On Tue, Oct 27, 2020 at 21:04, Vladimir Oltean <olte...@gmail.com> wrote: > On Tue, Oct 27, 2020 at 07:33:37PM +0100, Marek Behun wrote: >> > In order for this to work on transmit, we need to add forward offloading >> > to the bridge so that we can, for example, send one FORWARD from the CPU >> > to send an ARP broadcast to swp1..4 instead of four FROM_CPUs. >> >> Wouldn't this be solved if the CPU master interface was a bonding interface? > > I don't see how you would do that. Would DSA keep returning -EPROBE_DEFER > until user space decides to set up a bond over the master interfaces? > How would you even describe that in device tree?
Yeah that would be very hard indeed. Since this is going to be completely transparent to the user I think the best way is to just setup the hardware to see the two CPU ports as a LAG whenever you find e.g. "cpu0" and "cpu1", but have no representation of it as a separate netdev. DSA will have an rx_handler attached to both ports anyway, so it can just run the same handler for both. On Tx it can just load-balance in software like team does.