Thread (148 messages) 148 messages, 14 authors, 2014-12-09

Re: [patch net-next v3 02/17] net: make vid as a parameter for ndo_fdb_add/ndo_fdb_del

From: Scott Feldman <hidden>
Date: 2014-11-27 20:59:39

Ya right now the driver just doesn't call br_fdb_external_learn_add()
if LEARNING_SYNC is not set.  It's a port driver setting so it seems
fine to handle it in the port driver.  You could move the check up to
br_fdb_external_learn_add(), but then you have an extra call every 1s
for each fdb entry being refreshed.  (1s or whatever the refresh
frequency is).  Easier to avoid this overhead and make the decision at
the source.

-scott

On Thu, Nov 27, 2014 at 2:14 AM, Jamal Hadi Salim [off-list ref] wrote:
On 11/27/14 01:50, Scott Feldman wrote:

[..]
quoted
It's there: IFLA_BRPORT_LEARNING_SYNC.  From iproute2:

$ bridge -d link show dev swp1
2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
master br0 state forwarding priority 32 cost 2
     hairpin off guard off root_block off fastleave off learning off flood
off
2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master
br0
     learning on learning_sync on hwmode swdev

Turn it off:

$ bridge link set dev swp1 hwmode swdev learning_sync off

And now:

$ bridge -d link show dev swp1
2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
master br0 state forwarding priority 32 cost 2
     hairpin off guard off root_block off fastleave off learning off flood
off
2: swp1 state UNKNOWN : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 master
br0
     learning on learning_sync off hwmode swdev
Yes, this is the nice control portion.
From reviewing the patches, I didnt see how the core to the driver was
using the  learning_sync. IOW, how do i turn off the drivers sync
from being activated? Maybe you are doing this in the rocker patches
which i didnt review? i think this needs to be core infrastructure i.e
if you are doing this in a timer (as opposed to interrupt driven), then
the core sync timer would kick in and call some driver ops.
In any case, details that can be ironed out later..

cheers,
jamal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help