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 9B38D43B7D for ; Tue, 5 Mar 2024 11:00:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9353C4026B; Tue, 5 Mar 2024 11:00:31 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 008AE4014F for ; Tue, 5 Mar 2024 11:00:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bl+3Nwb46dDFH8HKSZP+r+3eoxd5oi5uicTTiKY72/hEpaw3IbW/3+Jv9OUDqC5UHT7JMIyBl4Dusf+shODooP2LbxFfxKczs8opGljx1+JFUta+9mu5+MiWjc61t5sHLGO1QSP7S1JbS+cQUd8QaC16BTl9Zo8VNAbiQRHRFgHnOAVqwdjpZZ2/3oBs91dX7PeFufTyBS6aBPCkMB/GzNuhsmuqp1//PB2G+Kam48+qMTcTnaInUZqbZRDlBomc2wVo4ytrnwH7nHWwTrT5qxt1BSA4iF92NbTkCLlXE7ocMdwQu6zdSSsuD+XQEqVUOVibss/BavxMrc+E2Y3qtg== 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=BPjLcZomx1w4soz3xaSb6KRa6Huu0kmadAMBQSo28aQ=; b=MrBd8AtQPg6bVBj80YRQNMMMAzX1C23rVJOkDo8CHG/iY+7emBVRh6KSfNLEGQ5yMNBIOyhP2c0OOgzP7ZuQUxsDCTGtKL8qWOZ83ZEf7OKFoEktypHwAt3bHqQjYWWuHGsDxjYuq/soXp0QKRNhTqjDbpEu7sfahl3PxwY2fO/C7MNli3OzqpC97Jc34IiOwwJaFEMjuazD2adDfdTw4uhHrlNyx9h6v56wR6eAJUGkeAYKijkGAnwABFtkcTt4KSChsJoihniagVTet3oQh5VlWzGpD8vk/vxE/my29rWyNHaUidh1BhJ5uwJmqzCspmAfchyi0TncC000IguJpg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=corigine.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=BPjLcZomx1w4soz3xaSb6KRa6Huu0kmadAMBQSo28aQ=; b=ts16yM38u90lUF+TMKYYw0CL22Mlv0lZM+qIvE7vWWSS3MwHxS7eWsbb4oCbKAKIJrpszS/1lPjdnUXmqYfFmghMUOCyE0M8HckuiSRXwMAUSgQE0gX6DqKOuV0nQ0QuSEYR8Qn/HJRz5RTtObaopE5peJO4MXBrV6G6sOWqmiONHgPicLotFmmX+FkheTHP1NqUdlfArYrxnZ/YF2zKh8YP8/csBl3SRU2TZVSJN+jEL1chGH1x26WeXpilir2ahvhLQrmOAi0SaBhipYaCldUPXdEFW5tJsQU3IDPH1hy4mkzbYdFf/4MWREa9fyJgd4aOu911bdoalL3BZW3vvA== Received: from SA0PR11CA0183.namprd11.prod.outlook.com (2603:10b6:806:1bc::8) by CY8PR12MB7291.namprd12.prod.outlook.com (2603:10b6:930:54::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.37; Tue, 5 Mar 2024 10:00:27 +0000 Received: from SA2PEPF00001506.namprd04.prod.outlook.com (2603:10b6:806:1bc:cafe::1c) by SA0PR11CA0183.outlook.office365.com (2603:10b6:806:1bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.40 via Frontend Transport; Tue, 5 Mar 2024 10:00:27 +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 SA2PEPF00001506.mail.protection.outlook.com (10.167.242.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 10:00:27 +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 02:00:09 -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 02:00:07 -0800 From: Xueming Li To: Chaoyong He CC: Long Wu , Peng Zhang , "dpdk stable" Subject: patch 'net/nfp: fix NFDk metadata process' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:56 +0800 Message-ID: <20240305094757.439387-136-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: SA2PEPF00001506:EE_|CY8PR12MB7291:EE_ X-MS-Office365-Filtering-Correlation-Id: 5082dc1c-91f5-430a-47b9-08dc3cfb1589 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T1pUO7ex26irWW4Aj8LgDo4KHnmjkEbzt9AYJnhZ8sanqpA5Rv6YkGNzphOTylNWWi6DD76CG1zUSdFszFayZ7OwGcUHXkLHl/ThcWRvIeFYQw2Yy/6kX+xNGsK9V/AALl5cBwrjQu5OQSU+DYjw0mEJAFV2gAbjaymdayk/ltCj7NreCmR5wFJocWfDyvMoBuWMVR20Nbh9tK278Jr+ooB30b3CxatoPG4nT7GxCixZZQTpx6QUL8w6gE834cByTcBGwDUjIegbl3uQos5bogS//UL2a2D1JK1Vp1MPJP9xXfb3R9hDGKnqbe7kHk+V2gWwQvR7gXZo2A4yegYExaU+/7oVTUIfB6ngZFwTeKvr3YgEwJxJvZ6AvXebnTKQVPLKpjMPS5Wo55G6eDDopURGo2/ZyDt2GQyY0WLEgHK0PBsQqGlm4tg+HfEuZ2TWB4C4qqoeeFaecPJpXMTv2at8ah4Zm1BwcLkHdkhvkucoEAux66y4CKPWN9UCtADpcfSNOTIldHya5PQemu+i2G+9+7rOFidw/hNl+HCSTHmxcOU/nwLNG2ILNP1P4rr1O/4mKzaBe4J4oJCUErJB+coVC8/+ChA58UWGB9SCpiRudSYoP8jpCFxi3JQqtz1oS/iUezh5EbupKo8ZKDNznamGPPgGzgenFBQxWJWfgWqP8TnL4f3S11vnISzVzc0Ys54fak0XbVS701zqi3vOacTF2atvXFLO2B5YhgZH0bLRBmWicMpKhaDp8HeKakQh 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)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 10:00:27.4293 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5082dc1c-91f5-430a-47b9-08dc3cfb1589 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: SA2PEPF00001506.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7291 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=cc670c78337dc89cffa5248facf46c121216cf43 Thanks. Xueming Li --- >From cc670c78337dc89cffa5248facf46c121216cf43 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Tue, 20 Feb 2024 16:14:51 +0800 Subject: [PATCH] net/nfp: fix NFDk metadata process Cc: Xueming Li [ upstream commit b36f0b1d3e453727999a5770b00af555e21f07b1 ] The Tx function can not check if the metadata process success for the process function with void return type. Fix it by change the return type of the metadata function from void to integer and add the error handle logic in the Tx function. Fixes: 7c82b8626af8 ("net/nfp: support VLAN insert with NFDk") Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfdk/nfp_nfdk_dp.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c index 0141fbcc8f..6a9e7ec042 100644 --- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c +++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c @@ -167,7 +167,7 @@ close_block: return nop_slots; } -static void +static int nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt, struct nfp_net_txq *txq, uint64_t *metadata) @@ -206,8 +206,10 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt, meta_data.length += 3 * NFP_NET_META_FIELD_SIZE; } - if (meta_data.length == 0) - return; + if (meta_data.length == 0) { + *metadata = 0; + return 0; + } meta_type = meta_data.header; header_offset = meta_type << NFP_NET_META_NFDK_LENGTH; @@ -223,15 +225,16 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt, case NFP_NET_META_VLAN: if (vlan_layer > 0) { PMD_DRV_LOG(ERR, "At most 1 layers of vlan is supported"); - return; + return -EINVAL; } + nfp_net_set_meta_vlan(&meta_data, pkt, layer); vlan_layer++; break; case NFP_NET_META_IPSEC: if (ipsec_layer > 2) { PMD_DRV_LOG(ERR, "At most 3 layers of ipsec is supported for now."); - return; + return -EINVAL; } nfp_net_set_meta_ipsec(&meta_data, txq, pkt, layer, ipsec_layer); @@ -239,13 +242,15 @@ nfp_net_nfdk_set_meta_data(struct rte_mbuf *pkt, break; default: PMD_DRV_LOG(ERR, "The metadata type not supported"); - return; + return -ENOTSUP; } memcpy(meta, &meta_data.data[layer], sizeof(meta_data.data[layer])); } *metadata = NFDK_DESC_TX_CHAIN_META; + + return 0; } uint16_t @@ -292,6 +297,7 @@ nfp_net_nfdk_xmit_pkts_common(void *tx_queue, /* Sending packets */ while (npkts < nb_pkts && free_descs > 0) { + int ret; int nop_descs; uint32_t type; uint32_t dma_len; @@ -319,10 +325,13 @@ nfp_net_nfdk_xmit_pkts_common(void *tx_queue, temp_pkt = pkt; - if (repr_flag) + if (repr_flag) { metadata = NFDK_DESC_TX_CHAIN_META; - else - nfp_net_nfdk_set_meta_data(pkt, txq, &metadata); + } else { + ret = nfp_net_nfdk_set_meta_data(pkt, txq, &metadata); + if (unlikely(ret != 0)) + goto xmit_end; + } if (unlikely(pkt->nb_segs > 1 && (hw->super.cap & NFP_NET_CFG_CTRL_GATHER) == 0)) { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:35.044073435 +0800 +++ 0135-net-nfp-fix-NFDk-metadata-process.patch 2024-03-05 17:39:31.093566504 +0800 @@ -1 +1 @@ -From b36f0b1d3e453727999a5770b00af555e21f07b1 Mon Sep 17 00:00:00 2001 +From cc670c78337dc89cffa5248facf46c121216cf43 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit b36f0b1d3e453727999a5770b00af555e21f07b1 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index a1c6ecdfe5..daf5ac5b30 100644 +index 0141fbcc8f..6a9e7ec042 100644 @@ -26 +28 @@ -@@ -169,7 +169,7 @@ close_block: +@@ -167,7 +167,7 @@ close_block: @@ -108 +110 @@ - (hw->super.ctrl & NFP_NET_CFG_CTRL_GATHER) == 0)) { + (hw->super.cap & NFP_NET_CFG_CTRL_GATHER) == 0)) {