[dpdk-dev] [EXT] Re: [PATCH] net/octeontx2: fix dynamic registration for timestamp

Harman Kalra hkalra at marvell.com
Tue Nov 3 16:50:50 CET 2020


On Tue, Nov 03, 2020 at 04:41:14PM +0100, Thomas Monjalon wrote:
> External Email
> 
> ----------------------------------------------------------------------
> 03/11/2020 16:20, Harman Kalra:
> > Registration of timestamp field should be done once and
> 
> Why?
> Next registrations does nothing, it is not a problem.
> 
> > only when ptp kernel changes are successful.
> 
> Rx timestamp can be useful without PTP.
Ack, you are correct, VF change is also required.

> 
> > --- a/drivers/net/octeontx2/otx2_ethdev.c
> > +++ b/drivers/net/octeontx2/otx2_ethdev.c
> > @@ -2225,16 +2225,6 @@ otx2_nix_dev_start(struct rte_eth_dev *eth_dev)
> >  	if (otx2_ethdev_is_ptp_en(dev) && otx2_dev_is_vf(dev))
> >  		otx2_nix_ptp_enable_vf(eth_dev);
> 
> NIX_RX_OFFLOAD_TSTAMP_F is set in above function.
> Is it useless? Or should we register timestamp below?
> 
> > -	if (dev->rx_offload_flags & NIX_RX_OFFLOAD_TSTAMP_F) {
> > -		rc = rte_mbuf_dyn_rx_timestamp_register(
> > -				&dev->tstamp.tstamp_dynfield_offset,
> > -				&dev->tstamp.rx_tstamp_dynflag);
> > -		if (rc != 0) {
> > -			otx2_err("Failed to register Rx timestamp field/flag");
> > -			return -rte_errno;
> > -		}
> > -	}
> 
> 
> 


More information about the dev mailing list