lkml.org 
[lkml]   [2018]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse
On Sun, Jul 29, 2018 at 10:40 PM Yafang Shao <laoar.shao@gmail.com> wrote:

> Should we put NET_INC_STATS(sock_net(sk), mib_idx) into the funtion
> tcp_drop() ?
> Then we could easily relate the sk_drops with the SNMP counters.
>
> Something like that,
>
> static void tcp_drop(struct sock *sk, struct sk_buff *skb, int mib_idx)
> {
> int segs = max_t(u16, 1, skb_shinfo(skb)->gso_segs);
>
> atomic_add(segs, &sk->sk_drops);
> NET_ADD_STATS(sock_net(sk), mib_idx, segs);
> __kfree_skb(skb);
> }

We had a discussion during netconf, and Brendan Gregg was working on
an idea like that,
so that distinct events could be traced/reported.

I prefer letting Brendan submit his patch, which not only refactors
things, but add new functionality.

Thanks.

\
 
 \ /
  Last update: 2018-07-30 17:57    [W:0.146 / U:1.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site