PetteriAimonen opened a new pull request, #11210: URL: https://github.com/apache/nuttx/pull/11210
## Summary Adds support for timestamping received UDP packets, either in hardware or in kernel. Builds on the existing support of `SO_TIMESTAMP` for SocketCAN. Implementation uses `CLOCK_REALTIME` for timestamping to match the behavior of Linux. This could be made configurable in future if needed. ## Impact When `CONFIG_NET_TIMESTAMP` is enabled, `setsockopt(..., SO_TIMESTAMP)` can be used to enable timestamping. Software timestamping is supported on all platforms. This already removes any queuing latency, but threads with higher priority than network processing can delay timestamping. Platforms where hardware support exists can define `ARCH_HAVE_NETDEV_TIMESTAMP` and store the timestamp to `d_rxtime` before calling `ipv4_input`/`ipv6_input`. ## Testing Tested on custom STM32F4 board with a ptpd version that has SO_TIMESTAMP support. I'll submit a pull request of that to nuttx-apps once I have cleaned it up. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
