From nobody Tue Nov 12 14:15:27 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XnpNR3SVyz5cbhq; Tue, 12 Nov 2024 14:15:35 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XnpNR2WGhz4Lnl; Tue, 12 Nov 2024 14:15:35 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731420935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LwK3EHjOpdnR3zVj+OdEf9cEYmvNVLYWolGHeqAJ8+U=; b=L7pAmTMvkTo7Vo59eD0leUhNeAV7m9tQJic0RfWEX8yQ/BcRpCgvkrfZakTrP7A+PE8+uo uA+dcbIgYbkpnnNJNsAO2Nr5eWGb0KbolXphEgB9RtVqxSb482uyGqZww6xeAB4iuhjC4S nCBUmJ/X2TEZ2zwf404ZnR3QRp8kTQE/Q3/ViI5TpCV68JFk945x/Jn4izIuCb4Tf9AFif pyncceNtISJA//1FD7C0On2qFefHMEhmmNhpWaFDHElmVYh1ZPVO+RDdUbWgfu5GIYMOvg wgupvoM2suF56LDu2zcQW3MKBw94oatwtpLETVJ+F5PEC7NYD/Np+bNLrNFUmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731420935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LwK3EHjOpdnR3zVj+OdEf9cEYmvNVLYWolGHeqAJ8+U=; b=PIv0u/hOYcZLfdBpV/D9db0xTZlXwcjCFrzYYEuSnnDt/63ku9F1A7lXQDP7+osJI60grO wXU+TwBZkzyCqHnkBh207BnXHFq0zbgguOy/Oj+vXp2HtjJCuOTTVJGSaO1IxdGTTrgKLj sBZ3I/huEFqPBaiLv1clgvodMUwT+D7gPIthi4mYnCTFlL+hIS+O+vwv5xnNIW/3gMtJgR S2z1Rpq6bwcmoi4JnmmaGASxDN+QRBzo/7MVkLiMi4kn3jN9mxCqsJB3QSlJ1s/aCoULsQ pmzh9SKnB/n0U8WmYIATSs60KH2rMnlYqJYYBPTg09LIWyzP6w9bRRCbszXfnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731420935; a=rsa-sha256; cv=none; b=A7WV10rlQP3WhLXH3EJ01JKpQaWHCd51PEmNW1LFrU45Wr207pjvHuJwEeC1y4flTHmgaj W8WWaPn4xfajQy4P898nItL4XkZEYoRcO5f/Sfaf/tbMEKRWfaWbQ82KjRmu2hf4PTKkLh slQnw45qA2QvrjEhBhdAhUbYgB+As885OoVaGrOaKnplDCFZboepUgTc4KKSNvZpWqsoKF aWUujB1WqLC9LdFDNdhKxmNG56cEeZvPMH3XvleRmm5vk3DQ9kCHq+yGSkgrgw/ELBji6W f8PSGGKllJRnGGwTbIEib9K/+5E+LNdOECHOHRpAB3vX3znS2qdVk/GLEwd7vQ== Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4XnpNN4PN0zhXb; Tue, 12 Nov 2024 14:15:32 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_0935611B-2776-4BFF-8EB5-D242FA2618BD" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 349d1366edd2 - main - socket: Export the FIB number of sockets Date: Tue, 12 Nov 2024 22:15:27 +0800 In-Reply-To: Cc: Mark Johnston , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org To: Gleb Smirnoff References: <202411041456.4A4EuXKm059669@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3696.120.41.1.10) --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 = 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

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



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