Thread (30 messages) 30 messages, 5 authors, 2017-06-14

Re: [patch net-next 06/19] net: bridge: Receive notification about successful FDB offload

flat view

From: Nikolay Aleksandrov <hidden>
Date: 2017-06-05 13:45:02

On 05/06/17 12:20, Jiri Pirko wrote:
From: Arkadi Sharshevsky <redacted>

When a new static FDB is added to the bridge a notification is sent to
the driver for offload. In case of successful offload the driver should
notify the bridge back, which in turn should mark the FDB as offloaded.

Currently, externally learned is equivalent for being offloaded which is
not correct due to the fact that FDBs which are added from user-space are
also marked as externally learned. In order to specify if an FDB was
successfully offloaded a new flag is introduced.

Signed-off-by: Arkadi Sharshevsky <redacted>
Reviewed-by: Ido Schimmel <redacted>
Signed-off-by: Jiri Pirko <redacted>
---
 include/net/switchdev.h        |  1 +
 include/uapi/linux/neighbour.h |  1 +
 net/bridge/br.c                | 11 ++++++++++-
 net/bridge/br_fdb.c            | 22 +++++++++++++++++++++-
 net/bridge/br_private.h        |  5 ++++-
 5 files changed, 37 insertions(+), 3 deletions(-)
Overall the patch looks good to me, one thing to note is that there's a race
window between the call to br_fdb_external_learn_add() and br_fdb_offloaded_set()
where a sw port can take over the entry (and thus set added_by_external_learn = 0)
but have br_fdb_offloaded_set() set its offloaded flag to 1. Now I know the bridge
generally has these known race conditions between fdb flag manipulations so just wanted
to mention it.

Reviewed-by: Nikolay Aleksandrov <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help