netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] net: bridge: Notify about bridge VLANs
@ 2018-05-28 10:49 Petr Machata
  2018-05-28 10:49 ` [PATCH net-next v2 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*() Petr Machata
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Petr Machata @ 2018-05-28 10:49 UTC (permalink / raw)
  To: netdev, devel, bridge
  Cc: f.fainelli, andrew, nikolay, gregkh, vivien.didelot, idosch, jiri,
	razvan.stefanescu, davem

In commit 946a11e7408e ("mlxsw: spectrum_span: Allow bridge for gretap
mirror"), mlxsw got support for offloading mirror-to-gretap such that
the underlay packet path involves a bridge. In that case, the offload is
also influenced by PVID setting of said bridge. However, changes to VLAN
configuration of the bridge itself do not generate switchdev
notifications, so there's no mechanism to prod mlxsw to update the
offload when these settings change.

In this patchset, the problem is resolved by distributing the switchdev
notification SWITCHDEV_OBJ_ID_PORT_VLAN also for configuration changes
on bridge VLANs. Since stacked devices distribute the notification to
lower devices, such event eventually reaches the driver, which can
determine whether it's a bridge or port VLAN by inspecting orig_dev.

To keep things consistent, the newly-distributed notifications observe
the same protocol as the existing ones: dual prepare/commit, with
-EOPNOTSUPP indicating lack of support, even though there's currently
nothing to prepare for and nothing to support. Correspondingly, all
switchdev drivers have been updated to return -EOPNOTSUPP for bridge
VLAN notifications.

In patch #1, the code to send notifications for adding and deleting is
factored out into two named functions.

In patches #2-#5, respectively for mlxsw, rocker, DSA and DPAA2 ethsw,
the new notifications (which are not enabled yet) are ignored to
maintain the current behavior.

In patch #6, the notification is actually enabled.

In patch #7, mlxsw is changed to update offloads of mirror-to-gre also
for bridge-related notifications.

Changes from v1 to v2:

- Rename br_switchdev_port_obj_add() and br_switchdev_port_obj_del() to
  br_switchdev_port_vlan_add() and br_switchdev_port_vlan_del(), and
  move from br_vlan.c to br_switchdev.c.

Petr Machata (7):
  net: bridge: Extract boilerplate around switchdev_port_obj_*()
  mlxsw: spectrum_switchdev: Ignore bridge VLAN events
  rocker: rocker_main: Ignore bridge VLAN events
  dsa: port: Ignore bridge VLAN events
  staging: fsl-dpaa2: ethsw: Ignore bridge VLAN events
  net: bridge: Notify about bridge VLANs
  mlxsw: spectrum_switchdev: Schedule respin during trans prepare

 .../ethernet/mellanox/mlxsw/spectrum_switchdev.c   |  8 +++-
 drivers/net/ethernet/rocker/rocker_main.c          |  6 +++
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c            |  6 +++
 net/bridge/br_private.h                            |  3 ++
 net/bridge/br_switchdev.c                          | 25 ++++++++++++
 net/bridge/br_vlan.c                               | 45 +++++++++-------------
 net/dsa/port.c                                     |  6 +++
 7 files changed, 71 insertions(+), 28 deletions(-)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-05-29 14:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-28 10:49 [PATCH net-next v2 0/7] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-28 10:49 ` [PATCH net-next v2 1/7] net: bridge: Extract boilerplate around switchdev_port_obj_*() Petr Machata
2018-05-28 13:39   ` Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 2/7] mlxsw: spectrum_switchdev: Ignore bridge VLAN events Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 3/7] rocker: rocker_main: " Petr Machata
2018-05-29 10:25   ` Ilias Apalodimas
2018-05-29 14:37     ` Petr Machata
2018-05-29 14:44       ` Ilias Apalodimas
2018-05-28 10:50 ` [PATCH net-next v2 4/7] dsa: port: " Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 5/7] staging: fsl-dpaa2: ethsw: " Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 6/7] net: bridge: Notify about bridge VLANs Petr Machata
2018-05-28 10:50 ` [PATCH net-next v2 7/7] mlxsw: spectrum_switchdev: Schedule respin during trans prepare Petr Machata

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).