On Thu, Mar 23, 2017 at 05:21:45PM +0100, Miroslav Lichvar wrote: > A better approach might be a control message that would provide the > original interface index together with the length of the packet, so > the application could transpose the HW timestamp and map the HW > interface to the PHC.
This sounds better than trying to auto-magically transpose and correct for link speed. BTW, isn't there already a control message for "original interface index"? > The two values could be saved in the skb_shared_info structure. Now > my question is if they could be useful also for other things than > timestamping such as? > and if it should be a new socket option which would work > on any socket independently from timestamping, or if it should rather > be a new flag for the SO_TIMESTAMPING option. If the latter, would it > make sense to put them in the skb_shared_hwtstamps structure and > modify all drivers to set the values when a HW timestamp is captured > instead of adding more code to __netif_receive_skb_core() or similar? This information is solely for a highly specialized NTP application. No normal program would ever need this, AFAICT. So, if possible, getting the original frame length should be done in a way that doesn't affect users that don't need it. Thanks, Richard