On Wed, 13 Nov 2024 16:39:25 -0800 Jakub Kicinski <kuba@xxxxxxxxxx> wrote: > On Wed, 13 Nov 2024 11:38:08 +0100 Kory Maincent wrote: > > > IOW I'm struggling to connect the dots how the code you're adding now > > > will be built _upon_ rather than _on the side_ of when socket PHC > > > selection is in place. > > > > I see what you mean! It is not something easy to think of as I don't really > > know how it would be implemented. > > Do you think adding simply the PHC source and the phydev pointer or index > > would fit? > > In net_device? Yes, I think so. Also as the "user" is not described in the ptp_clock structure the only way to find it is to roll through all the PTP of the concerned net device topology. This find ptp loop will not be in the hotpath but only when getting the tsinfo of a PHC or changing the current PHC. Is it ok for you? I am at v20 so I ask for confirmation before changing the full patch series! ;) Regards, -- Köry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com