The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5b08b46a6dd70cda57254cc21a40effe2c3a415c

commit 5b08b46a6dd70cda57254cc21a40effe2c3a415c
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2021-12-26 16:47:42 +0000
Commit:     Gleb Smirnoff <[email protected]>
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);

Reply via email to