net/mlx5: fix flow mark action handling
authorNélio Laranjeiro <nelio.laranjeiro@6wind.com>
Tue, 28 Feb 2017 09:20:01 +0000 (10:20 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 4 Apr 2017 13:52:51 +0000 (15:52 +0200)
Mark value is always reported even when not requested or invalid.

Fixes: ea3bc3b1df94 ("net/mlx5: support mark flow action")
Cc: stable@dpdk.org
Reported-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c

index 25059c9..b0551cc 100644 (file)
@@ -1507,7 +1507,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
                        }
                        if (rxq->mark &&
                            ((cqe->sop_drop_qpn !=
-                             htonl(MLX5_FLOW_MARK_INVALID)) ||
+                             htonl(MLX5_FLOW_MARK_INVALID)) &&
                             (cqe->sop_drop_qpn !=
                              htonl(MLX5_FLOW_MARK_DEFAULT)))) {
                                pkt->hash.fdir.hi =