Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2021 10:29:30 +0930
From:      Daniel O'Connor via freebsd-hackers <freebsd-hackers@freebsd.org>
To:        Michael Tuexen <tuexen@freebsd.org>
Cc:        "O'Connor, Daniel via freebsd-hackers" <freebsd-hackers@freebsd.org>
Subject:   Re: git: a730d82378d3 - main - tcp: fix RACK and BBR when using VIMAGE enabled kernel
Message-ID:  <CE6960A4-B1C0-49DE-BF69-57EDF55C8696@dons.net.au>
In-Reply-To: <202107192233.16JMX0k4044018@gitrepo.freebsd.org>
References:  <202107192233.16JMX0k4044018@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help


> On 20 Jul 2021, at 08:03, Michael Tuexen <tuexen@freebsd.org> wrote:
>=20
> The branch main has been updated by tuexen:
>=20
> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3Da730d82378d3cdf5356775ec0c23ad2c=
a40c5edb
>=20
> diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c =
b/sys/netinet/tcp_stacks/rack_bbr_common.c
> index baa267b43752..bf93359368f9 100644
> --- a/sys/netinet/tcp_stacks/rack_bbr_common.c
> +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c
> @@ -508,16 +508,18 @@ skip_vnet:
> 				m_freem(m);
> 				m =3D m_save;
> 			}
> -			if (no_vn =3D=3D 0)
> +			if (no_vn =3D=3D 0) {
> 				CURVNET_RESTORE();
> +			}
> 			INP_UNLOCK_ASSERT(inp);
> 			return(retval);
> 		}
> skipped_pkt:
> 		m =3D m_save;
> 	}
> -	if (no_vn =3D=3D 0)
> +	if (no_vn =3D=3D 0) {
> 		CURVNET_RESTORE();
> +	}
> 	return(retval);
> }

Not to pick on this particular commit, but does anyone know why =
CURVNET_RESTORE os not defined such that it doesn't require wrapping =
with {}?

Looking through vnet.h I see that VNET_ASSERT, =
VNET_GLOBAL_EVENTHANDLER_REGISTER_TAG, and =
VNET_GLOBAL_EVENTHANDLER_REGISTER have a do { } while(0) wrapper but =
CURVNET_SET_QUIET, CURVNET_SET_VERBOSE, CURVNET_RESTORE, VNET_SYSINIT, =
and VNET_SYSUNINIT don't.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CE6960A4-B1C0-49DE-BF69-57EDF55C8696>