net: dsa: support VLAN filtering switchdev attr
When a user explicitly requests VLAN filtering with something like:
# echo 1 > /sys/class/net/<bridge>/bridge/vlan_filtering
Switchdev propagates a SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING port
attribute.
Add support for it in the DSA layer with a new port_vlan_filtering
function to let drivers toggle 802.1Q filtering on user demand.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7f66ee4156
commit
fb2dabad69
@@ -305,6 +305,8 @@ struct dsa_switch_driver {
|
||||
/*
|
||||
* VLAN support
|
||||
*/
|
||||
int (*port_vlan_filtering)(struct dsa_switch *ds, int port,
|
||||
bool vlan_filtering);
|
||||
int (*port_vlan_prepare)(struct dsa_switch *ds, int port,
|
||||
const struct switchdev_obj_port_vlan *vlan,
|
||||
struct switchdev_trans *trans);
|
||||
|
||||
Reference in New Issue
Block a user