From nobody Fri Sep 18 22:25:41 2026 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 4hmnJW1Rk0z6t4Q2 for ; Fri, 18 Sep 2026 22:25:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hmnJV6ZWDz52nT for ; Fri, 18 Sep 2026 22:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789770346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4IzyQE9MI3btVKgSqx+NJxa6wz/XiQfiTecSA9sb7AA=; b=rxXhaz6xHi46qI0OZyqo4nG9JpjiEFsm5/MrMHBZqzocGH2I7KTH0oabLpxCM7hpK2LTep UOclK//mPPGrlQL4aKSq/PzRPGUZYyzTjMugaigAYYGJHcQamTpVnIykCnEFQyGexJU10G 6/I/x14KlPGfq4UzZP91SmCigt4zPPGawCFuwqTX9JbM0MUHu9kUP3v9OCU7mLSwE3VVEH eShTS/gEwgPMsuym5MvuvrR+vERjh3HXFfmWSqLXnLVTm5xjsdQYtSz2l9R9r1qb3dpmC/ /rwx+ezmFy9oMbOoO4t1q/vnOp1E6I313CIBnyJr7rYBUwJCbgShG1+Wvwo2dg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789770346; b=l+G57HD0f9TdsiJ3Iin7ecOV4H4kt3xF8V3/4N+fBpAImo5+B7nvgr9p0sN1W8hjA3H/sk CxqvjqfQaKXKLiVzEn+dTpyfDSKJJyxZzyVeONb4lwUZps7BiRtRmYl5gMyFgO8BNUVhjy G0CJAKcWXzqSA5F5cojQSZMxajmUhFFq39vDCTvVvSXizxF4JQmkHuIqU0HlE2HJW4seV3 /MVARTNYU0RVbQVmo5Hl/47oTPwM3Gfwe/sAOeXnAzqElq5BxkLSI1Tsjq66pbAwkBWPbY AXZulbWt38xO1X4pFv6pKiH7/m5ZUQqDZZI9w75Z09qpUO+X3C3W+B0shyar/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789770346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4IzyQE9MI3btVKgSqx+NJxa6wz/XiQfiTecSA9sb7AA=; b=oiPcBO7Y59xPHz8VWWmCpVQggW3OXHxsj0bhaAy7VmNJPms4wi27bkqUI3SNDfMCfIyuzr pAg7/R40BiAP6I8e17AqoKd8/tiez2S7LWmFN/rMSvCprfMxHuDd6n+oD10dso+ERUSOPn L/L5Fe1MuWdG+6a8pIj+k6WK1i7VhnCeg7C8/eYssCd7N/T854SyEUCqxz7G/Npt1L2GF7 7/upjH/qVQRJJVgn0zVXAx2ZSmfzD9DN7IG13JEsw/YZ5oPWjdfchOD8R6hzyTNxSGjRzE mzZ6443fCCrhM1DPoFPlZEkyDF6LIsmNxi3emkjarIebLW6t5s2lUMx7FSCLNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hmnJV5P1yzdq3 for ; Fri, 18 Sep 2026 22:25:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f65d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 22:25:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: a3880af465e6 - main - iflib: Add optional RSS configuration queries 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3880af465e617e5ed6f1a6e49645e6a8299e3c0 Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 22:25:41 +0000 Message-Id: <6aadba65.1f65d.1fa34921@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=a3880af465e617e5ed6f1a6e49645e6a8299e3c0 commit a3880af465e617e5ed6f1a6e49645e6a8299e3c0 Author: Kevin Bowling AuthorDate: 2026-09-15 00:15:12 +0000 Commit: Kevin Bowling CommitDate: 2026-09-18 22:24:29 +0000 iflib: Add optional RSS configuration queries Dispatch SIOCGIFRSSKEY and SIOCGIFRSSHASH through typed get_rss_key and get_rss_hash methods under the context lock. Drivers can report their programmed key and hash selections. The default methods return EOPNOTSUPP. The common RSS key does not describe which hash selections a particular device actually programs. hn(4) needs the effective VF configuration when synchronizing RSS between its synthetic and VF receive paths. Reviewed by: iflib (gallatin) MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59691 --- sys/net/ifdi_if.m | 26 ++++++++++++++++++++++++++ sys/net/iflib.c | 10 ++++++++++ 2 files changed, 36 insertions(+) diff --git a/sys/net/ifdi_if.m b/sys/net/ifdi_if.m index b226a1c7b96b..50427729b877 100644 --- a/sys/net/ifdi_if.m +++ b/sys/net/ifdi_if.m @@ -126,6 +126,18 @@ CODE { return (ENOTSUP); } + static int + null_get_rss_key(if_ctx_t _ctx __unused, struct ifrsskey *_key __unused) + { + return (EOPNOTSUPP); + } + + static int + null_get_rss_hash(if_ctx_t _ctx __unused, struct ifrsshash *_hash __unused) + { + return (EOPNOTSUPP); + } + static int null_vf_status(if_ctx_t _ctx __unused, struct if_vf_status **_status __unused) @@ -349,6 +361,20 @@ METHOD int priv_ioctl { # optional methods # +# +# Report the programmed RSS key and hash selections under the context lock. +# Unsupported queries return EOPNOTSUPP; unavailable state returns an error. +# +METHOD int get_rss_key { + if_ctx_t _ctx; + struct ifrsskey *_key; +} DEFAULT null_get_rss_key; + +METHOD int get_rss_hash { + if_ctx_t _ctx; + struct ifrsshash *_hash; +} DEFAULT null_get_rss_hash; + METHOD int i2c_req { if_ctx_t _ctx; struct ifi2creq *_req; diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 1c43792c9857..c2e70d946bf6 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4976,6 +4976,16 @@ iflib_if_ioctl(if_t ifp, u_long command, caddr_t data) if_vlancap(ifp); break; } + case SIOCGIFRSSKEY: + CTX_LOCK(ctx); + err = IFDI_GET_RSS_KEY(ctx, (struct ifrsskey *)data); + CTX_UNLOCK(ctx); + break; + case SIOCGIFRSSHASH: + CTX_LOCK(ctx); + err = IFDI_GET_RSS_HASH(ctx, (struct ifrsshash *)data); + CTX_UNLOCK(ctx); + break; case SIOCGPRIVATE_0: case SIOCSDRVSPEC: case SIOCGDRVSPEC: