From owner-dev-commits-src-all@freebsd.org Tue Jun 8 23:39:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FB6A6402D2; Tue, 8 Jun 2021 23:39:17 +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 4G06C946bSz3kXG; Tue, 8 Jun 2021 23:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7183E1204B; Tue, 8 Jun 2021 23:39:17 +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 158NdHXi017387; Tue, 8 Jun 2021 23:39:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 158NdH0R017386; Tue, 8 Jun 2021 23:39:17 GMT (envelope-from git) Date: Tue, 8 Jun 2021 23:39:17 GMT Message-Id: <202106082339.158NdH0R017386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 39b87f051506 - stable/13 - Fix LINT kernel builds after 1a714ff20419 . MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 39b87f051506f5d77ab5fa5ece948a73d4e91809 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2021 23:39:17 -0000 The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=39b87f051506f5d77ab5fa5ece948a73d4e91809 commit 39b87f051506f5d77ab5fa5ece948a73d4e91809 Author: Hans Petter Selasky AuthorDate: 2021-02-01 12:23:21 +0000 Commit: Michael Tuexen CommitDate: 2021-06-08 23:32:14 +0000 Fix LINT kernel builds after 1a714ff20419 . Discussed with: rrs@ Differential Revision: https://reviews.freebsd.org/D28357 Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit db46c0d0cb3da2813727e56df1f2db292065867a) --- sys/netinet/tcp_ratelimit.c | 36 ++++++++---------------------------- sys/netinet/tcp_ratelimit.h | 2 -- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/sys/netinet/tcp_ratelimit.c b/sys/netinet/tcp_ratelimit.c index aeb1ed6906b5..8f2cf3d8d061 100644 --- a/sys/netinet/tcp_ratelimit.c +++ b/sys/netinet/tcp_ratelimit.c @@ -372,17 +372,6 @@ rl_add_syctl_entries(struct sysctl_oid *rl_sysctl_root, struct tcp_rate_set *rs) OID_AUTO, "rate", CTLFLAG_RD, &rs->rs_rlt[i].rate, 0, "Rate in bytes per second"); - SYSCTL_ADD_U64(&rs->sysctl_ctx, - SYSCTL_CHILDREN(rl_rate_num), - OID_AUTO, "using", CTLFLAG_RD, - &rs->rs_rlt[i].using, 0, - "Number of flows using"); - SYSCTL_ADD_U64(&rs->sysctl_ctx, - SYSCTL_CHILDREN(rl_rate_num), - OID_AUTO, "enobufs", CTLFLAG_RD, - &rs->rs_rlt[i].rs_num_enobufs, 0, - "Number of enobufs logged on this rate"); - } } #endif @@ -678,8 +667,6 @@ bail: */ rs->rs_rlt[i].ptbl = rs; rs->rs_rlt[i].tag = NULL; - rs->rs_rlt[i].using = 0; - rs->rs_rlt[i].rs_num_enobufs = 0; /* * Calculate the time between. */ @@ -1076,28 +1063,16 @@ rt_find_real_interface(struct ifnet *ifp, struct inpcb *inp, int *error) static void rl_increment_using(const struct tcp_hwrate_limit_table *rte) { - struct tcp_hwrate_limit_table *decon_rte; - - decon_rte = __DECONST(struct tcp_hwrate_limit_table *, rte); - atomic_add_long(&decon_rte->using, 1); } static void rl_decrement_using(const struct tcp_hwrate_limit_table *rte) { - struct tcp_hwrate_limit_table *decon_rte; - - decon_rte = __DECONST(struct tcp_hwrate_limit_table *, rte); - atomic_subtract_long(&decon_rte->using, 1); } void tcp_rl_log_enobuf(const struct tcp_hwrate_limit_table *rte) { - struct tcp_hwrate_limit_table *decon_rte; - - decon_rte = __DECONST(struct tcp_hwrate_limit_table *, rte); - atomic_add_long(&decon_rte->rs_num_enobufs, 1); } /* @@ -1214,9 +1189,11 @@ use_real_interface: rte = NULL; } else { KASSERT((inp->inp_snd_tag != NULL) , - ("Setup rate has no snd_tag inp:%p rte:%p rate:%lu rs:%p", - inp, rte, rte->rate, rs)); + ("Setup rate has no snd_tag inp:%p rte:%p rate:%llu rs:%p", + inp, rte, (unsigned long long)rte->rate, rs)); +#ifdef INET counter_u64_add(rate_limit_new, 1); +#endif } } if (rte) { @@ -1462,8 +1439,11 @@ tcp_chg_pacing_rate(const struct tcp_hwrate_limit_table *crte, if (error) *error = err; return (NULL); - } else + } else { +#ifdef INET counter_u64_add(rate_limit_chg, 1); +#endif + } if (error) *error = 0; tp->t_pacing_rate = nrte->rate; diff --git a/sys/netinet/tcp_ratelimit.h b/sys/netinet/tcp_ratelimit.h index d3f82fab3ee1..b69f0e634b60 100644 --- a/sys/netinet/tcp_ratelimit.h +++ b/sys/netinet/tcp_ratelimit.h @@ -44,8 +44,6 @@ struct tcp_hwrate_limit_table { const struct tcp_rate_set *ptbl; /* Pointer to parent table */ struct m_snd_tag *tag; /* Send tag if needed (chelsio) */ uint64_t rate; /* Rate we get in Bytes per second (Bps) */ - uint64_t using; /* Temporary -- rrs remove */ - uint64_t rs_num_enobufs; uint32_t time_between; /* Time-Gap between packets at this rate */ uint32_t flags; };