From nobody Fri Sep 18 22:57:18 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 4hmp1021fmz6t5gJ for ; Fri, 18 Sep 2026 22:57:24 +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 4hmp100BPgz59QZ for ; Fri, 18 Sep 2026 22:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789772244; 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=Zrh8o8KLUpxJVN1KSyds3l+63AkfLDbqhptfE/RnuVk=; b=rjCutJx2KOptmNB2dTKGdto+2sipEdZZY7sogFErO1xWyHxYFKhKSLPDAmP6tgrSlSFvtf wkyByuYVqlsEFjddkuT6ugbT23dm7WnueebswMi2LWN1h+ZpNCyEPgmsX8/b7dBR2OBOrA q5J0yOByMK1BKdJtHfzMvE1+jNZOfmNnN94UUyN81Id/p0+6Sy287YvztEoFIkeDL6OCEp jHIv43iRrbwnxCHdJYdJERcdOGLXdWOI3huV1aJERHf3wIPzI/dM0t91ol/gIq1v/nZk35 a/4wmNESPlOG0Ja9wntgnyjnbhexWYsIRHKbipTR0TvQ/pqZbp3yS1dWhEoUeQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789772244; b=N1qhkO/9JtxTyZkJFz1cEs9dr3AojZSyvBDM1WpeatoFhEdzngIudHUWnd2h3O0QHorydJ t+BsLmfuz69GNOH0nXXrTBFz4PHHwTsOyc4TgRtcYtkUqWAlfUhqJVr5lq1IwkEbBU0pvm 5ni4a6gDjKSm+at3mYDx3elO+3b7/RwuZBcJp1sPMOmlC970Lpc2BJk4vNNXiwxBqx7Ll3 FJnTBXt+tLHkZkr9daU3Lb/uW4RG1SOsiPmCB7D51858CBnlJDCYAOdz7Nrvnh3UrUNHu+ DHenhHUeThaydo1GQSTgXp+pdBsnw49yWr+9CfAv0jnvkqMIsdCuAHr52gcjLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789772244; 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=Zrh8o8KLUpxJVN1KSyds3l+63AkfLDbqhptfE/RnuVk=; b=wLwi7jZOps6kI6Q+3l7DElNyfpVaHCOcZDqrDqrVoOIoYZ8IniKOQflqj9dgLK+p+41Oy2 Kv8n+0BGvxec4QdlgtLiLwKjLfClOrkwY1gQhYR2QxHJf+aPMi/evGfTyJFi3bKw78Dmb+ YFwAJFica1TP5pnGPWDaKc8GcK5SzCjcKrSX3hO+y/GLKlOpauAnGlhHl6YWWaGZNAN/Io 0gkRHI6Ez4VjYKyTtwAwpXM4lscj+U/VsUkScBDtitqb3lRaSYa1/xOBmKgJXZmDvYY3ED YRr6pHpbBzZnD/rGNFCPnWEFyQD/inNepfy4G2e1EWsx1ZH47a1v+YD6BMmPBw== 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 4hmp0z65G3zgYN for ; Fri, 18 Sep 2026 22:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23f93 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 22:57:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 9b374ad2b3f3 - main - bxe: Program the common RSS key in searcher byte order 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: 9b374ad2b3f3b0f4e6c9d4e78859a429b6b282d6 Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 22:57:18 +0000 Message-Id: <6aadc1ce.23f93.213151e0@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9b374ad2b3f3b0f4e6c9d4e78859a429b6b282d6 commit 9b374ad2b3f3b0f4e6c9d4e78859a429b6b282d6 Author: Kevin Bowling AuthorDate: 2026-09-18 08:29:18 +0000 Commit: Kevin Bowling CommitDate: 2026-09-18 22:56:01 +0000 bxe: Program the common RSS key in searcher byte order Use the common RSS key instead of generating private random words. Reverse the bytes before passing the key to the shared code, which copies the supplied bytes directly into the firmware request. The searcher consumes this array in reverse order; a raw copy of the common key would not produce matching Toeplitz hashes. The hardware ordering is documented by Linux commit d682d2bdc30650a5c7ce9908ab83ab674b658744 ("bnx2x: byte swap rss_key to comply to Toeplitz specs"). Keep the conversion in the FreeBSD caller rather than changing the shared-code interface. Preserve the config_hash gate, including the PMF-only key programming on 57710/57711, and leave hash types and indirection policy unchanged. Reviewed by: gallatin MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59796 --- sys/dev/bxe/bxe.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index b6364c3909bb..acc65ee1458a 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -30,6 +30,7 @@ #define BXE_DRIVER_VERSION "1.78.91" #include "bxe.h" +#include #include "ecore_sp.h" #include "ecore_init.h" #include "ecore_init_ops.h" @@ -11483,7 +11484,6 @@ bxe_config_rss_pf(struct bxe_softc *sc, uint8_t config_hash) { struct ecore_config_rss_params params = { NULL }; - int i; /* * Although RSS is meaningless when there is a single HW queue we @@ -11514,10 +11514,15 @@ bxe_config_rss_pf(struct bxe_softc *sc, memcpy(params.ind_table, rss_obj->ind_table, sizeof(params.ind_table)); if (config_hash) { - /* RSS keys */ - for (i = 0; i < sizeof(params.rss_key) / 4; i++) { - params.rss_key[i] = arc4random(); - } + uint8_t key[RSS_KEYSIZE]; + unsigned int i; + + /* The searcher consumes the key in reverse byte order. */ + _Static_assert(sizeof(params.rss_key) == RSS_KEYSIZE, + "RSS key size mismatch"); + rss_getkey(key); + for (i = 0; i < sizeof(key); i++) + ((uint8_t *)params.rss_key)[sizeof(key) - 1 - i] = key[i]; bxe_set_bit(ECORE_RSS_SET_SRCH, ¶ms.rss_flags); }