On Mon, Jun 11, 2018 at 11:26:25AM -0700, Cliff Spradlin via Linuxptp-devel wrote: > I feel like this would be better implemented as a config option - for > example, an option to not adjust SIOCSHWTSTAMP at all, or to have an > explicit value to set it to. > > My preference would be to have an option to not adjust it. Then you could > use hwstamp_ctl or another program before running ptp4l to set it to the > value you want. In this mode, ptp4l would simply check to see whether the > filter was set to a sufficient value for PTP operations and fail with an > error if it was not.
+1 > > + > > + if (ioctl(fd, SIOCGHWTSTAMP, &ifreq) < 0) > > + { > > + pr_err("ioctl SIOCGHWTSTAMP failed: %m"); > > + return -1; > > + } Wrong coding style here... > > + > > cfg.tx_type = tx_type; > > - cfg.rx_filter = rx_filter; > > + // Do not downgrade the rx filter, as it may be used by an AVB/TSN > > application and here... > > + if (cfg.rx_filter != HWTSTAMP_FILTER_ALL) > > + cfg.rx_filter = rx_filter; and here. Thanks, Richard ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel