From nobody Sun Dec 26 16:49:27 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 3289C1922D5E; Sun, 26 Dec 2021 16:49:28 +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 4JMRbW5mq0z4tqL; Sun, 26 Dec 2021 16:49:27 +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 A231B6181; Sun, 26 Dec 2021 16:49:27 +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 1BQGnRiq014125; Sun, 26 Dec 2021 16:49:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BQGnR8P014124; Sun, 26 Dec 2021 16:49:27 GMT (envelope-from git) Date: Sun, 26 Dec 2021 16:49:27 GMT Message-Id: <202112261649.1BQGnR8P014124@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: 5b08b46a6dd7 - main - tcp: welcome back tcp_output() as the right way to run output on tcpcb. 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: 5b08b46a6dd70cda57254cc21a40effe2c3a415c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640537367; 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=AeUoBJNovHTPs6fvCez5dE/t2LjeU8SpbhEr8KJgwgU=; b=F4G46uhRmNsI6MnCrHtzWndiE+wbA9NRlf1L9unKrXzmesKxW6MQmXlgd1uPyWd6edgFdu W82MuWvE+LpEv7oNfEm1390lP4M6H1p+1vYMNDdY9B+474KB+1bx/O2XI0SwQBUBZ11+2C rzlHjVuI1g0iECL7fqWC60fA5cRpjypTaPkowG9Z1kx+NHOiMXvOIEiKhGyHNY1v5P6TbS yDBmZi9Cp5iUcU/03cYe3A3U56nYRQ0Dk9jzXsUi2A7DGmvVoQnfCJsOxBrz5FHbU1QMiB BNT1KN8YrySkQBQdy8JutOqMveOLj+OF03Jhh40FBrjZUXO9T+/uzzlFFCtXmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640537367; a=rsa-sha256; cv=none; b=Jim6hfDF7Vny17MqBY8j1zmLpDOz8dgKeG3U5uSrBBWXc423rDirQnMhZ3g/pAvkIqc1SN QK8lFvU2ll5Onx5ZJKKGVd2RTjtg5idKwbARFauRUYXZ8QbULWwdavJgxGQst2JHz6NoFQ gFiQV5TBGssyWazgrQy/DWQwprH4E5KkD6N3/k25YGFXrMqSxpCQHUjfs9b3k1H75HUlSb e0pLnqbCXHVH5LeV1bxb+wfPwVSd+08jgsW/7n+WTgx67OQMgTAxcpH3F7APucI0MX9tDc bh10XAL9eF9WLbxDQ81RbyUO2ESqDDzxstEjn76knhlEmCGcU6g4Sl4w65JTUA== 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=5b08b46a6dd70cda57254cc21a40effe2c3a415c commit 5b08b46a6dd70cda57254cc21a40effe2c3a415c Author: Gleb Smirnoff AuthorDate: 2021-12-26 16:47:42 +0000 Commit: Gleb Smirnoff CommitDate: 2021-12-26 16:47:42 +0000 tcp: welcome back tcp_output() as the right way to run output on tcpcb. Reviewed by: rrs, tuexen Differential revision: https://reviews.freebsd.org/D33365 --- sys/netinet/tcp_output.c | 2 +- sys/netinet/tcp_subr.c | 2 +- sys/netinet/tcp_var.h | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index d0b56072e9af..ff40e67767ab 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -194,7 +194,7 @@ cc_after_idle(struct tcpcb *tp) * Tcp output routine: figure out what should be sent and send it. */ int -tcp_output(struct tcpcb *tp) +tcp_default_output(struct tcpcb *tp) { struct socket *so = tp->t_inpcb->inp_socket; int32_t len; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 18de53294229..7a0d5ee52ad9 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -381,7 +381,7 @@ static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, static struct tcp_function_block tcp_def_funcblk = { .tfb_tcp_block_name = "freebsd", - .tfb_tcp_output = tcp_output, + .tfb_tcp_output = tcp_default_output, .tfb_tcp_do_segment = tcp_do_segment, .tfb_tcp_ctloutput = tcp_default_ctloutput, .tfb_tcp_handoff_ok = tcp_default_handoff_ok, diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 92f3a76b480c..a3e6e8a05107 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -385,6 +385,13 @@ struct tcp_function { }; TAILQ_HEAD(tcp_funchead, tcp_function); + +static inline int +tcp_output(struct tcpcb *tp) +{ + + return (tp->t_fb->tfb_tcp_output(tp)); +} #endif /* _KERNEL */ /* @@ -1064,7 +1071,7 @@ struct inpcb * tcp_drop_syn_sent(struct inpcb *, int); struct tcpcb * tcp_newtcpcb(struct inpcb *); -int tcp_output(struct tcpcb *); +int tcp_default_output(struct tcpcb *); void tcp_state_change(struct tcpcb *, int); void tcp_respond(struct tcpcb *, void *, struct tcphdr *, struct mbuf *, tcp_seq, tcp_seq, int);