net/mlx5: validate sample action
authorJiawei Wang <jiaweiw@nvidia.com>
Tue, 13 Oct 2020 14:11:45 +0000 (17:11 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:18 +0000 (19:48 +0200)
commit96b1f0273c91fa29842eac4eb844aa0e1624e525
treef31649cbfcd3d747ef33fb01fcf86204da28d33d
parent8cc34c08018df9272f3157af09f4dc88b3699fa3
net/mlx5: validate sample action

Add sample action validate function.

Sample Flow is supported in NIC-RX and FDB domains. For the NIC-RX
the Sample Flow action list must include the destination queue action.

Only NIC-RX domain supports the optional actions list. FDB doesn't
support any optional actions, the sampled packets is always forwarded
to the E-Switch manager port.

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