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 41B72A034F for ; Wed, 10 Nov 2021 07:35:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3B6284068B; Wed, 10 Nov 2021 07:35:59 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2048.outbound.protection.outlook.com [40.107.93.48]) by mails.dpdk.org (Postfix) with ESMTP id 2F70B40142 for ; Wed, 10 Nov 2021 07:35:57 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nrG+5Ea5QUD02XsIxJk2AaopjdnfrAo7IxXvNJ3w92tdI3vfWNVxNsefwUEA+qLKL0xtQ5BEtU9d3E1173H7QUsme2k49cPsZNyuHpf9XCJ/FWHmvmircA09r50HsiqCixGwclW1vjcDzfMQ41fAgNH95z+R745IqTnPRTZTMhFQkyuq6nmDJj2UA1crMfNcJvDCvbxZBaylqpzq48ZG9DbSHGlOIWHqbiu7Lh4u7gSm92BgczaQgWfcgNCVdQyfaCNlZVP4nePpZTqDF3+fZakKaZV/t8cQkF1fMo8wMVOdAOafsEMerXU4vPMdgb7HqisnmIZYXmxTOASBOQvYBA== 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=foxCRjhCnHgDgxYG1ByPFZO59SP6rmrq0tiOCup3rv8=; b=mQzsNVe0yh+wMopSomMb1bTLeYr8p74k93TdUij6GJ8CpEMWfEngNO3gjbCM39eZpcUnKR+phaXrywXaXHTILCecoSdxb1z34FpWxRIDzm4or76xG22i7y6t5nFA424lWLjp6GicxKjMgqcEq81KBDHCCgig3L/ddaale7OYIj4JPeX5oysKGdidppdEZHI+n500nCreAKs8Wxbhs5CRiHGC7Md2oN7qACvW9Cl46qSiRWfX5xA8vNXgONCzeEmkhQSfDFKjJII2CWmBuQhtiGYgSljsGyC2dZqk4x7kdRFBmn40D+9EJ4KwedML58YHBVxQC+suITHxbtdACaXNdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none 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=foxCRjhCnHgDgxYG1ByPFZO59SP6rmrq0tiOCup3rv8=; b=aKTcRmiPZpovSGhnm6127IXejzPR/68msS6MZvlbKbpKGxBNykduAgr0Cm8ZpkePTxzGacEyYNMjWf/d0FcKQ7oQMsxed+hS5ORuRdCAjo8BbaGYtYaH5Sm19oskn59Dz8D7bx/mvbR0fNzI0n4yY+Kayg4lJ5gRmZWGV/eyZbjRgpTqb6Dii6jZbAPoez7xLvFN7VmYfXP0EAjLibhj/KEOdkjXFAmgzXKyxRF8wDU6ZpMBxGsNimgRqYpdo+EsMWX4h6P/DS2E5IEDttvNcT6uTDnvcEURxRYB5yIeGLxVJmu71QXkvlSc3XPfdfR4y6Ka10kZWu+RwjefYOEqJw== Received: from DM6PR02CA0104.namprd02.prod.outlook.com (2603:10b6:5:1f4::45) by CH2PR12MB5545.namprd12.prod.outlook.com (2603:10b6:610:67::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.13; Wed, 10 Nov 2021 06:35:55 +0000 Received: from DM6NAM11FT042.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1f4:cafe::6b) by DM6PR02CA0104.outlook.office365.com (2603:10b6:5:1f4::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:35:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT042.mail.protection.outlook.com (10.13.173.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:35:55 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:35:53 +0000 From: Xueming Li To: Baruch Siach CC: Luca Boccassi , Ciara Loftus , dpdk stable Date: Wed, 10 Nov 2021 14:28:35 +0800 Message-ID: <20211110063216.2744012-32-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d35f8545-29d6-46f6-3d2e-08d9a414593e X-MS-TrafficTypeDiagnostic: CH2PR12MB5545: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ytHmosE+cgM9PuyGwjTBTGT9zcOAmo81juMrYHmrUMF9MiUH89YytiYa7t1FGWSdBQV4K+f8qiskhpzlAIOZLceag4W+RAHfpe9K2IwoP4FMJMfrrmglPVR4Q2MebY8ID8Z++CimVmHrPsiBzRrmLR8n0g14L+JaNxE1D6jBRREnw+ZnHMx25h2CfgD6NjGIR1ii5xND5I8CQVeqymfxvPQyWTHzwEfYabgTMVP0dY35c6P3ZfK7Q1UqDhW32k7sNlgeSXU/1ES+5xw5hps6cZrDRE3+GYHivNukkMAE9SDbuFSMqT33hGxvIJKmuwxKvgBg+ELseWp5RkulI8LEEfyUlQvZl6uS/B5i4TXWU1so2Fu1NtC6CS4XN7YsxqPsv8Aent8oCQFspzvAwx/xwNX4ekKUVf5yiHr4+CEAFMqpovcbkNvVe1DXe+VAhvbsfGRdNtmvMm/EuqcirEvDh/ZZw56NmM29qovOf8i0H5iEM2Be2dgL8j1tWiihmIBk9fbuoPgSnUGSsivB4wXA9e6ApvPEKGwfgSfHr4fypLKQcyhL9sHedylW1pX2E1vMMpoRh8PACXk30Td7P6P0ie6ZPTF9AqGRdARf7kWo0CwpmoK2T4AkiyMtEUev42I21VLc9d+/LDQ0I7lsNoSccUfwtbDs5Ydj/h3imR5wuxI1/qipPxC3M201J3gdxH4l0B7m1jUgYqSxJjp44spCraLVTDNJEmMjosPKPtnxi2rEJcFx14NI4UeaxxEv5ZxrRb9j/maR6na4czfWQt/GktKfgQ+Xj2L3gHzfV12Ybd9CPDvyApbxsU6f3FkIBsWmXrIJY4ti+lnEckYjeoSH3w== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(55016002)(82310400003)(426003)(8936002)(6666004)(26005)(86362001)(336012)(70586007)(47076005)(70206006)(6286002)(7636003)(2616005)(356005)(36860700001)(53546011)(16526019)(7696005)(186003)(36756003)(36906005)(316002)(54906003)(1076003)(2906002)(4326008)(5660300002)(8676002)(4001150100001)(6916009)(966005)(83380400001)(508600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:35:55.2108 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d35f8545-29d6-46f6-3d2e-08d9a414593e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT042.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB5545 Subject: [dpdk-stable] patch 'net/af_xdp: fix zero-copy Tx queue drain' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Thanks. Xueming Li --- >From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Wed, 25 Aug 2021 13:05:44 +0300 Subject: [PATCH] net/af_xdp: fix zero-copy Tx queue drain Cc: Xueming Li [ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ] Call xsk_ring_prod__submit() before kick_tx() so that the kernel consumer sees the updated state of Tx ring. Otherwise, Tx packets are stuck in the ring until the next call to af_xdp_tx_zc(). Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Signed-off-by: Baruch Siach Acked-by: Ciara Loftus --- drivers/net/af_xdp/rte_eth_af_xdp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 3885fb7c78..312e424359 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c @@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (!xsk_ring_prod__reserve(&txq->tx, 1, &idx_tx)) { rte_pktmbuf_free(local_mbuf); - kick_tx(txq, cq); goto out; } @@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) tx_bytes += mbuf->pkt_len; } - kick_tx(txq, cq); - out: xsk_ring_prod__submit(&txq->tx, count); + kick_tx(txq, cq); txq->stats.tx_pkts += count; txq->stats.tx_bytes += tx_bytes; -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:03.510109335 +0800 +++ 0031-net-af_xdp-fix-zero-copy-Tx-queue-drain.patch 2021-11-10 14:17:01.777413521 +0800 @@ -1 +1 @@ -From 0f2ffb49ce29351fad043377a6d2f144f3c52afb Mon Sep 17 00:00:00 2001 +From af6efb8cb21cb6115a3fa20001f979f7beb6c9e9 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 0f2ffb49ce29351fad043377a6d2f144f3c52afb ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 74ffa45112..9bea0a895a 100644 +index 3885fb7c78..312e424359 100644 @@ -23 +25 @@ -@@ -527,7 +527,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -490,7 +490,6 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) @@ -31 +33 @@ -@@ -551,10 +550,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) +@@ -514,10 +513,9 @@ af_xdp_tx_zc(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)