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 9C99343B7D for ; Tue, 5 Mar 2024 10:58:15 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 966F74026B; Tue, 5 Mar 2024 10:58:15 +0100 (CET) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2078.outbound.protection.outlook.com [40.107.101.78]) by mails.dpdk.org (Postfix) with ESMTP id F0D524014F for ; Tue, 5 Mar 2024 10:58:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ioIL4yvrxRzXP4rfuQHVugSnoDKXC7pos8fWJ7bSYwhOvb5x/AD2t2Vr0T19iPFtdoEnsdNuWTAyttL7VvZwNhRyGbjVOIYNG0taaabUhMB427jLfLIxWMuT/y8KxCQF9u8NlYH0P0SHcrQCC0B7D98IKYpsU4hxXBnloVFGjHzSp/XVyvY2hQCM3l4UQ1y6ncazEy52pHwRqwJWOecEoXz9S6dZDT3ZBgJj6wHt2L6P5ybzNsUD572JlC9sj+fMNgk3JBnqADYBhqmXRDRKk4IqwchPeMosZ0Py+7Ekmm9fGnCWKfAWw8ypk3x6dVe6KNp0qzt/R+cabuoDHCkhjw== 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=WTeBgIFTAhzCr9i6Dky6o5G74QIfsTp/LoXM5QqJCqU=; b=jTYDCsAhiOyYpwTYwXuLzbgzVDfSxOITv4R9F0tns7tks9tIOigV44GbLH1o+5TZYlTAL1RgSAQ9aCX2d+X9kNw19fzOp2nZOHAGJadvwtA3DSDHBSEfbBMD2LCyco82/UsliVKYvDvhTY2yPJcRcjHHFEIXUpbRspjE5nlhYuF+q5DjgGxMYRunqi74Fg5Yf00sK1fVo1PiRIKaZBpReTSpeS5DTbo89vois73XFQBiNfDi0WRitpUOB3BPgsTIUpwCL/PncL6WslkfHiLtU/HRDhi8Job9vPUEsV6aGNJ3/LZfNPH1CX0E3nK+p2wd9bBmJBm2nIl8UubDfCDnQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=google.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=WTeBgIFTAhzCr9i6Dky6o5G74QIfsTp/LoXM5QqJCqU=; b=g3IOmaNNmK3EuapCfjrodzM5KcblRQem2bNEKhG2MqdcOYN1Sqa+Sskfki/355tZd8nxzabauBuW2N8X9FMYER9/EMgQ1Ax2sYKAHEvD84H59VN2HI0eKF8iLZ/GCeSqPvpsbVuz7lH0qhMN5amCP6ovr010EBK9pJOeID3leTYzAW+4g4KFMqq8qYTNk3I91LvOAdhPaut3hpGRdnCpSXaUeBY36EQwAr1Ym698c3U/dP6aj1hhmqJ39BwxSX4rJ8Gk1eKCN3m/Shd2OM+fDQqUnd4pXg3InRb7wu/GOGKoCKj1quNdyrs6K114g0sN3lh1lZ/u3GsQW72SQmlzYQ== Received: from SJ0PR13CA0127.namprd13.prod.outlook.com (2603:10b6:a03:2c6::12) by LV8PR12MB9405.namprd12.prod.outlook.com (2603:10b6:408:1fa::22) 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:58:08 +0000 Received: from SJ5PEPF000001D6.namprd05.prod.outlook.com (2603:10b6:a03:2c6:cafe::30) by SJ0PR13CA0127.outlook.office365.com (2603:10b6:a03:2c6::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:58:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SJ5PEPF000001D6.mail.protection.outlook.com (10.167.242.58) 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:58:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) 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:59 -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:57 -0800 From: Xueming Li To: Rushil Gupta CC: Joshua Washington , dpdk stable Subject: patch 'net/gve: fix DQO for chained descriptors' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:31 +0800 Message-ID: <20240305094757.439387-111-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: SJ5PEPF000001D6:EE_|LV8PR12MB9405:EE_ X-MS-Office365-Filtering-Correlation-Id: 13ef1f40-27d6-4dcd-f9c0-08dc3cfac296 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rkE+Q1N+PWgR4eYBA1YlzifpE11yXKE2H92G4mlbPuxz7B0xvgXWvUcHaSsbhkIGnAwLNW0s9bxMKtFXjtgCetT0dBKw84QJF3II/1H9wCF97gyixSqMQfwwsfQhPn7YEYH7GrZ9pNhF8i3+46RNh49TsRwtuAL6RTwdhc+BaYqbIBTwotwLvG9fqfSG2I6ZGilCl1PKzeVF/QM2kITQwjesi4+BIrBmhSG0JjCFl2wRr52esFSY+ZDPBq07vviRIJU/pA/Qz//HqAA0utdvMS8qTev9EJBfLcBFxrRp+v//gHF5XG+8KhxxrTSLP9UkAOcTrYcMJYRNzgUZ6VVrRAjhN5mPUFsoyVOTo/1OWxd7gPjpmIV8WA8Q5Wc96d5Tsuiu87tXG657h7he0LejgFai+Cox4Miz+edICHUldDgMsB0wiWa4fKOk91X7rWjvHV6ZzB4zsLp6wHuxT93bsYQ+51APQEb+oDqSAfct1vX71Ku46e7GUodIjGfTtUksZWCutIiUAcnxAAHTpl2pbIGSMSG46fQHYTHgPcCjYK7Okz0XmXDA/08FrCIILttbrTMK9+ZxkN6kr4SGDqQnYFv9CZClJ1DA6OfLJjP1tEvVxwTX5uShWxC5TH5O+zJL9LTbdHBX7s65j1RPK+d7roKEUfOe2yJBdUFxOurXyEee/TCzgqyyG7IhEb/ZjB76MO0ooy+KmeybOVJRkm7Lwu71+fHVE35T/2IEe82zJnEcR1J9ssUIYC1yxEQI/l0t X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:58:08.3620 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 13ef1f40-27d6-4dcd-f9c0-08dc3cfac296 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001D6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9405 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=561a3f508fcc648f599b683656af8d8e54814789 Thanks. Xueming Li --- >From 561a3f508fcc648f599b683656af8d8e54814789 Mon Sep 17 00:00:00 2001 From: Rushil Gupta Date: Thu, 15 Feb 2024 10:02:30 +0000 Subject: [PATCH] net/gve: fix DQO for chained descriptors Cc: Xueming Li [ upstream commit ab2fc2cd7016ba4b65b2f9fd845f0f9a7a87ef16 ] DQO Tx path had a bug where driver was overwriting mbufs in sw-ring. We fixed this bug by cleaning slots for all segments. Fixes: 4022f9999f56 ("net/gve: support basic Tx data path for DQO") Signed-off-by: Rushil Gupta Reviewed-by: Joshua Washington --- drivers/net/gve/gve_tx_dqo.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/net/gve/gve_tx_dqo.c b/drivers/net/gve/gve_tx_dqo.c index 16101de84f..30a1455b20 100644 --- a/drivers/net/gve/gve_tx_dqo.c +++ b/drivers/net/gve/gve_tx_dqo.c @@ -13,7 +13,7 @@ gve_tx_clean_dqo(struct gve_tx_queue *txq) struct gve_tx_compl_desc *compl_desc; struct gve_tx_queue *aim_txq; uint16_t nb_desc_clean; - struct rte_mbuf *txe; + struct rte_mbuf *txe, *txe_next; uint16_t compl_tag; uint16_t next; @@ -43,10 +43,15 @@ gve_tx_clean_dqo(struct gve_tx_queue *txq) PMD_DRV_LOG(DEBUG, "GVE_COMPL_TYPE_DQO_REINJECTION !!!"); /* FALLTHROUGH */ case GVE_COMPL_TYPE_DQO_PKT: + /* free all segments. */ txe = aim_txq->sw_ring[compl_tag]; - if (txe != NULL) { + while (txe != NULL) { + txe_next = txe->next; rte_pktmbuf_free_seg(txe); - txe = NULL; + if (aim_txq->sw_ring[compl_tag] == txe) + aim_txq->sw_ring[compl_tag] = NULL; + txe = txe_next; + compl_tag = (compl_tag + 1) & (aim_txq->sw_size - 1); } break; case GVE_COMPL_TYPE_DQO_MISS: @@ -83,6 +88,7 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) uint16_t tx_id; uint16_t sw_id; uint64_t bytes; + uint16_t first_sw_id; sw_ring = txq->sw_ring; txr = txq->tx_ring; @@ -107,23 +113,25 @@ gve_tx_burst_dqo(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) ol_flags = tx_pkt->ol_flags; nb_used = tx_pkt->nb_segs; - + first_sw_id = sw_id; do { - txd = &txr[tx_id]; + if (sw_ring[sw_id] != NULL) + PMD_DRV_LOG(DEBUG, "Overwriting an entry in sw_ring"); + txd = &txr[tx_id]; sw_ring[sw_id] = tx_pkt; /* fill Tx descriptor */ txd->pkt.buf_addr = rte_cpu_to_le_64(rte_mbuf_data_iova(tx_pkt)); txd->pkt.dtype = GVE_TX_PKT_DESC_DTYPE_DQO; - txd->pkt.compl_tag = rte_cpu_to_le_16(sw_id); + txd->pkt.compl_tag = rte_cpu_to_le_16(first_sw_id); txd->pkt.buf_size = RTE_MIN(tx_pkt->data_len, GVE_TX_MAX_BUF_SIZE_DQO); /* size of desc_ring and sw_ring could be different */ tx_id = (tx_id + 1) & mask; sw_id = (sw_id + 1) & sw_mask; - bytes += tx_pkt->pkt_len; + bytes += tx_pkt->data_len; tx_pkt = tx_pkt->next; } while (tx_pkt); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:34.282763810 +0800 +++ 0110-net-gve-fix-DQO-for-chained-descriptors.patch 2024-03-05 17:39:30.903566497 +0800 @@ -1 +1 @@ -From ab2fc2cd7016ba4b65b2f9fd845f0f9a7a87ef16 Mon Sep 17 00:00:00 2001 +From 561a3f508fcc648f599b683656af8d8e54814789 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ab2fc2cd7016ba4b65b2f9fd845f0f9a7a87ef16 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org