Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2024 22:15:27 +0800
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        Gleb Smirnoff <glebius@freebsd.org>
Cc:        Mark Johnston <markj@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 349d1366edd2 - main - socket: Export the FIB number of sockets
Message-ID:  <E9AB25A7-EE01-4F89-A9AD-76F6251BEC1A@FreeBSD.org>
In-Reply-To: <ZzKnzNaXdaQ6sOHN@cell.glebi.us>
References:  <202411041456.4A4EuXKm059669@gitrepo.freebsd.org> <ZzKnzNaXdaQ6sOHN@cell.glebi.us>

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

--Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii



> On Nov 12, 2024, at 8:56 AM, Gleb Smirnoff <glebius@freebsd.org> =
wrote:
>=20
> On Mon, Nov 04, 2024 at 02:56:33PM +0000, Mark Johnston wrote:
> M> diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
> M> index 40464f555816..fda8d23f5649 100644
> M> --- a/sys/sys/socketvar.h
> M> +++ b/sys/sys/socketvar.h
> M> @@ -615,7 +615,8 @@ struct xsocket {
> M>  	uint32_t	so_qlimit;
> M>  	pid_t		so_pgid;
> M>  	uid_t		so_uid;
> M> -	int32_t		so_spare32[8];
> M> +	int32_t		so_fibnum;
> M> +	int32_t		so_spare32[7];
> M>  	int16_t		so_type;
> M>  	int16_t		so_options;
> M>  	int16_t		so_linger;
>=20
> I would suggest not to spend the spares in the main branch.
> So this commit should add the field, keeping 8 spares. But
> the merge to stable/14 should use a spare.
>=20
> Otherwise we eventually will run out of spares in main
> and also nearly run out of spares in some stable/22 branch.
>=20
> I'd suggest to follow the policy of not spending spares
> in the main branch for all structures, not just xsocket.

IIUC, those spares are reserved for **future** new features while keep =
API / ABI compatibility.

If we lack spares, or in a foresee future we will lack then we should =
reserve large quantity of spares.

If we happen to run out of them, then no choices but we have to break =
the API / ABI compatibility, then this should
be done in CURRENT.

Right now there are still 7 spares not used, and I guess it is not =
urgent to add extra spares.

Please correct me if wrong.

Best regards,
Zhenlei

>=20
> --=20
> Gleb Smirnoff




--Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Nov 12, 2024, at 8:56 AM, Gleb Smirnoff &lt;<a =
href=3D"mailto:glebius@freebsd.org" class=3D"">glebius@freebsd.org</a>&gt;=
 wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div =
class=3D"">On Mon, Nov 04, 2024 at 02:56:33PM +0000, Mark Johnston =
wrote:<br class=3D"">M&gt; diff --git a/sys/sys/socketvar.h =
b/sys/sys/socketvar.h<br class=3D"">M&gt; index =
40464f555816..fda8d23f5649 100644<br class=3D"">M&gt; --- =
a/sys/sys/socketvar.h<br class=3D"">M&gt; +++ b/sys/sys/socketvar.h<br =
class=3D"">M&gt; @@ -615,7 +615,8 @@ struct xsocket {<br class=3D"">M&gt; =
&nbsp;<span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>uint32_t<span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_qlimit;<br class=3D"">M&gt; &nbsp;<span class=3D"Apple-tab-span"=
 style=3D"white-space:pre">	</span>pid_t<span class=3D"Apple-tab-span"=
 style=3D"white-space:pre">	</span><span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>so_pgid;<br class=3D"">M&gt; =
&nbsp;<span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>uid_t<span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_uid;<br class=3D"">M&gt; -<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>int32_t<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_spare32[8];<br class=3D"">M&gt; +<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>int32_t<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_fibnum;<br class=3D"">M&gt; +<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>int32_t<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_spare32[7];<br class=3D"">M&gt; &nbsp;<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>int16_t<span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_type;<br class=3D"">M&gt; &nbsp;<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>int16_t<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	</span><span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_options;<br class=3D"">M&gt; &nbsp;<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>int16_t<span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span><span class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>so_linger;<br class=3D""><br class=3D"">I would suggest not to =
spend the spares in the main branch.<br class=3D"">So this commit should =
add the field, keeping 8 spares. But<br class=3D"">the merge to =
stable/14 should use a spare.<br class=3D""><br class=3D"">Otherwise we =
eventually will run out of spares in main<br class=3D"">and also nearly =
run out of spares in some stable/22 branch.<br class=3D""><br =
class=3D"">I'd suggest to follow the policy of not spending spares<br =
class=3D"">in the main branch for all structures, not just xsocket.<br =
class=3D""></div></div></blockquote><div><br class=3D""></div><div>IIUC, =
those spares are reserved for **future** new features while keep API / =
ABI compatibility.</div><div><br class=3D""></div><div>If we =
lack&nbsp;<span style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, =
0);" class=3D"">spares, or in a foresee future we will lack then we =
should reserve large quantity of </span><span style=3D"caret-color: =
rgb(0, 0, 0); color: rgb(0, 0, 0);" =
class=3D"">spares.</span></div><div><span style=3D"caret-color: rgb(0, =
0, 0); color: rgb(0, 0, 0);" class=3D""><br =
class=3D""></span></div><div><span style=3D"caret-color: rgb(0, 0, 0); =
color: rgb(0, 0, 0);" class=3D"">If we happen to run out of them, then =
no choices but we have to break the API / ABI&nbsp;</span><span =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" =
class=3D"">compatibility, then this should</span></div><div><span =
style=3D"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=3D"">be =
done in CURRENT.</span></div><div><span style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0);" class=3D""><br =
class=3D""></span></div><div></div><font color=3D"#000000" =
class=3D""><span style=3D"caret-color: rgb(0, 0, 0);" class=3D"">Right =
now there are still 7 spares not used, and I guess it is not urgent to =
add extra spares.</span></font></div><div><font color=3D"#000000" =
class=3D""><span style=3D"caret-color: rgb(0, 0, 0);" class=3D""><br =
class=3D""></span></font></div><div><font color=3D"#000000" =
class=3D""><span style=3D"caret-color: rgb(0, 0, 0);" class=3D"">Please =
correct me if wrong.</span></font></div><div><font color=3D"#000000" =
class=3D""><span style=3D"caret-color: rgb(0, 0, 0);" class=3D""><br =
class=3D""></span></font></div><div><div style=3D"caret-color: rgb(0, 0, =
0); color: rgb(0, 0, 0);">Best regards,</div><div style=3D"caret-color: =
rgb(0, 0, 0); color: rgb(0, 0, 0);">Zhenlei</div></div><div><font =
color=3D"#000000" class=3D""><span style=3D"caret-color: rgb(0, 0, 0);" =
class=3D""><br class=3D""></span></font><blockquote type=3D"cite" =
class=3D""><div class=3D""><div class=3D""><br class=3D"">-- <br =
class=3D"">Gleb Smirnoff<br class=3D""></div></div></blockquote></div><br =
class=3D""><div class=3D"">
<div><br class=3D""></div>

</div>
<br class=3D""></body></html>=

--Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E9AB25A7-EE01-4F89-A9AD-76F6251BEC1A>