[ewg] Re: [PATCH] IB/ipoib: enhance ethtool support

Or Gerlitz ogerlitz at voltaire.com
Thu Oct 16 06:56:16 PDT 2008


IB/ipoib: improve ethtool support for older kernels

In non-recent kernels such as the ones used by RH5 the core networking ethtool
code doesn't apply the ethtool_op_get_xxx functions by default, so the driver
has to supply them. Without this patch ethtool -k on ipoib devices would print
wrong information eg:

# cat /sys/class/net/ib0/features
0x11423

# ethtool -k ib0
Offload parameters for ib0:
Cannot get device rx csum settings: Operation not supported
Cannot get device tx csum settings: Operation not supported
Cannot get device scatter-gather settings: Operation not supported
Cannot get device udp large send offload settings: Operation not supported
rx-checksumming: off
tx-checksumming: off
scatter-gather: off
tcp segmentation offload: on
udp fragmentation offload: off
generic segmentation offload: off

Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>

Index: linux-2.6.27/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
===================================================================
--- linux-2.6.27.orig/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ linux-2.6.27/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -129,7 +135,11 @@ static void ipoib_get_ethtool_stats(stru

 static const struct ethtool_ops ipoib_ethtool_ops = {
 	.get_drvinfo		= ipoib_get_drvinfo,
+	.get_tx_csum		= ethtool_op_get_tx_csum,
+	.get_sg			= ethtool_op_get_sg,
 	.get_tso		= ethtool_op_get_tso,
+	.get_ufo		= ethtool_op_get_ufo,
 	.get_coalesce		= ipoib_get_coalesce,
 	.set_coalesce		= ipoib_set_coalesce,
 	.get_flags		= ethtool_op_get_flags,



More information about the ewg mailing list