Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3857401pxb; Tue, 7 Sep 2021 09:02:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOCIRinE4wyHEJtF5+sPZj/Zkbg3Q+D5nnZBP7ZEuwn6HlQkiMIVmUqwwBiWqS+Dhv6IAr X-Received: by 2002:a17:907:7697:: with SMTP id jv23mr19254423ejc.451.1631030525884; Tue, 07 Sep 2021 09:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631030525; cv=none; d=google.com; s=arc-20160816; b=SkGd/cmVlqxk8pjfhH9cjZnbtMS548zA52OuOzEQoqnljMyS51/jxGQnlfFh8vXgUX t6ilKRrh+8rWAoHRtv24wQ+8wbXg13YAF+Bf1Ysc+rOzQ+fcSOsMFKEf3OZ4E9630ua0 uSQTDM7Dy9HLFf35PP+9IlPsz1mLkWmifssrc4PScJ2liYo6UEZVF9KfsoZAZsWgw3fw IRZ/sPP+6nhrjGJ4u4wqfoeYWX1Odcq10qkFh+9wSmz6C2hBQL7ygb5PYsl7JusXA108 B+JUkDZxSbtJu0MfD782VlMQkjyg0Ud2bwy1pbs0fPatMcxaDuqiLvAmQVINFTR0xXVr a3FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=cUsRgleGszBVzgV+4fN7fVZz/pjt3nqJ0h4uQifB3W4=; b=Six9T72huoBwfeEeevqiVS5jVotlhoKg7BSXVCTgXKOwVCtmwTSDOcdwF9qTrRcbuS 23It32vXcas8mM372cE5YV43YC+gg660vj/jDWszvfPNuMNv1f2tnc675DrCRg0FL7/E 5EV/AuYGKtj4UoarG0vEdivm3tzOD8n7JWV7CJT6vipzQOs0Z8OnYJ3MAXBPvwY8qGgQ m7zy89V8sDq7WU/uVyJWTzseOLflgUsxsO4nfZYPW57iFpBzFmjg3w00uY+xHuhji2gJ rVHusGRueFPudSJwz6EYEoqh/zXgdtOnIXVcFRBSN2vh1r5ugqfIYgOBv7MptOZ9MN/i iKWQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si11241802edc.427.2021.09.07.09.01.39; Tue, 07 Sep 2021 09:02:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344970AbhIGPNL (ORCPT + 99 others); Tue, 7 Sep 2021 11:13:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:40840 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344964AbhIGPNK (ORCPT ); Tue, 7 Sep 2021 11:13:10 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0510B610FE; Tue, 7 Sep 2021 15:12:02 +0000 (UTC) Date: Tue, 7 Sep 2021 11:12:01 -0400 From: Steven Rostedt To: Zhongya Yan Cc: edumazet@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kuba@kernel.org, mingo@redhat.com, davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, hengqi.chen@gmail.com, yhs@fb.com, brendan.d.gregg@gmail.com, 2228598786@qq.com Subject: Re: [PATCH] net: tcp_drop adds `reason` and SNMP parameters for tracing v4 Message-ID: <20210907111201.783d5ea2@gandalf.local.home> In-Reply-To: <20210904064044.125549-1-yan2228598786@gmail.com> References: <20210904064044.125549-1-yan2228598786@gmail.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 3 Sep 2021 23:40:44 -0700 Zhongya Yan wrote: > @@ -4708,7 +4710,7 @@ static void tcp_ofo_queue(struct sock *sk) > rb_erase(&skb->rbnode, &tp->out_of_order_queue); > > if (unlikely(!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))) { > - tcp_drop(sk, skb); > + tcp_drop(sk, skb, LINUX_MIB_TCPOFOQUEUE, "Tcp queue error"); > continue; > } > > @@ -4764,7 +4766,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb) > if (unlikely(tcp_try_rmem_schedule(sk, skb, skb->truesize))) { > NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPOFODROP); > sk->sk_data_ready(sk); > - tcp_drop(sk, skb); > + tcp_drop(sk, skb, LINUX_MIB_TCPOFODROP, "Tcp rmem failed"); > return; > } > > @@ -4827,7 +4829,7 @@ static void tcp_data_queue_ofo(struct sock *sk, struct sk_buff *skb) > /* All the bits are present. Drop. */ > NET_INC_STATS(sock_net(sk), > LINUX_MIB_TCPOFOMERGE); > - tcp_drop(sk, skb); > + tcp_drop(sk, skb, LINUX_MIB_TCPOFOMERGE, "Tcp bits are present"); Just curious. Is "Tcp" the normal way to write "TCP" in the kernel? I see it in snmp_seq_show_tcp_udp() in net/ipv4/proc.c, but no where else (besides doing CamelCase words). Should these be written using "TCP" instead of "Tcp". It just looks awkward to me. But hey, I'm not one of the networking folks, so what do I know? -- Steve