[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210529153133.GB13274@hoboy.vegasvil.org>
Date: Sat, 29 May 2021 08:31:33 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Michael Chan <michael.chan@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, kuba@...nel.org,
gospo@...adcom.com, pavan.chebbi@...adcom.com,
edwin.peer@...adcom.com
Subject: Re: [PATCH net-next 6/7] bnxt_en: Transmit and retrieve packet
timestamps.
On Fri, May 28, 2021 at 08:53:20PM -0400, Michael Chan wrote:
> @@ -319,6 +383,7 @@ int bnxt_ptp_init(struct bnxt *bp)
> if (IS_ERR(ptp->ptp_clock))
> ptp->ptp_clock = NULL;
>
> + INIT_WORK(&ptp->ptp_ts_task, bnxt_ptp_ts_task);
Instead of using generic work, consider using the PHC kernel thread.
See ptp_schedule_worker().
Experience shows that under heavy workloads, work can be delayed for
unacceptably long periods of time. The advantage of the kthread is
that the admin can use chrt to give the thread appropriate priority.
You could also use the kthread to perform the period time reading from
Patch #4.
> return 0;
> }
>
> @@ -333,4 +398,9 @@ void bnxt_ptp_clear(struct bnxt *bp)
> ptp_clock_unregister(ptp->ptp_clock);
>
> ptp->ptp_clock = NULL;
> + cancel_work_sync(&ptp->ptp_ts_task);
Thanks,
Richard
Powered by blists - more mailing lists