]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-switch, Extend eswitch enable to handle num_vfs change
authorParav Pandit <parav@mellanox.com>
Wed, 18 Dec 2019 10:58:58 +0000 (04:58 -0600)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Mar 2020 06:19:23 +0000 (23:19 -0700)
commit16c569d68d297ac3c530dfe4d48fe4b31128aa6e
tree770f9ae2f0a7cae9369bb0fbd5852d983a0f2abe
parent5d9d7a6e74986932b8dc229ee212b686454bc44c
net/mlx5: E-switch, Extend eswitch enable to handle num_vfs change

Subsequent patch protects eswitch mode changes across sriov and devlink
interfaces. It is desirable for eswitch to provide thread safe eswitch
enable and disable APIs.
Hence, extend eswitch enable API to optionally update num_vfs when
requested.

In subsequent patch, eswitch num_vfs are updated after all the eswitch
users eswitch drops its reference count.

Reviewed-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/sriov.c