]> 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)
commit06171b2f8022160d133a9cf4f0a0a292f4124aa9
tree770f9ae2f0a7cae9369bb0fbd5852d983a0f2abe
parent3180ecb8ab266f8a8343c8b1c2b72e17cb800290
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