From owner-dev-commits-src-all@freebsd.org Mon Feb 1 13:06:10 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 CAF345288B0; Mon, 1 Feb 2021 13:06:10 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DTp9G4ZFzz3MmQ; Mon, 1 Feb 2021 13:06:10 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8EA40260487; Mon, 1 Feb 2021 14:06:08 +0100 (CET) Subject: Re: git: 1a714ff20419 - main - This pulls over all the changes that are in the netflix tree that fix the ratelimit code. There were several bugs in tcp_ratelimit itself and we needed further work to support the multiple tag format coming for the joint TLS and Ratelimit dances. To: Mateusz Guzik , Michael Tuexen , Konstantin Belousov Cc: Randall Stewart , Randall Stewart , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202101281653.10SGrJWf002301@gitrepo.freebsd.org> From: Hans Petter Selasky Message-ID: <48fe9f24-e96b-1078-ada2-a8691ead6cf1@selasky.org> Date: Mon, 1 Feb 2021 14:05:54 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------4CEF225002A76A7E4D6C5E4E" Content-Language: en-US X-Rspamd-Queue-Id: 4DTp9G4ZFzz3MmQ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] 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: Mon, 01 Feb 2021 13:06:10 -0000 This is a multi-part message in MIME format. --------------4CEF225002A76A7E4D6C5E4E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, The attached patch should fix it. (Waiting for a quick review). But there are more issues: For i386 I now see: > ld: error: undefined symbol: xdr_export_sec_context_res >>>> referenced by gss_impl.c >>>> gss_impl.o:(kgss_transfer_context) > > ld: error: undefined symbol: gssd_import_name_1 >>>> referenced by gss_import_name.c >>>> gss_import_name.o:(gss_import_name) > > ld: error: undefined symbol: gssd_pname_to_uid_1 >>>> referenced by gss_pname_to_uid.c >>>> gss_pname_to_uid.o:(gss_pname_to_uid) >>>> referenced by gss_pname_to_uid.c >>>> gss_pname_to_uid.o:(gss_pname_to_unix_cred) > > ld: error: undefined symbol: xdr_pname_to_uid_res >>>> referenced by gss_pname_to_uid.c >>>> gss_pname_to_uid.o:(gss_pname_to_unix_cred) > > ld: error: undefined symbol: gssd_release_cred_1 >>>> referenced by gss_release_cred.c >>>> gss_release_cred.o:(gss_release_cred) > > ld: error: undefined symbol: gssd_release_name_1 >>>> referenced by gss_release_name.c >>>> gss_release_name.o:(gss_release_name) > Maybe xdr needs to be added to LINT now? Passing the ball onto Konstantin. --HPS --------------4CEF225002A76A7E4D6C5E4E Content-Type: text/x-patch; charset=UTF-8; name="a.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="a.diff" commit 38dc40d5b501932e60eb1fb52933a280d5035488 Author: Hans Petter Selasky Date: Mon Feb 1 13:23:21 2021 +0100 Fix LINT kernel builds after 1a714ff20419 . MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28357 Sponsored by: Mellanox Technologies // NVIDIA Networking diff --git a/sys/netinet/tcp_ratelimit.c b/sys/netinet/tcp_ratelimit.c index aeb1ed6906b..8f2cf3d8d06 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 @@ rt_setup_new_rs(struct ifnet *ifp, int *error) */ 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 @@ rt_setup_rate(struct inpcb *inp, struct ifnet *ifp, uint64_t bytes_per_sec, 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 d3f82fab3ee..b69f0e634b6 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; }; --------------4CEF225002A76A7E4D6C5E4E--