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 4345946A63 for ; Thu, 26 Jun 2025 14:05:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F12A9400D6; Thu, 26 Jun 2025 14:05:56 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2047.outbound.protection.outlook.com [40.107.96.47]) by mails.dpdk.org (Postfix) with ESMTP id EA223400D6 for ; Thu, 26 Jun 2025 14:05:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=U163DQ12StlhjBkrafDDSyIowRtKMZYLrn42zBJfwpfrdsgEz2dZaxQ0Yao135OCzMStoi5lTi++WGo7ecDjVn/xYExODRCNttlxptdLevcAY269i68ePhp+98TtFK5pRRUiTElSR43PBQ205BJ1r6MaKz5rXq1uv0K1GFUKZDnEzmjp3/ikX5N4FcA0cNKMuxmfl8lwQa8Nl+/K0fpeyaUDxWBWP3cIwep0UKzcLXkOaYzXbVr+fmW2cZSowC5lhUJ+7yhJJ3TfxeHfv5fd8dcQPcEZ8GtbFtKTq8eicFANEtOkdqpfEGUJ40o+ixYl6Ky+v7ja8CI4GiInFwn0Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RC8+AOE0RhQF2NyXxiLg+ui7DUmDvpzmB0f13oM4rPA=; b=H3qu1M7tE2W1B6NXixFidxdM9zLTqlk2CbSFf9yrbi+9ep3ANhi0nbueIKRB/M1pgeI4hnV72G5My7uSmD22VtK8QqnHjzvpK2QvEJJwC0Erx3bXaTlZIuIZOsZXMpLZ6dpums1o9sxgmrv4yWerbLbtr4Dhrm/jM0xdEAGDgP8sje8VURZ/rjUp4Xymylz7Cuw8b4G/ecpzw/Q3knTKT5QPxW/qYtwhzkPCPmYOb53ktxJrUMtn283E/jtn/gGk35QOgXYLeU8NqNI/gM68YpG0I/xoA4GSPSX1qSjlsFWyLcIQcfXhPGgr/GPeRaJtwUDV7UPXjIsfmof5+sXHqg== 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=RC8+AOE0RhQF2NyXxiLg+ui7DUmDvpzmB0f13oM4rPA=; b=UBg/GYg94wATiCBiVYz1XLCajKOkHVHtbWsNnDmdHvm6VLZPmEZCeWMsiKVqAAEhlW87kZTJPFEWkmnsuqnr5UN0Ur5yD3HM1VJhczeF31KpGz/P3l7/vbsVSGeRg2uHBJ4w36i9YeBzHWTvnXGV4SEUpmEQabU64R/06IOTJWsZBnxAgiWheWqr0Ss/EP3m6as1kyt86ZbJPjwFt51m4VzDH8HBeVQoKPazdDSwqkGKDpS/vZHqj7/p4qis01CwfMlizs8nGscdsmD2c+0UcUamOtdMTtYXdI3GfJ/0kDzwx4tkfQh0swPuKqNFtNN3aLXikrtNoT5m+dmT3YeGhw== Received: from MW4PR04CA0186.namprd04.prod.outlook.com (2603:10b6:303:86::11) by CY5PR12MB6597.namprd12.prod.outlook.com (2603:10b6:930:43::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8857.35; Thu, 26 Jun 2025 12:05:51 +0000 Received: from SJ5PEPF000001D4.namprd05.prod.outlook.com (2603:10b6:303:86:cafe::5e) by MW4PR04CA0186.outlook.office365.com (2603:10b6:303:86::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8880.17 via Frontend Transport; Thu, 26 Jun 2025 12:05:51 +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 SJ5PEPF000001D4.mail.protection.outlook.com (10.167.242.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8880.14 via Frontend Transport; Thu, 26 Jun 2025 12:05:51 +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.1544.4; Thu, 26 Jun 2025 05:05:37 -0700 Received: from nvidia.com (10.126.230.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.1544.14; Thu, 26 Jun 2025 05:05:35 -0700 From: Xueming Li To: Chaoyong He CC: Xueming Li , Long Wu , "Peng Zhang" , dpdk stable Subject: patch 'net/nfp: standardize NFD3 Tx descriptor endianness' has been queued to stable release 23.11.5 Date: Thu, 26 Jun 2025 20:01:01 +0800 Message-ID: <20250626120145.27369-42-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250626120145.27369-1-xuemingl@nvidia.com> References: <20250626120145.27369-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001D4:EE_|CY5PR12MB6597:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e381e81-8538-4c43-dff8-08ddb4a9cb6f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|36860700013|1800799024|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?o5moY2h1lc/JwHg9O/41ODPr5i+CHagsbW8byC/eSq4PLRZPic4mGqcxwdkt?= =?us-ascii?Q?hVMyB0G9Oui3BbH9mZZTKdDqtKbq+mInnLMO/SMjoI5mjpmGZGkH320cVZz5?= =?us-ascii?Q?q1+KS1tP4gHz2yQ/9dOzCUUmwx8XMHGrfV85tXzjifcIp5IUKngTCsCyBsgb?= =?us-ascii?Q?PMmpS6OV++7pI13r3bYGl3uLOo60ueFRar2AzKjB8Rkde+t5OPBjuGNG2Rah?= =?us-ascii?Q?Sy98yuzPDWQF0YnwB5zO5joNW/1V3+HcSJZLfQooGvu4BZegAjnIeRfi4l2E?= =?us-ascii?Q?Ou/4VrFVNwZpiCQmljtpV9VcQzHm9uGRT8B67brEiE2tLOv1ZxUh3Wkla1BW?= =?us-ascii?Q?McnDp5/GCZi6/oHodDXNY3rFgtHSDbPkJ/dY81VG1nGq32F18kirczWsVkRI?= =?us-ascii?Q?UbBpZEyobZI6EFI5Zho+jo/EC9yRcFpuuBgcS/0CYnim7ikWe9LO8qkV9Ef2?= =?us-ascii?Q?xP4zpzT1gM0s0w2HKUHHjX2Rt8Ca1p3EaGYmrW6jdVAqSdAveIB1AzgsQpZ5?= =?us-ascii?Q?4AGJlSD9alfzoWZzV6yc9E7vZzXTuoQ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Lm+7fYRDK//kQvhxJ3b+WugK7NqgAg1gCUT3s278+jW8obhzfMBC?= =?us-ascii?Q?7BT+IkVPsRTLfE57sR3rdL2Bm7DCyP2ut3Hmvhkx9vvqBhfUiuDT8EKLPw?= =?us-ascii?Q?=3D=3D?= 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:(13230040)(82310400026)(376014)(36860700013)(1800799024)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2025 12:05:51.1916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4e381e81-8538-4c43-dff8-08ddb4a9cb6f 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: SJ5PEPF000001D4.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6597 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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/28/25. 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=b9ece5da287d02d3d2d1ca803c0be008c34f4870 Thanks. Xueming Li --- >From b9ece5da287d02d3d2d1ca803c0be008c34f4870 Mon Sep 17 00:00:00 2001 From: Chaoyong He Date: Tue, 15 Apr 2025 10:54:52 +0800 Subject: [PATCH] net/nfp: standardize NFD3 Tx descriptor endianness Cc: Xueming Li [ upstream commit 1095bb0f86fafee3c7dca7b2dd23075ae869f689 ] The data endian of NFD3 Tx descriptor should be little, and the related logic also should modify. Fixes: 3745dd9dd86f ("net/nfp: adjust coding style for NFD3") Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_ctrl.c | 4 ++-- drivers/net/nfp/nfd3/nfp_nfd3.h | 14 +++++++------- drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c index 574e4fa056..06d9126340 100644 --- a/drivers/net/nfp/flower/nfp_flower_ctrl.c +++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c @@ -192,10 +192,10 @@ nfp_flower_ctrl_vnic_nfd3_xmit(struct nfp_app_fw_flower *app_fw_flower, *lmbuf = mbuf; dma_addr = rte_mbuf_data_iova(mbuf); - txds->data_len = mbuf->pkt_len; + txds->data_len = rte_cpu_to_le_16(mbuf->pkt_len); txds->dma_len = txds->data_len; txds->dma_addr_hi = (dma_addr >> 32) & 0xff; - txds->dma_addr_lo = (dma_addr & 0xffffffff); + txds->dma_addr_lo = rte_cpu_to_le_32(dma_addr & 0xffffffff); txds->offset_eop = FLOWER_PKT_DATA_OFFSET | NFD3_DESC_TX_EOP; txq->wr_p++; diff --git a/drivers/net/nfp/nfd3/nfp_nfd3.h b/drivers/net/nfp/nfd3/nfp_nfd3.h index 3ba562cc3f..6e636a86b8 100644 --- a/drivers/net/nfp/nfd3/nfp_nfd3.h +++ b/drivers/net/nfp/nfd3/nfp_nfd3.h @@ -17,13 +17,13 @@ struct nfp_net_nfd3_tx_desc { union { struct { - uint8_t dma_addr_hi; /**< High bits of host buf address */ - uint16_t dma_len; /**< Length to DMA for this desc */ + uint8_t dma_addr_hi; /**< High bits of host buf address */ + rte_le16_t dma_len; /**< Length to DMA for this desc */ /** Offset in buf where pkt starts + highest bit is eop flag */ uint8_t offset_eop; - uint32_t dma_addr_lo; /**< Low 32bit of host buf addr */ + rte_le32_t dma_addr_lo; /**< Low 32bit of host buf addr */ - uint16_t mss; /**< MSS to be used for LSO */ + rte_le16_t mss; /**< MSS to be used for LSO */ uint8_t lso_hdrlen; /**< LSO, where the data starts */ uint8_t flags; /**< TX Flags, see @NFD3_DESC_TX_* */ @@ -32,11 +32,11 @@ struct nfp_net_nfd3_tx_desc { uint8_t l3_offset; /**< L3 header offset */ uint8_t l4_offset; /**< L4 header offset */ }; - uint16_t vlan; /**< VLAN tag to add if indicated */ + rte_le16_t vlan; /**< VLAN tag to add if indicated */ }; - uint16_t data_len; /**< Length of frame + meta data */ + rte_le16_t data_len; /**< Length of frame + meta data */ } __rte_packed; - uint32_t vals[4]; + rte_le32_t vals[4]; }; }; diff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c index b9da74bc99..1771e3adf2 100644 --- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c +++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c @@ -133,7 +133,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, if ((mb->ol_flags & RTE_MBUF_F_TX_VLAN) != 0) { txd->flags |= NFD3_DESC_TX_VLAN; - txd->vlan = mb->vlan_tci; + txd->vlan = rte_cpu_to_le_16(mb->vlan_tci); } } @@ -298,7 +298,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, * Checksum and VLAN flags just in the first descriptor for a * multisegment packet, but TSO info needs to be in all of them. */ - txd.data_len = pkt->pkt_len; + txd.data_len = rte_cpu_to_le_16((uint16_t)pkt->pkt_len); nfp_net_nfd3_tx_tso(txq, &txd, pkt); nfp_net_nfd3_tx_cksum(txq, &txd, pkt); nfp_net_nfd3_tx_vlan(txq, &txd, pkt); @@ -328,10 +328,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, dma_addr = rte_mbuf_data_iova(pkt); /* Filling descriptors fields */ - txds->dma_len = dma_size; + txds->dma_len = rte_cpu_to_le_16(dma_size); txds->data_len = txd.data_len; txds->dma_addr_hi = (dma_addr >> 32) & 0xff; - txds->dma_addr_lo = (dma_addr & 0xffffffff); + txds->dma_addr_lo = rte_cpu_to_le_32(dma_addr & 0xffffffff); free_descs--; txq->wr_p++; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-06-26 19:59:19.477643057 +0800 +++ 0041-net-nfp-standardize-NFD3-Tx-descriptor-endianness.patch 2025-06-26 19:59:17.378418044 +0800 @@ -1 +1 @@ -From 1095bb0f86fafee3c7dca7b2dd23075ae869f689 Mon Sep 17 00:00:00 2001 +From b9ece5da287d02d3d2d1ca803c0be008c34f4870 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 1095bb0f86fafee3c7dca7b2dd23075ae869f689 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index 23d1b770d8..6ac2caf367 100644 +index 574e4fa056..06d9126340 100644 @@ -25 +27 @@ -@@ -194,10 +194,10 @@ nfp_flower_ctrl_vnic_nfd3_xmit(struct nfp_app_fw_flower *app_fw_flower, +@@ -192,10 +192,10 @@ nfp_flower_ctrl_vnic_nfd3_xmit(struct nfp_app_fw_flower *app_fw_flower, @@ -39 +41 @@ -index 96ea23b3df..dc24f4fa1d 100644 +index 3ba562cc3f..6e636a86b8 100644 @@ -45 +47 @@ - struct __rte_packed_begin { + struct { @@ -69 +71 @@ - } __rte_packed_end; + } __rte_packed; @@ -76 +78 @@ -index 3ffcbb2576..6466a5a4fb 100644 +index b9da74bc99..1771e3adf2 100644 @@ -79 +81 @@ -@@ -139,7 +139,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, +@@ -133,7 +133,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, @@ -88 +90 @@ -@@ -300,7 +300,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, +@@ -298,7 +298,7 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, @@ -97 +99 @@ -@@ -330,10 +330,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue, +@@ -328,10 +328,10 @@ nfp_net_nfd3_xmit_pkts_common(void *tx_queue,