mbox series

[net-next,00/11] net: dsa: parsing stage

Message ID 20171103230530.996-1-vivien.didelot@savoirfairelinux.com
Headers show
Series net: dsa: parsing stage | expand

Message

Vivien Didelot Nov. 3, 2017, 11:05 p.m. UTC
When registering a DSA switch, there is basically two stages.

The first stage is the parsing of the switch device, from either device
tree or platform data. It fetches the DSA tree to which it belongs, and
validates its ports. The switch device is then added to the tree, and
the second stage is called if this was the last switch of the tree.

The second stage is the setup of the tree, which validates that the tree
is complete, sets up the routing tables, the default CPU port for user
ports, sets up the switch drivers and finally the master interfaces,
which makes the whole switch fabric functional.

This patch series covers the first parsing stage. It fixes the type of
the switch and tree indexes to unsigned int, simplifies the tree
reference counting and the switch and CPU ports parsing.

Vivien Didelot (11):
  net: dsa: make switch index unsigned
  net: dsa: make tree index unsigned
  net: dsa: simplify tree reference counting
  net: dsa: get and put tree reference counting
  net: dsa: provide a find or new tree helper
  net: dsa: rework switch addition and removal
  net: dsa: get tree before parsing ports
  net: dsa: rework switch parsing
  net: dsa: only check presence of link property
  net: dsa: add one port parsing function per type
  net: dsa: resolve tagging protocol at parse time

 include/net/dsa.h |   4 +-
 net/dsa/dsa2.c    | 323 ++++++++++++++++++++++++++++++------------------------
 net/dsa/slave.c   |   2 +-
 3 files changed, 184 insertions(+), 145 deletions(-)

Comments

David Miller Nov. 5, 2017, 1:32 p.m. UTC | #1
From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Fri,  3 Nov 2017 19:05:19 -0400

> When registering a DSA switch, there is basically two stages.
> 
> The first stage is the parsing of the switch device, from either device
> tree or platform data. It fetches the DSA tree to which it belongs, and
> validates its ports. The switch device is then added to the tree, and
> the second stage is called if this was the last switch of the tree.
> 
> The second stage is the setup of the tree, which validates that the tree
> is complete, sets up the routing tables, the default CPU port for user
> ports, sets up the switch drivers and finally the master interfaces,
> which makes the whole switch fabric functional.
> 
> This patch series covers the first parsing stage. It fixes the type of
> the switch and tree indexes to unsigned int, simplifies the tree
> reference counting and the switch and CPU ports parsing.

Series applied, thanks Vivien.