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 v2 net-next 1/2] tcp: remove an unnecessary check in tcp_tx_timestamp
Date: Wed, 27 Apr 2016 23:39:00 -0400 [thread overview]
Message-ID: <1461814741-848-2-git-send-email-soheil.kdev@gmail.com> (raw)
In-Reply-To: <1461814741-848-1-git-send-email-soheil.kdev@gmail.com>
From: Soheil Hassas Yeganeh <soheil@google.com>
Remove the redundant check for sk->sk_tsflags in tcp_tx_timestamp.
tcp_tx_timestamp() receives the tsflags as a parameter. As a
result the "sk->sk_tsflags || tsflags" is redundant, since
tsflags already includes sk->sk_tsflags plus overrides from
control messages.
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
---
net/ipv4/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4d73858..3c542dc 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -430,7 +430,7 @@ 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);
--
2.8.0.rc3.226.g39d4020
next prev parent reply other threads:[~2016-04-28 3:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 3:38 [PATCH v2 net-next 0/2] tcp: simplify ack tx timestamps Soheil Hassas Yeganeh
2016-04-28 3:39 ` Soheil Hassas Yeganeh [this message]
2016-04-28 4:35 ` [PATCH v2 net-next 1/2] tcp: remove an unnecessary check in tcp_tx_timestamp Eric Dumazet
2016-04-28 3:39 ` [PATCH v2 net-next 2/2] tcp: remove SKBTX_ACK_TSTAMP since it is redundant Soheil Hassas Yeganeh
2016-04-28 4:37 ` Eric Dumazet
2016-04-28 20:06 ` [PATCH v2 net-next 0/2] tcp: simplify ack tx timestamps David Miller
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=1461814741-848-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.