Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354315

[RFC PATCH net-next 0/2] net: switchdev: add attribute for port bridging

From Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Newsgroups linux.kernel
Subject [RFC PATCH net-next 0/2] net: switchdev: add attribute for port bridging
Date 2016-03-09 18:50 +0100
Message-ID <raQpc-2UT-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Current switchdev users implement notifier blocks to filter global netdev
events, in order to correctly offload bridging to their hardware ports.

Such code could be replaced with the support of a simple switchdev attribute
set when adding/deleting a port to/from a bridge.

Also, we can imagine a switch driver or network layer wanting to restrict the
number of logical bridges on top of a physical device. That could be done by
returning -EOPNOTSUPP when setting such attribute.

The first patch adds a new SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF switchdev attribute
containing a boolean, set when joining or leaving a bridge.

The second patch shows the benefit of supporting such attribute in the DSA
layer. Similar change should be doable to other switchdev users, like Rocker.

Note: I send this as an RFC since I am not really sure about the attribute
flags, and the exact place to set it in del_nbp(). Comments needed :-)

Thanks,

Vivien Didelot (2):
  net: bridge: add switchdev attr for port bridging
  net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF

 include/net/switchdev.h |   2 +
 net/bridge/br_if.c      |  27 ++++++++++++
 net/dsa/dsa.c           |   7 ---
 net/dsa/dsa_priv.h      |   2 -
 net/dsa/slave.c         | 113 +++++++++++++-----------------------------------
 5 files changed, 59 insertions(+), 92 deletions(-)

-- 
2.7.2

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[RFC PATCH net-next 0/2] net: switchdev: add attribute for port bridging Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 18:50 +0100
  [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for port bridging Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 18:50 +0100
    Re: [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for port  bridging Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-03-09 20:30 +0100
    Re: [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for  port bridging Ido Schimmel <idosch@mellanox.com> - 2016-03-09 22:50 +0100
      Re: [RFC PATCH net-next 1/2] net: bridge: add switchdev attr for port bridging Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-10 00:00 +0100
  [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 18:50 +0100
    Re: [RFC PATCH net-next 2/2] net: dsa: support  SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Andrew Lunn <andrew@lunn.ch> - 2016-03-09 19:40 +0100
      Re: [RFC PATCH net-next 2/2] net: dsa: support  SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Jiri Pirko <jiri@resnulli.us> - 2016-03-09 20:30 +0100
        Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 23:20 +0100
      Re: [RFC PATCH net-next 2/2] net: dsa: support SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-03-09 20:40 +0100
        Re: [RFC PATCH net-next 2/2] net: dsa: support  SWITCHDEV_ATTR_ID_PORT_BRIDGE_IF Andrew Lunn <andrew@lunn.ch> - 2016-03-09 21:10 +0100

csiph-web