mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
tcp: remove SKBTX_ACK_TSTAMP since it is redundant
The SKBTX_ACK_TSTAMP flag is set in skb_shinfo->tx_flags when the timestamp of the TCP acknowledgement should be reported on error queue. Since accessing skb_shinfo is likely to incur a cache-line miss at the time of receiving the ack, the txstamp_ack bit was added in tcp_skb_cb, which is set iff the SKBTX_ACK_TSTAMP flag is set for an skb. This makes SKBTX_ACK_TSTAMP flag redundant. Remove the SKBTX_ACK_TSTAMP and instead use the txstamp_ack bit everywhere. Note that this frees one bit in shinfo->tx_flags. Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Martin KaFai Lau <kafai@fb.com> Suggested-by: Willem de Bruijn <willemb@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
863c1fd981
commit
0a2cf20c3f
5 changed files with 16 additions and 18 deletions
|
@ -3087,8 +3087,7 @@ static void tcp_ack_tstamp(struct sock *sk, struct sk_buff *skb,
|
|||
return;
|
||||
|
||||
shinfo = skb_shinfo(skb);
|
||||
if ((shinfo->tx_flags & SKBTX_ACK_TSTAMP) &&
|
||||
!before(shinfo->tskey, prior_snd_una) &&
|
||||
if (!before(shinfo->tskey, prior_snd_una) &&
|
||||
before(shinfo->tskey, tcp_sk(sk)->snd_una))
|
||||
__skb_tstamp_tx(skb, NULL, sk, SCM_TSTAMP_ACK);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue