From: Alexander Kozyrev Date: Mon, 27 Apr 2020 18:23:13 +0000 (+0000) Subject: net/mlx5: fix packet length assert in MPRQ X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9a6ea33af9fac4c2a00a4bb595875a393a90b12d;p=dpdk.git net/mlx5: fix packet length assert in MPRQ The assert that checks if there is a enough room for the whole packet minus headroom data is written incorrectly. The check should be negated in order to work properly. Fixes: bd0d5930bf56 ("net/mlx5: enable MPRQ multi-stride operations") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index a21201038c..6a17a9a5d0 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -1814,7 +1814,7 @@ mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) /* Set mbuf head-room. */ SET_DATA_OFF(pkt, RTE_PKTMBUF_HEADROOM); MLX5_ASSERT(pkt->ol_flags == EXT_ATTACHED_MBUF); - MLX5_ASSERT(rte_pktmbuf_tailroom(pkt) < + MLX5_ASSERT(rte_pktmbuf_tailroom(pkt) >= len - (hdrm_overlap > 0 ? hdrm_overlap : 0)); DATA_LEN(pkt) = len; /*