net: switchdev: Add PORT_PRE_BRIDGE_FLAGS
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 21 Feb 2019 00:58:19 +0000 (16:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 22:55:13 +0000 (14:55 -0800)
commit04dfb580e5d98789977a9f6bbf7471d78c9454ce
treeff3d2739fa128df049337baefba53270a6c8e94d
parent6de6fe0c097ada695fceb83812f7b22c70656a54
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>
include/net/switchdev.h