Re: [PATCH net-next 02/16] net: dsa: add ports list in the switch fabric

2019-10-21 Thread Vivien Didelot
On Mon, 21 Oct 2019 14:37:40 +0200, Andrew Lunn wrote: > > +static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index) > > +{ > > + struct dsa_switch_tree *dst = ds->dst; > > + struct dsa_port *dp; > > + > > + dp = >ports[index]; > > + > > + dp->ds = ds; > > + dp->index =

Re: [PATCH net-next 02/16] net: dsa: add ports list in the switch fabric

2019-10-21 Thread Andrew Lunn
> +static struct dsa_port *dsa_port_touch(struct dsa_switch *ds, int index) > +{ > + struct dsa_switch_tree *dst = ds->dst; > + struct dsa_port *dp; > + > + dp = >ports[index]; > + > + dp->ds = ds; > + dp->index = index; > + > + INIT_LIST_HEAD(>list); > +

Re: [PATCH net-next 02/16] net: dsa: add ports list in the switch fabric

2019-10-20 Thread Florian Fainelli
On 10/19/2019 8:19 PM, Vivien Didelot wrote: > Add a list of switch ports within the switch fabric. This will help the > lookup of a port inside the whole fabric, and it is the first step > towards supporting multiple CPU ports, before deprecating the usage of > the unique dst->cpu_dp pointer.

Re: [PATCH net-next 02/16] net: dsa: add ports list in the switch fabric

2019-10-20 Thread Florian Fainelli
On 10/19/2019 8:19 PM, Vivien Didelot wrote: > Add a list of switch ports within the switch fabric. This will help the > lookup of a port inside the whole fabric, and it is the first step > towards supporting multiple CPU ports, before deprecating the usage of > the unique dst->cpu_dp pointer.

[PATCH net-next 02/16] net: dsa: add ports list in the switch fabric

2019-10-19 Thread Vivien Didelot
Add a list of switch ports within the switch fabric. This will help the lookup of a port inside the whole fabric, and it is the first step towards supporting multiple CPU ports, before deprecating the usage of the unique dst->cpu_dp pointer. In preparation for a future allocation of the dsa_port