All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH 1/2] net: vlan: enable GSO by default
@ 2011-06-24  3:38 Shan Wei
  2011-07-05  9:35 ` Shan Wei
  0 siblings, 1 reply; 3+ messages in thread
From: Shan Wei @ 2011-06-24  3:38 UTC (permalink / raw)
  To: 单卫, Patrick McHardy, David Miller, netdev

Currently, GSO for vlan device is off, and can't be set to on.
Although underlying device don't support TSO, we still
should use software segments for vlan device.

In vlan_dev_fix_features(), final features is decided by
features of real device and vlan_features of real device.

real_dev->vlan_features is initialized in register_netdevice()
only with NETIF_F_GRO, not NETIF_F_GSO.

So, now GRO is ok, but GSO is broken by default.


Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
 net/8021q/vlan_dev.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 1c9aa8c..d8f45ba 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -588,9 +588,14 @@ static void vlan_dev_uninit(struct net_device *dev)
 static u32 vlan_dev_fix_features(struct net_device *dev, u32 features)
 {
 	struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
+	u32 old_features = features;
 
 	features &= real_dev->features;
 	features &= real_dev->vlan_features;
+
+	if (old_features & NETIF_F_SOFT_FEATURES)
+		features |= old_features & NETIF_F_SOFT_FEATURES;
+
 	if (dev_ethtool_get_rx_csum(real_dev))
 		features |= NETIF_F_RXCSUM;
 	features |= NETIF_F_LLTX;
-- 
1.7.4.1

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

* Re: [RFC][PATCH 1/2] net: vlan: enable GSO by default
  2011-06-24  3:38 [RFC][PATCH 1/2] net: vlan: enable GSO by default Shan Wei
@ 2011-07-05  9:35 ` Shan Wei
  2011-07-05 10:08   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Shan Wei @ 2011-07-05  9:35 UTC (permalink / raw)
  To: Shan Wei
  Cc: Patrick McHardy, David Miller, netdev, Michał Mirosław,
	Ben Hutchings

Ping....

Shan Wei wrote, at 06/24/2011 11:38 AM:
> Currently, GSO for vlan device is off, and can't be set to on.
> Although underlying device don't support TSO, we still
> should use software segments for vlan device.
> 
> In vlan_dev_fix_features(), final features is decided by
> features of real device and vlan_features of real device.
> 
> real_dev->vlan_features is initialized in register_netdevice()
> only with NETIF_F_GRO, not NETIF_F_GSO.
> 
> So, now GRO is ok, but GSO is broken by default.
> 
> 
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> ---
>  net/8021q/vlan_dev.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
> index 1c9aa8c..d8f45ba 100644
> --- a/net/8021q/vlan_dev.c
> +++ b/net/8021q/vlan_dev.c
> @@ -588,9 +588,14 @@ static void vlan_dev_uninit(struct net_device *dev)
>  static u32 vlan_dev_fix_features(struct net_device *dev, u32 features)
>  {
>  	struct net_device *real_dev = vlan_dev_info(dev)->real_dev;
> +	u32 old_features = features;
>  
>  	features &= real_dev->features;
>  	features &= real_dev->vlan_features;
> +
> +	if (old_features & NETIF_F_SOFT_FEATURES)
> +		features |= old_features & NETIF_F_SOFT_FEATURES;
> +
>  	if (dev_ethtool_get_rx_csum(real_dev))
>  		features |= NETIF_F_RXCSUM;
>  	features |= NETIF_F_LLTX;


-- 

Best Regards
-----
Shan Wei

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

* Re: [RFC][PATCH 1/2] net: vlan: enable GSO by default
  2011-07-05  9:35 ` Shan Wei
@ 2011-07-05 10:08   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-07-05 10:08 UTC (permalink / raw)
  To: shanwei; +Cc: kaber, netdev, mirq-linux, bhutchings

From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Tue, 05 Jul 2011 17:35:31 +0800

> Ping....

I hope you're not waiting for something from me.  If you mean for me
to seriously review and apply this patch, resubmit it without "RFC" in
subject.

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

end of thread, other threads:[~2011-07-05 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-24  3:38 [RFC][PATCH 1/2] net: vlan: enable GSO by default Shan Wei
2011-07-05  9:35 ` Shan Wei
2011-07-05 10:08   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.