On 12/12/2020 6:40 PM, Vladimir Oltean wrote: > Right now, the following would happen for a switch driver that does not > implement .port_fdb_add or .port_fdb_del. > > dsa_slave_switchdev_event returns NOTIFY_OK and schedules: > -> dsa_slave_switchdev_event_work > -> dsa_port_fdb_add > -> dsa_port_notify(DSA_NOTIFIER_FDB_ADD) > -> dsa_switch_fdb_add > -> if (!ds->ops->port_fdb_add) return -EOPNOTSUPP; > -> an error is printed with dev_dbg, and > dsa_fdb_offload_notify(switchdev_work) is not called. > > We can avoid scheduling the worker for nothing and say NOTIFY_OK. Not sure if this comment is intended to describe what is being added, only if you have to respin, should this be NOTIFY_DONE? > Because we don't call dsa_fdb_offload_notify, the static FDB entry will > remain just in the software bridge. > > Signed-off-by: Vladimir Oltean <vladimir.olt...@nxp.com> Reviewed-by: Florian Fainelli <f.faine...@gmail.com> -- Florian
- [PATCH v2 net-next 0/6] Offload software learnt bridge... Vladimir Oltean
- [PATCH v2 net-next 3/6] net: dsa: move switchdev ... Vladimir Oltean
- Re: [PATCH v2 net-next 3/6] net: dsa: move sw... Florian Fainelli
- [PATCH v2 net-next 5/6] net: dsa: listen for SWIT... Vladimir Oltean
- Re: [PATCH v2 net-next 5/6] net: dsa: listen ... Florian Fainelli
- [PATCH v2 net-next 4/6] net: dsa: exit early in d... Vladimir Oltean
- Re: [PATCH v2 net-next 4/6] net: dsa: exit ea... Florian Fainelli
- [PATCH v2 net-next 6/6] net: dsa: ocelot: request... Vladimir Oltean
- Re: [PATCH v2 net-next 6/6] net: dsa: ocelot:... Florian Fainelli
- [PATCH v2 net-next 2/6] net: dsa: don't use switc... Vladimir Oltean
- Re: [PATCH v2 net-next 2/6] net: dsa: don't u... Florian Fainelli
- [PATCH v2 net-next 1/6] net: bridge: notify switc... Vladimir Oltean
- Re: [PATCH v2 net-next 1/6] net: bridge: noti... Nikolay Aleksandrov
- Re: [PATCH v2 net-next 1/6] net: bridge: ... Nikolay Aleksandrov
- Re: [PATCH v2 net-next 1/6] net: brid... Vladimir Oltean
- Re: [PATCH v2 net-next 1/6] net: bridge: ... Vladimir Oltean
- Re: [PATCH v2 net-next 1/6] net: brid... Nikolay Aleksandrov