summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>2019-11-21 17:59:42 +0000
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-25 16:41:03 +0000
commitf536f5958be09e9132d17603a9e1b908fa77cd9d (patch)
treeb6135d92def5af7b3b29a083f0d3d4aac03408c8
parent27d93382e53b8934d04f40b2be664c2d4c949632 (diff)
downloaddpdk-next-net-intel-f536f5958be09e9132d17603a9e1b908fa77cd9d.zip
dpdk-next-net-intel-f536f5958be09e9132d17603a9e1b908fa77cd9d.tar.gz
dpdk-next-net-intel-f536f5958be09e9132d17603a9e1b908fa77cd9d.tar.xz
net/mlx5: fix getting metadata register for E-Switch domain
The metadata register used for META item/action within E-Switch steering domain should be altered depending on dv_xmeta_en devarg value. Fixes: 3e8edd0ef848 ("net/mlx5: update metadata register ID query") Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
-rw-r--r--drivers/net/mlx5/mlx5_flow.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index b488b67..65a0e65 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -364,7 +364,15 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev,
case MLX5_METADATA_TX:
return REG_A;
case MLX5_METADATA_FDB:
- return REG_C_0;
+ switch (config->dv_xmeta_en) {
+ case MLX5_XMETA_MODE_LEGACY:
+ return REG_NONE;
+ case MLX5_XMETA_MODE_META16:
+ return REG_C_0;
+ case MLX5_XMETA_MODE_META32:
+ return REG_C_1;
+ }
+ break;
case MLX5_FLOW_MARK:
switch (config->dv_xmeta_en) {
case MLX5_XMETA_MODE_LEGACY: