netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Soheil Hassas Yeganeh <soheil.kdev@gmail.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: kafai@fb.com, willemb@google.com, edumazet@google.com,
	ycheng@google.com, ncardwell@google.com,
	Soheil Hassas Yeganeh <soheil@google.com>
Subject: [PATCH net-next 2/2] tcp: remove a redundant check for SKBTX_ACK_TSTAMP
Date: Mon, 25 Apr 2016 16:51:13 -0400	[thread overview]
Message-ID: <1461617473-11349-2-git-send-email-soheil.kdev@gmail.com> (raw)
In-Reply-To: <1461617473-11349-1-git-send-email-soheil.kdev@gmail.com>

From: Soheil Hassas Yeganeh <soheil@google.com>

txstamp_ack in tcp_skb_cb is set iff the SKBTX_ACK_TSTAMP
flag is set for an skb. Thus, it is not required to check
shinfo->tx_flags if the txstamp_ack bit is checked.

Remove the check on shinfo->tx_flags & SKBTX_ACK_TSTAMP, since
it has already been checked using the txstamp_ack bit.

Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
---
 net/ipv4/tcp_input.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 967520d..2f3fd92 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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);
 }
-- 
2.8.0.rc3.226.g39d4020

  reply	other threads:[~2016-04-25 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 20:51 [PATCH net-next 1/2] tcp: remove an unnecessary check in tcp_tx_timestamp Soheil Hassas Yeganeh
2016-04-25 20:51 ` Soheil Hassas Yeganeh [this message]
2016-04-27 18:19   ` [PATCH net-next 2/2] tcp: remove a redundant check for SKBTX_ACK_TSTAMP Martin KaFai Lau
2016-04-27 19:25     ` Soheil Hassas Yeganeh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461617473-11349-2-git-send-email-soheil.kdev@gmail.com \
    --to=soheil.kdev@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kafai@fb.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=soheil@google.com \
    --cc=willemb@google.com \
    --cc=ycheng@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).