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 38DE1427EF for ; Wed, 22 Mar 2023 11:32:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3525742C76; Wed, 22 Mar 2023 11:32:44 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0245D41148 for ; Wed, 22 Mar 2023 11:32:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679481162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MjGW7oZ7j+XGeeYqSoWbLqADLdAyvaXjLtrwSpxWSYI=; b=Nruf5f7xHTOqSrjoO5+e9lz0cnEHiCC+rU6ZgBHiE3wfTzBEe3aAg38nWk3yvQAj/JZPit 3NVwgXAXdhVtAz/3AxQzv724slWJRIA0FxRR5eQ/SRwIHTKrlZE0Lm62iHH5CsJLnRfAa2 QQFDYU6AzsOOMztuYG8tMMEmk1/V4sI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-190-vvafVto8MCqIJ6MXtEtEuA-1; Wed, 22 Mar 2023 06:32:39 -0400 X-MC-Unique: vvafVto8MCqIJ6MXtEtEuA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 099BF185A791; Wed, 22 Mar 2023 10:32:39 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.69]) by smtp.corp.redhat.com (Postfix) with ESMTP id A4F45492C13; Wed, 22 Mar 2023 10:32:37 +0000 (UTC) From: Kevin Traynor To: Kamalakshitha Aligeri Cc: Ruifeng Wang , Feifei Wang , =?UTF-8?q?Morten=20Br=C3=B8rup?= , dpdk stable Subject: patch 'net/i40e: fix AVX512 fast-free path' has been queued to stable release 21.11.4 Date: Wed, 22 Mar 2023 10:32:01 +0000 Message-Id: <20230322103209.456098-14-ktraynor@redhat.com> In-Reply-To: <20230322103209.456098-1-ktraynor@redhat.com> References: <20230322103209.456098-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 21.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/24/23. 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/ac111b80fe45d3c13c82068e12bba2645b04e6ed Thanks. Kevin --- >From ac111b80fe45d3c13c82068e12bba2645b04e6ed Mon Sep 17 00:00:00 2001 From: Kamalakshitha Aligeri Date: Tue, 7 Mar 2023 19:32:21 +0000 Subject: [PATCH] net/i40e: fix AVX512 fast-free path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 1ad4bea0d73a7671095c2c675f9bb8b19503ac06 ] In i40e_tx_free_bufs_avx512 fast-free path, when cache is NULL, non fast-free path is being executed. Fixed the bug by calling rte_mempool_generic_put API that handles the cache==NULL case. Fixes: 5171b4ee6b6b ("net/i40e: optimize Tx by using AVX512") Signed-off-by: Kamalakshitha Aligeri Reviewed-by: Ruifeng Wang Reviewed-by: Feifei Wang Acked-by: Morten Brørup --- .mailmap | 1 + drivers/net/i40e/i40e_rxtx_vec_avx512.c | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.mailmap b/.mailmap index 6a56239c3a..f4568f4984 100644 --- a/.mailmap +++ b/.mailmap @@ -680,4 +680,5 @@ Kaiwen Deng Kalesh AP Kamalakannan R +Kamalakshitha Aligeri Kamil Bednarczyk Kamil Chalupnik diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx512.c b/drivers/net/i40e/i40e_rxtx_vec_avx512.c index 2e8a3f0df6..2ad9a920a1 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx512.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx512.c @@ -907,14 +907,11 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) rte_lcore_id()); - if (!cache || cache->len == 0) - goto normal; - - cache_objs = &cache->objs[cache->len]; - - if (n > RTE_MEMPOOL_CACHE_MAX_SIZE) { - rte_mempool_ops_enqueue_bulk(mp, (void *)txep, n); + if (!cache || n > RTE_MEMPOOL_CACHE_MAX_SIZE) { + rte_mempool_generic_put(mp, (void *)txep, n, cache); goto done; } + cache_objs = &cache->objs[cache->len]; + /* The cache follows the following algorithm * 1. Add the objects to the cache @@ -948,5 +945,4 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) } -normal: m = rte_pktmbuf_prefree_seg(txep[0].mbuf); if (likely(m)) { -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-03-22 10:30:08.271775142 +0000 +++ 0014-net-i40e-fix-AVX512-fast-free-path.patch 2023-03-22 10:30:07.917866567 +0000 @@ -1 +1 @@ -From 1ad4bea0d73a7671095c2c675f9bb8b19503ac06 Mon Sep 17 00:00:00 2001 +From ac111b80fe45d3c13c82068e12bba2645b04e6ed Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 1ad4bea0d73a7671095c2c675f9bb8b19503ac06 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index 9578b86866..c77cdc9ddf 100644 +index 6a56239c3a..f4568f4984 100644 @@ -29 +30 @@ -@@ -682,4 +682,5 @@ Kaiwen Deng +@@ -680,4 +680,5 @@ Kaiwen Deng @@ -36 +37 @@ -index d3c7bfd121..ad0893324d 100644 +index 2e8a3f0df6..2ad9a920a1 100644 @@ -39 +40 @@ -@@ -784,14 +784,11 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) +@@ -907,14 +907,11 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) @@ -58 +59 @@ -@@ -825,5 +822,4 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq) +@@ -948,5 +945,4 @@ i40e_tx_free_bufs_avx512(struct i40e_tx_queue *txq)