Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp157770pxb; Tue, 29 Mar 2022 01:45:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymdlcAHEx1xaDeTXTZtCiSJnH2uYQd2meihNsBbIdbLP+jmY0QzO8XF3R1SJaNCcQsMdX6 X-Received: by 2002:a50:d64f:0:b0:418:f142:5d1c with SMTP id c15-20020a50d64f000000b00418f1425d1cmr3149557edj.192.1648543513203; Tue, 29 Mar 2022 01:45:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648543513; cv=none; d=google.com; s=arc-20160816; b=OYZ+4ErR23+zcPbRvTRR3Z0GbptL7+OPC4JDwBZveCblJSBgqET5peTGZ/0lSLWizk luBTtCp94gT82zVL3Y0lpegADFETTCCSywU/E7uCcLuMpEncCxtBmE3fJWoYn27ZaNPz TrWHzWd+6GP9Sgf8SLHnlA6EPQeMN/kj6/mFqtW+ifb9Jr9bRsDGrBzO3O9Bd2kmTUBB J1f7CUT9FC0lFxolpS1ZG17yE082sqooJnLqtG2MkP1aHHcmctjBaB0ym6ZVyJjbIleR AZDB6AnI2iNyGSaai2xLIzU8JWwSw6r8gtQrqbS2YLG1lNyfBEnOnP4B6DacJ5CIhwqT RElQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=SMJ7HA+GhWy/IAmB9jNUXH9QEgpFnaJvqxK6ae+CKGY=; b=Ex1AokLQI1DgDP3CIgzYMVam4XWxOoincTGmaYCZa4q7oyRsw6q6kKCgC79JHshrGX gZ3Ai4+V/Zo12CE5eICfvVHVSrIPfRMAAGvKHlK3olA/lSy9zk6d4rIrzslW0C9OKqNq 5l7huk8wUVy0/aILwE3DcSRjrKitlIy0ulai9+ZOQ2lGZYACU3CvIGQiksew4LmW3q/L sSZwyIwJxU1tUnrwznfa34PLkiLfBafvPng25+801fDQQ2uiM/SznF2yMJ11+e+SOoBG TSAuQkABhcsmvRE5LMilP9Ql7Vnne7XAzVYSLXxHSvU52tmB089XkYYJa37kl6j7ln27 EG6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aHHElCWD; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y67-20020a50bb49000000b00418c2b5be22si16315216ede.260.2022.03.29.01.44.46; Tue, 29 Mar 2022 01:45:13 -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=@gmail.com header.s=20210112 header.b=aHHElCWD; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232873AbiC2GI7 (ORCPT + 99 others); Tue, 29 Mar 2022 02:08:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbiC2GI6 (ORCPT ); Tue, 29 Mar 2022 02:08:58 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9CB78938; Mon, 28 Mar 2022 23:07:16 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id z16so14974894pfh.3; Mon, 28 Mar 2022 23:07:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SMJ7HA+GhWy/IAmB9jNUXH9QEgpFnaJvqxK6ae+CKGY=; b=aHHElCWDjalts8TqZ0B6f0CAhdJmHF6sr/aDWMIUeChXC50KWpl/E1z8DjI4dIB1G9 EYv5TKjH/vv3KzZPbZz6S7SRiw4jHqFWSpAJnBL4mb04HcugZaEgWl8V2kSvgwrj98Ej aqSI4F89WvUv+AjjdFKY/7ienbIKVCsnhe+AXBLPZMeFJRKOHmTIdBkuOtZKrJh6Ic3Y xTlk6ouqLhQdgGhkbHTC5lfJ0emeaVWP0pELOKp6k7rbKBBfucC3w1ABUXgK0H0dtuQm hDDNnJDNToxrNj1EAjcDgzIK4hlKbxLo4WRkzL1gMEvzHUqTP106VTWegDQBC4Y4+dnj MlKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SMJ7HA+GhWy/IAmB9jNUXH9QEgpFnaJvqxK6ae+CKGY=; b=RV9eE7djElSLk/Exps6stu0muuJW7d9t8NwNKar0jojL7mkI2OtPiW2MNNdF8GSobA /RRpIhBF1eNu0SUlp+WxobNNHf/LK/mlC9yUoVZZWkUUqiNgm/Z9geo88nhBTnNvZhXO InH/A2lFDJ+ZO6IKCWMT/b2WGJUjRRCLVqhkfV9s/wSJOSFfVCjdF7lSGnea1jstkKUb sPmXhJ/PcPVZ2Mvn1bma/44l/walvS9/UPRCouFGD72dsu8cxOrtiRXlZT0iGp8U+o7Z pM6zoC3UVbAN6VmBY9JovDWg5o/GK2mCPHCc4itRS7gwPUGRIwZSBOAYLRjXb5NqDTWO QJDQ== X-Gm-Message-State: AOAM533KWpoaFoAOkCVhcs3CdMXVs64NGe4e9/8hVKHC44JXXHWTokEZ Xvb9Pa+ZvAvvcD1Augv3z8M= X-Received: by 2002:a63:68c6:0:b0:380:3fbc:dfb6 with SMTP id d189-20020a6368c6000000b003803fbcdfb6mr865178pgc.326.1648534035603; Mon, 28 Mar 2022 23:07:15 -0700 (PDT) Received: from localhost.localdomain ([180.150.111.33]) by smtp.gmail.com with ESMTPSA id k3-20020a056a00168300b004f7e60da26csm18967112pfc.182.2022.03.28.23.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 23:07:15 -0700 (PDT) From: Jamie Bainbridge To: Vlad Yasevich , Neil Horman , Marcelo Ricardo Leitner , "David S. Miller" , Jakub Kicinski , Paolo Abeni Cc: Jamie Bainbridge , linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net] sctp: count singleton chunks in assoc user stats Date: Tue, 29 Mar 2022 13:13:36 +1000 Message-Id: <3369a5f0a632571d7439377175051039db29f91d.1648522807.git.jamie.bainbridge@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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: -- 2.35.1