Vivien Didelot
2018-May-25 16:17 UTC
[Bridge] [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs
Hi Petr, Petr Machata <petrm at mellanox.com> writes:> A driver might need to react to changes in settings of brentry VLANs. > Therefore send switchdev port notifications for these as well. Reuse > SWITCHDEV_OBJ_ID_PORT_VLAN for this purpose. Listeners should use > netif_is_bridge_master() on orig_dev to determine whether the > notification is about a bridge port or a bridge. > > Signed-off-by: Petr Machata <petrm at mellanox.com>> + } else { > + err = br_switchdev_port_obj_add(dev, v->vid, flags); > + if (err && err != -EOPNOTSUPP) > + goto out; > }Except that br_switchdev_port_obj_add taking vid and flags arguments seems confusing to me, the change looks good: Reviewed-by: Vivien Didelot <vivien.didelot at savoirfairelinux.com> Thanks, Vivien
Petr Machata
2018-May-25 17:00 UTC
[Bridge] [PATCH net-next 6/7] net: bridge: Notify about bridge VLANs
Vivien Didelot <vivien.didelot at savoirfairelinux.com> writes:>> + } else { >> + err = br_switchdev_port_obj_add(dev, v->vid, flags); >> + if (err && err != -EOPNOTSUPP) >> + goto out; >> } > > Except that br_switchdev_port_obj_add taking vid and flags arguments > seems confusing to me, the change looks good:I'm not sure what you're aiming at. Both VID and flags are sent with the notification, so they need to be passed on to the function somehow. Do you have a counterproposal for the API? Thanks, Petr