DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix wrong segmented packet in Rx
@ 2021-02-15 10:15 Jiawei Zhu
  2021-02-24 13:20 ` Slava Ovsiienko
  2021-03-01 16:58 ` [dpdk-dev] [PATCH v2] " Jiawei Zhu
  0 siblings, 2 replies; 12+ messages in thread
From: Jiawei Zhu @ 2021-02-15 10:15 UTC (permalink / raw)
  To: dev; +Cc: zhujiawei12, matan, shahafs, viacheslavo, Jiawei Zhu, stable

Fixed issue could occur when Mbuf starvation happens
in a middle of reception of a segmented packet.
In such a situation, after release the segments of that
packet, it does not align consumer index to the next stride.
This would cause receive a wrong segmented packet.

Fixes: 15a756b63734 ("net/mlx5: fix possible NULL dereference in Rx path")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Zhu <17826875952@163.com>
---
 drivers/net/mlx5/mlx5_rxtx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 2e4b87c..e3ce9fd 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -1480,6 +1480,9 @@ enum mlx5_txcmp_code {
 				rte_mbuf_raw_free(pkt);
 				pkt = rep;
 			}
+			rq_ci >>= sges_n;
+			++rq_ci;
+			rq_ci <<= sges_n;
 			break;
 		}
 		if (!pkt) {
-- 
1.8.3.1



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

end of thread, other threads:[~2021-03-13 19:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 10:15 [dpdk-dev] [PATCH] net/mlx5: fix wrong segmented packet in Rx Jiawei Zhu
2021-02-24 13:20 ` Slava Ovsiienko
2021-02-26 16:11   ` Jiawei Zhu
2021-03-01  9:13     ` Slava Ovsiienko
2021-03-01 17:01       ` Jiawei Zhu
2021-03-02  8:10         ` Slava Ovsiienko
2021-03-02 16:44           ` Jiawei Zhu
2021-03-01 16:58 ` [dpdk-dev] [PATCH v2] " Jiawei Zhu
2021-03-01 17:19   ` [dpdk-dev] [PATCH v3] " Jiawei Zhu
2021-03-02 17:18     ` Slava Ovsiienko
2021-03-04  9:00     ` Raslan Darawsheh
2021-03-13 19:45       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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).