[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGVrzcbw9Z7=_v4pYf6nFFp6Nj6sTWX+ECC5+EYHh4i7eqo0BA@mail.gmail.com>
Date: Tue, 27 Aug 2013 12:04:56 +0100
From: Florian Fainelli <f.fainelli@...il.com>
To: Amos Kong <kongjianjun@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
Stephen Hemminger <stephen@...workplumber.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Vlad Yasevich <vyasevic@...hat.com>,
David Miller <davem@...emloft.net>
Subject: Re: [RFC PATCH] bridge: inherit slave devices needed_headroom
2013/8/23 Amos Kong <kongjianjun@...il.com>:
> On Tue, Aug 20, 2013 at 5:21 PM, Florian Fainelli <f.fainelli@...il.com> wrote:
>> Some slave devices may have set a dev->needed_headroom value which is
>> different than the default one, most likely in order to prepend a
>> hardware descriptor in front of the Ethernet frame to send. Whenever a
>> new slave is added to a bridge, ensure that we update the
>> needed_headroom value accordingly to account for the slave
>> needed_headroom value.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
>> ---
>> net/bridge/br_if.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
>> index aa6c9a8..c41d5fb 100644
>> --- a/net/bridge/br_if.c
>> +++ b/net/bridge/br_if.c
>> @@ -383,6 +383,9 @@ int br_add_if(struct net_bridge *br, struct net_device *dev)
>>
>> netdev_update_features(br->dev);
>>
>> + if (br->dev->needed_headroom < dev->needed_headroom)
>> + br->dev->needed_headroom = dev->needed_headroom;
>> +
>
> do we need to update 'br->dev->needed_headroom' in br_del_if()?
>
> if (br->dev->needed_headroom == dev->needed_headroom)
> br->dev->needed_headroom = ....;
In theory yes, we should recompute the minimum headroom which is
common to all bridge members. This is something that I want to address
separately though with the NETDEV_CHANGEROOM notifier.
--
Florian
--
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