From nobody Sun Dec 26 16:49:28 2021 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 4FDD01922EB2; Sun, 26 Dec 2021 16:49:29 +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 4JMRbX75pXz4v45; Sun, 26 Dec 2021 16:49:28 +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 CB7EF5E94; Sun, 26 Dec 2021 16:49:28 +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 1BQGnSsE014149; Sun, 26 Dec 2021 16:49:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BQGnSfi014148; Sun, 26 Dec 2021 16:49:28 GMT (envelope-from git) Date: Sun, 26 Dec 2021 16:49:28 GMT Message-Id: <202112261649.1BQGnSfi014148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 40fa3e40b584 - main - tcp: mechanically substitute call to tfb_tcp_output to new method. 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40fa3e40b5849089c5ea1e42c4318f36f227491a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640537369; 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=lqO4M3k3fVMd/3YvcN4lkqJ8DdJ0raaTmzTmSRyDGmk=; b=se76P/bPR+VNNdOrKCksfUo0lPc6oIdfAFytRERcF/2QAGONs9ZgWnI45lX9yhC029BKbT SdADKwUGsDvgPrDSVGUhYAF26aSFX27x9iw0gkFVp5b1Rid09o42jLAprMRgNfvFwC4uYK KwrhMmAspwRPg3oRP8IqQ8wNRIopCQTtOLymdfyTMZa2L519MxTlGFuOsSOWmP+SSLpBdb eLY1vJ4BnrgVElgKdPZMm7FTbhgs83KOU4KnDONuJIlBbG+X81XjVqan8UamLbeWiA53OQ r5CYHeoj0t7FvPuRAxHY+6xmui/5wSkHndWUfaVshOzz1cOgUUfTs1PVdZ7dAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640537369; a=rsa-sha256; cv=none; b=Nyznie5z24XvH+jJvisXNR02UeL78yCP/P3F2X71nouegkxm9BmH8BWrs6EzMiIMsEylEm lZWloAIxC+S1btprObbkx3ncoW0sxrPrHD1N/p6RdgyMf5VAkhV+nxNVbgBiJOvat8aVrT ATl5a+DN1cR/KteAu1+fh0j/+EqAaN/rAbdZEr1kY+JoPhk4H0xcfiRSE2oyy74ukTzV8c 3MHcAHvR5i3mv6bQ88q87GS3WGz5grAgYwDwdnqnMALIPvimEdfFkx0mjiXGUEDqM85kHP nvXjx8kkz2kdrLBScjy1XtCCJ0AYFMuDmWVLSNHPs4MgGgnxWWCm72z0+WWvzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=40fa3e40b5849089c5ea1e42c4318f36f227491a commit 40fa3e40b5849089c5ea1e42c4318f36f227491a Author: Gleb Smirnoff AuthorDate: 2021-12-26 16:47:59 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-26 16:47:59 +0000 tcp: mechanically substitute call to tfb_tcp_output to new method. Made with sed(1) execution: sed -Ef sed -i "" $(grep --exclude tcp_var.h -lr tcp_output sys/) sed: s/tp->t_fb->tfb_tcp_output\(tp\)/tcp_output(tp)/ s/to tfb_tcp_output\(\)/to tcp_output()/ Reviewed by: rrs, tuexen Differential revision: https://reviews.freebsd.org/D33366 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 2 +- sys/netinet/tcp_hpts.c | 2 +- sys/netinet/tcp_input.c | 18 +++++++++--------- sys/netinet/tcp_sack.c | 2 +- sys/netinet/tcp_stacks/bbr.c | 4 ++-- sys/netinet/tcp_stacks/rack.c | 4 ++-- sys/netinet/tcp_stacks/rack_bbr_common.c | 2 +- sys/netinet/tcp_subr.c | 4 ++-- sys/netinet/tcp_timer.c | 6 +++--- sys/netinet/tcp_usrreq.c | 20 ++++++++++---------- sys/netinet/toecore.c | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 8635dc3d8922..ae22b3d5c252 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2299,7 +2299,7 @@ sendanother: tp = intotcpcb(inp); if (moretocome) tp->t_flags |= TF_MORETOCOME; - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); if (moretocome) tp->t_flags &= ~TF_MORETOCOME; } diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 9bf6e6773cca..745ebe9f3aaa 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1549,7 +1549,7 @@ again: } } inp->inp_hpts_calls = 1; - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); inp->inp_hpts_calls = 0; if (ninp && ninp->inp_ppcb) { /* diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9332bf16235f..110cb99df7bb 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1889,7 +1889,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, tp->t_rxtcur); sowwakeup(so); if (sbavail(&so->so_snd)) - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); goto check_delack; } } else if (th->th_ack == tp->snd_una && @@ -1958,7 +1958,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, tp->t_flags |= TF_DELACK; } else { tp->t_flags |= TF_ACKNOW; - tp->t_fb->tfb_tcp_output(tp); + tcp_output(tp); } goto check_delack; } @@ -2629,7 +2629,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, } } else tp->snd_cwnd += maxseg; - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); goto drop; } else if (tp->t_dupacks == tcprexmtthresh || (tp->t_flags & TF_SACK_PERMIT && @@ -2698,14 +2698,14 @@ enter_recovery: tcps_sack_recovery_episode); tp->snd_recover = tp->snd_nxt; tp->snd_cwnd = maxseg; - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); if (SEQ_GT(th->th_ack, tp->snd_una)) goto resume_partialack; goto drop; } tp->snd_nxt = th->th_ack; tp->snd_cwnd = maxseg; - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); KASSERT(tp->snd_limited <= 2, ("%s: tp->snd_limited too big", __func__)); @@ -2753,7 +2753,7 @@ enter_recovery: (tp->snd_nxt - tp->snd_una); SOCKBUF_UNLOCK(&so->so_snd); if (avail > 0) - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); sent = tp->snd_max - oldsndmax; if (sent > maxseg) { KASSERT((tp->t_dupacks == 2 && @@ -3305,7 +3305,7 @@ dodata: /* XXX */ * Return any desired output. */ if (needoutput || (tp->t_flags & TF_ACKNOW)) - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); check_delack: INP_WLOCK_ASSERT(tp->t_inpcb); @@ -3346,7 +3346,7 @@ dropafterack: #endif TCP_PROBE3(debug__input, tp, th, m); tp->t_flags |= TF_ACKNOW; - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); INP_WUNLOCK(tp->t_inpcb); m_freem(m); return; @@ -4049,7 +4049,7 @@ tcp_newreno_partial_ack(struct tcpcb *tp, struct tcphdr *th) */ tp->snd_cwnd = maxseg + BYTES_THIS_ACK(tp, th); tp->t_flags |= TF_ACKNOW; - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); tp->snd_cwnd = ocwnd; if (SEQ_GT(onxt, tp->snd_nxt)) tp->snd_nxt = onxt; diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 25eb633fbbd4..11a3eb5c68a5 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -902,7 +902,7 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) highdata - maxseg), highdata, NULL); } } - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); } #if 0 diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 24d238bbd04e..f79933d54f24 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11637,7 +11637,7 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, if (bbr->r_wanted_output != 0) { bbr->rc_output_starts_timer = 0; did_out = 1; - (void)tp->t_fb->tfb_tcp_output(tp); + (void)tcp_output(tp); } else bbr_start_hpts_timer(bbr, tp, cts, 6, 0, 0); } @@ -11676,7 +11676,7 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, /* We are late */ bbr->r_ctl.rc_last_delay_val = 0; BBR_STAT_INC(bbr_force_output); - (void)tp->t_fb->tfb_tcp_output(tp); + (void)tcp_output(tp); } } } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 202829f12b7c..765b023e9658 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -14171,7 +14171,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb ctf_calc_rwin(so, tp); if ((rack->r_wanted_output != 0) || (rack->r_fast_output != 0)) { send_out_a_rst: - (void)tp->t_fb->tfb_tcp_output(tp); + (void)tcp_output(tp); did_out = 1; } rack_free_trim(rack); @@ -14657,7 +14657,7 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((rack->r_wanted_output != 0) || (rack->r_fast_output != 0)) { do_output_now: did_out = 1; - (void)tp->t_fb->tfb_tcp_output(tp); + (void)tcp_output(tp); } rack_start_hpts_timer(rack, tp, cts, 0, 0, 0); rack_free_trim(rack); diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index 88e028109c95..42225dfced2f 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -381,7 +381,7 @@ ctf_process_inbound_raw(struct tcpcb *tp, struct socket *so, struct mbuf *m, int * 1) It returns 0 if all went well and you (the caller) need * to release the lock. * 2) If nxt_pkt is set, then the function will surpress calls - * to tfb_tcp_output() since you are promising to call again + * to tcp_output() since you are promising to call again * with another packet. * 3) If it returns 1, then you must free all the packets being * shipped in, the tcb has been destroyed (or about to be destroyed). diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 7a0d5ee52ad9..15faca076001 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2398,7 +2398,7 @@ tcp_drop(struct tcpcb *tp, int errno) if (TCPS_HAVERCVDSYN(tp->t_state)) { tcp_state_change(tp, TCPS_CLOSED); - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); TCPSTAT_INC(tcps_drops); } else TCPSTAT_INC(tcps_conndrops); @@ -3517,7 +3517,7 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) */ tp->t_fb->tfb_tcp_mtu_chg(tp); } - tp->t_fb->tfb_tcp_output(tp); + tcp_output(tp); } #ifdef INET diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 54ac67867fcb..d41bd9465a08 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -292,7 +292,7 @@ tcp_timer_delack(void *xtp) tp->t_flags |= TF_ACKNOW; TCPSTAT_INC(tcps_delack); NET_EPOCH_ENTER(et); - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); INP_WUNLOCK(inp); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); @@ -563,7 +563,7 @@ tcp_timer_persist(void *xtp) tcp_setpersist(tp); tp->t_flags |= TF_FORCEDATA; NET_EPOCH_ENTER(et); - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); NET_EPOCH_EXIT(et); tp->t_flags &= ~TF_FORCEDATA; @@ -843,7 +843,7 @@ tcp_timer_rexmt(void * xtp) cc_cong_signal(tp, NULL, CC_RTO); NET_EPOCH_ENTER(et); - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); NET_EPOCH_EXIT(et); #ifdef TCPDEBUG if (tp != NULL && (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 198852cc8fac..39705c3a9b54 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -593,7 +593,7 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) goto out_in_epoch; #endif tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); out_in_epoch: NET_EPOCH_EXIT(et); out: @@ -690,7 +690,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) (error = tcp_offload_connect(so, nam)) == 0) goto out_in_epoch; #endif - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); goto out_in_epoch; } else { if ((inp->inp_vflag & INP_IPV6) == 0) { @@ -714,7 +714,7 @@ tcp6_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) #endif tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); NET_EPOCH_ENTER(et); - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); #ifdef INET out_in_epoch: #endif @@ -905,7 +905,7 @@ tcp_usr_shutdown(struct socket *so) socantsendmore(so); tcp_usrclosed(tp); if (!(inp->inp_flags & INP_DROPPED)) - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); out: TCPDEBUG2(PRU_SHUTDOWN); @@ -953,7 +953,7 @@ tcp_usr_rcvd(struct socket *so, int flags) tcp_offload_rcvd(tp); else #endif - tp->t_fb->tfb_tcp_output(tp); + tcp_output(tp); NET_EPOCH_EXIT(et); out: TCPDEBUG2(PRU_RCVD); @@ -1188,7 +1188,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, !(flags & PRUS_NOTREADY)) { if (flags & PRUS_MORETOCOME) tp->t_flags |= TF_MORETOCOME; - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); if (flags & PRUS_MORETOCOME) tp->t_flags &= ~TF_MORETOCOME; } @@ -1255,7 +1255,7 @@ tcp_usr_send(struct socket *so, int flags, struct mbuf *m, tp->snd_up = tp->snd_una + sbavail(&so->so_snd); if ((flags & PRUS_NOTREADY) == 0) { tp->t_flags |= TF_FORCEDATA; - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); tp->t_flags &= ~TF_FORCEDATA; } } @@ -1312,7 +1312,7 @@ tcp_usr_ready(struct socket *so, struct mbuf *m, int count) SOCKBUF_UNLOCK(&so->so_snd); if (error == 0) { NET_EPOCH_ENTER(et); - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); NET_EPOCH_EXIT(et); } INP_WUNLOCK(inp); @@ -2238,7 +2238,7 @@ unlock_and_done: struct epoch_tracker et; NET_EPOCH_ENTER(et); - error = tp->t_fb->tfb_tcp_output(tp); + error = tcp_output(tp); NET_EPOCH_EXIT(et); } } @@ -2767,7 +2767,7 @@ tcp_disconnect(struct tcpcb *tp) sbflush(&so->so_rcv); tcp_usrclosed(tp); if (!(inp->inp_flags & INP_DROPPED)) - tp->t_fb->tfb_tcp_output(tp); + tcp_output(tp); } } diff --git a/sys/netinet/toecore.c b/sys/netinet/toecore.c index 0bf55958c618..17900a047559 100644 --- a/sys/netinet/toecore.c +++ b/sys/netinet/toecore.c @@ -532,7 +532,7 @@ toe_connect_failed(struct toedev *tod, struct inpcb *inp, int err) KASSERT(!(tp->t_flags & TF_TOE), ("%s: tp %p still offloaded.", __func__, tp)); tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); - (void) tp->t_fb->tfb_tcp_output(tp); + (void) tcp_output(tp); } else { tp = tcp_drop(tp, err); if (tp == NULL)