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, stable@dpdk.org
Subject: [PATCH v3 2/4] net/ice: fix PTP clock corruption with TxPP
Date: Thu, 6 Nov 2025 01:46:35 -0500 [thread overview]
Message-ID: <20251106064638.23020-3-soumyadeep.hore@intel.com> (raw)
In-Reply-To: <20251106064638.23020-1-soumyadeep.hore@intel.com>
On enabling TxPP PTP clock was getting corrupted as timesync was enabled
on during setup. Currently timesync will be enabled during start of tx
queue, hence enabling PHC clock to get updated on starting and stopping
of ports.
Earlier when timesync was enabled in tx queue setup, on stopping ports
time will reset back to 0. Currently after every port restart PHC clock
will be set to current system CLOCK_REALTIME.
Fixes: 0b6ff09a1f19 ("net/intel: support Tx packet pacing for E830")
Cc: stable@dpdk.org
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
drivers/net/intel/ice/ice_ethdev.c | 6 ++++++
drivers/net/intel/ice/ice_rxtx.c | 2 --
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 4669eba7c7..3eef4303e9 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -2893,6 +2893,9 @@ 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)
+ 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 &&
pf->init_link_up))
@@ -4433,6 +4436,9 @@ ice_dev_start(struct rte_eth_dev *dev)
}
}
+ if (dev->data->dev_conf.txmode.offloads & RTE_ETH_TX_OFFLOAD_SEND_ON_TIMESTAMP)
+ ice_timesync_enable(dev);
+
return 0;
/* stop the started queues if failed to start all queues */
diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
index fd0b3a7532..2673e885c3 100644
--- a/drivers/net/intel/ice/ice_rxtx.c
+++ b/drivers/net/intel/ice/ice_rxtx.c
@@ -1181,7 +1181,6 @@ ice_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
if (txq->tsq != NULL && txq->tsq->ts_flag > 0) {
struct ice_aqc_ena_dis_txtime_qgrp txtime_pg;
- dev->dev_ops->timesync_disable(dev);
status = ice_aq_ena_dis_txtimeq(hw, q_ids[0], 1, 0, &txtime_pg, NULL);
if (status != ICE_SUCCESS) {
PMD_DRV_LOG(DEBUG, "Failed to disable Tx time queue");
@@ -1671,7 +1670,6 @@ ice_tx_queue_setup(struct rte_eth_dev *dev,
PMD_INIT_LOG(ERR, "Cannot register Tx mbuf field/flag for timestamp");
return -EINVAL;
}
- dev->dev_ops->timesync_enable(dev);
txq->tsq->nb_ts_desc = ice_calc_ts_ring_count(ICE_VSI_TO_HW(vsi), txq->nb_tx_desc);
ring_size = sizeof(struct ice_ts_desc) * txq->tsq->nb_ts_desc;
--
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 ` Soumyadeep Hore [this message]
2025-11-06 6:46 ` [PATCH v3 3/4] net/ice: enable PTP packet forward with TxPP Soumyadeep Hore
2025-11-05 18:17 ` 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-3-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 \
--cc=stable@dpdk.org \
/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).