Re: [PATCH RFC net-next v8 10/13] net: netdevsim: ptp_mock: Convert to netdev_ptp_clock_register

From
Rahul Rameshbabu <rrameshbabu@nvidia.com>
Date
2024-02-16 20:04:04
Also in
lkml, netdev
Reply to
Kory Maincent, 2024-02-16
On Fri, 16 Feb, 2024 16:52:28 +0100 Kory Maincent [off-list ref] wrote:
The hardware registration clock for net device is now using
netdev_ptp_clock_register to save the net_device pointer within the PTP
clock xarray. netdevsim is registering its ptp through the mock driver.
It is the only driver using the mock driver to register a ptp clock.
Convert the mock driver to the new API.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Shouldn't we move the mock driver in the netdevsim directory as it is only
used by netdevsim driver?
This gets interesting. I think the reason it live under drivers/ptp
rather than drivers/net/netdevsim is because a bunch of reference/simple
phc implementations live under drivers/ptp already. In the case of mlx5,
it lives under the mlx5 driver directory to avoid needing to export
symbols between some mlx5_ptp driver and the netdev driver. I think
since the mock-up driver makes for a good reference for developers
wanting to know what it would take to implement the functionality for a
phc, it is fine living under drivers/ptp. That is just my opinion
though.
Changes in v8:
- New patch
---
Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
Thread (30 messages) 30 messages, 5 authors, last reply 2024-02-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help