git: 4581cffb3d52 - main - sockets: fix build, convert missed sbreserve_locked() calls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 May 2022 21:29:26 UTC
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4581cffb3d52b863cd853e923edc8e2b5cce425c commit 4581cffb3d52b863cd853e923edc8e2b5cce425c Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-05-12 21:27:45 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-05-12 21:29:19 +0000 sockets: fix build, convert missed sbreserve_locked() calls Fixes: 4328318445ae --- sys/dev/cxgbe/tom/t4_tls.c | 4 ++-- sys/netinet/tcp_stacks/bbr.c | 3 +-- sys/netinet/tcp_stacks/rack.c | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index 06a21ade04c1..936199fd18f1 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -786,7 +786,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) int newsize = min(sb->sb_hiwat + V_tcp_autosndbuf_inc, V_tcp_autosndbuf_max); - if (!sbreserve_locked(sb, newsize, so, NULL)) + if (!sbreserve_locked(so, SO_SND, newsize, NULL)) sb->sb_flags &= ~SB_AUTOSIZE; else sowwakeup = 1; /* room available */ @@ -1108,7 +1108,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) unsigned int newsize = min(hiwat + sc->tt.autorcvbuf_inc, V_tcp_autorcvbuf_max); - if (!sbreserve_locked(sb, newsize, so, NULL)) + if (!sbreserve_locked(so, SO_RCV, newsize, NULL)) sb->sb_flags &= ~SB_AUTOSIZE; } diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index ced2d9658b28..67d0b7a5c64c 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -8541,8 +8541,7 @@ bbr_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, * reached. */ if (newsize) - if (!sbreserve_locked(&so->so_rcv, - newsize, so, NULL)) + if (!sbreserve_locked(so, SO_RCV, newsize, NULL)) so->so_rcv.sb_flags &= ~SB_AUTOSIZE; m_adj(m, drop_hdrlen); /* delayed header drop */ diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index cda6bd1fcf84..0f02c5615286 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -10882,8 +10882,7 @@ rack_do_fastnewdata(struct mbuf *m, struct tcphdr *th, struct socket *so, * reached. */ if (newsize) - if (!sbreserve_locked(&so->so_rcv, - newsize, so, NULL)) + if (!sbreserve_locked(so, SO_RCV, newsize, NULL)) so->so_rcv.sb_flags &= ~SB_AUTOSIZE; m_adj(m, drop_hdrlen); /* delayed header drop */ #ifdef NETFLIX_SB_LIMITS @@ -16125,7 +16124,7 @@ rack_sndbuf_autoscale(struct tcp_rack *rack) scaleup += so->so_snd.sb_hiwat; if (scaleup > V_tcp_autosndbuf_max) scaleup = V_tcp_autosndbuf_max; - if (!sbreserve_locked(&so->so_snd, scaleup, so, curthread)) + if (!sbreserve_locked(so, SO_SND, scaleup, curthread)) so->so_snd.sb_flags &= ~SB_AUTOSIZE; } }