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.olt...@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.faine...@gmail.com>
-- 
Florian

Reply via email to