linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] vmxnet3: fix compilation when RSS is disabled
@ 2010-11-27 20:33 Scott J. Goldman
  2010-11-27 20:33 ` [PATCH] " Scott J. Goldman
  0 siblings, 1 reply; 5+ messages in thread
From: Scott J. Goldman @ 2010-11-27 20:33 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-next; +Cc: pv-drivers, randy.dunlap

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] vmxnet3: fix compilation when RSS is disabled
  2010-11-27 20:33 [PATCH net-next] vmxnet3: fix compilation when RSS is disabled Scott J. Goldman
@ 2010-11-27 20:33 ` Scott J. Goldman
  2010-11-28 19:09   ` [Pv-drivers] " Bhavesh Davda
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Scott J. Goldman @ 2010-11-27 20:33 UTC (permalink / raw)
  To: netdev, linux-kernel, linux-next
  Cc: pv-drivers, randy.dunlap, Scott J. Goldman

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Pv-drivers] [PATCH] vmxnet3: fix compilation when RSS is disabled
  2010-11-27 20:33 ` [PATCH] " Scott J. Goldman
@ 2010-11-28 19:09   ` Bhavesh Davda
  2010-11-29  2:26   ` David Miller
  2010-11-29  3:07   ` Randy Dunlap
  2 siblings, 0 replies; 5+ messages in thread
From: Bhavesh Davda @ 2010-11-28 19:09 UTC (permalink / raw)
  To: Scott Goldman; +Cc: netdev, linux-kernel, linux-next, pv-drivers, randy.dunlap

Straightforward enough. Thanks for fixing this Scott!


On Nov 27, 2010, at 12:35 PM, "Scott J. Goldman" <scottjg@vmware.com> wrote:

> 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>

Reviewed-by: Bhavesh Davda <bhavesh@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
> 
> _______________________________________________
> Pv-drivers mailing list
> Pv-drivers@vmware.com
> http://mailman2.vmware.com/mailman/listinfo/pv-drivers

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] vmxnet3: fix compilation when RSS is disabled
  2010-11-27 20:33 ` [PATCH] " Scott J. Goldman
  2010-11-28 19:09   ` [Pv-drivers] " Bhavesh Davda
@ 2010-11-29  2:26   ` David Miller
  2010-11-29  3:07   ` Randy Dunlap
  2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-11-29  2:26 UTC (permalink / raw)
  To: scottjg; +Cc: netdev, linux-kernel, linux-next, pv-drivers, randy.dunlap

From: "Scott J. Goldman" <scottjg@vmware.com>
Date: Sat, 27 Nov 2010 12:33:55 -0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] vmxnet3: fix compilation when RSS is disabled
  2010-11-27 20:33 ` [PATCH] " Scott J. Goldman
  2010-11-28 19:09   ` [Pv-drivers] " Bhavesh Davda
  2010-11-29  2:26   ` David Miller
@ 2010-11-29  3:07   ` Randy Dunlap
  2 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2010-11-29  3:07 UTC (permalink / raw)
  To: Scott J. Goldman; +Cc: netdev, linux-kernel, linux-next, pv-drivers

On 11/27/10 12:33, Scott J. Goldman wrote:
> 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>

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

Thanks.

> ---
>  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)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-29  3:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-27 20:33 [PATCH net-next] vmxnet3: fix compilation when RSS is disabled Scott J. Goldman
2010-11-27 20:33 ` [PATCH] " Scott J. Goldman
2010-11-28 19:09   ` [Pv-drivers] " Bhavesh Davda
2010-11-29  2:26   ` David Miller
2010-11-29  3:07   ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).