Use new ioctls added in Linux 6.7 to disable receiving events from other
channels when enabling external timestamping on a PHC. This should save
some CPU time when other applications or chronyd instances are using
other channels of the same PHC.
return 0;
}
+#if defined(PTP_MASK_CLEAR_ALL) && defined(PTP_MASK_EN_SINGLE)
+ /* Disable events from other channels on this descriptor */
+ if (ioctl(fd, PTP_MASK_CLEAR_ALL))
+ DEBUG_LOG("ioctl(%s) failed : %s", "PTP_MASK_CLEAR_ALL", strerror(errno));
+ else if (ioctl(fd, PTP_MASK_EN_SINGLE, &channel))
+ DEBUG_LOG("ioctl(%s) failed : %s", "PTP_MASK_EN_SINGLE", strerror(errno));
+#endif
+
return 1;
}