From nobody Fri Oct 30 22:41:35 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 4jGbgM4pdtz6xS3x for ; Fri, 30 Oct 2026 22:41:35 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jGbgM1KZ5z4hTN for ; Fri, 30 Oct 2026 22:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793400095; 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=KJK9ewdiElq6nOO/nQQ1Avrj+woRh7tPKS5R3T8r6jY=; b=xRlN9yghao3qIr/a+PehKYDcClFJ/8RqMP9uu5ov+EkJCuXec7M1fF6g31iJx1x8oxiUN4 2hUol9tJN5r1tyQFhdJx+d7s3rcLPmnhxSbcBnehOBF2apm1JQRhATQhjF53UfYxMb/wVn VNWWR0eDt9yeEkJ25q0zOp76xLKdFVcOCDw+zdcYb2jPjQM5wF6g7MQSc2DgU5E+YB6lO0 Net2U5FtY2kFx7ZDQu7CprUnJVBhMqY42OavYoOZOjroRqVqKlsOmg5bPEaUAPfJIAeDpZ 7knP3B7ioKUL4UZs06kd8twRr1RZqnjSZFPMi+X7vZlhWDgHU5m5rEZbjuJecw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793400095; b=LmEZp10UQmVlzxDyIu2lyjRel63Qp2QcAbdWOiKHX59nYOQo5as1NItvP8d0v7HLl+TEX+ /8py2wrX46hCH9x0BQueChsBKHOPJuMy+MGfYPmKzxIWJh0PN7/ddAaB+NwF7ZCpmfVGtL GYF9y9L7OXfLnq4ng+rRX0tYFK42ScyOs/TSnH+G01IYrLbDOuC4kfYxDUZ4TdoWynQiG4 UdxaKYpD1YxjwJvvVRAfXlJWHQQ0e9WxUAa4TO7Gc7kt1ufa9Ddn5znjg21fp+p5gZOoKE 6Za4MMUlDA4JQqugw5AVUROReIRMmZrVrqawzBKLyHuZ9jaS+JEE2H59DLZZtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793400095; 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=KJK9ewdiElq6nOO/nQQ1Avrj+woRh7tPKS5R3T8r6jY=; b=puwdTvjyI4IECDQwYpIXzXYPi2sSP9aayVdBVYL3lg0MPTj/3jt/oqgRKONbpRpa/J84C2 K2nErWf7dRjGZmW1U5+eSCNuOYU69+pSv/cYV3LO0N1tRYDu7Yd0DTLfow9OrUMxedzdiT EuyJ46Ec8+mVp4DKxfBYjj8vz8lIM49QaqDOwgkgC+kGamADkal8XGgQN9AOsk1x7lOT1j s56ruIRkriL/QuPQS/KLPAXqZy1RZSWLmYaI8eoL0wSDttqt8Ts4+GJ7fNmol1aKrKEVn8 Pa8LvvBjmDkxuQvD7w/tl9UVP49r1IG5bdEsfzE6J8TXp88uTkXnqY4sFfNYOA== 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 4jGbgM0jTTznQ0 for ; Fri, 30 Oct 2026 22:41:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a128 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 30 Oct 2026 22:41:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 0f111a802f6b - main - mlx5en: Report the configured RSS tuple selections List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository 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: 0f111a802f6beb88f3edad9fa48d3721f8b3ec7b Auto-Submitted: auto-generated Date: Fri, 30 Oct 2026 22:41:35 +0000 Message-Id: <6ae51d1f.3a128.30367ea6@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0f111a802f6beb88f3edad9fa48d3721f8b3ec7b commit 0f111a802f6beb88f3edad9fa48d3721f8b3ec7b Author: Kevin Bowling AuthorDate: 2026-09-18 10:23:19 +0000 Commit: Kevin Bowling CommitDate: 2026-10-30 22:40:58 +0000 mlx5en: Report the configured RSS tuple selections Derive SIOCGIFRSSHASH's TCP and UDP selections from the same boot-time hash configuration used by mlx5e_build_tir_ctx(). The query previously advertised all six IPv4/IPv6 hash types even when the transport-specific TIRs selected only the IP addresses. In particular, the default RSS configuration disables UDP four-tuple hashing. Continue reporting IPv4 and IPv6 two-tuple hashing unconditionally, matching the driver's IP-only TIRs. Do not report IPv6 extension-header variants which the query did not previously claim. Leave key selection, TIR programming, and the receive datapath unchanged. This lets consumers such as hn(4) match the VF's hash inputs instead of enabling incompatible UDP four-tuple hashes on their own receive path. Fixes: a00718e1dfcd ("Implement SIOCGIFRSSKEY and SIOCGIFRSSHASH and mlx5en(4).") MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59807 --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index f912e69819dd..b20ce65385fb 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2974,6 +2974,25 @@ mlx5e_get_rss_key(void *key_ptr) rss_getkey(key_ptr); } +static u_int +mlx5e_get_rss_hash_types(void) +{ + u_int hashconfig, types; + + hashconfig = rss_gethashconfig(); + /* The IP-only TIRs are always enabled, independently of hashconfig. */ + types = RSS_TYPE_IPV4 | RSS_TYPE_IPV6; + if (hashconfig & RSS_HASHTYPE_RSS_TCP_IPV4) + types |= RSS_TYPE_TCP_IPV4; + if (hashconfig & RSS_HASHTYPE_RSS_UDP_IPV4) + types |= RSS_TYPE_UDP_IPV4; + if (hashconfig & RSS_HASHTYPE_RSS_TCP_IPV6) + types |= RSS_TYPE_TCP_IPV6; + if (hashconfig & RSS_HASHTYPE_RSS_UDP_IPV6) + types |= RSS_TYPE_UDP_IPV6; + return (types); +} + static void mlx5e_hw_lro_set_tir_ctx_lro_max_msg_sz(struct mlx5e_priv *priv, u32 *tirc) { @@ -4020,13 +4039,7 @@ err_i2c: case SIOCGIFRSSHASH: ifrh = (struct ifrsshash *)data; ifrh->ifrh_func = RSS_FUNC_TOEPLITZ; - ifrh->ifrh_types = - RSS_TYPE_IPV4 | - RSS_TYPE_TCP_IPV4 | - RSS_TYPE_UDP_IPV4 | - RSS_TYPE_IPV6 | - RSS_TYPE_TCP_IPV6 | - RSS_TYPE_UDP_IPV6; + ifrh->ifrh_types = mlx5e_get_rss_hash_types(); break; default: