net/mlx5: update translate function for sample action
authorJiawei Wang <jiaweiw@nvidia.com>
Tue, 13 Oct 2020 14:11:47 +0000 (17:11 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:18 +0000 (19:48 +0200)
commit0756228b27040fc7b47b6ad7970879cc893c2b69
treebc38c3344fae08e1c06a35278814f4be2c692715
parentb4c0ddbfcc58691b5f27f074e7ce4b67db696088
net/mlx5: update translate function for sample action

Translate the attribute of sample action that include sample ratio
and sub actions list, then create the sample DR action.

The metadata register value will be lost in the default path after
Sampler in FDB due to CX5 HW limitation.

Since source vport also be shared with metadata register c0, MLX5
PMD would set the source vport to rdma-core and rdma-core will
restore the regc0 value after sampler.

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_flow_dv.c