patches for DPDK stable branches
 help / color / mirror / Atom feed
From: edwin.brossette@6wind.com
To: dev@dpdk.org
Cc: olivier.matz@6wind.com, didier.pallard@6wind.com,
	lauren.hardy@6wind.com, dsinghrawat@marvell.com,
	palok@marvell.com, Edwin Brossette <edwin.brossette@6wind.com>,
	stable@dpdk.org
Subject: [PATCH 2/5] net/qede: fix bad sanity check on Rx queue release
Date: Tue, 22 Apr 2025 17:51:40 +0200	[thread overview]
Message-ID: <20250422155143.3893525-2-edwin.brossette@6wind.com> (raw)
In-Reply-To: <20250422155143.3893525-1-edwin.brossette@6wind.com>

From: Edwin Brossette <edwin.brossette@6wind.com>

As per the rte_mbuf API: the driver is responsible of initializing all
the required fields. This is not done at qede alloc, meaning there can
be garbage data in mbufs memory, although this garbage data should be
overwritten when the mbufs are used. Since a sanity check is done when
freeing the queues, its possible some remaining garbage data causes a
panic when trying to release the queues if some mbufs are being
processed.

Use rte_pktmbuf_raw_free() instead of rte_pktmbuf_free() as the sanity
check is more relaxed.

Fixes: 2ea6f76aff40 ("qede: add core driver")
CC: stable@dpdk.org

Signed-off-by: Edwin Brossette <edwin.brossette@6wind.com>
Acked-by: Didier Pallard <didier.pallard@6wind.com>
---
 drivers/net/qede/qede_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index c764e3d83763..601fcb30b357 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -305,7 +305,7 @@ static void qede_rx_queue_release_mbufs(struct qede_rx_queue *rxq)
 	if (rxq->sw_rx_ring) {
 		for (i = 0; i < rxq->nb_rx_desc; i++) {
 			if (rxq->sw_rx_ring[i]) {
-				rte_pktmbuf_free(rxq->sw_rx_ring[i]);
+				rte_mbuf_raw_free(rxq->sw_rx_ring[i]);
 				rxq->sw_rx_ring[i] = NULL;
 			}
 		}
-- 
2.35.0.4.g44a5d4affccf


  reply	other threads:[~2025-04-22 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CANDF9xDNq9Yy+FujvGcc3r1ycjbJDJmnP4_ih+LEm-07=jHDcA@mail.gmail.com>
2025-04-22 15:51 ` [PATCH 1/5] qede: fix tunnel checksums offload flags edwin.brossette
2025-04-22 15:51   ` edwin.brossette [this message]
2025-04-22 15:51   ` [PATCH 3/5] Revert "net/qede: fix maximum Rx packet length" edwin.brossette
2025-04-22 15:51   ` [PATCH 4/5] net/qede: fix QEDE_ETH_OVERHEAD being counted twice in rx_buf_size edwin.brossette
2025-04-22 15:51   ` [PATCH 5/5] net/qede: fix rx_buf_size calculation edwin.brossette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250422155143.3893525-2-edwin.brossette@6wind.com \
    --to=edwin.brossette@6wind.com \
    --cc=dev@dpdk.org \
    --cc=didier.pallard@6wind.com \
    --cc=dsinghrawat@marvell.com \
    --cc=lauren.hardy@6wind.com \
    --cc=olivier.matz@6wind.com \
    --cc=palok@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).