net/mlx5: Add management of EC VF vports
authorDaniel Jurgens <danielj@nvidia.com>
Tue, 7 Mar 2023 19:24:55 +0000 (21:24 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 10 Jun 2023 01:40:51 +0000 (18:40 -0700)
commita7719b29a82199b90ebbf355d3332e0fbfbf6045
tree29feb15e5c0f50a3f2c4859ae7f0589936fb141b
parent9ac0b128248e19d06475f4592fe87f6ce18bc554
net/mlx5: Add management of EC VF vports

Add init, load, unload, and cleanup of the EC VF vports. This includes
changes in how eswitch SRIOV is managed. Previous on an embedded CPU
platform the number of VFs provided when enabling the eswitch was always
0, host VFs vports are handled in the eswitch functions change event
handler. Now track the number of EC VFs as well, so they can be handled
properly in the enable/disable flows.

There are only 3 marks available for use in xarrays, all 3 were already
in use for this use case. EC VF vports are in a known range so we can
access them by index instead of marks.

Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: William Tu <witu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.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