From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90BB2A06CC for ; Tue, 22 Nov 2022 23:03:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87C6442D88; Tue, 22 Nov 2022 23:03:28 +0100 (CET) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mails.dpdk.org (Postfix) with ESMTP id 80F4D42B77 for ; Tue, 22 Nov 2022 23:03:27 +0100 (CET) Received: by mail-wr1-f43.google.com with SMTP id v1so26831582wrt.11 for ; Tue, 22 Nov 2022 14:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yw8gLQFQqLJwOI+UPRipXbOMzZLmeLpG+ykMoYNdDlg=; b=V2F0TZPI8BiXKMGgUyGhHfiJRzy/lA/1wMqwkdJdOQPIOfytah8Mc6M58Bo4GWK0NJ pe3JWGTFnvUqzDkeGIwzCBWyN1xd5vTJkfeONiD6QYrkyjoOk51xbNnqKb59rt5RztK4 kj5BW4PEici1EAd8nDW1hXDLSTZkXNBopWnOnvuVLXSwHZrgUUgddMGYYoqxNCxLRwqy 52PgdUGekCbnSmxG5fBu6UyXkJkAgEPvfCClbi3uQR/DMUVfLQ21KIJ7LicjHcc3V1rl F2iLfqfcoECN5x7V9vZD6DuWSfiWGmj4Lo0/o+LGL4fVathIo02WKEUy4mSZuAYXP5Vt GDvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yw8gLQFQqLJwOI+UPRipXbOMzZLmeLpG+ykMoYNdDlg=; b=W01IcxYoqf+WHZiFeJ9Ypw+NWZ7MgyQIHQBIt2I6PnnkzXub3pJkbSJmFrHrATadBE MSj04lp1eyxWu1loYvjrK4Il5D+lyytawC3nQRoMXOn+sCgA7plql5N63rwowSUwNAxW BcKHtwWg9Uy0w0w1SsQDRQIIYs5Rs6CLoAajm/q29GEvDzailboeb36UaYVkqnj8JcAS TQmJreko3Q9Vl4VKcPC67SJRYZJNFVTJUrYKDio7j92DiF9Oh6yWtdQwVLY2M3yjpNGx iPxMeHmaYNoIxdDZOWCJqUSmRIquS29WXgY+K5QAhZo91usLkawiDE2oBAnACHrZNj0d r1IA== X-Gm-Message-State: ANoB5pk5eQTAuglY2AI/JD7KfYNEW7SIuQ2NjvOX0KaK6f/J/D/Pn0w/ fLaQdEj7bvWhRookwde5/yCIZ6UEGYcSjA== X-Google-Smtp-Source: AA0mqf5j6qrESUSoVW3h2apdPz1os3Sj14B7iotXH7ICQG0m32vL7RYP0PqttAcz0a/KRSf0HjDiSg== X-Received: by 2002:a5d:5b19:0:b0:241:dea3:ad48 with SMTP id bx25-20020a5d5b19000000b00241dea3ad48mr5082286wrb.357.1669154607137; Tue, 22 Nov 2022 14:03:27 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id u6-20020a05600c210600b003cfe1376f68sm109462wml.9.2022.11.22.14.03.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 14:03:26 -0800 (PST) From: luca.boccassi@gmail.com To: Chaoyong He Cc: =?UTF-8?q?Niklas=20S=C3=B6derlund?= , dpdk stable Subject: patch 'net/nfp: fix Rx descriptor DMA address' has been queued to stable release 20.11.7 Date: Tue, 22 Nov 2022 22:02:39 +0000 Message-Id: <20221122220241.926784-15-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221122220241.926784-1-luca.boccassi@gmail.com> References: <20221117230859.611465-34-luca.boccassi@gmail.com> <20221122220241.926784-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 20.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6b4da2faa5415b0ae32a41dbe2b92e5a3b5d1a70 Thanks. Luca Boccassi --- >From 6b4da2faa5415b0ae32a41dbe2b92e5a3b5d1a70 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Fri, 18 Nov 2022 09:44:06 +0800 Subject: [PATCH] net/nfp: fix Rx descriptor DMA address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 0c48f5ad446d17d3039432d629b1537d2b2d1b98 ] When receiving a packet that is larger than the mbuf size, the Rx function will break the receive loop and sent a free list descriptor with random DMA address. Fix this by moving the increment of the free list descriptor counter to after the packet size have been checked and acted on. Fixes: bb340f56fcb7 ("net/nfp: fix memory leak in Rx") Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/nfp_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index 1c2b676676..b09ccac345 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2087,8 +2087,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) break; } - nb_hold++; - /* * Grab the mbuf and refill the descriptor with the * previously allocated mbuf @@ -2159,6 +2157,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) rxds->fld.dd = 0; rxds->fld.dma_addr_hi = (dma_addr >> 32) & 0xff; rxds->fld.dma_addr_lo = dma_addr & 0xffffffff; + nb_hold++; rxq->rd_p++; if (unlikely(rxq->rd_p == rxq->rx_count)) /* wrapping?*/ -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-22 22:01:32.520144669 +0000 +++ 0015-net-nfp-fix-Rx-descriptor-DMA-address.patch 2022-11-22 22:01:31.539525264 +0000 @@ -1 +1 @@ -From 0c48f5ad446d17d3039432d629b1537d2b2d1b98 Mon Sep 17 00:00:00 2001 +From 6b4da2faa5415b0ae32a41dbe2b92e5a3b5d1a70 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 0c48f5ad446d17d3039432d629b1537d2b2d1b98 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ - drivers/net/nfp/nfp_rxtx.c | 3 +-- + drivers/net/nfp/nfp_net.c | 3 +-- @@ -25,5 +26,5 @@ -diff --git a/drivers/net/nfp/nfp_rxtx.c b/drivers/net/nfp/nfp_rxtx.c -index b8c874d315..38377ca218 100644 ---- a/drivers/net/nfp/nfp_rxtx.c -+++ b/drivers/net/nfp/nfp_rxtx.c -@@ -293,8 +293,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c +index 1c2b676676..b09ccac345 100644 +--- a/drivers/net/nfp/nfp_net.c ++++ b/drivers/net/nfp/nfp_net.c +@@ -2087,8 +2087,6 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) @@ -38 +39 @@ -@@ -365,6 +363,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) +@@ -2159,6 +2157,7 @@ nfp_net_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)