Ido Schimmel
2021-Jul-20 14:25 UTC
[Bridge] [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience
On Tue, Jul 20, 2021 at 02:12:01PM +0000, Vladimir Oltean wrote:> On Tue, Jul 20, 2021 at 05:01:48PM +0300, Ido Schimmel wrote: > > > The patches were split from a larger series for easier review: > > > > This is not what I meant. I specifically suggested to get the TX > > forwarding offload first and then extending the API with an argument to > > opt-in for the replay / cleanup: > > Yeah, ok, I did not get that and I had already reposted by the time you > clarified, sorry. > > Anyway, is it so bad that we cannot look at the patches in the order > that they are in right now (even if this means that maybe a few more > days would pass)? To me it makes a bit more sense anyway to first > consolidate the code that is already in the tree right now, before > adding new logic. And I don't really want to rebase the patches again to > change the ordering and risk a build breakage without a good reason.If you don't want to change the order, then at least make the replay/cleanup optional and set it to 'false' for mlxsw. This should mean that the only change in mlxsw should be adding calls to switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() in mlxsw_sp_bridge_port_create() / mlxsw_sp_bridge_port_destroy(), respectively.
Vladimir Oltean
2021-Jul-20 14:46 UTC
[Bridge] [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience
On Tue, Jul 20, 2021 at 05:25:08PM +0300, Ido Schimmel wrote:> If you don't want to change the order, then at least make the > replay/cleanup optional and set it to 'false' for mlxsw. This should > mean that the only change in mlxsw should be adding calls to > switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() in > mlxsw_sp_bridge_port_create() / mlxsw_sp_bridge_port_destroy(), > respectively.I mean, I could guard br_{vlan,mdb,fdb}_replay() against NULL notifier block pointers, and then make mlxsw pass NULL for both the atomic_nb and blocking_nb. But why? How do you deal with a host-joined mdb that was auto-installed while there was no port under the bridge? How does anyone deal with that? What's optional about it? Why would driver X opt out of it but Y not (apart for the case where driver X does not offload MDBs at all, that I can understand).
Vladimir Oltean
2021-Jul-20 19:47 UTC
[Bridge] [PATCH v5 net-next 00/10] Let switchdev drivers offload and unoffload bridge ports at their own convenience
On Tue, Jul 20, 2021 at 05:25:08PM +0300, Ido Schimmel wrote:> If you don't want to change the order, then at least make the > replay/cleanup optional and set it to 'false' for mlxsw. This should > mean that the only change in mlxsw should be adding calls to > switchdev_bridge_port_offload() / switchdev_bridge_port_unoffload() in > mlxsw_sp_bridge_port_create() / mlxsw_sp_bridge_port_destroy(), > respectively.Is there any specific reason why you suggested me to move the switchdev_bridge_port_offload() call from the top-level mlxsw_sp_port_bridge_join() into mlxsw_sp_bridge_port_create() (and similarly, from _pre_bridge_leave to _destroy)? Even if you don't support replays right now, you'd need to move a bunch of code around before you would get them to work. As far as I can see, mlxsw_sp_bridge_port_create() is a bit too early and mlxsw_sp_bridge_port_destroy() is a bit too late. The port needs to be fairly up and running to be able to process the switchdev notifiers at that stage. Do you mind if I keep the hooks where they are, which is what I do for all drivers? I don't think I am missing to handle any case.