git: 37bf391d3cee - main - tcp: make tcp_packets_this_ack() only visible in kernel scope
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Nov 2022 12:53:06 UTC
The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=37bf391d3cee813e061b7f653050895531834c43 commit 37bf391d3cee813e061b7f653050895531834c43 Author: Richard Scheffenegger <rscheff@FreeBSD.org> AuthorDate: 2022-11-06 12:50:13 +0000 Commit: Richard Scheffenegger <rscheff@FreeBSD.org> CommitDate: 2022-11-06 12:51:57 +0000 tcp: make tcp_packets_this_ack() only visible in kernel scope --- sys/netinet/tcp_var.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 01deeaad58cf..3bcba227d5da 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -490,6 +490,13 @@ tcp_unlock_or_drop(struct tcpcb *tp, int tcp_output_retval) return (tcp_output_retval); } #endif /* _NETINET_IN_PCB_H_ */ + +static int inline +tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) +{ + return ((ack - tp->snd_una) / tp->t_maxseg + + ((((ack - tp->snd_una) % tp->t_maxseg) != 0) ? 1 : 0)); +} #endif /* _KERNEL */ /* @@ -551,12 +558,6 @@ tcp_unlock_or_drop(struct tcpcb *tp, int tcp_output_retval) #endif #define BYTES_THIS_ACK(tp, th) (th->th_ack - tp->snd_una) -static int inline -tcp_packets_this_ack(struct tcpcb *tp, tcp_seq ack) -{ - return ((ack - tp->snd_una) / tp->t_maxseg + - ((((ack - tp->snd_una) % tp->t_maxseg) != 0) ? 1 : 0)); -} /* * Flags for the t_oobflags field.