From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D48E6C433FE for ; Wed, 16 Feb 2022 17:05:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236886AbiBPRFQ (ORCPT ); Wed, 16 Feb 2022 12:05:16 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234217AbiBPRFP (ORCPT ); Wed, 16 Feb 2022 12:05:15 -0500 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04F632A5983 for ; Wed, 16 Feb 2022 09:05:03 -0800 (PST) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-2d62593ad9bso5842917b3.8 for ; Wed, 16 Feb 2022 09:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2juVayWDeDNiMOSl5byAk4ZO9Dz6MyJWtuklD1EzHsc=; b=Me2QFmo170zKETlbtKN8PcGm3z91iWxBm8JFCZl0dLPpr6c2h9bTwnU4y756hvisXL 5skvfAhbQ2/kJsqmTfAtDcdB2tYVqSahp9S0T1oiUckh4F3vEepLix+KRHxWdi0DNzVj HZMXcz4rL+rZujczwWkcbsXz76D1YlZkdz72pxcoMXGmQDrdom3WJgEgrU9Nr/mWLL/t o9rHyGG8/Nl40QSN7F+QKxdDpTZdqHqs5LfMY1oZQEfP0oBFZIbX8e1cRux3TIC0SDx7 iwkZ4dOMenFdBk2po2X52T8QtHb7spTFl/9korrlnMv80YKkorD3O3NDiiQOqGosBOZI NQCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2juVayWDeDNiMOSl5byAk4ZO9Dz6MyJWtuklD1EzHsc=; b=Z7QnLeOEs7ze/6Wm/EeKuPgza9NJhABQMf0nC/BYjsqfp4DOWw7WIk9XLv7ZRsKy6F VVBaLm58xCWL70OI0wa6NlxrRGY3oXfWfrUXSdvdFDN0/ey7WFWzo+tOg8IOKF7PPSlq MwGxvJSmkpk75L71g4YtkXb8X3ueze8YgJn+hKwbmhlgAL6Oq0eCL6IDJ7gyXybVF4Sg pr+qsblkUppS6o15NeCmrz5pS2AhyIyyZR/SS/+ezEfoHxFjxcBkYRz5fa9d2krMA56I chrKTbGw60ia976HwrEol1Ckt5nqLQVudLK7tNeSd350jCtLPhWYn44GT6glBmhIkQoY K7Ug== X-Gm-Message-State: AOAM5321Tu4qP2HczwH+bvo4Ik/FWzAjdlgtP+FdKRAwL4T0MlIMFnuh lNizaIZAnbK9di3M12craFPA2nHxw2YbYtOD+PMmsg== X-Google-Smtp-Source: ABdhPJzPZKpp/lmdiJbf1hd+uHL0HzVvyEzxKNLXdYq/W8oDUygcnnrBqzIk0QsOwf5SNcKoOsImPBIsfNXO10j6SmM= X-Received: by 2002:a81:993:0:b0:2d6:15f5:b392 with SMTP id 141-20020a810993000000b002d615f5b392mr3246691ywj.489.1645031101716; Wed, 16 Feb 2022 09:05:01 -0800 (PST) MIME-Version: 1.0 References: <20220216035426.2233808-1-imagedong@tencent.com> In-Reply-To: <20220216035426.2233808-1-imagedong@tencent.com> From: Eric Dumazet Date: Wed, 16 Feb 2022 09:04:50 -0800 Message-ID: Subject: Re: [PATCH net-next 0/9] net: add skb drop reasons to TCP packet receive To: Menglong Dong Cc: David Ahern , Jakub Kicinski , David Miller , Steven Rostedt , Ingo Molnar , Hideaki YOSHIFUJI , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Menglong Dong , Talal Ahmad , Kees Cook , Ilias Apalodimas , Alexander Lobakin , Kumar Kartikeya Dwivedi , Antoine Tenart , Sebastian Andrzej Siewior , Paolo Abeni , Yunsheng Lin , Arnd Bergmann , Yajun Deng , Roopa Prabhu , Willem de Bruijn , Vasily Averin , Cong Wang , Luiz Augusto von Dentz , LKML , netdev , bpf , flyingpeng@tencent.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Feb 15, 2022 at 7:54 PM wrote: > > From: Menglong Dong > > In this series patches, reasons for skb drops are added to TCP layer, and > both TCPv4 and TCPv6 are considered. > > in this series patches, the process of packet ingress in TCP layer is > considered, as skb drops hardly happens in the egress path. > > However, it's a little complex for TCP state processing, as I find that > it's hard to report skb drop reasons to where it is freed. For example, > when skb is dropped in tcp_rcv_state_process(), the reason can be caused > by the call of tcp_v4_conn_request(), and it's hard to return a drop > reason from tcp_v4_conn_request(). So I just skip such case for this > moment. > I think you should add at least in this cover letter, or better in a document that can be amended, how this can be used on a typical TCP session. For someone who is having issues with TCP flows, what would they need to do. Think of something that we (kernel dev) could copy paste to future email replies. It might be mostly clear for some of us reviewing patches at this moment, but in one year we will all forget about the details. > > Menglong Dong (9): > net: tcp: introduce tcp_drop_reason() > net: tcp: add skb drop reasons to tcp_v4_rcv() > net: tcp: use kfree_skb_reason() for tcp_v6_rcv() > net: tcp: add skb drop reasons to tcp_v{4,6}_inbound_md5_hash() > net: tcp: add skb drop reasons to tcp_add_backlog() > net: tcp: use kfree_skb_reason() for tcp_v{4,6}_do_rcv() > net: tcp: use tcp_drop_reason() for tcp_rcv_established() > net: tcp: use tcp_drop_reason() for tcp_data_queue() > net: tcp: use tcp_drop_reason() for tcp_data_queue_ofo() > > include/linux/skbuff.h | 28 +++++++++++++++++++++++++ > include/net/tcp.h | 3 ++- > include/trace/events/skb.h | 10 +++++++++ > net/ipv4/tcp_input.c | 42 +++++++++++++++++++++++++++++--------- > net/ipv4/tcp_ipv4.c | 36 ++++++++++++++++++++++++-------- > net/ipv6/tcp_ipv6.c | 42 +++++++++++++++++++++++++++++--------- > 6 files changed, 131 insertions(+), 30 deletions(-) > > -- > 2.34.1 >