Message ID | 20191021205130.304149-1-vivien.didelot@gmail.com |
---|---|
Headers | show |
Series | net: dsa: turn arrays of ports into a list | expand |
On 10/21/19 1:51 PM, Vivien Didelot wrote: > 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. For the entire series: Tested-by: Florian Fainelli <f.fainelli@gmail.com> On a BCM7278 with two CPU ports (one at 5, one at 8), and things are working as they used to before your patch series, thanks!
On 21. 10. 19 22:51, Vivien Didelot wrote: > 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. I just tried the whole series on our imx6dl-yapp4-hydra with QCA8334 switch and did not notice any problems as well. Thank you. Tested-by: Michal Vokáč <michal.vokac@ysoft.com>
On Mon, 21 Oct 2019 16:51:14 -0400, Vivien Didelot wrote: > 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. Applied, thanks!