netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: support switchdev FDB objects
@ 2015-08-06  5:44 Vivien Didelot
  2015-08-06  5:44 ` [PATCH net-next v2 1/7] net: switchdev: change fdb addr for a byte array Vivien Didelot
                   ` (7 more replies)
  0 siblings, 8 replies; 24+ messages in thread
From: Vivien Didelot @ 2015-08-06  5:44 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Guenter Roeck, Andrew Lunn,
	Florian Fainelli, Scott Feldman, Jiri Pirko, Vivien Didelot

This patchset refactors the DSA and mv88e6xxx code to use the switchdev FDB
objects.

The first two patches add minor but necessary changes to switchdev, the third
one implements the switchdev glue in DSA for FDB routines, and the remaining
ones refactor the FDB access functions in the mv88e6xxx code.

Below is an usage example (ports 0-2 belongs to br0, ports 3-4 belongs to br1):

    # bridge fdb add 3c:97:0e:11:30:6e dev swp2
    # bridge fdb add 3c:97:0e:11:40:78 dev swp3
    # bridge fdb add 3c:97:0e:11:50:86 dev swp4
    # bridge fdb del 3c:97:0e:11:40:78 dev swp3
    # bridge fdb
    01:00:5e:00:00:01 dev eth0 self permanent
    01:00:5e:00:00:01 dev eth1 self permanent
    00:50:d2:10:78:15 dev swp0 master br0 permanent
    3c:97:0e:11:30:6e dev swp2 self static
    00:50:d2:10:78:15 dev swp3 master br1 permanent
    3c:97:0e:11:50:86 dev swp4 self static
    # cat /sys/kernel/debug/dsa0/atu
    # DB   T/P  Vec State Addr
    # 001  Port 004   e   3c:97:0e:11:30:6e
    # 004  Port 010   e   3c:97:0e:11:50:86

For the 88E6xxx switches, FIDs 1 to num_ports will be reserved for non-bridged
ports and bridge groups, and the remaining will be later used by VLANs.

This change is necessary to welcome the support for hardware VLANs (which will
follow soon).

Changes in v2:

 - remove ndo_bridge_{get,set,del}link from switchdev/DSA glue code

 - use ether_addr_copy instead of memcpy for MAC addresses

 - constify MAC address in port_fdb_{add,del}

 - split the mv88e6xxx code refactoring into several patches

Vivien Didelot (7):
  net: switchdev: change fdb addr for a byte array
  net: switchdev: support static FDB addresses
  net: dsa: add support for switchdev FDB objects
  net: dsa: mv88e6xxx: extend fid mask
  net: dsa: mv88e6xxx: rename ATU MAC accessors
  net: dsa: mv88e6xxx: rework FDB getnext operation
  net: dsa: mv88e6xxx: rework FDB add/del operations

 drivers/net/dsa/mv88e6171.c          |   6 +-
 drivers/net/dsa/mv88e6352.c          |   6 +-
 drivers/net/dsa/mv88e6xxx.c          | 223 ++++++++++++++++++++++++-----------
 drivers/net/dsa/mv88e6xxx.h          |  31 +++--
 drivers/net/ethernet/rocker/rocker.c |   2 +-
 include/net/dsa.h                    |  16 ++-
 include/net/switchdev.h              |   3 +-
 net/bridge/br_fdb.c                  |   2 +-
 net/dsa/slave.c                      | 218 ++++++++++++++++++----------------
 net/switchdev/switchdev.c            |   7 +-
 10 files changed, 317 insertions(+), 197 deletions(-)

-- 
2.4.6

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

end of thread, other threads:[~2015-08-11 20:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06  5:44 [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: support switchdev FDB objects Vivien Didelot
2015-08-06  5:44 ` [PATCH net-next v2 1/7] net: switchdev: change fdb addr for a byte array Vivien Didelot
2015-08-06  5:44 ` [PATCH net-next v2 2/7] net: switchdev: support static FDB addresses Vivien Didelot
2015-08-06  6:28   ` Scott Feldman
2015-08-06 14:19     ` Vivien Didelot
2015-08-06 16:37       ` Scott Feldman
2015-08-06  5:44 ` [PATCH net-next v2 3/7] net: dsa: add support for switchdev FDB objects Vivien Didelot
2015-08-06 14:04   ` Andrew Lunn
2015-08-06 14:52     ` Vivien Didelot
2015-08-06  5:44 ` [PATCH net-next v2 4/7] net: dsa: mv88e6xxx: extend fid mask Vivien Didelot
2015-08-06  5:44 ` [PATCH net-next v2 5/7] net: dsa: mv88e6xxx: rename ATU MAC accessors Vivien Didelot
2015-08-06  5:44 ` [PATCH net-next v2 6/7] net: dsa: mv88e6xxx: rework FDB getnext operation Vivien Didelot
2015-08-06  5:44 ` [PATCH net-next v2 7/7] net: dsa: mv88e6xxx: rework FDB add/del operations Vivien Didelot
2015-08-10  5:48 ` [PATCH net-next v2 0/7] net: dsa: mv88e6xxx: support switchdev FDB objects David Miller
2015-08-10 13:39   ` Vivien Didelot
2015-08-11 16:25     ` Vivien Didelot
2015-08-11 17:38       ` David Miller
2015-08-11 18:03         ` Florian Fainelli
2015-08-11 18:07           ` David Miller
2015-08-11 18:18             ` Vivien Didelot
2015-08-11 18:52               ` David Miller
2015-08-11 19:00                 ` David Miller
2015-08-11 19:05                   ` David Miller
2015-08-11 20:10                     ` Vivien Didelot

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).