[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB7PR04MB501714AD36532802298384D5F83F9@DB7PR04MB5017.eurprd04.prod.outlook.com>
Date: Mon, 31 May 2021 10:40:46 +0000
From: "Y.b. Lu" <yangbo.lu@....com>
To: Richard Cochran <richardcochran@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"David S . Miller" <davem@...emloft.net>,
Claudiu Manoil <claudiu.manoil@....com>,
Jakub Kicinski <kuba@...nel.org>
Subject: RE: [net-next, v2, 2/7] ptp: support ptp physical/virtual clocks
conversion
> -----Original Message-----
> From: Richard Cochran <richardcochran@...il.com>
> Sent: 2021年5月25日 20:28
> To: Y.b. Lu <yangbo.lu@....com>
> Cc: netdev@...r.kernel.org; David S . Miller <davem@...emloft.net>; Claudiu
> Manoil <claudiu.manoil@....com>; Jakub Kicinski <kuba@...nel.org>
> Subject: Re: [net-next, v2, 2/7] ptp: support ptp physical/virtual clocks
> conversion
>
> On Fri, May 21, 2021 at 12:36:14PM +0800, Yangbo Lu wrote:
>
> > @@ -76,6 +77,11 @@ static int ptp_clock_settime(struct posix_clock
> > *pc, const struct timespec64 *tp {
> > struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
> >
> > + if (ptp_guarantee_pclock(ptp)) {
>
> Going to need to protect against concurrency WRT ptp->num_vclocks.
Will protect n_vclocks.
Thanks.
>
> > + pr_err("ptp: virtual clock in use, guarantee physical clock free
> running\n");
> > + return -EBUSY;
> > + }
> > +
> > return ptp->info->settime64(ptp->info, tp); }
>
> Thanks,
> Richard
Powered by blists - more mailing lists