DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix packet length check assert in MPRQ
@ 2020-04-27 18:23 Alexander Kozyrev
  2020-04-30  9:50 ` Raslan Darawsheh
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Kozyrev @ 2020-04-27 18:23 UTC (permalink / raw)
  To: dev; +Cc: stable, rasland, viacheslavo

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: bd0d593 ("net/mlx5: enable MPRQ multi-stride operations")
Cc: stable@dpdk.org

Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index a212010..6a17a9a 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1814,7 +1814,7 @@ enum mlx5_txcmp_code {
 			/* 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;
 			/*
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/mlx5: fix packet length check assert in MPRQ
  2020-04-27 18:23 [dpdk-dev] [PATCH] net/mlx5: fix packet length check assert in MPRQ Alexander Kozyrev
@ 2020-04-30  9:50 ` Raslan Darawsheh
  0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2020-04-30  9:50 UTC (permalink / raw)
  To: Alexander Kozyrev, dev; +Cc: stable, Slava Ovsiienko

Hi,

> -----Original Message-----
> From: Alexander Kozyrev <akozyrev@mellanox.com>
> Sent: Monday, April 27, 2020 9:23 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Raslan Darawsheh <rasland@mellanox.com>; Slava
> Ovsiienko <viacheslavo@mellanox.com>
> Subject: [PATCH] net/mlx5: fix packet length check 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: bd0d593 ("net/mlx5: enable MPRQ multi-stride operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alexander Kozyrev <akozyrev@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxtx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
> index a212010..6a17a9a 100644
> --- a/drivers/net/mlx5/mlx5_rxtx.c
> +++ b/drivers/net/mlx5/mlx5_rxtx.c
> @@ -1814,7 +1814,7 @@ enum mlx5_txcmp_code {
>  			/* 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;
>  			/*
> --
> 1.8.3.1


Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-30  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 18:23 [dpdk-dev] [PATCH] net/mlx5: fix packet length check assert in MPRQ Alexander Kozyrev
2020-04-30  9:50 ` Raslan Darawsheh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).