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 C867843829 for ; Tue, 5 Mar 2024 16:36:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEB0F42E51; Tue, 5 Mar 2024 16:36:13 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id D2425410D3 for ; Tue, 5 Mar 2024 16:36:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709652971; 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=XCwdFRvWccwgN7Becs0ikql/VEaHMcpFkQh6bqYtJks=; b=U/f9uugdUErgmZRF1zL+OmJIaLQ+0MuF8ddu3kCtk7SXAT/rTkhoXXNwjh1bQbkwPoZ+2Y F/Q4RnkvzTHWMdq0RVUOxBUYB6kv0hlqC+AAWbbinaJL9aFoaAli0BQhdplhyD4vXlw0Bk DQlppmBCTevbAN2DQt224ose8aBunnY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-547-HK48_lOYPnCJ4PF2-Ri7Ow-1; Tue, 05 Mar 2024 10:36:09 -0500 X-MC-Unique: HK48_lOYPnCJ4PF2-Ri7Ow-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 576693C02535; Tue, 5 Mar 2024 15:36:08 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 252F8200AFA2; Tue, 5 Mar 2024 15:36:07 +0000 (UTC) From: Kevin Traynor To: Wathsala Vithanage Cc: Liangxing Wang , Ruifeng Wang , Ferruh Yigit , dpdk stable Subject: patch 'net/memif: fix extra mbuf refcnt update in zero copy Tx' has been queued to stable release 21.11.7 Date: Tue, 5 Mar 2024 15:34:28 +0000 Message-ID: <20240305153449.263666-55-ktraynor@redhat.com> In-Reply-To: <20240305153449.263666-1-ktraynor@redhat.com> References: <20240305153449.263666-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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.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 03/11/24. 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/18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 Thanks. Kevin --- >From 18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 Mon Sep 17 00:00:00 2001 From: Wathsala Vithanage Date: Wed, 14 Feb 2024 00:36:16 +0000 Subject: [PATCH] net/memif: fix extra mbuf refcnt update in zero copy Tx [ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ] The refcnt update of stored mbufs in memif driver is redundant since those mbufs are only freed in eth_memif_tx_zc(). No other place can free those stored mbufs quietly. By removing this redundant update single core dpdk memif performance can be improved by 7.5%. testpmd stats on Arm Neoverse N1 (Ampere Altra) +-----------------------------+-----------------------+ | | With refcnt update | Without refcnt update | +--------+--------------------+-----------------------+ | Rx-pps | 2748851 | 2955487 | +--------+--------------------+-----------------------+ | Tx-pps | 2748812 | 2955436 | +--------+--------------------+-----------------------+ Fixes: 43b815d88188 ("net/memif: support zero-copy slave") Signed-off-by: Liangxing Wang Signed-off-by: Wathsala Vithanage Reviewed-by: Ruifeng Wang Acked-by: Ferruh Yigit --- .mailmap | 1 + drivers/net/memif/rte_eth_memif.c | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.mailmap b/.mailmap index af1a1103cb..5891d511a4 100644 --- a/.mailmap +++ b/.mailmap @@ -1453,4 +1453,5 @@ Wang Sheng-Hui Wangyu (Eric) Waterman Cao +Wathsala Vithanage Weichun Chen Wei Dai diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index abaf98c65e..88908a42a5 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -265,6 +265,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q while (mq->last_tail != cur_tail) { RTE_MBUF_PREFETCH_TO_FREE(mq->buffers[(mq->last_tail + 1) & mask]); - /* Decrement refcnt and free mbuf. (current segment) */ - rte_mbuf_refcnt_update(mq->buffers[mq->last_tail & mask], -1); rte_pktmbuf_free_seg(mq->buffers[mq->last_tail & mask]); mq->last_tail++; @@ -711,8 +709,4 @@ next_in_chain: /* store pointer to mbuf to free it later */ mq->buffers[slot & mask] = mbuf; - /* Increment refcnt to make sure the buffer is not freed before server - * receives it. (current segment) - */ - rte_mbuf_refcnt_update(mbuf, 1); /* populate descriptor */ d0 = &ring->desc[slot & mask]; -- 2.43.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 14:08:55.955732512 +0000 +++ 0055-net-memif-fix-extra-mbuf-refcnt-update-in-zero-copy-.patch 2024-03-05 14:08:54.698520892 +0000 @@ -1 +1 @@ -From aa3e97fcb55d7b68fef864aa76078bdae375ad3d Mon Sep 17 00:00:00 2001 +From 18fb9b63a8efdfdb26512bfcfe72bc19cf9f86d9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -33 +34 @@ -index e040e2219b..b2d0fc0729 100644 +index af1a1103cb..5891d511a4 100644 @@ -36 +37 @@ -@@ -1519,4 +1519,5 @@ Wang Sheng-Hui +@@ -1453,4 +1453,5 @@ Wang Sheng-Hui @@ -43 +44 @@ -index 6f45a00172..18377d9caf 100644 +index abaf98c65e..88908a42a5 100644 @@ -46 +47 @@ -@@ -266,6 +266,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q +@@ -265,6 +265,4 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q @@ -53 +54 @@ -@@ -826,8 +824,4 @@ next_in_chain: +@@ -711,8 +709,4 @@ next_in_chain: