Re: [RFC PATCH net-next 12/16] net: mscc: ocelot: drop the use of the "lags" array

2021-01-15 Thread Alexandre Belloni
On 15/01/2021 13:05:47+0200, Vladimir Oltean wrote: > > -static void ocelot_set_aggr_pgids(struct ocelot *ocelot) > > +static int ocelot_set_aggr_pgids(struct ocelot *ocelot) > > { > > + struct net_device **bonds; > > int i, port, lag; > > > > + bonds = kcalloc(ocelot->num_phys_ports, si

Re: [RFC PATCH net-next 12/16] net: mscc: ocelot: drop the use of the "lags" array

2021-01-15 Thread Vladimir Oltean
On Tue, Dec 08, 2020 at 02:07:58PM +0200, Vladimir Oltean wrote: > We can now simplify the implementation by always using ocelot_get_bond_mask > to look up the other ports that are offloading the same bonding interface > as us. > > In ocelot_set_aggr_pgids, the code had a way to uniquely iterate t

Re: [RFC PATCH net-next 12/16] net: mscc: ocelot: drop the use of the "lags" array

2020-12-16 Thread Alexandre Belloni
On 08/12/2020 14:07:58+0200, Vladimir Oltean wrote: > We can now simplify the implementation by always using ocelot_get_bond_mask > to look up the other ports that are offloading the same bonding interface > as us. > > In ocelot_set_aggr_pgids, the code had a way to uniquely iterate through > LAGs

[RFC PATCH net-next 12/16] net: mscc: ocelot: drop the use of the "lags" array

2020-12-08 Thread Vladimir Oltean
We can now simplify the implementation by always using ocelot_get_bond_mask to look up the other ports that are offloading the same bonding interface as us. In ocelot_set_aggr_pgids, the code had a way to uniquely iterate through LAGs. We need to achieve the same behavior by marking each LAG as vi