summaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorSoheil Hassas Yeganeh2016-04-03 05:08:08 +0200
committerDavid S. Miller2016-04-04 21:50:29 +0200
commit6b084928baac562ed61866f540a96120e9c9ddb7 (patch)
tree775a973c0dc77e0c42c7fde2e128843d18bf95d9 /include/net/tcp.h
parenttcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO (diff)
downloadkernel-qcow2-linux-6b084928baac562ed61866f540a96120e9c9ddb7.tar.gz
kernel-qcow2-linux-6b084928baac562ed61866f540a96120e9c9ddb7.tar.xz
kernel-qcow2-linux-6b084928baac562ed61866f540a96120e9c9ddb7.zip
tcp: use one bit in TCP_SKB_CB to mark ACK timestamps
Currently, to avoid a cache line miss for accessing skb_shinfo, tcp_ack_tstamp skips socket that do not have SOF_TIMESTAMPING_TX_ACK bit set in sk_tsflags. This is implemented based on an implicit assumption that the SOF_TIMESTAMPING_TX_ACK is set via socket options for the duration that ACK timestamps are needed. To implement per-write timestamps, this check should be removed and replaced with a per-packet alternative that quickly skips packets missing ACK timestamps marks without a cache-line miss. To enable per-packet marking without a cache line miss, use one bit in TCP_SKB_CB to mark a whether a SKB might need a ack tx timestamp or not. Further checks in tcp_ack_tstamp are not modified and work as before. Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Willem de Bruijn <willemb@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index f8bb4a4ed3d1..a23282996ca9 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -754,7 +754,8 @@ struct tcp_skb_cb {
TCPCB_REPAIRED)
__u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */
- /* 1 byte hole */
+ __u8 txstamp_ack:1, /* Record TX timestamp for ack? */
+ unused:7;
__u32 ack_seq; /* Sequence number ACK'd */
union {
struct inet_skb_parm h4;