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 84B1B45CE3 for ; Mon, 11 Nov 2024 07:33:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7CE0640E09; Mon, 11 Nov 2024 07:33:13 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2040.outbound.protection.outlook.com [40.107.244.40]) by mails.dpdk.org (Postfix) with ESMTP id CC1C440E09 for ; Mon, 11 Nov 2024 07:33:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FhgK5Wb/QrPlO1RsODNNZijKveo7ItcCI3I4exZbtR9ifTY9MdjSWJEOUgh+TjpLBTX4aNegIiGVfsxEQzmSnvPtlBa2SLuQGNfqKjkTWZSoWxWT/8eN4IhsZKX4NTGUhM+V/Gtvmd/hiXTqeF2JS8FoeGOSA/zo0eUU4LTullup7J0ZiXj+5hie+LXTpnHvFkL17AzMiIGLMe5beVXXS+KEmoZysJaJl6f+aSWUxH/U+biRkFZxCb8Lb2ZegMalY/RUA02m5A2IogrHdVoVUPeLKizjX6U2S8QLgTAs6TUCGhX7LnnA2nY30YZzNV3AscMsF+IKaP92GrE8KjP/ww== 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=sBAwVwfkrnkTz4jEcaLfV3Dk6r29TUl0rx/0aoqAmxw=; b=O3U8ohqaZo3aLRcpYHIwEZl2aALIQdQP1kbNI/dS/CPd8B+kRH2KZl1jjJygkEZ2PlIdsHGD8T9YxClxKl4cKSRHgsyOM0dePCvLOi/MTvMFo2PsemD7oJZwyp+5TLBpGwXr5Q6srqFrKEWLKXbd8a1vzdNbBsh2I/Kc6T7rZ/GP83FmihBZf/sT16EN3TnOHxQtW/1CZbcFQB7SPIEo2nUp09gC1ezARlAvTM8knBw90Tgajcs3CvfY7i1QNBP+8LEKbsPac9ntA3fQNy9kvtkukvItUSgcET4INHQ38x0VNYyR8nAXQ6e56BLN+fFbEx4Lm1i04xxt9RUbxsu0gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=marvell.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=sBAwVwfkrnkTz4jEcaLfV3Dk6r29TUl0rx/0aoqAmxw=; b=dL3LXy6Pboy6yJUKP43uCczyxosoYsD0dFiYVWw/XoSSNAI9FZLvTzz60+QH+sXIRNmcLpb1hL0QcWrFjlBqLVNrjT+ilRfXErV/ifhjSFR/Og0H1Q8Z2OldRn8qMktb8q4RYZ0j3s/IGHj2hjJ/qqAsLDWuemGZQuXvYEazBuSqG1bMvcIeeOEtxhgAq32QKVzOtUlG4S0HV93p516On9wFk2qPR6CGmsDtI79V06OZK2A49dYKwCKrEuANfpDFpAtzNvulZaWpBRHZ1fivyF9gE8Gz4cy80sgt4ZdeRkaBTxy8NGU5qCd4FNGuyUzkyLX9VSSuHJjm2PqXMcS3cg== Received: from BL1PR13CA0438.namprd13.prod.outlook.com (2603:10b6:208:2c3::23) by IA1PR12MB6185.namprd12.prod.outlook.com (2603:10b6:208:3e7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:33:06 +0000 Received: from BL02EPF00021F6D.namprd02.prod.outlook.com (2603:10b6:208:2c3:cafe::bd) by BL1PR13CA0438.outlook.office365.com (2603:10b6:208:2c3::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:33:06 +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 BL02EPF00021F6D.mail.protection.outlook.com (10.167.249.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:33:05 +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; Sun, 10 Nov 2024 22:32:50 -0800 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.4; Sun, 10 Nov 2024 22:32:49 -0800 From: Xueming Li To: Rakesh Kudurumalla CC: , dpdk stable Subject: patch 'net/cnxk: fix Rx offloads to handle timestamp' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:21 +0800 Message-ID: <20241111062847.216344-36-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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: 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: BL02EPF00021F6D:EE_|IA1PR12MB6185:EE_ X-MS-Office365-Filtering-Correlation-Id: e82cad7a-eb17-4a5c-304b-08dd021ab393 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|82310400026|1800799024|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?X+gPI5gXK0SD6nA4qlNI0QY24PeXCu3yogHVg+503zeFXKYhqiywSCeMM9pp?= =?us-ascii?Q?VepF7Z9cKuFeMQJQ3I/ELk1rVl9OEHHLq5+jP6uYlaH7qe2acByoGY0qR9iy?= =?us-ascii?Q?RxDKlpYqKc9sVhtR/U52+Svkif+4zKYsVwoD4Mf0lGXlSmqF8+7Bx636I00H?= =?us-ascii?Q?7yjfEAiwZqEL06i8XXizU8GBkgcGRXUJI2G0OJwxAGl1LYfVBMDMvkpxgiW8?= =?us-ascii?Q?Sj6wSUjXB7JGWOENCC1hgZAPPXpMOqJ+H1QGq1rRuz2n2C6hMjSu46oQWEb/?= =?us-ascii?Q?ZaLBPnMNrgUUJ69xFAVzRiKdBsdzE29qi4qJMm8Xyw7r1i5eaMlukku3zMso?= =?us-ascii?Q?FFcYWSkaKhHd40r+XQlVSNJm0XezwUecRLmcYyqgGSeIDQ5co9e/k66xstgM?= =?us-ascii?Q?gLnyNOj19LasGlAlMKe/7Iil4JBVJQr6uaEQYrioLZqbzSppDevGpkQPlQbO?= =?us-ascii?Q?icqr6v4Tt3j7UaLnKDJmJqsAZ+RvY9sbKShkVzuhkEXA7I0o8SzQdujLr4eu?= =?us-ascii?Q?gg/WA0Y6EbZG5UsaxfUPpu172Jdg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: 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)(36860700013)(82310400026)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:33:05.9464 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e82cad7a-eb17-4a5c-304b-08dd021ab393 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: BL02EPF00021F6D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6185 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.3 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/30/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=118f84d541146b7a073ca53849069f4be15b7036 Thanks. Xueming Li --- >From 118f84d541146b7a073ca53849069f4be15b7036 Mon Sep 17 00:00:00 2001 From: Rakesh Kudurumalla Date: Tue, 1 Oct 2024 11:30:41 +0530 Subject: [PATCH] net/cnxk: fix Rx offloads to handle timestamp Cc: Xueming Li [ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ] RX offloads flags are updated to handle timestamp in VF when PTP is enabled in respective PF in kernel. Fixes: c7c7c8ed7d47 ("net/cnxk: get PTP status") Signed-off-by: Rakesh Kudurumalla --- drivers/net/cnxk/cn10k_ethdev.c | 6 +++++- drivers/net/cnxk/cn9k_ethdev.c | 5 ++++- drivers/net/cnxk/cnxk_ethdev.h | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/net/cnxk/cn10k_ethdev.c b/drivers/net/cnxk/cn10k_ethdev.c index 24c4c2d15e..3b7de891e0 100644 --- a/drivers/net/cnxk/cn10k_ethdev.c +++ b/drivers/net/cnxk/cn10k_ethdev.c @@ -30,7 +30,7 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev) if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER) flags |= NIX_RX_MULTI_SEG_F; - if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) + if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) || dev->ptp_en) flags |= NIX_RX_OFFLOAD_TSTAMP_F; if (!dev->ptype_disable) @@ -508,6 +508,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) eth_dev->rx_pkt_burst = nix_ptp_vf_burst; rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst; rte_mb(); + if (dev->cnxk_sso_ptp_tstamp_cb) + dev->cnxk_sso_ptp_tstamp_cb(eth_dev->data->port_id, + NIX_RX_OFFLOAD_TSTAMP_F, dev->ptp_en); + } return 0; diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c index c06764d745..dee0abdac5 100644 --- a/drivers/net/cnxk/cn9k_ethdev.c +++ b/drivers/net/cnxk/cn9k_ethdev.c @@ -30,7 +30,7 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev) if (dev->rx_offloads & RTE_ETH_RX_OFFLOAD_SCATTER) flags |= NIX_RX_MULTI_SEG_F; - if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP)) + if ((dev->rx_offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) || dev->ptp_en) flags |= NIX_RX_OFFLOAD_TSTAMP_F; if (!dev->ptype_disable) @@ -467,6 +467,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) eth_dev->rx_pkt_burst = nix_ptp_vf_burst; rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = eth_dev->rx_pkt_burst; rte_mb(); + if (dev->cnxk_sso_ptp_tstamp_cb) + dev->cnxk_sso_ptp_tstamp_cb(eth_dev->data->port_id, + NIX_RX_OFFLOAD_TSTAMP_F, dev->ptp_en); } return 0; diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index 4d3ebf123b..edbb492e2c 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -424,6 +424,13 @@ struct cnxk_eth_dev { /* MCS device */ struct cnxk_mcs_dev *mcs_dev; struct cnxk_macsec_sess_list mcs_list; + + /* SSO event dev */ + void *evdev_priv; + + /* SSO event dev ptp */ + void (*cnxk_sso_ptp_tstamp_cb) + (uint16_t port_id, uint16_t flags, bool ptp_en); }; struct cnxk_eth_rxq_sp { -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.885498904 +0800 +++ 0035-net-cnxk-fix-Rx-offloads-to-handle-timestamp.patch 2024-11-11 14:23:05.092192840 +0800 @@ -1 +1 @@ -From f12dab814f0898c661d32f6cdaaae6a11bbacb6e Mon Sep 17 00:00:00 2001 +From 118f84d541146b7a073ca53849069f4be15b7036 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 46476e386a..f5b485650e 100644 +index 24c4c2d15e..3b7de891e0 100644 @@ -44 +46 @@ -index 5417628368..c419593a23 100644 +index c06764d745..dee0abdac5 100644 @@ -67 +69 @@ -index 687c60c27d..5920488e1a 100644 +index 4d3ebf123b..edbb492e2c 100644 @@ -70,4 +72,4 @@ -@@ -433,6 +433,13 @@ struct cnxk_eth_dev { - - /* Eswitch domain ID */ - uint16_t switch_domain_id; +@@ -424,6 +424,13 @@ struct cnxk_eth_dev { + /* MCS device */ + struct cnxk_mcs_dev *mcs_dev; + struct cnxk_macsec_sess_list mcs_list;