Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3044535rwb; Mon, 7 Aug 2023 07:28:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEP2U9dJUpe8sMzLLkBvqQLs+Ew5egJWtuBJlS25BZiM6sbVW7A5QvceR72/b97HvYKczbn X-Received: by 2002:a05:6a20:12ce:b0:134:4f86:7966 with SMTP id v14-20020a056a2012ce00b001344f867966mr12595312pzg.9.1691418524208; Mon, 07 Aug 2023 07:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691418524; cv=none; d=google.com; s=arc-20160816; b=fwVru42YNhkhY3b6fRHsM5UCd58f1BbIqD3m+tGixP7RFBjnwlZameICn4tsLRsw3X KMMg8glKzBUTphdaFXZiu7sfS3NmHY58uR530A8S+tDjGz1ZYssExN/UK0TRj7VL1cvV vsLUXudJQQ2S1ht5Oj/zRSJwfHVDfrq6+dU5qaQm0U3cnR2r8SDN2miTwBONKnIo+X3C 4iPUrCR9gG4bzCatAmnIDPPxSexmH5i1PA35x7cfYRV0epbJxyZqcrVcxN8PJbSTG4Ln UWUo/4szzUpPO4UVaf3673toV4vD2HVEDiPYbW6fzAzgL8VzgykzagJm2ZFyqJkCnDMW TYiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=+lJs9GYWBNiOAOVqXWOH5SilIPKlB6jLhY/Q7PdyL5M=; fh=RUOV72EMVwh4yRs+53FP8QsXL6xZGa0OT/zL0wauN3c=; b=DsQ9GQPd5K7wvXIZguEeMEeydd4NqeUtwm4vve1r/PCYWPdKoHLOHINeJ7yr0JmFQi /X6NShCe8KqUXJHWK64BwGaqjOCBR015xdtVutGD7LovEPo2Tif3m8CMS0umWCDbyuAh 0a8D60/znqrzKwnH/FlUZJfDSK3Yk1Aw0mb4IqJ2Jacm9kxcQ8kG1Fx1UOFVxP4FNKCe AwM4GziCaJLzN2Paf0cXM38aDZBa2bZnOVuTIl5cf3cHm5htvOYwx9vA3ybapLWhMCoY 72DAEiawU+68uYSMZiYYlpmMwx+hj4/hXC1Stz8fknC/sgUBWKVmxbZZ6YEi09/lRKBg 4lLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@manjusaka.me header.s=fm3 header.b=c312f7jQ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NmN9ldXH; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq8-20020a056a00330800b00687346d94c4si5655149pfb.334.2023.08.07.07.28.30; Mon, 07 Aug 2023 07:28:44 -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=@manjusaka.me header.s=fm3 header.b=c312f7jQ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NmN9ldXH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234293AbjHGNmY (ORCPT + 99 others); Mon, 7 Aug 2023 09:42:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233961AbjHGNmJ (ORCPT ); Mon, 7 Aug 2023 09:42:09 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF2A01738; Mon, 7 Aug 2023 06:41:53 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 917EC5C00D8; Mon, 7 Aug 2023 09:41:12 -0400 (EDT) Received: from imap48 ([10.202.2.98]) by compute4.internal (MEProxy); Mon, 07 Aug 2023 09:41:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjusaka.me; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1691415672; x=1691502072; bh=+lJs9GYWBNiOAOVqXWOH5SilIPKlB6jLhY/ Q7PdyL5M=; b=c312f7jQA5+I9qUi7iYMuedJv8L70Agehy5ZgTGHu0Pz7W02Ppn 1Z0zgOZSW2+Bv0x1KO8g+qvpdX1jJY9WG7g8pnbWkBwFEqg+84zoWP6S1dnE7MOS /r5DMQ22koAnK/vCle3StbOWP1xM3F5JzzvnVMv0Jvu4iwB13wo60yRWIiRPYs8s dpF+gV36ExFSygq4CkMunTHg+MxRP+jvBJ3G9mvxbnZYKcq5kVzTIJ4PU2BftWrI rIqavDwtv+cKnHvhLqrb9Olfx19dG+6qv4BLCUYeF3gzezjfCInoecIgUXOPFgmq gKw6f8dhXk8CKVhPpBlgOGitVCq0DA2/GAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1691415672; x=1691502072; bh=+lJs9GYWBNiOAOVqXWOH5SilIPKlB6jLhY/ Q7PdyL5M=; b=NmN9ldXHdYl8oT9Ay+qbHn3v/Q5TrM9dwmeMiGBHNbuFtqFFVdZ FXsekpSzser2hjjbLWZ/LFfpy6gvCojDVo1zSsWnBWA2S9biWuK2PNGZjIUuHPaQ KSOgleN5/FltuUD9QXOf+3+vgw0/wtK8mW/Muqm5QrAo3DWsiku0TZ4RO00bodPk JO8BV/lilVlQWU+XpztM96iCKIKwwSDwherBuYJg/SNy7U/NlpU5YFmiFjBuAqOt YAu/EGAYSG+RQAIw48t/gpQcCDKqgZivS1eVophmS2qSHNE3Y7sIO1zevL+gB6Ub 7+5imLaLazgqYAv+x+upwHIMgfwCiAz68lQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrledtgdeiudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpeforghn jhhushgrkhgruceomhgvsehmrghnjhhushgrkhgrrdhmvgeqnecuggftrfgrthhtvghrnh epffdvfeejleefjeegfedtieeuleelhffhuedufeevkeeltdelgeetiefgkefhvddvnecu ffhomhgrihhnpegsohhothhlihhnrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhgvsehmrghnjhhushgrkhgrrdhmvg X-ME-Proxy: Feedback-ID: i3ea9498d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4B4B831A0065; Mon, 7 Aug 2023 09:41:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-624-g7714e4406d-fm-20230801.001-g7714e440 Mime-Version: 1.0 Message-Id: <9f0abdcc-1cb2-4a4a-8348-4fcbd2be9a53@app.fastmail.com> In-Reply-To: References: <20230806075216.13378-1-me@manjusaka.me> <8d25f9e8-9653-4e9b-b88b-c5434ce8aabf@app.fastmail.com> Date: Mon, 07 Aug 2023 21:40:50 +0800 From: Manjusaka To: "Eric Dumazet" Cc: mhiramat@kernel.org, rostedt@goodmis.org, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH] [RFC PATCH] tcp event: add new tcp:tcp_cwnd_restart event 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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Got you means! LGTM I will make a patch later and make a try On Mon, Aug 7, 2023, at 9:25 PM, Eric Dumazet wrote: > On Mon, Aug 7, 2023 at 2:49=E2=80=AFPM Manjusaka wro= te: > > > > > Do not include code before variable declarations. > > Sorry about that. I will update the code later. > > > > > I would rather add a trace in tcp_ca_event(), this would be more g= eneric ? > > > > https://elixir.bootlin.com/linux/latest/source/net/ipv4/tcp_cong.c#L= 41 > > > > I think maybe we already have the tcp_ca_event but named tcp_cong_st= ate_set? >=20 > I am speaking of tcp_ca_event()... >=20 > For instance, tcp_cwnd_restart() calls tcp_ca_event(sk, CA_EVENT_CWND_= RESTART); >=20 > tcp_set_ca_state() can only set icsk_ca_state to one value from enum > tcp_ca_state: > TCP_CA_Open, TCP_CA_Disorder, TCP_CA_CWR, TCP_CA_Recovery, TCP_CA_Loss >=20 > enum tcp_ca_event has instead: > CA_EVENT_TX_START, CA_EVENT_CWND_RESTART, CA_EVENT_COMPLETE_CWR, > CA_EVENT_LOSS, CA_EVENT_ECN_NO_CE, CA_EVENT_ECN_IS_CE >=20