[PATCH v2 2/3] net/ice: fix PTP clock corruption with TxPP

Bruce Richardson bruce.richardson at intel.com
Tue Nov 4 12:32:14 CET 2025


On Thu, Oct 30, 2025 at 01:33:03PM -0400, Soumyadeep Hore wrote:
> 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 at dpdk.org
> 
> Signed-off-by: Soumyadeep Hore <soumyadeep.hore at intel.com>
> ---
>  drivers/net/intel/ice/ice_rxtx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/intel/ice/ice_rxtx.c b/drivers/net/intel/ice/ice_rxtx.c
> index fd0b3a7532..752e52b8cd 100644
> --- a/drivers/net/intel/ice/ice_rxtx.c
> +++ b/drivers/net/intel/ice/ice_rxtx.c
> @@ -908,6 +908,7 @@ ice_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id)
>  			rte_free(txq_elem);
>  			return err;
>  		}
> +		dev->dev_ops->timesync_enable(dev);
>  	} else {
>  		txq->qtx_tail = hw->hw_addr + QTX_COMM_DBELL(txq->reg_idx);
>  

What happens in the case of multiple queues, the timesync is configured
multiple times? What happens when multiple queues are used and one stops,
is the timesync for the whole port set back to zero?

Basically, as I understand it, the clock is per-port rather than per-queue,
so why are we enabling it on a per-queue basis? For example, in the commit
message explanation above you say "on stopping PORTS time will be reset",
but here you configure it on starting a QUEUE.

Please clarify, thanks,
/Bruce

> @@ -1671,7 +1672,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
> 


More information about the stable mailing list