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 53CFC43B7D for ; Tue, 5 Mar 2024 11:00:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EBCF4026B; Tue, 5 Mar 2024 11:00:11 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2087.outbound.protection.outlook.com [40.107.244.87]) by mails.dpdk.org (Postfix) with ESMTP id 6524542E73 for ; Tue, 5 Mar 2024 11:00:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JkK2w5ru4bAsK3wBt0DvFnSSCLebeYLMQ+UuMnMVwcJYnzBAvDewBSAeHCetOfWwFUnJgbvqmoRdA9VlgStPIz4YTub35u7iBQI9TNt/fHLjwnltnn3uj06I+MycjvizpXijr6ChTFj40lgfEmG1Zl0RXU8FudzWyADz79w3R9MhyVv1nZP8cgXaj/kG853BNLfzBxDjbZxLWV5xnHDNvHl6B1ikUSPukcF5CSMttE4I17FeJ82XBIsEOJ8/730/6CEMfugc7qDVPtToZQ4dLJwwMdHn/nQgWPDLL1j7fvMJqzoDaodA3QqaPp7rjrtE7X8SqwhwvuGaHF0e/JICyg== 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=FU7jXeueMdLho3/KSgQxZgLXQ25Gj0q5pP7V/fF3b5k=; b=c9ZoTYlraVLbYg4HEeAFSvpSYBV6JclUL60UrGyc/LppM6Koax6w0jbDXsShy88aZBDDpMPqMPXHW6F7svvwogtwWD5/LDkSLt38dtCbAR6YdRry4WxVasSLeGntXe41tCIZ7qyF4KrvlYl2S2U2qS8Ia2v6GNHKuU37c1UMstsP5apDtQetaueABe78/m2jSmIPk0cAM1/R2Q+3qkvZpXxxS0dZwDlxGDkXWq5WeA2gy6dNxsRrlZZIPTJkcM9Ym6vz7uJpXRNqJT56n+HE4p20P/w2qfH8tvSfYQIO2y8+4V+1s1x1f0Bx/Utw+jhc4ucsg46YGetY7PuGh5EyhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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=FU7jXeueMdLho3/KSgQxZgLXQ25Gj0q5pP7V/fF3b5k=; b=T/PY7S6NSGtKW8j15HTAyStWEEV7VrjN16X9cJN95biTR45oT+vY4P7p3Tca6fsNgAh+5XzC4p1sgdPJtm6eVs9Of6QGCoXXegORKAaYKwysDt8q0ZU6IOPA31ripptqyAcAbdBFMUuda5xUOKj5cpcrYFgJjzw3UvAqEiqWOJCayAA+xrgauaPOOphddvRxfPCoe6VcBBF1cpS1+uVhcYo/wZNN3ssC5LxiKxmGNXOVrKFgt0Ep6c0yI6sUblihEHy/RD50TTzHCUQkP8hquDBGL42U/BZ4lDr7mfEROmmyqyztChT2nYOtCSJBYnUktr94LQ+I5LEJJxLbIFuWEw== Received: from CY5PR15CA0251.namprd15.prod.outlook.com (2603:10b6:930:66::23) by PH7PR12MB6953.namprd12.prod.outlook.com (2603:10b6:510:1ac::21) 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 10:00:03 +0000 Received: from CY4PEPF0000EDD7.namprd03.prod.outlook.com (2603:10b6:930:66:cafe::5d) by CY5PR15CA0251.outlook.office365.com (2603:10b6:930:66::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 10:00:03 +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 CY4PEPF0000EDD7.mail.protection.outlook.com (10.167.241.211) 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:02 +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:59:49 -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:59:48 -0800 From: Xueming Li To: Chaoyong He CC: Long Wu , Peng Zhang , "dpdk stable" Subject: patch 'net/nfp: fix NFD3 metadata process' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:55 +0800 Message-ID: <20240305094757.439387-135-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: CY4PEPF0000EDD7:EE_|PH7PR12MB6953:EE_ X-MS-Office365-Filtering-Correlation-Id: ccac5004-7bf0-486c-4c9b-08dc3cfb06db X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 53ehbAZWtERlMAv2TqAY/dGO0NdkCWz7l/Ktndxjawp6gyLJuNJYdtdDPGnAOwF/H4/HMafnh0wBtUfW2mr/TQEVb7XFWtyIBEG2cyAChEI/7SB2Nm+No86E2VDXT00ihboeLgaLwZ6c8nQoYuL8MgSUJr+cPBSKnvqSkEmbDoFKVCqw1AkoQjTQ2lSZ4A6PExj5Yrr4Vvu248mTmAX5fMjausKEc4jnaykz695soXwCxOS2WKUV1YxFvkCoKSKXoVOY/PNrgWJyG69Jx6ETgFAWmpI5+Nr+iugwko7pwVxUoWX2ZG2nqnhxu7gkk+CY+IZSetM7ZSHvFPv1uBocYT9baVRddDPARzLOvlttOkLidolky+CzjggcvhvOa60VljnlJDx5bMnitF0oxAn+tOvGbxHQIg1MOyc1heVPcz8liTVBju0w4FAo4q6TZKonSTno8FAttPhRi22sjKxB/fx9V4sxj/T/43bRiUCom8Yt7p0utIyqhEeJgoYa56LEYWLnRsmi3DeTYKJhMr8JlTqsU6/IZQckNTDjPiY6eqJJ4AFJMHDUlMHJzwgu7jPVl64m7OKvvlIlNv6S2CoTzebq1D3YnN+hsx5Pt5e3xLa0Z5UYCS1U5KqszB5Vo0Di8Y2jnudSbdmQ+Zw1UqibqV9x2wDRUmVBD5UAlY2XBnnHsg2ZmotHIByLbn6MGfi9yIgasieSeXivI4vhVZ9mi1yhqGBV1tyk0UvW3cezKoFB6B8rVZE0ffB//nNEayKG 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)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 10:00:02.8167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ccac5004-7bf0-486c-4c9b-08dc3cfb06db 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: CY4PEPF0000EDD7.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6953 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=8e79562a0ed536de5a27a8a144ff17aa8b0164bd Thanks. Xueming Li --- >From 8e79562a0ed536de5a27a8a144ff17aa8b0164bd Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Tue, 20 Feb 2024 16:14:50 +0800 Subject: [PATCH] net/nfp: fix NFD3 metadata process Cc: Xueming Li [ upstream commit 7ecf3b9039dbe0370b48d620261f62049ab0786e ] 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: 962791ba6804 ("net/nfp: support VLAN insert with NFD3") Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c index ff9b10f046..b9da74bc99 100644 --- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c +++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c @@ -137,7 +137,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, } } -static inline void +static inline int nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, struct nfp_net_txq *txq, struct rte_mbuf *pkt) @@ -174,7 +174,7 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, } if (meta_data->length == 0) - return; + return 0; meta_info = meta_data->header; meta_data->header = rte_cpu_to_be_32(meta_data->header); @@ -188,15 +188,16 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, 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); @@ -204,11 +205,13 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, 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])); } + + return 0; } uint16_t @@ -225,6 +228,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, uint16_t nb_pkts, bool repr_flag) { + int ret; uint16_t i; uint8_t offset; uint32_t pkt_size; @@ -271,7 +275,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, if (!repr_flag) { struct nfp_net_meta_raw meta_data; memset(&meta_data, 0, sizeof(meta_data)); - nfp_net_nfd3_set_meta_data(&meta_data, txq, pkt); + ret = nfp_net_nfd3_set_meta_data(&meta_data, txq, pkt); + if (unlikely(ret != 0)) + goto xmit_end; + offset = meta_data.length; } else { offset = FLOWER_PKT_DATA_OFFSET; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:35.017341234 +0800 +++ 0134-net-nfp-fix-NFD3-metadata-process.patch 2024-03-05 17:39:31.093566504 +0800 @@ -1 +1 @@ -From 7ecf3b9039dbe0370b48d620261f62049ab0786e Mon Sep 17 00:00:00 2001 +From 8e79562a0ed536de5a27a8a144ff17aa8b0164bd Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 7ecf3b9039dbe0370b48d620261f62049ab0786e ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +25 @@ -index ee120f55ab..be31f4ac33 100644 +index ff9b10f046..b9da74bc99 100644 @@ -26 +28 @@ -@@ -142,7 +142,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, +@@ -137,7 +137,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, @@ -35 +37 @@ -@@ -177,7 +177,7 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, +@@ -174,7 +174,7 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, @@ -44 +46 @@ -@@ -191,15 +191,16 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, +@@ -188,15 +188,16 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, @@ -63 +65 @@ -@@ -207,11 +208,13 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, +@@ -204,11 +205,13 @@ nfp_net_nfd3_set_meta_data(struct nfp_net_meta_raw *meta_data, @@ -78 +80 @@ -@@ -228,6 +231,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, +@@ -225,6 +228,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, @@ -86 +88 @@ -@@ -274,7 +278,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, +@@ -271,7 +275,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,