]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net/mlx4_en: Fix off-by-one in ethtool statistics display
authorEran Ben Elisha <eranbe@mellanox.com>
Wed, 18 Mar 2015 14:51:36 +0000 (16:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 12:59:34 +0000 (13:59 +0100)
[ Upstream commit a16f3565703cfc3094938fb3c979cbb90f6d9eb4 ]

NUM_PORT_STATS was 9 instead of 10, which caused off-by-one bug when
displaying the statistics starting from tx_chksum_offload in ethtool.

Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h

index 944a112dff374ef919a216e5ee13415b9f3974bd..8805ef1a4c7506e55fc4ccc3440e813da713c988 100644 (file)
@@ -451,7 +451,7 @@ struct mlx4_en_port_stats {
        unsigned long rx_chksum_none;
        unsigned long rx_chksum_complete;
        unsigned long tx_chksum_offload;
-#define NUM_PORT_STATS         9
+#define NUM_PORT_STATS         10
 };
 
 struct mlx4_en_perf_stats {