summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_prm.h
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2017-03-30 14:45:37 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2017-04-04 19:03:01 +0200
commitc604f61978889b2d205b312d778f5c50b323a349 (patch)
tree51c071815e25a72d744efc014d8ad80b0690a9fd /drivers/net/mlx5/mlx5_prm.h
parent005870b4d3a1f6ac2e0f492b57d502e09f1565f3 (diff)
downloaddpdk-c604f61978889b2d205b312d778f5c50b323a349.zip
dpdk-c604f61978889b2d205b312d778f5c50b323a349.tar.gz
dpdk-c604f61978889b2d205b312d778f5c50b323a349.tar.xz
net/mlx5: fix mark id retrieval
Mark ID in the completion queue entry is 24 bits, the remaining 8 bits are reserved and may be nonzero. Do not take them into account when looking for marked packets. Fixes: ea3bc3b1df94 ("net/mlx5: support mark flow action") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_prm.h')
-rw-r--r--drivers/net/mlx5/mlx5_prm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 155bdba..608072f 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -138,6 +138,13 @@
/* Inner L4 checksum offload (Tunneled packets only). */
#define MLX5_ETH_WQE_L4_INNER_CSUM (1u << 5)
+/* Is flow mark valid. */
+#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
+#define MLX5_FLOW_MARK_IS_VALID(val) ((val) & 0xffffff00)
+#else
+#define MLX5_FLOW_MARK_IS_VALID(val) ((val) & 0xffffff)
+#endif
+
/* INVALID is used by packets matching no flow rules. */
#define MLX5_FLOW_MARK_INVALID 0