diff options
author | Miroslav Lichvar <mlichvar@redhat.com> | 2017-05-19 17:52:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-21 13:37:32 -0400 |
commit | b50a5c70ffa4fd6b6da324ab54c84adf48fb17d9 (patch) | |
tree | 02554df34f5ee85dd91f228e45b8d17a066b1e48 /include/uapi/linux/net_tstamp.h | |
parent | 67953d47bb24e63d209705f745a0de411a4c6578 (diff) | |
download | linux-b50a5c70ffa4fd6b6da324ab54c84adf48fb17d9.tar.gz linux-b50a5c70ffa4fd6b6da324ab54c84adf48fb17d9.tar.bz2 linux-b50a5c70ffa4fd6b6da324ab54c84adf48fb17d9.zip |
net: allow simultaneous SW and HW transmit timestamping
Add SOF_TIMESTAMPING_OPT_TX_SWHW option to allow an outgoing packet to
be looped to the socket's error queue with a software timestamp even
when a hardware transmit timestamp is expected to be provided by the
driver.
Applications using this option will receive two separate messages from
the error queue, one with a software timestamp and the other with a
hardware timestamp. As the hardware timestamp is saved to the shared skb
info, which may happen before the first message with software timestamp
is received by the application, the hardware timestamp is copied to the
SCM_TIMESTAMPING control message only when the skb has no software
timestamp or it is an incoming packet.
While changing sw_tx_timestamp(), inline it in skb_tx_timestamp() as
there are no other users.
CC: Richard Cochran <richardcochran@gmail.com>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/net_tstamp.h')
-rw-r--r-- | include/uapi/linux/net_tstamp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/net_tstamp.h b/include/uapi/linux/net_tstamp.h index dee74d39da94..3d421d912193 100644 --- a/include/uapi/linux/net_tstamp.h +++ b/include/uapi/linux/net_tstamp.h @@ -28,8 +28,9 @@ enum { SOF_TIMESTAMPING_OPT_TSONLY = (1<<11), SOF_TIMESTAMPING_OPT_STATS = (1<<12), SOF_TIMESTAMPING_OPT_PKTINFO = (1<<13), + SOF_TIMESTAMPING_OPT_TX_SWHW = (1<<14), - SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_PKTINFO, + SOF_TIMESTAMPING_LAST = SOF_TIMESTAMPING_OPT_TX_SWHW, SOF_TIMESTAMPING_MASK = (SOF_TIMESTAMPING_LAST - 1) | SOF_TIMESTAMPING_LAST }; |