All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yafang Shao <laoar.shao@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: Brendan Gregg <bgregg@netflix.com>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse
Date: Tue, 31 Jul 2018 08:48:49 +0800	[thread overview]
Message-ID: <CALOAHbCcK5OoGn1Zc_CDYwM9FXKgi0wk8zq8xB1wHyH4iZTxZA@mail.gmail.com> (raw)
In-Reply-To: <CANn89iK4KLHww-R2JmNr-tYVcUWevq6ceFQW0qE2mJCsq6eL-g@mail.gmail.com>

On Mon, Jul 30, 2018 at 11:56 PM, Eric Dumazet <edumazet@google.com> wrote:
> 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.
>

Oh yes, introducing a new tracepoint for it should be better.
trace_tcp_probe(sk, skb, mib_idx);

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

OK.

      reply	other threads:[~2018-07-31  0:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28  3:01 [PATCH net-next 1/2] tcp: call tcp_drop() in tcp collapse Yafang Shao
2018-07-28  3:01 ` [PATCH net-next 2/2] tcp: propagate GSO to the new skb built " 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 [this message]

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=CALOAHbCcK5OoGn1Zc_CDYwM9FXKgi0wk8zq8xB1wHyH4iZTxZA@mail.gmail.com \
    --to=laoar.shao@gmail.com \
    --cc=bgregg@netflix.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.