Subject: Re: [patch net-next v2 08/10] bridge: add API to notify bridge driver of learned FBD on offloaded device

From: Roopa Prabhu <[email-masked]>
Date: Tue, 11 Nov 2014 13:43:26 -0800

On 11/11/14, 9:38 AM, Scott Feldman wrote:
> On Tue, Nov 11, 2014 at 4:21 AM, Roopa Prabhu <[email-masked]> wrote:
>> On 11/9/14, 2:51 AM, Jiri Pirko wrote:
>>> From: Scott Feldman <[email-masked]>
>>>
>>> When the swdev device learns a new mac/vlan on a port, it sends some async
>>> notification to the driver and the driver installs an FDB in the device.
>>> To give a holistic system view, the learned mac/vlan should be reflected
>>> in the bridge's FBD table, so the user, using normal iproute2 cmds, can
>>> view
>>> what is currently learned by the device.  This API on the bridge driver
>>> gives
>>> a way for the swdev driver to install an FBD entry in the bridge FBD
>>> table.
>>> (And remove one).
>>>
>>> This is equivalent to the device running these cmds:
>>>
>>>     bridge fdb [add|del] <mac> dev <dev> vid <vlan id> master
>>>
>>> This patch needs some extra eyeballs for review, in paricular around the
>>> locking and contexts.
>>
>> scott/jiri, love that you have handled this case!, This will be useful.
>> But, quick question, Cant this also be done using the same ndo_op that is
>> done to add the static fdb..?
> Maybe.  I think I tried sending netlink msg from swdev driver to
> bridge driver, but wasn't able to make it to work.  I'm not sure if
> it's possible to do that, in general, send netlink kernel-to-kernel.
> The other option is to synthesize a netlink msg with needed attrs and
> call ndo in bridge directly.  That feels a little yucky to me.
ok.
If i understand correctly this is just an api that drivers can use if 
they want to push learnt fdb
entries to the fdb associated with the bridge.  So, the learn 
sync-hw-fdb behavior is switch driver dependent. If the switch driver
allows learning on a port, she can use this api to sync learnt entries 
to the kernel.

How do the policy flags (That jamal and you were discussing on the other 
thread) apply here ?
SYNC_HW_FDB  ?...will this flag be needed...?. I am just trying to see 
how this api relates to the other thread.

Thanks,
Roopa