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 5455643B7D for ; Tue, 5 Mar 2024 10:58:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EFB042E4D; Tue, 5 Mar 2024 10:58:02 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2067.outbound.protection.outlook.com [40.107.243.67]) by mails.dpdk.org (Postfix) with ESMTP id 508AE4014F for ; Tue, 5 Mar 2024 10:58:00 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W42vPen+pGiSx5Kdw8H59mVCvfuHja26XJ3oLQrflVT80q0VldgqzMh/L0SkmbExvrRD1azoJjQ9Zd7mnXdr2CFgaRJVV7RSJIYrs4ZdI36C4WnfjE6WrjzF+nrdlnkHbpAGOSV7uNak8FBDhQWjVhIK21j/eNc/5GqNjX4qavZt8A01zFXrEEavmWY5UoToDjqmCbYzJeK0LhH/L4DejUwbBwjqG1OIzqm7dJFXJzb2kdnfds5HiBKKK9pY6EUH1ciHKAdIOFRSP7Hc1FK1ZpWOJ1t02Q84U6cJYLARG5yyotUE6kg69NPxOe5dQBAWsAmJRDOJx7C8pOmFiwnpxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0//KjeqLrIia8PcWGrBgK06t4E0/+dlVvcZKloFpJq0=; b=FRa264QCvM1Gjd/Bs3zfABaVP/dEQXNSojdqA0bR/ejSL+gDONOIUin+5Rdo6GQYEuzyB5WgEmTrjpMfYQdlYRrIWindE8JqQcn0sudc5pDVPFJOFN/pskYBa+ubX6eHAFCTD0/jOEKXK3yKcWJQsBW34T7UbllQ8aRBvAvOHo4eIVp4Rs+aQ+Wmvf9JArJ1rb4pUa/Pmcc3C45GgPe6ggX3UNszxLQY/mFl+M4tCWwSa5B5pkKSyNCypOlse2tR5SyMUAFskmdMFMB3ccW8hC8IzVYr0rwN3FiYc0cRAW+dv1nF4EHPMgNdZEsJBa2OFpDumxFZr4TwiVRZv/7m7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0//KjeqLrIia8PcWGrBgK06t4E0/+dlVvcZKloFpJq0=; b=WygJ1T6KK4S4wgdKDjHkYQgxz5eoQmTsgJ7dsUBN3QxFUtqA1z1FlfFOXtI06mbJ9I4TVxUfboCQgY2lq7Assbb5JFFQTRO5bCA8vZgH3NqpZcawKDJwRKSblIyzWySjI1KU9mqxX6wIGP+skpFkXbI1L/IEqlUmoH84cYPYLndmYaAUgzMtV3+xw5IDTg6hK3JzZsc5G/Kn+9uuJbLM723qPAG7HQxOj83+BG/urJQpBBKkIB53Z7yKdM8U6dDWXthYJa5aw8IM3dEL1+lecJrmCYCkArtNmce4iODvSOzrhQecWcmt7F1c+5s/PchvtVJGaQgN0glYNuKDHZum5g== Received: from SJ0PR13CA0067.namprd13.prod.outlook.com (2603:10b6:a03:2c4::12) by PH7PR12MB7890.namprd12.prod.outlook.com (2603:10b6:510:268::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 09:57:57 +0000 Received: from CO1PEPF000042A9.namprd03.prod.outlook.com (2603:10b6:a03:2c4:cafe::41) by SJ0PR13CA0067.outlook.office365.com (2603:10b6:a03:2c4::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.23 via Frontend Transport; Tue, 5 Mar 2024 09:57:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000042A9.mail.protection.outlook.com (10.167.243.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:57:56 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:57:38 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:57:36 -0800 From: Xueming Li 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 23.11.1 Date: Tue, 5 Mar 2024 17:47:29 +0800 Message-ID: <20240305094757.439387-109-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042A9:EE_|PH7PR12MB7890:EE_ X-MS-Office365-Filtering-Correlation-Id: 49ecc9fc-30ee-401f-e0bf-08dc3cfabbcc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lcJIy5gU1PP14R+gEUni2Dw1xyNR/OHhB0sbOQAFJh0jLtqOA/fiDbIJChEUpQHjNSa219kc+rkybzzfGHvXuDk0pID6xzZM4Rtf0CHPYyoyAr+gXWJiRMam7cBkyzH3dOSCesBOmXxrrUUCDKRiFDmdEzqPFgtxksxmwXsmw9DWlleTVD/MwzG6IsDqBJnoWnwYGwS0Zf8VyBmtoK8MXexlHvFXH6rtWIXygjJKQPL/eu8ZS0GXnRDfJwuu1fRc0J2PsJvuxEybnICiY/AVM63Fu4xq/DA7lcXebV0luKxCn83C2k6lpYuX69Ab7VVve3Rs+GmTm1uvYtRpSNskd1dF7L2ZZXkwn5xj7lA5OGk2ub5MjI1LyAhB9TQgQ7Sfc0SnlsGoOwqmj4tiYCVEKQWc66U1Z7ipFPi4zxXxLU8MmLhLx/e0Y59MGbwr9xhEHbXd5UWeNpd2Aq9q7jvlA/lzKg689rORZR0foIJHJUQMsc91rHj/bhrLjuLEeotFHkvsQkUERuU/3MUERYkRpLNyalwoInkuR1inC/Bt18s5jnjBwIX3PIjPrx+1ZKvUT8HDNVb9wE8zXJKnAGpKs6HYQ4kJgEv/A2KmacYtWchYBJrXH4JL4Cfa5vdSORKuvCI7XI9rPLXb9x7ZHJ9QvaNxXXbW1miFBXzInyckPw4P5PyqPB8murWdfD4kRjEf8ysGdZHtybUv4EyRILwajYB1xYGnmC7xG6NU2ySMxftWjd1F8yM3nXYTp+6MoQTL X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:57:56.8618 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49ecc9fc-30ee-401f-e0bf-08dc3cfabbcc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042A9.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7890 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 23.11.1 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/31/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=edaeda9ef7ec00ecce31b4e5d16158e60fb1e15f Thanks. Xueming Li --- >From edaeda9ef7ec00ecce31b4e5d16158e60fb1e15f 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 Cc: Xueming Li [ 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 65c0e8e0ac..55901a26c0 100644 --- a/.mailmap +++ b/.mailmap @@ -1511,6 +1511,7 @@ Walter Heymans Wang Sheng-Hui Wangyu (Eric) Waterman Cao +Wathsala Vithanage Weichun Chen Wei Dai Weifeng Li diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 6f45a00172..18377d9caf 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -265,8 +265,6 @@ memif_free_stored_mbufs(struct pmd_process_private *proc_private, struct memif_q cur_tail = __atomic_load_n(&ring->tail, __ATOMIC_ACQUIRE); 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++; } @@ -825,10 +823,6 @@ memif_tx_one_zc(struct pmd_process_private *proc_private, struct memif_queue *mq 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]; d0->length = rte_pktmbuf_data_len(mbuf); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:34.230372508 +0800 +++ 0108-net-memif-fix-extra-mbuf-refcnt-update-in-zero-copy-.patch 2024-03-05 17:39:30.893566497 +0800 @@ -1 +1 @@ -From aa3e97fcb55d7b68fef864aa76078bdae375ad3d Mon Sep 17 00:00:00 2001 +From edaeda9ef7ec00ecce31b4e5d16158e60fb1e15f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit aa3e97fcb55d7b68fef864aa76078bdae375ad3d ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -33 +35 @@ -index e040e2219b..b2d0fc0729 100644 +index 65c0e8e0ac..55901a26c0 100644 @@ -36 +38 @@ -@@ -1518,6 +1518,7 @@ Walter Heymans +@@ -1511,6 +1511,7 @@ Walter Heymans