Message ID | 1285238771.2864.38.camel@edumazet-laptop |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
> > Automatically allows vlans to get NETIF_F_HIGHDMA if underlying device > supports it. > > On 32bit arches (and more precisely if CONFIG_HIGHMEM is enabled), it > can help to reduce cost of illegal_highdma() and __skb_linearize() > calls. > > Tested on tg3 , bnx2, bonding, this worked very well. > > This is a generalization of a patch provided by Yi Zou & Jeff Kirsher. > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> > --- > net/core/dev.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/net/core/dev.c b/net/core/dev.c > index 2c7934f..e0c0b86 100644 > --- a/net/core/dev.c > +++ b/net/core/dev.c > @@ -5058,10 +5058,11 @@ int register_netdevice(struct net_device *dev) > if (dev->features & NETIF_F_SG) > dev->features |= NETIF_F_GSO; > > - /* Enable GRO for vlans by default if dev->features has GRO also. > - * vlan_dev_init() will do the dev->features check. > + /* 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. > */ > - dev->vlan_features |= NETIF_F_GRO; > + dev->vlan_features |= (NETIF_F_GRO | NETIF_F_HIGHDMA); > > ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev); > ret = notifier_to_errno(ret); > Cool, thanks for taking care of this, Eric. -yi
From: Eric Dumazet <eric.dumazet@gmail.com> Date: Thu, 23 Sep 2010 12:46:11 +0200 > Automatically allows vlans to get NETIF_F_HIGHDMA if underlying device > supports it. > > On 32bit arches (and more precisely if CONFIG_HIGHMEM is enabled), it > can help to reduce cost of illegal_highdma() and __skb_linearize() > calls. > > Tested on tg3 , bnx2, bonding, this worked very well. > > This is a generalization of a patch provided by Yi Zou & Jeff Kirsher. > > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Applied, thanks Eric. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/core/dev.c b/net/core/dev.c index 2c7934f..e0c0b86 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5058,10 +5058,11 @@ int register_netdevice(struct net_device *dev) if (dev->features & NETIF_F_SG) dev->features |= NETIF_F_GSO; - /* Enable GRO for vlans by default if dev->features has GRO also. - * vlan_dev_init() will do the dev->features check. + /* 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. */ - dev->vlan_features |= NETIF_F_GRO; + dev->vlan_features |= (NETIF_F_GRO | NETIF_F_HIGHDMA); ret = call_netdevice_notifiers(NETDEV_POST_INIT, dev); ret = notifier_to_errno(ret);
Automatically allows vlans to get NETIF_F_HIGHDMA if underlying device supports it. On 32bit arches (and more precisely if CONFIG_HIGHMEM is enabled), it can help to reduce cost of illegal_highdma() and __skb_linearize() calls. Tested on tg3 , bnx2, bonding, this worked very well. This is a generalization of a patch provided by Yi Zou & Jeff Kirsher. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> --- net/core/dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html