diff options
author | David S. Miller <davem@davemloft.net> | 2016-04-28 16:06:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-28 16:06:11 -0400 |
commit | 2a9e8438a29c00432ae14eaceb088b965f8ac290 (patch) | |
tree | 8ac718cd55a6ec72241c647e38856d904797a078 /net/ipv4/tcp.c | |
parent | ba7863f4d3bfe1698e0a92934cbc9c3021f4448d (diff) | |
parent | 0a2cf20c3fb62ad4717276b5303bf831f7b29d54 (diff) |
Merge branch 'tcp-redundant-checks'
Soheil Hassas Yeganeh says:
====================
tcp: simplify ack tx timestamps
v2:
- Fully remove SKBTX_ACK_TSTAMP, as suggested by Willem de Bruijn.
This patch series aims at removing redundant checks and fields
for ack timestamps for TCP.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 040f35e7efe0..91993782a947 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -430,14 +430,15 @@ EXPORT_SYMBOL(tcp_init_sock); static void tcp_tx_timestamp(struct sock *sk, u16 tsflags, struct sk_buff *skb) { - if (sk->sk_tsflags || tsflags) { + if (tsflags) { struct skb_shared_info *shinfo = skb_shinfo(skb); struct tcp_skb_cb *tcb = TCP_SKB_CB(skb); sock_tx_timestamp(sk, tsflags, &shinfo->tx_flags); - if (shinfo->tx_flags & SKBTX_ANY_TSTAMP) + if (tsflags & SOF_TIMESTAMPING_TX_ACK) + tcb->txstamp_ack = 1; + if (tsflags & SOF_TIMESTAMPING_TX_RECORD_MASK) shinfo->tskey = TCP_SKB_CB(skb)->seq + skb->len - 1; - tcb->txstamp_ack = !!(shinfo->tx_flags & SKBTX_ACK_TSTAMP); } } |