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>
This commit is contained in:

committed by
David S. Miller

parent
fed9ce22bf
commit
08f4b5918b
@@ -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)
|
||||
|
Reference in New Issue
Block a user