On Fri, Oct 13, 2023 at 09:00:20AM -0700, Jakub Kicinski wrote: > On Tue, 10 Oct 2023 10:23:43 +0200 Köry Maincent wrote: > > > Why do we have to set NETDEV_TIMESTAMPING here, or is this a round-about > > > way of enumerating 0, 1, 2 and 3? > > > > I answered you above the software timestamping should have the > > NETDEV_TIMESTAMPING bit set as it is done from the net device driver. > > > > What I was thinking is that all the new timestamping should have > > NETDEV_TIMESTAMPING or PHYLIB_TIMESTAMPING set to know which API to pass > > through. > > Like we could add these in the future: > > MAC_DMA_TIMESTAMPING = (2 << 2) | (1 >> 0), > > MAC_PRECISION_TIMESTAMPING = (3 << 2) | (1 >> 0), > > ... > > PHY_SFP_TIMESTAMPING = (2 << 2) | (1 << 1), > > ... > > What is "PRECISION"? DMA is a separate block like MAC and PHY. If DMA is a separate block like MAC and PHY, can it have its own PHC device, and the ethtool UAPI only lists the timestamping-capable PHCs for one NIC, and is able to select between them? Translation between the UAPI-visible PHC index and MAC, DMA, phylib PHY, other PHY etc can then be done by the kernel as needed.