diff options
| author | Vladimir Oltean <[email protected]> | 2021-07-26 19:55:28 +0300 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2021-07-26 22:35:22 +0100 |
| commit | f7cdb3ecc9b7f609082fc89e5b79d66858504899 (patch) | |
| tree | 4e8d3923ba7a25ab493627c052cc61c919afb105 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 9bff6684192347fcb4cd780f83f2394c5430ae88 (diff) | |
net: bridge: update BROPT_VLAN_ENABLED before notifying switchdev in br_vlan_filter_toggle
SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING is notified by the bridge from
two places:
- nbp_vlan_init(), during bridge port creation
- br_vlan_filter_toggle(), during a netlink/sysfs/ioctl change requested
by user space
If a switchdev driver uses br_vlan_enabled(br_dev) inside its handler
for the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING attribute notifier,
different things will be seen depending on whether the bridge calls from
the first path or the second:
- in nbp_vlan_init(), br_vlan_enabled() reflects the current state of
the bridge
- in br_vlan_filter_toggle(), br_vlan_enabled() reflects the past state
of the bridge
This can lead in some cases to complications in driver implementation,
which can be avoided if these could reliably use br_vlan_enabled().
Nothing seems to depend on this behavior, and it seems overall more
straightforward for br_vlan_enabled() to return the proper value even
during the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING notifier, so
temporarily enable the bridge option, then revert it if the switchdev
notifier failed.
Cc: Roopa Prabhu <[email protected]>
Cc: Nikolay Aleksandrov <[email protected]>
Cc: Ido Schimmel <[email protected]>
Cc: Jiri Pirko <[email protected]>
Signed-off-by: Vladimir Oltean <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions