From: Bing Zhao Date: Wed, 5 May 2021 12:23:14 +0000 (+0300) Subject: net/mlx5: use meter color register for connection tracking X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8ebbc01f4275af5555a0a81702768596a4ca8089;p=dpdk.git net/mlx5: use meter color register for connection tracking Based on the capacity, 3 registers could be used. Due to the register allocation, only the one REG_C_3 for meter color could be reused right now. Then in the same flow, no more than one ASO action can be supported. Signed-off-by: Bing Zhao Acked-by: Viacheslav Ovsiienko --- diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index e3544bba7b..97a144d0c3 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -434,6 +434,10 @@ Limitations or flow create 0 ingress pattern integrity level is 0 value mask l4_ok value spec 0 / eth / ipv4 proto is udp / end … +- Connection tracking: + + - Cannot co-exist with ASO meter, ASO age action in a single flow rule. + Statistics ---------- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 1923abe411..8cc5fab703 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -759,7 +759,9 @@ mlx5_flow_get_reg_id(struct rte_eth_dev *dev, return priv->mtr_color_reg != REG_C_2 ? REG_C_2 : REG_C_3; case MLX5_MTR_COLOR: - case MLX5_ASO_FLOW_HIT: /* Both features use the same REG_C. */ + case MLX5_ASO_FLOW_HIT: + case MLX5_ASO_CONNTRACK: + /* All features use the same REG_C. */ MLX5_ASSERT(priv->mtr_color_reg != REG_NON); return priv->mtr_color_reg; case MLX5_COPY_MARK: diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 1e9353458c..6bb9b6085d 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -85,6 +85,7 @@ enum mlx5_feature_name { MLX5_MTR_COLOR, MLX5_MTR_ID, MLX5_ASO_FLOW_HIT, + MLX5_ASO_CONNTRACK, }; /* Default queue number. */