lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE4R7bCASKHmZD+tiu=ZWM9dzvTrSLsaXxgtOYLpsmOR87kcTQ@mail.gmail.com>
Date:	Wed, 4 Feb 2015 23:13:07 -0800
From:	Scott Feldman <sfeldma@...il.com>
To:	roopa <roopa@...ulusnetworks.com>
Cc:	Siva Mannem <siva.mannem.lnx@...il.com>,
	Netdev <netdev@...r.kernel.org>,
	Scott Feldman <sfeldma@...ulusnetworks.com>,
	Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH net-next] bridge: Let bridge not age 'externally' learnt
 FDB entries, they are removed when 'external' entity notifies the aging

On Wed, Feb 4, 2015 at 8:19 AM, roopa <roopa@...ulusnetworks.com> wrote:
> On 2/4/15, 12:02 AM, Siva Mannem wrote:
>>
>> On Tue, Feb 3, 2015 at 8:41 PM, roopa <roopa@...ulusnetworks.com> wrote:
>>>
>>> On 2/2/15, 9:21 AM, Siva Mannem wrote:
>>>>
>>>>    When 'learned_sync' flag is turned on, the offloaded switch
>>>>    port syncs learned MAC addresses to bridge's FDB via switchdev
>>>> notifier
>>>>    (NETDEV_SWITCH_FDB_ADD). Currently, FDB entries learnt via this
>>>> mechanism are
>>>>    wrongly being deleted by bridge aging logic. This patch ensures that
>>>> FDB
>>>>    entries synced from offloaded switch ports are not deleted by
>>>> bridging
>>>> logic.
>>>>    Such entries can only be deleted via switchdev notifier
>>>>    (NETDEV_SWITCH_FDB_DEL).
>>>
>>>
>>> Your patch seems right and maintains symmetry for fdb add/del of
>>> externally
>>> learnt entries.
>>> However, this could be made configurable. I think some drivers may rely
>>> on
>>> bridge driver aging these entries (The default setting needs more
>>> thought).
>>> I am not sure what rocker does (CC'ed rocker maintainers). But, our
>>> driver
>>> does rely on the bridge driver aging these entries by default.
>>
>> added_by_external_learn flag is only set for entries learned via
>> switchdev notifier
>> (NETDEV_SWITCH_FDB_ADD) and rocker is the only driver using these
>> notifiers.
>>   I see that rocker is deleting the entries via switchdev notifier
>> (NETDEV_SWITCH_FDB_DEL).
>> This mechanism is only used by drivers when learned_sync is turned on by
>> user.
>>
>> $ sudo bridge link set dev swp1 learning_sync on self
>>
>> Am I missing something here?
>
> I know that its enabled by an external flag. I wasn't sure rocker was doing
> a del
> or was relying on the bridge driver to age those entries (hence the CC to
> rocker maintainers).
> And, my only point was its valid in some cases for the switch driver to rely
> on bridge driver ageing those entries.
> For symmetry, your patch seems right.

No, not right.  Drats, email was sent to the wrong address for me.
Thanks Roopa for trying to keep me in the loop.

We want the bridge's aging logic to age out these externally learned
entries, just like it would age out internally learned entries.

I'd like to see this patch reverted so we can have a more
comprehensive discussion/solution.  With this patch applied, the only
user (rocker) of NETDEV_SWITCH_FDB_ADD is broken.  So please undo this
patch so rocker isn't broken and let's work on a knob to suit both
modes: 1) let bridge manage aging, 2) let device manage aging.

-scott
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ