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

[-- Attachment #1 --]


> On Nov 12, 2024, at 8:56 AM, Gleb Smirnoff <glebius@freebsd.org> wrote:
> 
> 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;
> 
> 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.
> 
> Otherwise we eventually will run out of spares in main
> and also nearly run out of spares in some stable/22 branch.
> 
> 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

> 
> -- 
> Gleb Smirnoff




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

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

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