Hi Florian,
Florian Fainelli <[email protected]> writes:
> This patch series prepares the ground for adding mutliple CPU port support to
multiple
> DSA, and starts by removing redundant pieces of information such as
> master_netdev which is cpu_dp->ethernet. Finally drivers are moved away from
cpu_dp->netdev
> directly accessing ds->dst->cpu_dp and use appropriate helper functions.
>
> Note that if you have Device Tree blobs/platform configurations that are
> currently listing multiple CPU ports, the proposed behavior in
> dsa_ds_get_cpu_dp() will be to return the last bit set in ds->cpu_port_mask.
>
> Future plans include:
> - making dst->cpu_dp a flexible data structure (array, list, you name it)
> - having the ability for drivers to return a default/preferred CPU port (if
> necessary)
The overall patchset looks good. I have questions for future work
though.
I am still not sure that we need CPU port references in
dsa_switch_tree. When device tree or pdata is parsed, we have allocated
dsa_switch and dsa_port structures. We should be able validate and
assign all ds->ports[x].cpu_dp, before setting up the switches and
creating the slave devices. What do you think?
Also I see dsa_ptr becoming a pointer to the assosicated dsa_port, and
dsa_port should contain the tagging ops for quick access. That is more
rigourous with the physical representation and much easier for
transparent multi-CPU port support.
Thanks,
Vivien