Messages in this thread | | | Subject | Re: [PATCH net-next 4/5] net: mscc: ocelot: make entry_type a member of struct ocelot_multicast | From | Florian Fainelli <> | Date | Wed, 28 Oct 2020 19:37:09 -0700 |
| |
On 10/28/2020 7:27 PM, Vladimir Oltean wrote: > This saves a re-classification of the MDB address on deletion. > > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> > ---
[snip]
> mc = ocelot_multicast_get(ocelot, mdb->addr, vid); > if (!mc) { > /* New entry */ > - int pgid = ocelot_mdb_get_pgid(ocelot, entry_type); > + int pgid; > + > + mc = devm_kzalloc(ocelot->dev, sizeof(*mc), GFP_KERNEL);
If the MDB object is programmed with SWITCHDEV_OBJ_ID_HOST_MDB then you would need this gfp_t to be GFP_ATOMIC per net/bridge/br_mdb.c::__br_mdb_notify, if this is a regular SWITCHDEV_OBJ_ID_MDB then GFP_KERNEL appears to be fine.
Looks like this existed before, so that might have to be fixed separately.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> -- Florian
| |