diff options
| author | Petr Machata <petrm@mellanox.com> | 2018-12-07 14:55:07 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2018-12-07 15:59:08 -0500 |
| commit | 43920edf3b24b0a3d136019c816e84ffcbef83ab (patch) | |
| tree | fca00c929de803dcf1e8762ebda6bab60860a4c3 /include | |
| parent | e5ff4b1952893fb75aa75067fce31c8567341ed7 (diff) | |
bridge: Add br_fdb_clear_offload()
When a driver unoffloads all FDB entries en bloc, it's inefficient to
send the switchdev notification one by one. Add a helper that unsets the
offload flag on FDB entries on a given bridge port and VLAN.
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/if_bridge.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index ef7c3d376b21..627b788ba0ff 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h | |||
| @@ -119,6 +119,7 @@ static inline int br_vlan_get_info(const struct net_device *dev, u16 vid, | |||
| 119 | struct net_device *br_fdb_find_port(const struct net_device *br_dev, | 119 | struct net_device *br_fdb_find_port(const struct net_device *br_dev, |
| 120 | const unsigned char *addr, | 120 | const unsigned char *addr, |
| 121 | __u16 vid); | 121 | __u16 vid); |
| 122 | void br_fdb_clear_offload(const struct net_device *dev, u16 vid); | ||
| 122 | bool br_port_flag_is_set(const struct net_device *dev, unsigned long flag); | 123 | bool br_port_flag_is_set(const struct net_device *dev, unsigned long flag); |
| 123 | #else | 124 | #else |
| 124 | static inline struct net_device * | 125 | static inline struct net_device * |
| @@ -128,6 +129,11 @@ br_fdb_find_port(const struct net_device *br_dev, | |||
| 128 | { | 129 | { |
| 129 | return NULL; | 130 | return NULL; |
| 130 | } | 131 | } |
| 132 | |||
| 133 | static inline void br_fdb_clear_offload(const struct net_device *dev, u16 vid) | ||
| 134 | { | ||
| 135 | } | ||
| 136 | |||
| 131 | static inline bool | 137 | static inline bool |
| 132 | br_port_flag_is_set(const struct net_device *dev, unsigned long flag) | 138 | br_port_flag_is_set(const struct net_device *dev, unsigned long flag) |
| 133 | { | 139 | { |
