Thread (23 messages) 23 messages, 3 authors, 2021-06-15

Re: [net-next, v2, 2/7] ptp: support ptp physical/virtual clocks conversion

From: Richard Cochran <richardcochran@gmail.com>
Date: 2021-05-25 12:28:34

On Fri, May 21, 2021 at 12:36:14PM +0800, Yangbo Lu wrote:
quoted hunk ↗ jump to hunk
@@ -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.
+		pr_err("ptp: virtual clock in use, guarantee physical clock free running\n");
+		return -EBUSY;
+	}
+
 	return  ptp->info->settime64(ptp->info, tp);
 }
Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help