mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
net: switchdev: Add PORT_PRE_BRIDGE_FLAGS
In preparation for removing switchdev_port_attr_get(), introduce PORT_PRE_BRIDGE_FLAGS which will be called through switchdev_port_attr_set(), in the caller's context (possibly atomic) and which must be checked by the switchdev driver in order to return whether the operation is supported or not. This is entirely analoguous to how the BRIDGE_FLAGS_SUPPORT works, except it goes through a set() instead of get(). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
db088ca3c1
commit
746dc184ba
@ -46,6 +46,7 @@ enum switchdev_attr_id {
|
||||
SWITCHDEV_ATTR_ID_PORT_STP_STATE,
|
||||
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS,
|
||||
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT,
|
||||
SWITCHDEV_ATTR_ID_PORT_PRE_BRIDGE_FLAGS,
|
||||
SWITCHDEV_ATTR_ID_PORT_MROUTER,
|
||||
SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME,
|
||||
SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING,
|
||||
@ -61,7 +62,7 @@ struct switchdev_attr {
|
||||
void (*complete)(struct net_device *dev, int err, void *priv);
|
||||
union {
|
||||
u8 stp_state; /* PORT_STP_STATE */
|
||||
unsigned long brport_flags; /* PORT_BRIDGE_FLAGS */
|
||||
unsigned long brport_flags; /* PORT_{PRE}_BRIDGE_FLAGS */
|
||||
unsigned long brport_flags_support; /* PORT_BRIDGE_FLAGS_SUPPORT */
|
||||
bool mrouter; /* PORT_MROUTER */
|
||||
clock_t ageing_time; /* BRIDGE_AGEING_TIME */
|
||||
|
Loading…
Reference in New Issue
Block a user