aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorOr Gerlitz <ogerlitz@mellanox.com>2016-07-01 07:51:01 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-02 14:40:40 -0400
commit08f4b5918b2d6b491f0403cc1886f5cdccef89bb (patch)
tree35da396f43f718b63095c9e552ec4cfe26a27a6e /include/uapi/linux
parentfed9ce22bf8ae8f417b8f047d2d630542d152ccf (diff)
net/devlink: Add E-Switch mode control
Add the commands to set and show the mode of SRIOV E-Switch, two modes are supported: * legacy: operating in the "old" L2 based mode (DMAC --> VF vport) * switchdev: the E-Switch is referred to as whitebox switch configured using standard tools such as tc, bridge, openvswitch etc. To allow working with the tools, for each VF, a VF representor netdevice is created by the E-Switch manager vendor device driver instance (e.g PF). Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/devlink.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index ba0073b26fa6..915bfa74458c 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -57,6 +57,8 @@ enum devlink_command {
57 DEVLINK_CMD_SB_OCC_SNAPSHOT, 57 DEVLINK_CMD_SB_OCC_SNAPSHOT,
58 DEVLINK_CMD_SB_OCC_MAX_CLEAR, 58 DEVLINK_CMD_SB_OCC_MAX_CLEAR,
59 59
60 DEVLINK_CMD_ESWITCH_MODE_GET,
61 DEVLINK_CMD_ESWITCH_MODE_SET,
60 /* add new commands above here */ 62 /* add new commands above here */
61 63
62 __DEVLINK_CMD_MAX, 64 __DEVLINK_CMD_MAX,
@@ -95,6 +97,11 @@ enum devlink_sb_threshold_type {
95 97
96#define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20 98#define DEVLINK_SB_THRESHOLD_TO_ALPHA_MAX 20
97 99
100enum devlink_eswitch_mode {
101 DEVLINK_ESWITCH_MODE_LEGACY,
102 DEVLINK_ESWITCH_MODE_SWITCHDEV,
103};
104
98enum devlink_attr { 105enum devlink_attr {
99 /* don't change the order or add anything between, this is ABI! */ 106 /* don't change the order or add anything between, this is ABI! */
100 DEVLINK_ATTR_UNSPEC, 107 DEVLINK_ATTR_UNSPEC,
@@ -125,6 +132,7 @@ enum devlink_attr {
125 DEVLINK_ATTR_SB_TC_INDEX, /* u16 */ 132 DEVLINK_ATTR_SB_TC_INDEX, /* u16 */
126 DEVLINK_ATTR_SB_OCC_CUR, /* u32 */ 133 DEVLINK_ATTR_SB_OCC_CUR, /* u32 */
127 DEVLINK_ATTR_SB_OCC_MAX, /* u32 */ 134 DEVLINK_ATTR_SB_OCC_MAX, /* u32 */
135 DEVLINK_ATTR_ESWITCH_MODE, /* u16 */
128 136
129 /* add new attributes above here, update the policy in devlink.c */ 137 /* add new attributes above here, update the policy in devlink.c */
130 138