Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp92289rwp; Wed, 12 Jul 2023 10:07:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUVRAX/FkCGz49eiupHII7PAyDM0wpkoS//j4gW0YzN65cmZWCAtnFWS2nWNt4tEKty8IX X-Received: by 2002:a05:6a20:13c4:b0:126:f64b:668e with SMTP id ho4-20020a056a2013c400b00126f64b668emr14039324pzc.5.1689181672725; Wed, 12 Jul 2023 10:07:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689181672; cv=none; d=google.com; s=arc-20160816; b=v2v81xk2cW6ocuNSU6KM4r2GFjnjjcwDLeDvn4Wte9MS9TwQ2QUBhKCuYVBZMo3yZD b+yB01CX2qDs8Xar4GhqGVG8Zub8HEOaPkgoG1r4kW3jysoWrAcDKTXK6mmB43F3KTAb gfIGVRF6o15P5DTJclVjTeMx7aqh9ljaYy4GI0hpV7TZlzdw8zmz3qT3ejx7Ro3WVMd+ kZf+lP/i1nFLvXUUnt2eq2zSPtXJwsgLiH04usIT/02btyF7UwbjTBdY1Yzur4QBDYEj zbSGtLIhwAROmJM+60e3C+8xW8dqimKob6Z98rE7W5cEmfMeMtbKbeKXpyFycE4qW4ZS ETUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=bW19SqP+fvSrSLXAkvlkbepiHCJjhpsp8L+HzcG/ses=; fh=/D928PrlEs9kxJj0L2ApXE7EbhKxB2GtjucFwFS3s6k=; b=yBTp4Og5SiylE4DCZBzXnS/MnWi4FyEOLdNyvO21HI5V8ZIzCzSxjXh3kKNTpzhNJh Ylq7z+Zm2uxaEaiUf09V2ALPSSFo/YLNQfano0WPrjXDP3KTfSU/0ddA25CW0CPIz8kx p2DA0m+Sme5IqfY7QtiW+cqYuB4VfawiDA7h93Oez/GzA3ehKH6Z0olJPBlOnJegIhAt 5pw69TbsnYnFjHFOAJjRA+IlEpmrp+a9UFq7Ux6i3XMXBtR18vdEz0Dz/K4VP31MKVxW noH225erVAJNpTV5Ib3kH5EAXixtLwuazaJrcLG7/w8sYzzKOJrT1G82Y/uQRuo/S7OG ttJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=SgfwpiDW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a056a0008c900b0067713a69349si3626924pfu.1.2023.07.12.10.07.40; Wed, 12 Jul 2023 10:07:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=SgfwpiDW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232888AbjGLQmx (ORCPT + 99 others); Wed, 12 Jul 2023 12:42:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbjGLQmm (ORCPT ); Wed, 12 Jul 2023 12:42:42 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F234C1FC9 for ; Wed, 12 Jul 2023 09:42:38 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-51f7fb9a944so2390670a12.3 for ; Wed, 12 Jul 2023 09:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; t=1689180157; x=1691772157; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bW19SqP+fvSrSLXAkvlkbepiHCJjhpsp8L+HzcG/ses=; b=SgfwpiDWROfxicDuY5a0jDAkPQX29D8MNs1R5sSaSiMXu07hvOsRjGj7HzDMnoMyuK AnKOFz5cSrsss5qyVXdnVaFbkjetGCqVe5k4VNKvQqq8pjpuoKaOse60yM0U/X4YrTrA 4S4A6px64gAkeCA3SC0KBg49c/q6SIcP8kiG8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689180157; x=1691772157; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bW19SqP+fvSrSLXAkvlkbepiHCJjhpsp8L+HzcG/ses=; b=jV+1IquEQU012km60ZMCC2B4tkd7vYk9q50+e+zoXUc3ugtV0djEsK9pw6eB4hqmBG c0lILHWHaW0nPISOpTFOeB4hmie0Eg1rXQnyYsv1FsyzVdUjJDK4lQA6UBWf12EqP6Af X4kZtm99n/k9YhCw6wZ6lQDyzjJ/iN9cJ/80xlYEGsd5FibN300/exi+2Yf4qzbbOQYd ORM91th8kyLYeFKB2xh6wsj4ihh+6VdIpoJjHyJB5ytDFz8EHzKqzExOlRi+uIYJHRjI BoVdt9F0t2cjf4JIXIsSooC5bE2CJk9bet4j88lOdO/bFe+9wiOiL0mPpmhQFzvmWtMn MuCw== X-Gm-Message-State: ABy/qLZ6SXICLRt5slAvrFC6CNY2yknNZ8hBcQ6eCQWWe63kdOfKwNK4 erirrXRVYeAs5xhOOd1zOa5sxMR31P27tMRNoqHX8g== X-Received: by 2002:aa7:d951:0:b0:51e:342c:25e0 with SMTP id l17-20020aa7d951000000b0051e342c25e0mr15386229eds.41.1689180157295; Wed, 12 Jul 2023 09:42:37 -0700 (PDT) MIME-Version: 1.0 References: <20230711043453.64095-1-ivan@cloudflare.com> <20230711193612.22c9bc04@kernel.org> In-Reply-To: <20230711193612.22c9bc04@kernel.org> From: Yan Zhai Date: Wed, 12 Jul 2023 11:42:26 -0500 Message-ID: Subject: Re: [RFC PATCH net-next] tcp: add a tracepoint for tcp_listen_queue_drop To: Jakub Kicinski Cc: Ivan Babrou , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@cloudflare.com, Eric Dumazet , "David S. Miller" , Paolo Abeni , Steven Rostedt , Masami Hiramatsu , David Ahern Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 11, 2023 at 9:36=E2=80=AFPM Jakub Kicinski wr= ote: > > On Mon, 10 Jul 2023 21:34:52 -0700 Ivan Babrou wrote: > > There's already a way to count the overall numbers of queue overflows: > > > > $ sudo netstat -s | grep 'listen queue' > > 4 times the listen queue of a socket overflowed > > > > However, it's too coarse for monitoring and alerting when a user wants = to > > track errors per socket and route alerts to people responsible for thos= e > > sockets directly. For UDP there's udp_fail_queue_rcv_skb, which fills > > a similar need for UDP sockets. This patch adds a TCP equivalent. > > Makes me want to revert your recent UDP tracepoint to be honest :( > We can play whack a mole like this. You said that kfree_skb fires > too often, why is that? Maybe it's an issue of someone using > kfree_skb() when they should be using consume_skb() ? Hi Jakub, The issue with kfree_skb is not that it fires too frequently (not in the 6.x kernel now). Rather, it is unable to locate the socket info when a SYN is dropped due to the accept queue being full. The sk is stolen upon inet lookup, e.g. in tcp_v4_rcv. This makes it unable to tell in kfree_skb which socket a SYN skb is targeting (when TPROXY or socket lookup are used). A tracepoint with sk information will be more useful to monitor accurately which service/socket is involved. -- Yan