From nobody Fri Sep 18 23:02:08 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 4hmp6Z05s9z6t63f for ; Fri, 18 Sep 2026 23:02:14 +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 4hmp6Y6NjBz3Drc for ; Fri, 18 Sep 2026 23:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789772533; 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=Wov4nVLlfceYAr0jM61TvGTBafJfRJl8f5ckzw+tJcE=; b=mcVlPOMPbS4jMBBlxYyigofYcfiyIqjBSpus8RdwS6eWHuzx1/ykyoKy55v3wH4ilLf/Bw GiPqt1nHxphP0RKlk8I/IReromfgAN3HJ+Ac8YLVQQECY5+RSqlsUZTCpHPiaCdjaIDqJq JI8rbD9sNzAn1NZl9aggUcKRA2HQuN9q6Kzv8G9wLzp0LZKaTUU+1NRJsnptk/OgAXXX9n 8QGDAxShunHhLekjH385m9qZMnZxiKGRzS2gMLzgCeKXr5ELLi7iv7Sfl1kGm3RzhA7KU7 L+FDgkG5ZZJW9xwCc7ARs53/s1zksSlLc6vebA4PYyFO9h2f8EZ7CSiZiovBkA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789772533; b=t9y9YPtF9Z+joPd7XKpIg29M526KpMw4Zi0nGp8HAttagLCjN8AwE9v/fgELHkhgdXjYdx 1uuBLt/gUo6RBbhHqlwLAEtUxt93ccihWt6JlF0Dso/dlMbO7yTXdibGusbmPbj00Li6jM bfG8VroCO6TmRTS8Ed2H64WzUOIEdksNzpH4MSzlYTEkNq4ZoMMtTWuDHEmkS/XeSrRMUe DVgYhoMOT51LTgXXqLswR+C9G9/z8ZuIogKOEgryGvG9u0KxeQzyq8S/hLQ1aPs2oMNVh1 W9AFfNT28GzXVjZlU0Jf8GVrInf5ZAqXLZMOh6ffkAGsKawXgO7jBSI5M9Oxog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789772533; 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=Wov4nVLlfceYAr0jM61TvGTBafJfRJl8f5ckzw+tJcE=; b=Nao/oD55OFOW6zl+yfY92B7N/+Ow+FcMn7nobTTKjwB3fY/CmVOtF+qAdDZwud0veoulBb snaBjlZg6knPcf8TnRDtFTdDtgqTfbDPm/OanD4b2MAtflC8r1rqmocGRc32s5Jk/ic1AE 0yyOuDHxcPOV6XloMMLf32fqWYKNvPGYOxIT1BCZH/O0MX7F+PQMwhSHUG72y/3LgiCufj hqL+DQN8mvYwxydkH2RLva4Yt7/r1dgn7cM6oEPRSyyWNvQmzswXg8Zk4BrzfNbBIkCJou nSjT/iKiqsCVPshJx5KrZ1tul4Kue++OOM5HhqAwkiIRWEHW+afinjeHrRRF6w== 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 4hmp6Y5TdCzglh for ; Fri, 18 Sep 2026 23:02:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25883 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 18 Sep 2026 23:02:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: aef4c3eb31d9 - main - mana: Initialize ports with the common RSS key 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: aef4c3eb31d9c29c6aeb08023b1c9d2457d817e3 Auto-Submitted: auto-generated Date: Fri, 18 Sep 2026 23:02:08 +0000 Message-Id: <6aadc2f0.25883.307490a5@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=aef4c3eb31d9c29c6aeb08023b1c9d2457d817e3 commit aef4c3eb31d9c29c6aeb08023b1c9d2457d817e3 Author: Kevin Bowling AuthorDate: 2026-09-18 08:29:20 +0000 Commit: Kevin Bowling CommitDate: 2026-09-18 23:01:09 +0000 mana: Initialize ports with the common RSS key Use rss_getkey() for each port's initial key instead of a lazily generated driver-global random key. Remove the obsolete helper and its unsynchronized initialization flag. Make the common-key declaration available without options RSS. The port still retains the key used for hardware programming and the existing SIOCGIFRSSKEY response. Leave hash types and queue placement unchanged. Reviewed by: gallatin MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59799 --- sys/dev/mana/mana_en.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/sys/dev/mana/mana_en.c b/sys/dev/mana/mana_en.c index bc8c172bab69..2c6007dff909 100644 --- a/sys/dev/mana/mana_en.c +++ b/sys/dev/mana/mana_en.c @@ -49,9 +49,7 @@ #include #include #include -#ifdef RSS #include -#endif #include #include @@ -71,22 +69,6 @@ extern unsigned int mana_tx_req_size; extern unsigned int mana_rx_req_size; extern unsigned int mana_rx_refill_threshold; -static void -mana_rss_key_fill(void *k, size_t size) -{ - static bool rss_key_generated = false; - static uint8_t rss_key[MANA_HASH_KEY_SIZE]; - - KASSERT(size <= MANA_HASH_KEY_SIZE, - ("Request more buytes than MANA RSS key can hold")); - - if (!rss_key_generated) { - arc4random_buf(rss_key, MANA_HASH_KEY_SIZE); - rss_key_generated = true; - } - memcpy(k, rss_key, size); -} - static int mana_ifmedia_change(if_t ifp __unused) { @@ -2958,7 +2940,9 @@ mana_probe_port(struct mana_context *ac, int port_idx, if_setmtu(ndev, apc->mtu); if_setbaudrate(ndev, IF_Gbps(100)); - mana_rss_key_fill(apc->hashkey, MANA_HASH_KEY_SIZE); + _Static_assert(sizeof(apc->hashkey) == RSS_KEYSIZE, + "RSS key size mismatch"); + rss_getkey(apc->hashkey); err = mana_init_port(ndev); if (err)