diff options
| author | David S. Miller <davem@davemloft.net> | 2017-08-23 20:30:48 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-08-23 20:30:48 -0700 |
| commit | d260e9e6ad6fd89488da0fa9e34a1a646ce670e1 (patch) | |
| tree | 528bfca0dfecd19eade87b02a1208b3e268f4e59 /include | |
| parent | b28547728d4fd42a004df2b662724e16ff778db6 (diff) | |
| parent | 16e781224198be06389f6bd8a757c829bf221ea0 (diff) | |
Merge branch 'tcp-sw-rx-timestamps'
Mike Maloney says:
====================
net: Add software rx timestamp for TCP.
Add software rx timestamps for TCP, and a test to ensure consistency of
behavior between IP, UDP, and TCP implementation.
Changes since v1:
-Initialize tss->ts[1] to 0 if caller requested any timestamps.
-Fix test case to validate that tss->ts[1] is zero.
-Fix tests to actually use a raw socket.
-Fix --tcp flag to work on the test.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/tcp.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index a995004ae946..c614ff135b66 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -774,6 +774,12 @@ struct tcp_skb_cb { u16 tcp_gso_segs; u16 tcp_gso_size; }; + + /* Used to stash the receive timestamp while this skb is in the + * out of order queue, as skb->tstamp is overwritten by the + * rbnode. + */ + ktime_t swtstamp; }; __u8 tcp_flags; /* TCP header flags. (tcp[13]) */ @@ -790,7 +796,8 @@ struct tcp_skb_cb { __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ __u8 txstamp_ack:1, /* Record TX timestamp for ack? */ eor:1, /* Is skb MSG_EOR marked? */ - unused:6; + has_rxtstamp:1, /* SKB has a RX timestamp */ + unused:5; __u32 ack_seq; /* Sequence number ACK'd */ union { struct { |
