Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp606415pxb; Tue, 29 Mar 2022 08:22:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWsS7NNUAVVMeNlxAn514RG2b1Rxd85qLqceYisXjEUwzBnlLxzr/Obo9YAxoZtpchTGvz X-Received: by 2002:aa7:db94:0:b0:410:f0e8:c39e with SMTP id u20-20020aa7db94000000b00410f0e8c39emr5144843edt.14.1648567339896; Tue, 29 Mar 2022 08:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648567339; cv=none; d=google.com; s=arc-20160816; b=NcoQzoNwHFq1vh5RGD5eG8ZfwMchSyY/phLovlhaoWinsWc/X+MJaNBVfBZVuIk1wK kvgda29SMP0Uv2QalUDBlX9UGol8KU68IkSfm8HaQGnkiCKy6XRkc/g5nEvAf1AhU4Gu PpNVvXA6WMjAX/DXgTfmA076OLa9EeJlv1LdD1KjGfS7YDZfDgV8dY8OIj6/hGJdCDoP wE3IzgFuIt7oSVaU2HnkJNQMUTlyZMA2jdvSGfXXeUDxXSnjvL8m2pWXnu+D+YO7xkXw 9TNKO4RIE4HgjeybVwaHkKaeEEAexu3XsE6wJuZOib+U3oBqzN/AOnSJ9l6EfN0CcRiQ SMzg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=DbPYdZedfRIYwRtWtwiurEBq9rlw3/Z3627UEFaws4Q=; b=y9okgUExNzfm9yQyG0Ntrr3TrpIyCmYL5/vAmeNKpGHNkGtJBrKpaBbHxzrDCVnQgg 961/UBK4LSbX1zR5lV4/sE92wUuPt6twO/k4FImbFFGknM+xdCpSWwuPKNr2+CYx0xUC J3YDzZ8NKTISW+kwMPrIYc+4sbF+hYN8v0WThmr3iqmtb5fmE/DDdeTNMFqeGWLBZ13D eya7OHYhfM3wH3FqgiiqWEK9cDRnRBQslAUQZT0pjobJxooId5oDyzUdKwhLY4PlgOmk dNESkucHunf8YyDkpcgtrM+5hd+SSS6Jo3wAHWJq8MC4BN6eCXrw9B6pMhbsWeOBMzNn Qnew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MUrl5d0V; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rp18-20020a170906d97200b006df76385be1si16602873ejb.129.2022.03.29.08.21.50; Tue, 29 Mar 2022 08:22:19 -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=@redhat.com header.s=mimecast20190719 header.b=MUrl5d0V; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237218AbiC2NXa (ORCPT + 99 others); Tue, 29 Mar 2022 09:23:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235104AbiC2NX1 (ORCPT ); Tue, 29 Mar 2022 09:23:27 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 61207403E6 for ; Tue, 29 Mar 2022 06:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648560103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DbPYdZedfRIYwRtWtwiurEBq9rlw3/Z3627UEFaws4Q=; b=MUrl5d0VaGKyAx7h3jh6rGEIp7Vj0LwrKv5luQZ0MnN5k5+/YwY8cIxPedzqzzghMmTkYw 5fy7YXB4mVnDNPhqkwVNfK2Rl7RVSoZktSKWsVdMBcTI2EILn9XrXogI/aGtEVwaAT08/9 Dl48oZ6lqNQ5tf+1m163yDWfw1cH8gQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-257-3zl2Bs-qNT-54pO4lTWJEA-1; Tue, 29 Mar 2022 09:21:42 -0400 X-MC-Unique: 3zl2Bs-qNT-54pO4lTWJEA-1 Received: by mail-wm1-f71.google.com with SMTP id bg28-20020a05600c3c9c00b0038c8da4d9b3so885165wmb.0 for ; Tue, 29 Mar 2022 06:21:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=DbPYdZedfRIYwRtWtwiurEBq9rlw3/Z3627UEFaws4Q=; b=x1JcBBGlJEk+WsFxxnbLPdEyWxajy6lB5pgfUD32kfWviIlihx5/wN517vWzLSadlq IC6tPeZYueVXGsbxB/NSAhxxLWPObSgEjd7p9nTMuB1I6UXLzqlhQaJTimyf5l2W9Qns nwVSq2IKozcsx8DXmfTk0iG7bx+AoTRDpZJYyOqQKzU2YrN6K84qikomuyrv5GcxVAdI xX6mtIf4q6iunicGDc0Surd3TCs2RPJ8jhJfl7V4fDqRlUuVZKS7m4uVNiKxv/76YgHd s5oVsZpRptDoAWDwWIcY4HUfNIsU+YhdyuF7sgJSHXQWYt2/H2eJpMyZuvaoo114y/2p VAsA== X-Gm-Message-State: AOAM531MGUh1QyBeiq03G6LM1GtAfrJTYvzcKHn2D69K94s6MtlUqMJq VvAkegRvJKtwLctUxFROJwSKgK6fiPxwUTU1ubJQJZJWvzkgcvtXt8n1mSYs56yjnSsm6kXYE6Z 3DEVNVmiN2Z9CbrWXmidwDrwN X-Received: by 2002:a05:600c:3c9b:b0:380:be98:6204 with SMTP id bg27-20020a05600c3c9b00b00380be986204mr6779614wmb.121.1648560100539; Tue, 29 Mar 2022 06:21:40 -0700 (PDT) X-Received: by 2002:a05:600c:3c9b:b0:380:be98:6204 with SMTP id bg27-20020a05600c3c9b00b00380be986204mr6779585wmb.121.1648560100327; Tue, 29 Mar 2022 06:21:40 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-232-135.dyn.eolo.it. [146.241.232.135]) by smtp.gmail.com with ESMTPSA id bh16-20020a05600c3d1000b0038ceba454f9sm2240271wmb.20.2022.03.29.06.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 06:21:39 -0700 (PDT) Message-ID: <21f0fb45d30a1a2fa98a370e3e8ef303e1f79846.camel@redhat.com> Subject: Re: [PATCH net] sctp: count singleton chunks in assoc user stats From: Paolo Abeni To: Marcelo Ricardo Leitner , Jamie Bainbridge Cc: Vlad Yasevich , Neil Horman , "David S. Miller" , Jakub Kicinski , linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 29 Mar 2022 15:21:38 +0200 In-Reply-To: <20220329130050.vwo5zcbgr7z2qpg5@t14s.localdomain> References: <3369a5f0a632571d7439377175051039db29f91d.1648522807.git.jamie.bainbridge@gmail.com> <20220329130050.vwo5zcbgr7z2qpg5@t14s.localdomain> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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, 2022-03-29 at 10:00 -0300, Marcelo Ricardo Leitner wrote: > On Tue, Mar 29, 2022 at 01:13:36PM +1000, Jamie Bainbridge wrote: > > singleton chunks (INIT, and less importantly SHUTDOWN and SHUTDOWN- > > COMPLETE) are not counted in SCTP_GET_ASOC_STATS "sas_octrlchunks" > > counter available to the assoc owner. > > > > INIT (and the SHUTDOWN chunks) are control chunks so they should be > > counted as such. > > > > Add counting of singleton chunks so they are properly accounted for. > > > > Signed-off-by: Jamie Bainbridge > > --- > > net/sctp/outqueue.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c > > index a18609f608fb786b2532a4febbd72a9737ab906c..e2d7c955f07c80da17c7525159aaf8a053432ae3 100644 > > --- a/net/sctp/outqueue.c > > +++ b/net/sctp/outqueue.c > > @@ -914,6 +914,7 @@ static void sctp_outq_flush_ctrl(struct sctp_flush_ctx *ctx) > > ctx->asoc->base.sk->sk_err = -error; > > return; > > } > > + ctx->asoc->stats.octrlchunks++; > > break; > > > > case SCTP_CID_ABORT: > > Please also fix it for pmtu probes a bit below. They are heartbeats > being handled specially as singletons as well. Since a v2 is needed, please add also a suitable fixes tag - possibly: Fixes: 196d67593439 ("sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call") Thanks! Paolo