[dpdk-stable] patch 'net/mlx4: fix mbuf poisoning in debug code' has been queued to LTS release 16.11.3

Yuanhan Liu yliu at fridaylinux.org
Fri Jul 14 12:34:03 CEST 2017


Hi,

FYI, your patch has been queued to LTS release 16.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/19/17. So please
shout if anyone has objections.

Thanks.

	--yliu

---
>From 496d42edbb06743f6a178038c334983c32ac862a Mon Sep 17 00:00:00 2001
From: Vasily Philipov <vasilyf at mellanox.com>
Date: Wed, 5 Jul 2017 14:49:22 +0300
Subject: [PATCH] net/mlx4: fix mbuf poisoning in debug code

[ upstream commit 4be06219012181c6f500c8f23440baaf7d4d3618 ]

In debug mode, all mbuf ol_flags are temporarily enabled while sitting
in the Rx queue to detect otherwise silent data corruption, however
some of them are special (indirect and control) and must be cleared
before returning mbufs to the pool to avoid crashing.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")

Signed-off-by: Vasily Philipov <vasilyf at mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
 drivers/net/mlx4/mlx4.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 83f9143..f682413 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -3157,6 +3157,13 @@ mlx4_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
 			NB_SEGS(rep) = 0x2a;
 			PORT(rep) = 0x2a;
 			rep->ol_flags = -1;
+			/*
+			 * Clear special flags in mbuf to avoid
+			 * crashing while freeing.
+			 */
+			rep->ol_flags &=
+				~(uint64_t)(IND_ATTACHED_MBUF |
+					    CTRL_MBUF_FLAG);
 #endif
 			assert(rep->buf_len == seg->buf_len);
 			/* Reconfigure sge to use rep instead of seg. */
-- 
2.7.4



More information about the stable mailing list