Re: [PATCH net-next v4 5/8] gve: Add support to query the nic clock

From: Ziwei Xiao
Date: Wed Jun 11 2025 - 19:41:30 EST


On Tue, Jun 10, 2025 at 6:25 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Mon, 9 Jun 2025 18:40:26 +0000 Harshitha Ramamurthy wrote:
> > + priv->nic_ts_report =
> > + dma_alloc_coherent(&priv->pdev->dev,
> > + sizeof(struct gve_nic_ts_report),
> > + &priv->nic_ts_report_bus,
> > + GFP_KERNEL);
> > + if (!priv->nic_ts_report) {
> > + dev_err(&priv->pdev->dev, "%s dma alloc error\n", __func__);
> > + err = -ENOMEM;
> > + goto release_ptp;
> > + }
> > +
> > + ptp_schedule_worker(priv->ptp->clock, 0);
>
> Given the "very dynamic nature" of the clock I think you need to do the
> first refresh synchronously. Otherwise the config path may exit, and
> the first packet arrive before the worker had a chance to run and latch
> the initial timestamp?

Thanks for pointing it out. Will add gve_clock_nic_ts_read before the
ptp_schedule_worker to do the first refresh on V5.
> --
> pw-bot: cr