summaryrefslogtreecommitdiffstats
path: root/include/net/devlink.h
diff options
context:
space:
mode:
authorOr Gerlitz2016-07-01 13:51:01 +0200
committerDavid S. Miller2016-07-02 20:40:40 +0200
commit08f4b5918b2d6b491f0403cc1886f5cdccef89bb (patch)
tree35da396f43f718b63095c9e552ec4cfe26a27a6e /include/net/devlink.h
parentnet/mlx5: E-Switch, Add API to create vport rx rules (diff)
downloadkernel-qcow2-linux-08f4b5918b2d6b491f0403cc1886f5cdccef89bb.tar.gz
kernel-qcow2-linux-08f4b5918b2d6b491f0403cc1886f5cdccef89bb.tar.xz
kernel-qcow2-linux-08f4b5918b2d6b491f0403cc1886f5cdccef89bb.zip
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/net/devlink.h')
-rw-r--r--include/net/devlink.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 1d45b61cb320..c99ffe8cef3c 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -90,6 +90,9 @@ struct devlink_ops {
u16 tc_index,
enum devlink_sb_pool_type pool_type,
u32 *p_cur, u32 *p_max);
+
+ int (*eswitch_mode_get)(struct devlink *devlink, u16 *p_mode);
+ int (*eswitch_mode_set)(struct devlink *devlink, u16 mode);
};
static inline void *devlink_priv(struct devlink *devlink)