From nobody Tue Apr 19 12:46:08 2022 X-Original-To: dev-commits-src-all@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 B145111CF19A; Tue, 19 Apr 2022 12:46:09 +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 4KjNp90Ylhz4ShX; Tue, 19 Apr 2022 12:46:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650372369; 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=YvoOrYfjGQNKboXSb93cKf8stYxEfjUFj1H0uBgD2p8=; b=le9YGBMFdsVpR8jEF2Zn8BUG95vL1RvklNdk713gKRzH5H/hLnzzKHYqbZKLGoOWncFE7k CrgCrxFt71nhFOX0W/4a4lek9iH+Qt6Jpmz11EVNOeJEyBEVWNyudYQsoUwwg6Cm3fgI6H jSOM8jFU7UEAi2P9UC+4vdOWLrM31UhpVYkc7Sevq7Dq/0BaHr6okvwfZ9+9r900mvDeqa N4y43ytQdMWXANQsNBAUbsDaFKOYs4DT51VbeKoQat9bMY0QuijUNOqD0zqoJiWvYB5b9X 5jJ/wZViBizLPAiHO785BG6uEPANdCdi4uFd+b6ugDKw+J6wdBPnEUfhURKGlQ== 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 98C3C278A3; Tue, 19 Apr 2022 12:46:08 +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 23JCk8OG030478; Tue, 19 Apr 2022 12:46:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23JCk86c030477; Tue, 19 Apr 2022 12:46:08 GMT (envelope-from git) Date: Tue, 19 Apr 2022 12:46:08 GMT Message-Id: <202204191246.23JCk86c030477@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: db2ce6914b6a - main - sctp: plug set-but-not-used vars List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db2ce6914b6a5f5f40f12d5daf1cc81767fc8610 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650372369; 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=YvoOrYfjGQNKboXSb93cKf8stYxEfjUFj1H0uBgD2p8=; b=a1iHjzgrkez51YQs4T+IlUO+X5A+0KEYO8zzEhjcY+A9OTjJwsxQCoJ+7QNo5JVOQacRm0 KUYuqOtiSRH9p0HHMIAOQv89tHpWp7dtEJQ4p+xxLMwgHFSAV10Fn5fE4JlwE4gXU8VU93 tl4dC0+eTLnpqHSG/JElpVkFSCiQt284ksGM/82xclo2P7aBDzz+maanVY4oXtvuMsQrl0 ePV0lQ6otmE3qnjqNDrFPMbXVgOiS+F0PSeyeN4Jfht4fcUuskme7y/0rTrMIvimXgSn42 ZLU24e3oTfLjOdBzEXGX7iKrjQlfOjPUToy2Qum1eStSFjIq5Hal9k9rnfGmsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650372369; a=rsa-sha256; cv=none; b=AfU22d2nwLT6VnPTnaYUFSw+cIozO/qfJLxT1lly339vbz+5WfwGoe67LnLGfImhoj2V9P NL1UBQxnlkQr/ziMmoNfGxa8T8KbMHg5p0J1PB5itXNI6OtuakYlyuR10geqRG1CPtC3VY 7pIxU6LWcC6a2XstVJ23XLPBaVxuWCtFrwymhVwNhonvQkzQjNkS7YEPgV6x39kQskesKm U97QLnef9HazCZdTRDyCENYmmQQQy1tvr2fVm2IPwVQ5KKyqL/SWNgBIQa8aAr+9u2z5ZM iHeqjZIPaqsFlAjrF28d2EPRoyNo2h3JS2q/o4uzM4xmtxj6xNR4GsReVceN9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=db2ce6914b6a5f5f40f12d5daf1cc81767fc8610 commit db2ce6914b6a5f5f40f12d5daf1cc81767fc8610 Author: Mateusz Guzik AuthorDate: 2022-04-19 12:32:24 +0000 Commit: Mateusz Guzik CommitDate: 2022-04-19 12:45:57 +0000 sctp: plug set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet/sctp_cc_functions.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/sys/netinet/sctp_cc_functions.c b/sys/netinet/sctp_cc_functions.c index c5b031199a01..342b4126698b 100644 --- a/sys/netinet/sctp_cc_functions.c +++ b/sys/netinet/sctp_cc_functions.c @@ -54,6 +54,12 @@ __FBSDID("$FreeBSD$"); #define SHIFT_MPTCP_MULTI_Z 16 #define SHIFT_MPTCP_MULTI 8 +#ifdef KDTRACE_HOOOKS +#define __dtrace +#else +#define __dtrace __unused +#endif + static void sctp_enforce_cwnd_limit(struct sctp_association *assoc, struct sctp_nets *net) { @@ -252,7 +258,7 @@ static int cc_bw_same(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t rtt_offset, uint64_t vtag, uint8_t inst_ind) { - uint64_t oth, probepoint; + uint64_t oth __dtrace, probepoint __dtrace; probepoint = (((uint64_t)net->cwnd) << 32); if (net->rtt > net->cc_mod.rtcc.lbw_rtt + rtt_offset) { @@ -387,7 +393,7 @@ static int cc_bw_decrease(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t rtt_offset, uint64_t vtag, uint8_t inst_ind) { - uint64_t oth, probepoint; + uint64_t oth __dtrace, probepoint __dtrace; /* Bandwidth decreased. */ probepoint = (((uint64_t)net->cwnd) << 32); @@ -527,7 +533,7 @@ out_decision: static int cc_bw_increase(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw, uint64_t vtag) { - uint64_t oth, probepoint; + uint64_t oth __dtrace, probepoint __dtrace; /* * BW increased, so update and return 0, since all actions in our @@ -571,7 +577,7 @@ static int cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw) { uint64_t bw_offset, rtt_offset; - uint64_t probepoint, rtt, vtag; + uint64_t probepoint __dtrace, rtt, vtag; uint64_t bytes_for_this_rtt, inst_bw; uint64_t div, inst_off; int bw_shift; @@ -684,7 +690,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, int accum_moved, int reneged_all SCTP_UNUSED, int will_exit, int use_rtcc) { struct sctp_nets *net; - int old_cwnd; + int old_cwnd __dtrace; uint32_t t_ssthresh, incr; uint64_t t_ucwnd_sbw; uint64_t t_path_mptcp; @@ -797,7 +803,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, continue; } } else { - uint64_t vtag, probepoint; + uint64_t vtag __dtrace, probepoint __dtrace; probepoint = (((uint64_t)net->cwnd) << 32); probepoint |= ((0xa << 16) | 0); @@ -995,7 +1001,7 @@ sctp_cwnd_update_after_sack_common(struct sctp_tcb *stcb, static void sctp_cwnd_update_exit_pf_common(struct sctp_tcb *stcb, struct sctp_nets *net) { - int old_cwnd; + int old_cwnd __dtrace; old_cwnd = net->cwnd; net->cwnd = net->mtu; @@ -1336,7 +1342,7 @@ static void sctp_cwnd_new_rtcc_transmission_begins(struct sctp_tcb *stcb, struct sctp_nets *net) { - uint64_t vtag, probepoint; + uint64_t vtag __dtrace, probepoint __dtrace; if (net->cc_mod.rtcc.lbw) { /* Clear the old bw.. we went to 0 in-flight */ @@ -1399,7 +1405,11 @@ static void sctp_set_rtcc_initial_cc_param(struct sctp_tcb *stcb, struct sctp_nets *net) { +#ifdef KDTRACE_HOOOKS uint64_t vtag, probepoint; +#else + uint64_t vtag __unused, probepoint __unused; +#endif sctp_set_initial_cc_param(stcb, net); stcb->asoc.use_precise_time = 1;