diff options
author | Arkadi Sharshevsky <arkadis@mellanox.com> | 2017-06-08 09:44:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-08 21:16:25 +0300 |
commit | 9fe8bcec0dbc19604acc3a2cd469febf96f0d59a (patch) | |
tree | 58770ae1985708089c1fa1992d14a95f388cbe86 /net/bridge/br_private.h | |
parent | 6b26b51b1d13c62a09f55d745b06a8e964900715 (diff) | |
download | linux-9fe8bcec0dbc19604acc3a2cd469febf96f0d59a.tar.xz |
net: bridge: Receive notification about successful FDB offload
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 <arkadis@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r-- | net/bridge/br_private.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 98410ea032cb..c18682f804a0 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -169,7 +169,8 @@ struct net_bridge_fdb_entry { unsigned char is_local:1, is_static:1, added_by_user:1, - added_by_external_learn:1; + added_by_external_learn:1, + offloaded:1; /* write-heavy members should not affect lookups */ unsigned long updated ____cacheline_aligned_in_smp; @@ -536,6 +537,8 @@ int br_fdb_external_learn_add(struct net_bridge *br, struct net_bridge_port *p, const unsigned char *addr, u16 vid); int br_fdb_external_learn_del(struct net_bridge *br, struct net_bridge_port *p, const unsigned char *addr, u16 vid); +void br_fdb_offloaded_set(struct net_bridge *br, struct net_bridge_port *p, + const unsigned char *addr, u16 vid); /* br_forward.c */ enum br_pkt_type { |