Skip to contentSkip to conversation

vmxnet3: fix compilation when RSS is disabled

PATCH New Scott J. Goldman 4 participants 5 messages Nov 27, 2010 – Nov 29, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vmxnet3: fix compilation when RSS is disabled

Since this was reported on linux-next, we may want to merge it there too.

#1 lore raw

PATCH 1/1 vmxnet3: fix compilation when RSS is disabled

If RSS is disabled, we can ifdef out some RSS specific code. This fixes the compile error found by Randy Dunlap.

---
 drivers/net/vmxnet3/vmxnet3_ethtool.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/vmxnet3/vmxnet3_ethtool.c +4 -1
index 9ddaea6..8e17fc8 100644
@@ -553,7 +553,7 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info,
 	return -EOPNOTSUPP;
 }
 
-
+#ifdef VMXNET3_RSS
 static int
 vmxnet3_get_rss_indir(struct net_device *netdev,
 		      struct ethtool_rxfh_indir *p)
@@ -598,6 +598,7 @@ vmxnet3_set_rss_indir(struct net_device *netdev,
 	return 0;
 
 }
+#endif
 
 static struct ethtool_ops vmxnet3_ethtool_ops = {
 	.get_settings      = vmxnet3_get_settings,
@@ -623,8 +624,10 @@ static struct ethtool_ops vmxnet3_ethtool_ops = {
 	.get_ringparam     = vmxnet3_get_ringparam,
 	.set_ringparam     = vmxnet3_set_ringparam,
 	.get_rxnfc         = vmxnet3_get_rxnfc,
+#ifdef VMXNET3_RSS
 	.get_rxfh_indir    = vmxnet3_get_rss_indir,
 	.set_rxfh_indir    = vmxnet3_set_rss_indir,
+#endif
 };
 
 void vmxnet3_set_ethtool_ops(struct net_device *netdev)
Signature · 1 line
1.7.0.4
Reviewed-by on v1 1/1
#2 lore raw

Straightforward enough. Thanks for fixing this Scott!

Quoted 4 lines · Scott J. Goldman

If RSS is disabled, we can ifdef out some RSS specific code. This fixes the compile error found by Randy Dunlap.

Quoted 43 lines

---
drivers/net/vmxnet3/vmxnet3_ethtool.c | 5 ++++-

1 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/vmxnet3/vmxnet3_ethtool.c +1 -1
index 9ddaea6..8e17fc8 100644
@@ -553,7 +553,7 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info,
   return -EOPNOTSUPP;
 }
 
-
+#ifdef VMXNET3_RSS

static int
vmxnet3_get_rss_indir(struct net_device *netdev,
struct ethtool_rxfh_indir *p)

drivers/net/vmxnet3/vmxnet3_ethtool.c +3 -0
@@ -598,6 +598,7 @@ vmxnet3_set_rss_indir(struct net_device *netdev,
   return 0;
 
 }
+#endif
 
 static struct ethtool_ops vmxnet3_ethtool_ops = {
   .get_settings      = vmxnet3_get_settings,
@@ -623,8 +624,10 @@ static struct ethtool_ops vmxnet3_ethtool_ops = {
   .get_ringparam     = vmxnet3_get_ringparam,
   .set_ringparam     = vmxnet3_set_ringparam,
   .get_rxnfc         = vmxnet3_get_rxnfc,
+#ifdef VMXNET3_RSS
   .get_rxfh_indir    = vmxnet3_get_rss_indir,
   .set_rxfh_indir    = vmxnet3_set_rss_indir,
+#endif
 };
 
 void vmxnet3_set_ethtool_ops(struct net_device *netdev)
Signature · 6 lines
1.7.0.4

_______________________________________________
Pv-drivers mailing list
[email protected]
http://mailman2.vmware.com/mailman/listinfo/pv-drivers
Acked-by on v1 1/1
#4 lore raw
In reply to Scott J. Goldman
Quoted 4 lines · Scott J. Goldman

If RSS is disabled, we can ifdef out some RSS specific code. This fixes the compile error found by Randy Dunlap.

Thanks.

Quoted 36 lines
---
 drivers/net/vmxnet3/vmxnet3_ethtool.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/vmxnet3/vmxnet3_ethtool.c +4 -1
index 9ddaea6..8e17fc8 100644
@@ -553,7 +553,7 @@ vmxnet3_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *info,
 	return -EOPNOTSUPP;
 }
 
-
+#ifdef VMXNET3_RSS
 static int
 vmxnet3_get_rss_indir(struct net_device *netdev,
 		      struct ethtool_rxfh_indir *p)
@@ -598,6 +598,7 @@ vmxnet3_set_rss_indir(struct net_device *netdev,
 	return 0;
 
 }
+#endif
 
 static struct ethtool_ops vmxnet3_ethtool_ops = {
 	.get_settings      = vmxnet3_get_settings,
@@ -623,8 +624,10 @@ static struct ethtool_ops vmxnet3_ethtool_ops = {
 	.get_ringparam     = vmxnet3_get_ringparam,
 	.set_ringparam     = vmxnet3_set_ringparam,
 	.get_rxnfc         = vmxnet3_get_rxnfc,
+#ifdef VMXNET3_RSS
 	.get_rxfh_indir    = vmxnet3_get_rss_indir,
 	.set_rxfh_indir    = vmxnet3_set_rss_indir,
+#endif
 };
 
 void vmxnet3_set_ethtool_ops(struct net_device *netdev)
Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***