From nobody Sat Feb 05 15:55:32 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1C0A819B1D5F; Sat, 5 Feb 2022 15:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JrcSN4Bsqz4trF; Sat, 5 Feb 2022 15:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644076533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKJ5FahhfVtJ6fkDzFYmUzw40qLH/o1nBpnR0+kW9SM=; b=UTBdcDBiQ9Ta4tcuCzE58Tc1I3Mh5h79V12YDFJUtohKWW0GIOgJzSbLI/hm5PCNel2yko hBmuwR0j0blkbuqEbutIWZtCylGxlJeDwIeR74rgeqwtw+Q96q3KhH7QwmAxRVNl8p/txX RLhSOxZWIccDNhAD7x/0NZZEXPjq/TbNWk4BxrGxkY8U5URxZHPMf4NEvzkIMkDZTEgxrs fH2BJ0ToHV73LNDCaDsZYEy6yzuyBwVFc3ymiMrLsgXYS33fD8rpwemHP/sue0lIhjGkqc VeJ06wlllu4Y7oCc2czF4GgRZRw69V5U+9wYxS/YiInRWmS4Li+Xt5Ln3PMIfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2B9C42220A; Sat, 5 Feb 2022 15:55:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 215FtWRX097864; Sat, 5 Feb 2022 15:55:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 215FtW1H097863; Sat, 5 Feb 2022 15:55:32 GMT (envelope-from git) Date: Sat, 5 Feb 2022 15:55:32 GMT Message-Id: <202202051555.215FtW1H097863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 1790549d801f - main - tcp: use TCPSTAT_INC in kernel ecn functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1790549d801f65266811c49c0741ffedf722170e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644076533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZKJ5FahhfVtJ6fkDzFYmUzw40qLH/o1nBpnR0+kW9SM=; b=mfQte0e/5IrKPuc2rBv4/hpI88ljbJfPlaJNhc1WBGGTcQpvK+Rd6fTN1CBX71gBpXCuGT eaEv6vy4KJr6AT7Iud1YpoEKv9p/uYKy5Ox8sFGtE5/QO4/veiSzVRdk1XwMQRA1kjMQtV S4DE/63pr9q9GaR2pEWGFr1Nk5xiZVQGRmiE13WumzLMvrIH/GDeN0sZJ8zh3UhVFt0Wig WV65x6iE8fOJaEJI09FlqLVFpKgMb/tqWs+4krJVFkj1frFzhai0vGQV1Yfz30A9GhQjoQ R+0Wndckdxyrawg/vJREx1S/o1L/P7h3ncEq+AHJpsrW6EHGJaLtZpoxYrGO9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644076533; a=rsa-sha256; cv=none; b=aEh1XBUSjmsbxuVe/Dmvw/R4TRjFXAoMbl4PcRjE/4x4b6k78zgOEPZ5x8fT24mrO78qYa pFKgsL1XZXMWYJUt6zPjzHpww9SB9orOVPWCMel0w2XpLL5i4SISBmzoz7VV5cgAN5xm/1 YIaggL6ECpMQkJqWxrXD4KF72kQGlNwpvtbqTKnpkWjlBDYQ7HEGcQZsdg8c0eM4Od/+vq /k2pyEvPMowZbEBZh1nA1w8kTZFckSNZRju5W7e7Y2UoZrfq1maB9L9jIdeaVT7/pVUOs2 l6w6hC86+VFwSL7zjAfzFtzo3+hGnNVGk9hLzIgSF/IXRONuZaD3gLSs6NvoLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=1790549d801f65266811c49c0741ffedf722170e commit 1790549d801f65266811c49c0741ffedf722170e Author: Richard Scheffenegger AuthorDate: 2022-02-05 15:50:21 +0000 Commit: Richard Scheffenegger CommitDate: 2022-02-05 15:55:22 +0000 tcp: use TCPSTAT_INC in kernel ecn functions Incorrectly used KMOD_ marco in static kernel ECN functions. Both eventually resolve to counter_s64_add(), but better use the correct macros. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D34181 --- sys/netinet/tcp_ecn.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c index 2ef552af93bf..43870b0801c3 100644 --- a/sys/netinet/tcp_ecn.c +++ b/sys/netinet/tcp_ecn.c @@ -114,7 +114,7 @@ tcp_ecn_input_syn_sent(struct tcpcb *tp, uint16_t thflags, int iptos) if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) && V_tcp_do_ecn) { tp->t_flags2 |= TF2_ECN_PERMIT; - KMOD_TCPSTAT_INC(tcps_ecn_shs); + TCPSTAT_INC(tcps_ecn_shs); } } @@ -133,7 +133,7 @@ tcp_ecn_input_parallel_syn(struct tcpcb *tp, uint16_t thflags, int iptos) if ((thflags & (TH_CWR | TH_ECE)) == (TH_CWR | TH_ECE)) { tp->t_flags2 |= TF2_ECN_PERMIT; tp->t_flags2 |= TF2_ECN_SND_ECE; - KMOD_TCPSTAT_INC(tcps_ecn_shs); + TCPSTAT_INC(tcps_ecn_shs); } } } @@ -149,13 +149,13 @@ tcp_ecn_input_segment(struct tcpcb *tp, uint16_t thflags, int iptos) if (tp->t_flags2 & TF2_ECN_PERMIT) { switch (iptos & IPTOS_ECN_MASK) { case IPTOS_ECN_CE: - KMOD_TCPSTAT_INC(tcps_ecn_ce); + TCPSTAT_INC(tcps_ecn_ce); break; case IPTOS_ECN_ECT0: - KMOD_TCPSTAT_INC(tcps_ecn_ect0); + TCPSTAT_INC(tcps_ecn_ect0); break; case IPTOS_ECN_ECT1: - KMOD_TCPSTAT_INC(tcps_ecn_ect1); + TCPSTAT_INC(tcps_ecn_ect1); break; } @@ -216,7 +216,7 @@ tcp_ecn_output_established(struct tcpcb *tp, uint16_t *thflags, int len) !((tp->t_flags & TF_FORCEDATA) && len == 1)); if (newdata) { ipecn = IPTOS_ECN_ECT0; - KMOD_TCPSTAT_INC(tcps_ecn_ect0); + TCPSTAT_INC(tcps_ecn_ect0); } /* * Reply with proper ECN notifications. @@ -286,7 +286,7 @@ tcp_ecn_syncache_respond(uint16_t thflags, struct syncache *sc) switch (sc->sc_flags & SCF_ECN) { case SCF_ECN: thflags |= (0 | TH_ECE); - KMOD_TCPSTAT_INC(tcps_ecn_shs); + TCPSTAT_INC(tcps_ecn_shs); break; /* undefined SCF codepoint */ default: