[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210107110400.GA1110674@shredder.lan>
Date: Thu, 7 Jan 2021 13:04:00 +0200
From: Ido Schimmel <idosch@...sch.org>
To: Vladimir Oltean <olteanv@...il.com>, petrm@...dia.com
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Kurt Kanzenbach <kurt@...utronix.de>,
Hauke Mehrtens <hauke@...ke-m.de>,
Woojung Huh <woojung.huh@...rochip.com>,
Microchip Linux Driver Support <UNGLinuxDriver@...rochip.com>,
Sean Wang <sean.wang@...iatek.com>,
Landen Chao <Landen.Chao@...iatek.com>,
Claudiu Manoil <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Linus Walleij <linus.walleij@...aro.org>,
Vadym Kochan <vkochan@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Ioana Ciornei <ioana.ciornei@....com>,
Ivan Vecera <ivecera@...hat.com>
Subject: Re: [PATCH v3 net-next 03/11] net: switchdev: remove the transaction
structure from port object notifiers
On Thu, Jan 07, 2021 at 12:40:51PM +0200, Ido Schimmel wrote:
> Forgot to actually add Petr
>
> On Thu, Jan 07, 2021 at 12:38:39PM +0200, Ido Schimmel wrote:
> > +Petr
> >
> > On Thu, Jan 07, 2021 at 01:17:20AM +0200, Vladimir Oltean wrote:
> > > static int mlxsw_sp_port_obj_add(struct net_device *dev,
> > > const struct switchdev_obj *obj,
> > > - struct switchdev_trans *trans,
> > > struct netlink_ext_ack *extack)
> > > {
> > > struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev);
> > > const struct switchdev_obj_port_vlan *vlan;
> > > + struct switchdev_trans trans;
> > > int err = 0;
> > >
> > > switch (obj->id) {
> > > case SWITCHDEV_OBJ_ID_PORT_VLAN:
> > > vlan = SWITCHDEV_OBJ_PORT_VLAN(obj);
> > > - err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, trans,
> > > +
> >
> > Got the regression results. The call to mlxsw_sp_span_respin() should be
> > placed here because it needs to be triggered regardless of the return
> > value of mlxsw_sp_port_vlans_add().
> >
> > I'm looking into another failure, which might not be related to these
> > patches. I will also have results with a debug kernel tomorrow (takes
> > almost a day to complete). Will let you know.
Please ignore the comment about the additional failure. Not related to
these patches.
Thanks
> >
> > > + trans.ph_prepare = true;
> > > + err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, &trans,
> > > extack);
> > > + if (err)
> > > + break;
> > >
> > > - if (switchdev_trans_ph_prepare(trans)) {
> > > - /* The event is emitted before the changes are actually
> > > - * applied to the bridge. Therefore schedule the respin
> > > - * call for later, so that the respin logic sees the
> > > - * updated bridge state.
> > > - */
> > > - mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp);
> > > - }
> > > + /* The event is emitted before the changes are actually
> > > + * applied to the bridge. Therefore schedule the respin
> > > + * call for later, so that the respin logic sees the
> > > + * updated bridge state.
> > > + */
> > > + mlxsw_sp_span_respin(mlxsw_sp_port->mlxsw_sp);
> > > +
> > > + trans.ph_prepare = false;
> > > + err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, &trans,
> > > + extack);
> > > break;
> > > case SWITCHDEV_OBJ_ID_PORT_MDB:
> > > err = mlxsw_sp_port_mdb_add(mlxsw_sp_port,
> > > - SWITCHDEV_OBJ_PORT_MDB(obj),
> > > - trans);
> > > + SWITCHDEV_OBJ_PORT_MDB(obj));
> > > break;
> > > default:
> > > err = -EOPNOTSUPP;
Powered by blists - more mailing lists