[PATCH net-next] vmxnet3: fix compilation when RSS is disabled

Previous thread: Regression 2.6.36 - driver rtl8169 crashes kernel, triggered by user app by Michael Monnerie on Saturday, November 27, 2010 - 1:22 pm. (3 messages)

Next thread: [PATCH] arch/arm/kernel: use cpu_relax() in halt loops by =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= on Saturday, November 27, 2010 - 1:20 pm. (1 message)
From: Scott J. Goldman
Date: Saturday, November 27, 2010 - 1:33 pm

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

From: Scott J. Goldman
Date: Saturday, November 27, 2010 - 1:33 pm

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

Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethtool.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethtool.c b/drivers/net/vmxnet3/vmxnet3_ethtool.c
index 9ddaea6..8e17fc8 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethtool.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c
@@ -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)
-- 
1.7.0.4

--

From: Bhavesh Davda
Date: Sunday, November 28, 2010 - 12:09 pm

Straightforward enough. Thanks for fixing this Scott!



--

From: David Miller
Date: Sunday, November 28, 2010 - 7:26 pm

From: "Scott J. Goldman" <scottjg@vmware.com>

Applied.
--

From: Randy Dunlap
Date: Sunday, November 28, 2010 - 8:07 pm

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>



-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--

Previous thread: Regression 2.6.36 - driver rtl8169 crashes kernel, triggered by user app by Michael Monnerie on Saturday, November 27, 2010 - 1:22 pm. (3 messages)

Next thread: [PATCH] arch/arm/kernel: use cpu_relax() in halt loops by =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= on Saturday, November 27, 2010 - 1:20 pm. (1 message)