diff mbox

[RFC,NET-NEXT,2/2] net: Add GSO to vlan_features initialization

Message ID 4E0406BE.50900@cn.fujitsu.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Shan Wei June 24, 2011, 3:38 a.m. UTC
This patch is not a bug fix.
Just add GSO to vlan_features initialization, and update comments.


Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
 net/core/dev.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Comments

Ben Hutchings June 24, 2011, 4:51 p.m. UTC | #1
On Fri, 2011-06-24 at 11:38 +0800, Shan Wei wrote:
> This patch is not a bug fix.
> Just add GSO to vlan_features initialization, and update comments.
> 
> 
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> ---
>  net/core/dev.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 6b6ef14..becc1e5 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -5478,11 +5478,12 @@ int register_netdevice(struct net_device *dev)
>  		dev->features |= NETIF_F_NOCACHE_COPY;
>  	}
>  
> -	/* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
> -	 * vlan_dev_init() will do the dev->features check, so these features
> -	 * are enabled only if supported by underlying device.
> +	/* Enable GSO, GRO and NETIF_F_HIGHDMA for vlans by default,
> +	 * vlan_dev_fix_features() will do the features check,
> +	 * so NETIF_F_HIGHDMA feature is enabled only if supported
> +	 * by underlying device.
>  	 */
> -	dev->vlan_features |= (NETIF_F_GRO | NETIF_F_HIGHDMA);
> +	dev->vlan_features |= (NETIF_F_SOFT_FEATURES | NETIF_F_HIGHDMA);
>  
>  	ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev);
>  	ret = notifier_to_errno(ret);

Have you verified that GSO works correctly for VLAN devices if the
underlying device does not support VLAN tag insertion?
skb_gso_segment() has code to handle this case, but I suspect it's not
actually being exercised at the moment.

Ben.
Shan Wei June 28, 2011, 3:47 a.m. UTC | #2
Hi Ben:

Ben Hutchings wrote, at 06/25/2011 12:51 AM:
> Have you verified that GSO works correctly for VLAN devices if the
> underlying device does not support VLAN tag insertion?

OK. I will do some test in future days.
Then report test results.
diff mbox

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 6b6ef14..becc1e5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5478,11 +5478,12 @@  int register_netdevice(struct net_device *dev)
 		dev->features |= NETIF_F_NOCACHE_COPY;
 	}
 
-	/* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
-	 * vlan_dev_init() will do the dev->features check, so these features
-	 * are enabled only if supported by underlying device.
+	/* Enable GSO, GRO and NETIF_F_HIGHDMA for vlans by default,
+	 * vlan_dev_fix_features() will do the features check,
+	 * so NETIF_F_HIGHDMA feature is enabled only if supported
+	 * by underlying device.
 	 */
-	dev->vlan_features |= (NETIF_F_GRO | NETIF_F_HIGHDMA);
+	dev->vlan_features |= (NETIF_F_SOFT_FEATURES | NETIF_F_HIGHDMA);
 
 	ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev);
 	ret = notifier_to_errno(ret);