aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2022-05-12 21:27:45 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2022-05-12 21:29:19 +0000
commit4581cffb3d52b863cd853e923edc8e2b5cce425c (patch)
tree8f2cb901623924154773baf275c11e40b67e3e4a
parent0bef4927ea858bb18b6f679bc0a36cff264dc842 (diff)
downloadsrc-4581cffb3d52b863cd853e923edc8e2b5cce425c.tar.gz
src-4581cffb3d52b863cd853e923edc8e2b5cce425c.zip
sockets: fix build, convert missed sbreserve_locked() calls
Fixes: 4328318445ae
-rw-r--r--sys/dev/cxgbe/tom/t4_tls.c4
-rw-r--r--sys/netinet/tcp_stacks/bbr.c3
-rw-r--r--sys/netinet/tcp_stacks/rack.c5
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;
}
}