From: Soumyadeep Hore <soumyadeep.hore@intel.com>
To: dev@dpdk.org, bruce.richardson@intel.com
Cc: rajesh3.kumar@intel.com, aman.deep.singh@intel.com,
manoj.kumar.subbarao@intel.com
Subject: [PATCH v3 3/4] net/ice: enable PTP packet forward with TxPP
Date: Thu, 6 Nov 2025 01:46:36 -0500 [thread overview]
Message-ID: <20251106064638.23020-4-soumyadeep.hore@intel.com> (raw)
In-Reply-To: <20251106064638.23020-1-soumyadeep.hore@intel.com>
Previously TxPP cannot be run with ieee1588 fwd. This fwd
if enabled after TxPP enablement, causes multiple calls to
ice_timesync_enable() and ice_timesync_disable().
On introducing txpp_ena flag in adapter, the multiple calls
is handled.
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
drivers/net/intel/ice/ice_ethdev.c | 16 ++++++++++++++--
drivers/net/intel/ice/ice_ethdev.h | 2 ++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 3eef4303e9..2ac63bf97f 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -2873,6 +2873,8 @@ ice_dev_stop(struct rte_eth_dev *dev)
{
struct rte_eth_dev_data *data = dev->data;
struct ice_pf *pf = ICE_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+ struct ice_adapter *ad =
+ ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
struct ice_vsi *main_vsi = pf->main_vsi;
struct rte_pci_device *pci_dev = ICE_DEV_TO_PCI(dev);
struct rte_intr_handle *intr_handle = pci_dev->intr_handle;
@@ -2893,8 +2895,10 @@ ice_dev_stop(struct rte_eth_dev *dev)
/* disable all queue interrupts */
ice_vsi_disable_queues_intr(main_vsi);
- if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP)
+ if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP) {
+ ad->txpp_ena = 0;
ice_timesync_disable(dev);
+ }
if (pf->adapter->devargs.link_state_on_close == ICE_LINK_UP ||
(pf->adapter->devargs.link_state_on_close == ICE_LINK_INITIAL &&
@@ -4436,8 +4440,10 @@ ice_dev_start(struct rte_eth_dev *dev)
}
}
- if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP)
+ if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP) {
ice_timesync_enable(dev);
+ ad->txpp_ena = 1;
+ }
return 0;
@@ -7029,6 +7035,9 @@ ice_timesync_enable(struct rte_eth_dev *dev)
ICE_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
int ret;
+ if (ad->txpp_ena)
+ return 0;
+
if (dev->data->dev_started && !(dev->data->dev_conf.rxmode.offloads &
RTE_ETH_RX_OFFLOAD_TIMESTAMP)) {
PMD_DRV_LOG(ERR, "Rx timestamp offload not configured");
@@ -7267,6 +7276,9 @@ ice_timesync_disable(struct rte_eth_dev *dev)
uint64_t val;
uint8_t lport;
+ if (ad->txpp_ena)
+ return 0;
+
lport = hw->port_info->lport;
ice_clear_phy_tstamp(hw, lport, 0);
diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h
index 6478d6dfbd..d9f857b81b 100644
--- a/drivers/net/intel/ice/ice_ethdev.h
+++ b/drivers/net/intel/ice/ice_ethdev.h
@@ -668,6 +668,8 @@ struct ice_adapter {
uint8_t ptp_tx_index;
bool ptp_ena;
uint64_t time_hw;
+ /* For TxPP */
+ bool txpp_ena;
struct ice_fdir_prof_info fdir_prof_info[ICE_MAX_PTGS];
struct ice_rss_prof_info rss_prof_info[ICE_MAX_PTGS];
/* True if DCF state of the associated PF is on */
--
2.47.1
next prev parent reply other threads:[~2025-11-05 18:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 18:27 [PATCH v1 0/3] Update TxPP feature Soumyadeep Hore
2025-10-27 18:27 ` [PATCH v1 1/3] net/ice: restrict testpmd to scalar path for TxPP Soumyadeep Hore
2025-10-29 9:30 ` Loftus, Ciara
2025-10-27 18:28 ` [PATCH v1 2/3] net/ice: fix PTP clock corruption with TxPP Soumyadeep Hore
2025-10-29 17:11 ` Bruce Richardson
2025-10-27 18:28 ` [PATCH v1 3/3] doc: update TxPP documentation Soumyadeep Hore
2025-10-30 17:33 ` [PATCH v2 0/3] Update TxPP feature Soumyadeep Hore
2025-10-30 17:33 ` [PATCH v2 1/3] net/ice: restrict ice PMD to scalar path for TxPP Soumyadeep Hore
2025-11-03 10:25 ` Loftus, Ciara
2025-10-30 17:33 ` [PATCH v2 2/3] net/ice: fix PTP clock corruption with TxPP Soumyadeep Hore
2025-11-04 11:32 ` Bruce Richardson
2025-11-06 6:46 ` [PATCH v3 0/4] Update TxPP feature Soumyadeep Hore
2025-11-06 6:46 ` [PATCH v3 1/4] net/ice: restrict ice PMD to scalar path for TxPP Soumyadeep Hore
2025-11-06 6:46 ` [PATCH v3 2/4] net/ice: fix PTP clock corruption with TxPP Soumyadeep Hore
2025-11-06 6:46 ` Soumyadeep Hore [this message]
2025-11-05 18:17 ` [PATCH v3 3/4] net/ice: enable PTP packet forward " Bruce Richardson
2025-11-06 6:46 ` [PATCH v3 4/4] doc: update TxPP documentation Soumyadeep Hore
2025-10-30 17:33 ` [PATCH v2 3/3] " Soumyadeep Hore
2025-11-04 11:41 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251106064638.23020-4-soumyadeep.hore@intel.com \
--to=soumyadeep.hore@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=manoj.kumar.subbarao@intel.com \
--cc=rajesh3.kumar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).