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 B394545DB9 for ; Wed, 27 Nov 2024 18:20:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B0B574066C; Wed, 27 Nov 2024 18:20:20 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id B8BB64066C for ; Wed, 27 Nov 2024 18:20:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dngBUo51gOBN4/UL5jbP5El2jAJhHPGHPi9WxCp193E=; b=QaQgg4b0KtuqiRfTSlnZQQ9Y2tEPMvtJ1ZpZkOuUx7pPgVF3FVsfTIACaUt1yH/mOsTSEI UNRMMYpn/H2jzS/R9vdXdln+Lk+0LtUr2+4ffPmKX2Frg6ob7l1w/gSApmjhXZk8TUGWRj mSyp1YoRfEBCCv7Je6Sc/jV+CQAf4nI= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-412-BAHmaWn1NxyM3Mf8YVl0UQ-1; Wed, 27 Nov 2024 12:20:17 -0500 X-MC-Unique: BAHmaWn1NxyM3Mf8YVl0UQ-1 X-Mimecast-MFC-AGG-ID: BAHmaWn1NxyM3Mf8YVl0UQ Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 94A4D195419F; Wed, 27 Nov 2024 17:20:16 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 95A88300019E; Wed, 27 Nov 2024 17:20:15 +0000 (UTC) From: Kevin Traynor To: Rakesh Kudurumalla Cc: dpdk stable Subject: patch 'net/cnxk: fix Rx offloads to handle timestamp' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:17:28 +0000 Message-ID: <20241127171916.690404-21-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: RufPcgWCkZCNgXwg_IKQbEPDLZZKBJqiNLHnkC_GA_c_1732728016 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/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://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/b65e408f0d05dd46ea8f183ca1092fd3da23c32e Thanks. Kevin --- >From b65e408f0d05dd46ea8f183ca1092fd3da23c32e 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 [ 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 fed447c874..c06af766db 100644 --- a/drivers/net/cnxk/cn10k_ethdev.c +++ b/drivers/net/cnxk/cn10k_ethdev.c @@ -31,5 +31,5 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev) 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; @@ -405,4 +405,8 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) 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); + } diff --git a/drivers/net/cnxk/cn9k_ethdev.c b/drivers/net/cnxk/cn9k_ethdev.c index 9ec5d7fe89..c45e5d4f6d 100644 --- a/drivers/net/cnxk/cn9k_ethdev.c +++ b/drivers/net/cnxk/cn9k_ethdev.c @@ -31,5 +31,5 @@ nix_rx_offload_flags(struct rte_eth_dev *eth_dev) 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; @@ -396,4 +396,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) 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); } diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index ccdc5f04ee..4f65462b78 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -399,4 +399,11 @@ struct cnxk_eth_dev { struct cnxk_eth_dev_sec_inb inb; struct cnxk_eth_dev_sec_outb outb; + + /* 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); }; -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:38.975009289 +0000 +++ 0021-net-cnxk-fix-Rx-offloads-to-handle-timestamp.patch 2024-11-27 17:17:38.177269124 +0000 @@ -1 +1 @@ -From f12dab814f0898c661d32f6cdaaae6a11bbacb6e Mon Sep 17 00:00:00 2001 +From b65e408f0d05dd46ea8f183ca1092fd3da23c32e Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit f12dab814f0898c661d32f6cdaaae6a11bbacb6e ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 46476e386a..f5b485650e 100644 +index fed447c874..c06af766db 100644 @@ -30 +31 @@ -@@ -509,4 +509,8 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) +@@ -405,4 +405,8 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) @@ -40 +41 @@ -index 5417628368..c419593a23 100644 +index 9ec5d7fe89..c45e5d4f6d 100644 @@ -50 +51 @@ -@@ -468,4 +468,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) +@@ -396,4 +396,7 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) @@ -59 +60 @@ -index 687c60c27d..5920488e1a 100644 +index ccdc5f04ee..4f65462b78 100644 @@ -62,3 +63,3 @@ -@@ -434,4 +434,11 @@ struct cnxk_eth_dev { - /* Eswitch domain ID */ - uint16_t switch_domain_id; +@@ -399,4 +399,11 @@ struct cnxk_eth_dev { + struct cnxk_eth_dev_sec_inb inb; + struct cnxk_eth_dev_sec_outb outb;