]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: E-Switch, Setup all vports' metadata to support peer miss rule
authorVu Pham <vuhuong@mellanox.com>
Fri, 22 May 2020 18:48:38 +0000 (11:48 -0700)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 15 Sep 2020 18:59:52 +0000 (11:59 -0700)
commit8532264513eb88cf755310f951d9ff35e7986386
treefc85c891317ee79525ef3dcf2385a3de4262c15c
parent551458b9ad188e64e73bf82862a2e2a46598a8b3
net/mlx5: E-Switch, Setup all vports' metadata to support peer miss rule

In merged eswitch configuration, peer miss rule is setup for all
vports. If metadata is enabled, peer miss rule with metadata matching
will be configured instead of source port matching; however, some
vports that have not yet been enabled don't have default_metadata
setup and their default_metadata will be zero.

Hence, setup/cleanup default metadata for all vports when eswitch moves
in/out of offloads mode.

Fixes: 6128fe745be1 ("net/mlx5: E-Switch, Alloc and free unique metadata for match")
Signed-off-by: Vu Pham <vuhuong@mellanox.com>
Reviewed-by: Bodong Wang <bodong@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c