From nobody Thu Oct 29 06:57:10 2026 X-Original-To: dev-commits-src-branches@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 4jFZm66Chkz6xwDB for ; Thu, 29 Oct 2026 06:57:10 +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 4jFZm63tCSz4HYQ for ; Thu, 29 Oct 2026 06:57:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793257030; 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: content-transfer-encoding:content-transfer-encoding; bh=oQAyRbZ469KopO9PJYysKvB+1DZA736gV/PWaHm+8sI=; b=Y6FSs+nsSmRzzdGQGZORNi1emKtRCmYmgV1F+fPIxqmkJ+V4w8Rm4GZCo/GF8RQj9ji8AL ZfTg4E1jP550P8I3JY2ezkx21P7htlBSuU8rpu6/pBxbw3Q6bDrwzlZAZawydC6s5QKt+2 WqQWyKIs7VhOrP7emu3MJW/vOUpLBJ8p9lP18iFiT+gpoyH9GoG1GcwiIAPpkX5mWi4MJs GF/1h8GwjAh3gw4mTjYgI12murlpySR8uszyt4q1XUmTzNEFrXcmkvzVl6g5RohgEHCYgx eWkZ/EAEGVDtun681PwkrgFxXE1KYRpuUoWwxFaus1nFKFud+OMmn1gn2Q5B6g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793257030; b=tRuAqL10JFNvnfLngWzsGoC+WzU/oF3PcpQ8tNdgglyxpurj2HgU+f+9LnlFUsiD4LnRk0 rY6XO59Qa70iWGhrNDpve5W23en03IgzoFdnLYPlg+h6y9/GKLm1sshQdwkpN1y+vaZ5Kh WfP0Fb+FpqvevOMtp50kZoK5mV2tj6ee2oLuF+6M3QRWupS8sgKAwKHpFbWLgfgWYOAibP xgFhd0XE1NYpofQdM44ycgBiJ3TGgcYd73wUXjBzcmhu8rIUCF6h9grIwiPAbiSxJpoR63 GLPWrDoD6ePYPSpVEGHB5BsjWGh25X5Psu045UrtiA6LFUtu3/H9n5/7kWvXtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793257030; 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: content-transfer-encoding:content-transfer-encoding; bh=oQAyRbZ469KopO9PJYysKvB+1DZA736gV/PWaHm+8sI=; b=rfieTD/ob+Y3clTd7Y06MbmzrjTjB3HObOGEqHEcKnGwcbEcA1uKD4MNgHrjY5ejgYeEM6 7YK+e5m36Iz6ItAUAdX3VA2l0ufr2G2RMm/UZltBTTAElwmfrJEg6XM24AaUvGwOGrduxe rcEiqCiFaP+a7UsUnj2Mubqx/VfRJZC1JqVswdXtkN6pGTWVOBSzxzguFoFphb3bJNvT+K jbL9JbqvVn358DX2L+syI81NHXKC0SDXkWeZcSLwAMaUxgYtzYKoznLYIm2JlMGRAlFp5U vCGtWDBaiKgygev2nE738ZhH8hCdGIj3OrkDOlAfVDqyB/kV9Eo8AvLXt3lmRw== 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 4jFZm62yP6zSN9 for ; Thu, 29 Oct 2026 06:57:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fe45 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:57:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Gallatin From: Kevin Bowling Subject: git: fa247b5ceb66 - stable/15 - mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD 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/stable/15 X-Git-Reftype: branch X-Git-Commit: fa247b5ceb66e22dde0e203c233bdd084a84f53f Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:57:10 +0000 Message-Id: <6ae2ee46.3fe45.7f969cb@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=fa247b5ceb66e22dde0e203c233bdd084a84f53f commit fa247b5ceb66e22dde0e203c233bdd084a84f53f Author: Andrew Gallatin AuthorDate: 2025-11-24 15:36:09 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 06:54:44 +0000 mlx5: use newly exposed RSS hash key API rather than ad-hoc hashing Differential Revision: https://reviews.freebsd.org/D53091 Reviewed by: kib Sponsored by: Netflix (cherry picked from commit 8f94088bc5d3ee586b36f8f7b269223b420ac957) --- sys/dev/mlx5/mlx5_en/en.h | 2 -- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 30 +----------------------------- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 4 ---- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index f59902be226a..768f58188220 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -53,10 +53,8 @@ #include #include -#ifdef RSS #include #include -#endif #include diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index e8c42b65a5f0..c565c22c6028 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -2966,24 +2966,7 @@ err_modify: static void mlx5e_get_rss_key(void *key_ptr) { -#ifdef RSS rss_getkey(key_ptr); -#else - static const u32 rsskey[] = { - cpu_to_be32(0xD181C62C), - cpu_to_be32(0xF7F4DB5B), - cpu_to_be32(0x1983A2FC), - cpu_to_be32(0x943E1ADB), - cpu_to_be32(0xD9389E6B), - cpu_to_be32(0xD1039C2C), - cpu_to_be32(0xA74499AD), - cpu_to_be32(0x593D56D9), - cpu_to_be32(0xF3253C06), - cpu_to_be32(0x2ADC1FFC), - }; - CTASSERT(sizeof(rsskey) == MLX5E_RSS_KEY_SIZE); - memcpy(key_ptr, rsskey, MLX5E_RSS_KEY_SIZE); -#endif } static void @@ -3095,15 +3078,12 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla CTASSERT(MLX5_FLD_SZ_BYTES(tirc, rx_hash_toeplitz_key) >= MLX5E_RSS_KEY_SIZE); -#ifdef RSS + /* * The FreeBSD RSS implementation does currently not * support symmetric Toeplitz hashes: */ MLX5_SET(tirc, tirc, rx_hash_symmetric, 0); -#else - MLX5_SET(tirc, tirc, rx_hash_symmetric, 1); -#endif mlx5e_get_rss_key(hkey); switch (tt) { @@ -3112,12 +3092,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV4); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_TCP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV4)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3127,12 +3105,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV6); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_TCP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_TCP_IPV6)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3142,12 +3118,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV4); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_UDP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV4)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; @@ -3157,12 +3131,10 @@ mlx5e_build_tir_ctx(struct mlx5e_priv *priv, u32 * tirc, int tt, bool inner_vxla MLX5_L3_PROT_TYPE_IPV6); MLX5_SET(rx_hash_field_select, hfs, l4_prot_type, MLX5_L4_PROT_TYPE_UDP); -#ifdef RSS if (!(rss_gethashconfig() & RSS_HASHTYPE_RSS_UDP_IPV6)) { MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_IP); } else -#endif MLX5_SET(rx_hash_field_select, hfs, selected_fields, MLX5_HASH_ALL); break; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index eb569488631a..262558d529dc 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -358,7 +358,6 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq, /* check if a Toeplitz hash was computed */ if (cqe->rss_hash_type != 0) { mb->m_pkthdr.flowid = be32_to_cpu(cqe->rss_hash_result); -#ifdef RSS /* decode the RSS hash type */ switch (cqe->rss_hash_type & (CQE_RSS_DST_HTYPE_L4 | CQE_RSS_DST_HTYPE_IP)) { @@ -386,9 +385,6 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, struct mlx5e_rq *rq, M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH); break; } -#else - M_HASHTYPE_SET(mb, M_HASHTYPE_OPAQUE_HASH); -#endif #ifdef M_HASHTYPE_SETINNER if (cqe_is_tunneled(cqe)) M_HASHTYPE_SETINNER(mb);