All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: edumazet@google.com, davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Yafang Shao <laoar.shao@gmail.com>
Subject: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse
Date: Sat, 28 Jul 2018 11:01:39 +0800	[thread overview]
Message-ID: <1532746900-11710-1-git-send-email-laoar.shao@gmail.com> (raw)

When this SKB is dropped, we should add the counter sk_drops.
That could help us better tracking this behavior.

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
---
 net/ipv4/tcp_input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d51fa35..90f83eb 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4802,7 +4802,7 @@ static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
 	else
 		rb_erase(&skb->rbnode, root);
 
-	__kfree_skb(skb);
+	tcp_drop(sk, skb);
 	NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPRCVCOLLAPSED);
 
 	return next;
-- 
1.8.3.1


             reply	other threads:[~2018-07-28  3:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28  3:01 Yafang Shao [this message]
2018-07-28  3:01 ` [PATCH net-next 2/2] tcp: propagate GSO to the new skb built in tcp collapse Yafang Shao
2018-07-28  3:13   ` Eric Dumazet
2018-07-28  3:22     ` Yafang Shao
2018-07-28  3:06 ` [PATCH net-next 1/2] tcp: call tcp_drop() " Eric Dumazet
2018-07-28  3:34   ` Yafang Shao
2018-07-28  3:38     ` Eric Dumazet
2018-07-28  7:42       ` Yafang Shao
2018-07-28 16:28         ` Eric Dumazet
2018-07-30  2:06           ` Yafang Shao
2018-07-30  2:27             ` Eric Dumazet
2018-07-30  5:40               ` Yafang Shao
2018-07-30 15:56                 ` Eric Dumazet
2018-07-31  0:48                   ` Yafang Shao

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=1532746900-11710-1-git-send-email-laoar.shao@gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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.