Subject: Re: [PATCH net-next v7 5/6] net: marvell: prestera: Add Switchdev driver implementation

From: Vadym Kochan <[email-masked]>
Date: Thu, 10 Sep 2020 10:03:16 +0300

Hi Andy,

On Fri, Sep 04, 2020 at 10:41:17PM +0300, Andy Shevchenko wrote:
> On Fri, Sep 4, 2020 at 7:52 PM Vadym Kochan <[email-masked]> wrote:
> >
> > The following features are supported:
> >
> >     - VLAN-aware bridge offloading
> >     - VLAN-unaware bridge offloading
> >     - FDB offloading (learning, ageing)
> >     - Switchport configuration
> >
> > Currently there are some limitations like:
> >
> >     - Only 1 VLAN-aware bridge instance supported
> >     - FDB ageing timeout parameter is set globally per device
> 
> Similar comments as per previous patches.
> 
> > +       struct list_head vlans_list;
> 
> How this container is being protected against races?
> 

It should be protected by rtnl lock from the Switchdev core:

    net/switchdev/switchdev.c:int switchdev_port_obj_add(...)

which is called by:

    net/bridge/br_switchdev.c:int br_switchdev_port_vlan_add(...)

> -- 
> With Best Regards,
> Andy Shevchenko