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 8383345BB6 for ; Wed, 23 Oct 2024 23:18:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E83E40261; Wed, 23 Oct 2024 23:18:32 +0200 (CEST) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 08F8943291 for ; Wed, 23 Oct 2024 23:18:31 +0200 (CEST) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-431548bd1b4so2012445e9.3 for ; Wed, 23 Oct 2024 14:18:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718311; x=1730323111; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CZMUmGwBdj01yWuqsj/63cai5WN/K2yOm4yudvkW0f4=; b=a9nexFeGdQ5dwZWoOsW57WXtyzGpiihDQYJ6lzVCoqAyH6TLIocT7lpUzGi2baZQru SOZxqdJIVL0xofxRCPenysnNIxGB2ld3CfGDrtvUO3zDvQ34iLtByhfDVFz3Q7RnIW6f mjF4342uQWguot6xrc0eAX/znvvU2yuc7aUvokQFLrb1iwmO2L4BDrxXHqOZWXhr98Hh 2gKyGoKnEmd2K6FS+DHqLrLm0+5rJKIv8zb+yGydzb1pLFgQHJKnqH0zLvhGkm460DFu w2nuuWVGAS6BMJZv7oGl2ttUKtlG7B1MeuuR/6RyDjoBTWwflliqBl28vDkJHAXveDef 2X6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718311; x=1730323111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CZMUmGwBdj01yWuqsj/63cai5WN/K2yOm4yudvkW0f4=; b=MwyApuGcKPCo9oMWt2jG4dbfZsou12/RQoMh/dABnXocw0zGYVLcsITpdJmGG4njDJ 5srbWIXZXgshgbSqJ/6WMMbOPx0FOZTN+hVUP9r5Zwj6512es2exRbccUSJCSwdOyk9a sdkWTSBXfeg256PDU/sLd/jfOz4zabqMNmScgd2q4z4a7iC4ynuA6GZwtsT1MDfsjYnH dGZQcChv7GC5/XXRNclDlu135GhS/qCbizT939sDGUpObZviYIEmTGwl5flmtyabky7O A6Wg+InTVWiNdzkXSsQ8m0Rq4N+Sivj1EnLYH5eDie41NlNXIiXksuk+a7fQ2T59C8p1 KQIw== X-Gm-Message-State: AOJu0YwWVDc6wZ80HPVUvyRvCbHA8OEy9o4uYQHRhCgjiAIoA/jIvUz6 tcfskc3eBCxZROEVb3j1aICNFTZ7bxDQ/trziDd+IryGK1Ck2qANfwY6oQ== X-Google-Smtp-Source: AGHT+IGdTBwFLepoUYpwdwRcX+pRvxdd8BwkXRETc1BBZDozEDHhoi6JD5y4EZBkmEkttRgQy6680A== X-Received: by 2002:a05:600c:3b05:b0:431:54f3:11b1 with SMTP id 5b1f17b1804b1-4318424d1f6mr31103975e9.34.1729718310577; Wed, 23 Oct 2024 14:18:30 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186bfd4cbsm26827425e9.28.2024.10.23.14.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:18:29 -0700 (PDT) From: luca.boccassi@gmail.com To: Rakesh Kudurumalla Cc: dpdk stable Subject: patch 'net/cnxk: fix Rx offloads to handle timestamp' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:04 +0100 Message-ID: <20241023211704.1216956-24-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/1601becebabb67227a7aff036100fd4cd1cb81a5 Thanks. Luca Boccassi --- >From 1601becebabb67227a7aff036100fd4cd1cb81a5 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 ed979d42af..3dd71fc70d 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) @@ -416,6 +416,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 3243c9f82c..e5ab0f3697 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) @@ -397,6 +397,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 83d6e9398f..4202b647f4 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -443,6 +443,13 @@ struct cnxk_eth_dev { /* Reassembly dynfield/flag offsets */ int reass_dynfield_off; int reass_dynflag_bit; + + /* 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.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:41.447204165 +0100 +++ 0024-net-cnxk-fix-Rx-offloads-to-handle-timestamp.patch 2024-10-23 22:16:40.455941029 +0100 @@ -1 +1 @@ -From f12dab814f0898c661d32f6cdaaae6a11bbacb6e Mon Sep 17 00:00:00 2001 +From 1601becebabb67227a7aff036100fd4cd1cb81a5 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 ed979d42af..3dd71fc70d 100644 @@ -32 +33 @@ -@@ -508,6 +508,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) +@@ -416,6 +416,10 @@ cn10k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) @@ -44 +45 @@ -index 5417628368..c419593a23 100644 +index 3243c9f82c..e5ab0f3697 100644 @@ -56 +57 @@ -@@ -467,6 +467,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) +@@ -397,6 +397,9 @@ cn9k_nix_ptp_info_update_cb(struct roc_nix *nix, bool ptp_en) @@ -67 +68 @@ -index 687c60c27d..5920488e1a 100644 +index 83d6e9398f..4202b647f4 100644 @@ -70,4 +71,4 @@ -@@ -433,6 +433,13 @@ struct cnxk_eth_dev { - - /* Eswitch domain ID */ - uint16_t switch_domain_id; +@@ -443,6 +443,13 @@ struct cnxk_eth_dev { + /* Reassembly dynfield/flag offsets */ + int reass_dynfield_off; + int reass_dynflag_bit;