[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1383407176.2764.17.camel@deadeye.wl.decadent.org.uk>
Date: Sat, 2 Nov 2013 15:46:16 +0000
From: Ben Hutchings <bhutchings@...arflare.com>
To: Eric Dumazet <eric.dumazet@...il.com>
CC: David Miller <davem@...emloft.net>,
<christoph.paasch@...ouvain.be>, <herbert@...dor.apana.org.au>,
<netdev@...r.kernel.org>, <hkchu@...gle.com>, <mwdalton@...gle.com>
Subject: Re: [PATCH v3 net-next] net: introduce dev_set_forwarding()
On Sat, 2013-11-02 at 07:01 -0700, Eric Dumazet wrote:
[...]
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
[...]
> -void dev_disable_lro(struct net_device *dev)
> +void dev_set_forwarding(struct net_device *dev, int inc)
> {
> /*
> - * If we're trying to disable lro on a vlan device
> + * If we're trying to enable forwarding from a vlan device
> * use the underlying physical device instead
> */
> if (is_vlan_dev(dev))
> dev = vlan_dev_real_dev(dev);
>
> - dev->wanted_features &= ~NETIF_F_LRO;
> + dev->forwarding_count += inc;
> + if (dev->forwarding_count)
> + dev->wanted_features &= ~NETIF_F_LRO;
> + else
> + dev->wanted_features |= NETIF_F_LRO;
> netdev_update_features(dev);
[...]
We should not change dev->wanted_features any more. It should only be
set as requested by userland.
Instead, netdev_update_features() should mask out NETIF_F_LRO based on
dev->forwarding_count.
Ben.
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists