linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/16] net: dsa: turn arrays of ports into a list
@ 2019-10-20  3:19 Vivien Didelot
  2019-10-20  3:19 ` [PATCH net-next 01/16] net: dsa: use dsa_to_port helper everywhere Vivien Didelot
                   ` (16 more replies)
  0 siblings, 17 replies; 44+ messages in thread
From: Vivien Didelot @ 2019-10-20  3:19 UTC (permalink / raw)
  To: David S. Miller
  Cc: linux-kernel, Vivien Didelot, Florian Fainelli, Andrew Lunn, netdev

The dsa_switch structure represents the physical switch device itself,
and is allocated by the driver. The dsa_switch_tree and dsa_port structures
represent the logical switch fabric (eventually composed of multiple switch
devices) and its ports, and are allocated by the DSA core.

This branch lists the logical ports directly in the fabric which simplifies
the iteration over all ports when assigning the default CPU port or configuring
the D in DSA in drivers like mv88e6xxx.

This also removes the unique dst->cpu_dp pointer and is a first step towards
supporting multiple CPU ports and dropping the DSA_MAX_PORTS limitation.

Because the dsa_port structures are not tight to the dsa_switch structure
anymore, we do not need to provide an helper for the drivers to allocate a
switch structure. Like in many other subsystems, drivers can now embed their
dsa_switch structure as they wish into their private structure. This will
be particularly interesting for the Broadcom drivers which were currently
limited by the dynamically allocated array of DSA ports.

The series implements the list of dsa_port structures, makes use of it,
then drops dst->cpu_dp and the dsa_switch_alloc helper.


Vivien Didelot (16):
  net: dsa: use dsa_to_port helper everywhere
  net: dsa: add ports list in the switch fabric
  net: dsa: use ports list in dsa_to_port
  net: dsa: use ports list to find slave
  net: dsa: use ports list to setup switches
  net: dsa: use ports list for routing table setup
  net: dsa: use ports list to find a port by node
  net: dsa: use ports list to setup multiple master devices
  net: dsa: use ports list to find first CPU port
  net: dsa: use ports list to setup default CPU port
  net: dsa: mv88e6xxx: silently skip PVT ops
  net: dsa: mv88e6xxx: use ports list to map port VLAN
  net: dsa: mv88e6xxx: use ports list to map bridge
  net: dsa: sja1105: register switch before assigning port private data
  net: dsa: allocate ports on touch
  net: dsa: remove dsa_switch_alloc helper

 drivers/net/dsa/b53/b53_common.c       |  11 +-
 drivers/net/dsa/bcm_sf2.c              |   8 +-
 drivers/net/dsa/bcm_sf2_cfp.c          |   6 +-
 drivers/net/dsa/dsa_loop.c             |   5 +-
 drivers/net/dsa/lan9303-core.c         |   4 +-
 drivers/net/dsa/lantiq_gswip.c         |   4 +-
 drivers/net/dsa/microchip/ksz_common.c |   5 +-
 drivers/net/dsa/mt7530.c               |  17 +-
 drivers/net/dsa/mv88e6060.c            |   4 +-
 drivers/net/dsa/mv88e6xxx/chip.c       |  87 ++++----
 drivers/net/dsa/qca8k.c                |   7 +-
 drivers/net/dsa/realtek-smi-core.c     |   5 +-
 drivers/net/dsa/sja1105/sja1105_main.c |  37 ++--
 drivers/net/dsa/vitesse-vsc73xx-core.c |   5 +-
 include/net/dsa.h                      |  26 ++-
 net/dsa/dsa.c                          |   8 +-
 net/dsa/dsa2.c                         | 282 +++++++++++++------------
 net/dsa/dsa_priv.h                     |  23 +-
 net/dsa/switch.c                       |   4 +-
 net/dsa/tag_8021q.c                    |   6 +-
 20 files changed, 297 insertions(+), 257 deletions(-)

-- 
2.23.0


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

end of thread, other threads:[~2019-10-21 20:00 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20  3:19 [PATCH net-next 00/16] net: dsa: turn arrays of ports into a list Vivien Didelot
2019-10-20  3:19 ` [PATCH net-next 01/16] net: dsa: use dsa_to_port helper everywhere Vivien Didelot
2019-10-21  2:34   ` Florian Fainelli
2019-10-21 12:31   ` Andrew Lunn
2019-10-21 15:44     ` Vivien Didelot
2019-10-20  3:19 ` [PATCH net-next 02/16] net: dsa: add ports list in the switch fabric Vivien Didelot
2019-10-21  2:36   ` Florian Fainelli
2019-10-21  2:58   ` Florian Fainelli
2019-10-21 12:37   ` Andrew Lunn
2019-10-21 20:00     ` Vivien Didelot
2019-10-20  3:19 ` [PATCH net-next 03/16] net: dsa: use ports list in dsa_to_port Vivien Didelot
2019-10-21  2:38   ` Florian Fainelli
2019-10-21 12:39   ` Andrew Lunn
2019-10-20  3:19 ` [PATCH net-next 04/16] net: dsa: use ports list to find slave Vivien Didelot
2019-10-21  2:39   ` Florian Fainelli
2019-10-21 12:42   ` Andrew Lunn
2019-10-20  3:19 ` [PATCH net-next 05/16] net: dsa: use ports list to setup switches Vivien Didelot
2019-10-21  2:42   ` Florian Fainelli
2019-10-21 12:49     ` Andrew Lunn
2019-10-21 19:37       ` Vivien Didelot
2019-10-20  3:19 ` [PATCH net-next 06/16] net: dsa: use ports list for routing table setup Vivien Didelot
2019-10-21  2:42   ` Florian Fainelli
2019-10-21 12:50   ` Andrew Lunn
2019-10-20  3:19 ` [PATCH net-next 07/16] net: dsa: use ports list to find a port by node Vivien Didelot
2019-10-21  2:43   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 08/16] net: dsa: use ports list to setup multiple master devices Vivien Didelot
2019-10-21  3:03   ` Florian Fainelli
2019-10-21 14:17     ` Andrew Lunn
2019-10-20  3:19 ` [PATCH net-next 09/16] net: dsa: use ports list to find first CPU port Vivien Didelot
2019-10-21  2:46   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 10/16] net: dsa: use ports list to setup default " Vivien Didelot
2019-10-21  2:47   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 11/16] net: dsa: mv88e6xxx: silently skip PVT ops Vivien Didelot
2019-10-21  2:48   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 12/16] net: dsa: mv88e6xxx: use ports list to map port VLAN Vivien Didelot
2019-10-21  2:50   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 13/16] net: dsa: mv88e6xxx: use ports list to map bridge Vivien Didelot
2019-10-21  2:52   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 14/16] net: dsa: sja1105: register switch before assigning port private data Vivien Didelot
2019-10-20  3:19 ` [PATCH net-next 15/16] net: dsa: allocate ports on touch Vivien Didelot
2019-10-21  2:56   ` Florian Fainelli
2019-10-20  3:19 ` [PATCH net-next 16/16] net: dsa: remove dsa_switch_alloc helper Vivien Didelot
2019-10-21  2:55   ` Florian Fainelli
2019-10-21 18:32 ` [PATCH net-next 00/16] net: dsa: turn arrays of ports into a list David Miller

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