forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ptp: Support late timestamp determination
If a physical clock supports a free running time called cycles, then timestamps shall be based on this time too. For TX it is known in advance before the transmission if a timestamp based on cycles is needed. For RX it is impossible to know which timestamp is needed before the packet is received and assigned to a socket. Support late timestamp determination by a physical clock. Therefore, an address/cookie is stored within the new phc_data field of struct skb_shared_hwtstamps. This address/cookie is provided to a new physical clock method called gettstamp(), which returns a timestamp based on the normal/adjustable time or based on cycles. The previously introduced flag SKBTX_HW_TSTAMP_USE_CYCLES is reused with an additional alias to request the late timestamp determination by the physical clock. That is possible, because SKBTX_HW_TSTAMP_USE_CYCLES is not used in the receive path. Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
- Loading branch information
1 parent
1a1e2ad
commit 754e870
Showing
4 changed files
with
88 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters