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 B2398A0C41 for ; Tue, 30 Nov 2021 17:37:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACEBD41142; Tue, 30 Nov 2021 17:37:23 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id C37664118F for ; Tue, 30 Nov 2021 17:37:22 +0100 (CET) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id A488A3F1ED for ; Tue, 30 Nov 2021 16:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290242; bh=IFLk+b+2wNxiVfFnmb0E43Y9sOhK42H2gXOdJ3H9M58=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PFr+hRn76pdl7jVOm8BLLAa03hn1wR70V4Q9iRrDTtM/Ghb2Tvvdc2hqAWD9wtkXZ eUb5CN90WAL5ud6ioo2dzwqG5PU11rJsgwM2ZlgkZ7Pnc53kPTKAhYQyRRDURCthIn z9D/0qZzF1yNodf0eAtgrGnyAKHbxZo0Ftt2eOjwRecml7J84nQSNXuzTujwLASBBq cync7rLCc00EEYwseMzdeWozhkfuDkqj+3k/wXDrfLoYoY8JUFVwqcV8mO35UYS4T6 DONCjzn6V9KsMxEDCs/ugH3ozHLRSeTAmG4i4rXX52EGX4tpuenuMPrb1HzlA3VXQ3 w6Qn3LnHz6pbQ== Received: by mail-ed1-f72.google.com with SMTP id m12-20020a056402430c00b003e9f10bbb7dso17432183edc.18 for ; Tue, 30 Nov 2021 08:37:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IFLk+b+2wNxiVfFnmb0E43Y9sOhK42H2gXOdJ3H9M58=; b=4POCilWIj3VjCciVyZaf3znyak2G14uG+X/n8VKeptjioR6RvvY2cH4mHOeEhqCh18 w5NJp6XD5z8E+uPxqc7gBznLyHJtplTPzFw1xy1JWnL/yo67Y1JweYOOIhKIRK8Yaj9U wykMMFjoRCDVNfaez24D8j6Pjozv6WmQ3VRJphNxgjgAlaG/ZC+cErG6ibj06KCMTzc8 7wal2E+hMSLDJCGkG/7VUcsgetHSGvCwdFm7Tz0l1ZMW/LbfF7DBFU9cxmyzNRqnnmUM nnZGkAn/OD7GNRg+pz317KX9M/Dph1QxSuCAchLK2T6eXsDRsLtZdtzyMQ5BNo49oH8k mwKw== X-Gm-Message-State: AOAM533WHoigREUOXfBwYvc/JwLdTh3SrBapxhuXS9Le7PQJk9G6r2Ut uyVGwJ4um2thdl/bWSqDNojsjF2AYsw1D4MVmQKyORLkUFPQ5bphNedAvwS9Du6dSPimgUnMCzn GPa+x0uY05eAuMwEzGKw3X6UB X-Received: by 2002:a50:c212:: with SMTP id n18mr16278edf.211.1638290242422; Tue, 30 Nov 2021 08:37:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJy57ARSUKaC0ebXxvscfGuqaaswkzNuQrFFOOePMe7aFpALHRgkfOrDZWS1YW8CWOJxY7ecHw== X-Received: by 2002:a50:c212:: with SMTP id n18mr16254edf.211.1638290242292; Tue, 30 Nov 2021 08:37:22 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id a13sm8722422edk.29.2021.11.30.08.37.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:37:21 -0800 (PST) From: christian.ehrhardt@canonical.com To: Qiming Chen Cc: Haiyue Wang , dpdk stable Subject: patch 'net/ixgbe: fix mbuf leak' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:33:48 +0100 Message-Id: <20211130163605.2460997-24-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 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 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/6d3cd4152bf4c53dc2972ce16ccec55b29173970 Thanks. Christian Ehrhardt --- >From 6d3cd4152bf4c53dc2972ce16ccec55b29173970 Mon Sep 17 00:00:00 2001 From: Qiming Chen Date: Wed, 1 Sep 2021 15:22:37 +0800 Subject: [PATCH] net/ixgbe: fix mbuf leak [ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ] A local test found that repeated port start and stop operations during the continuous SSE vector bufflist receiving process will cause the mbuf resource to run out. The final positioning is when the port is stopped, the mbuf of the pkt_first_seg pointer is not released. Resources leak. The patch scheme is to judge whether the pointer is empty when the port is stopped, and release the corresponding mbuf if it is not empty. Fixes: af75078fece3 ("first public release") Signed-off-by: Qiming Chen Acked-by: Haiyue Wang --- drivers/net/ixgbe/ixgbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 8b9b009396..ed36a33b5d 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -2838,6 +2838,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1); rxq->rx_tail = 0; rxq->nb_rx_hold = 0; + + if (rxq->pkt_first_seg != NULL) + rte_pktmbuf_free(rxq->pkt_first_seg); + rxq->pkt_first_seg = NULL; rxq->pkt_last_seg = NULL; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:07.517362458 +0100 +++ 0024-net-ixgbe-fix-mbuf-leak.patch 2021-11-30 16:50:05.602872150 +0100 @@ -1 +1 @@ -From d54b51efb6ef12b8cdfc7316316d99e2a762e1cd Mon Sep 17 00:00:00 2001 +From 6d3cd4152bf4c53dc2972ce16ccec55b29173970 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d54b51efb6ef12b8cdfc7316316d99e2a762e1cd ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index c814a28cb4..bfdfd5e755 100644 +index 8b9b009396..ed36a33b5d 100644 @@ -26 +27 @@ -@@ -2981,6 +2981,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq) +@@ -2838,6 +2838,10 @@ ixgbe_reset_rx_queue(struct ixgbe_adapter *adapter, struct ixgbe_rx_queue *rxq)