On Wed, 17 Jul 2024 10:43:05 -0700 Jacob Keller <jacob.e.keller@xxxxxxxxx> wrote: > > > +The legacy configuration is the use of the ioctl(SIOCSHWTSTAMP) with a > > pointer +to a struct ifreq whose ifr_data points to a struct > > hwtstamp_config. +The tx_type and rx_filter are hints to the driver what it > > is expected to do. +If the requested fine-grained filtering for incoming > > packets is not supported, the driver may time stamp more than just the > > requested types of packets. > > > > Does the core automatically handle SIOCSHWTSTAMP and SIOCGHWTSTAMP in > terms of the new API? I'm guessing yes because of the new > .ndo_set_hwtstamp ops? Yes. > > A driver which supports hardware time stamping must support the > > -SIOCSHWTSTAMP ioctl and update the supplied struct hwtstamp_config with > > -the actual values as described in the section on SIOCSHWTSTAMP. It > > -should also support SIOCGHWTSTAMP. > > +ndo_hwtstamp_set NDO or the legacy SIOCSHWTSTAMP ioctl and update the > > +supplied struct hwtstamp_config with the actual values as described in > > +the section on SIOCSHWTSTAMP. It should also support ndo_hwtstamp_get or > > +the legacy SIOCGHWTSTAMP. > > Can we simply drop the mention of implementing the legacy implementation > on the kernel side? I guess not all existing drivers have converted yet...? Yes indeed. In fact, Vlad has already worked on converting all the existing drivers: https://github.com/vladimiroltean/linux/tree/ndo-hwtstamp-v9 I can't find any patch series sent to net next. Vlad what is the status on this? > I have a similar thought about the other legacy PTP hooks.. it is good > to completely remove the legacy/deprecated implementations as it means > drivers can't be published which don't update to new APIs. That > ultimately just wastes reviewer/maintainer time to point out that it > must be updated to new APIs. Yes but on the userspace side linuxPTP is still using the IOCTLs uAPI that will become legacy with this series. Maybe it is still a bit early to remove totally their descriptions in the doc? Regards, -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com