From nobody Thu Jun 11 10:23:00 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 4gbdyK6KQsz6h88H for ; Thu, 11 Jun 2026 10:23:05 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gbdyK2sGXz3xTP for ; Thu, 11 Jun 2026 10:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781173385; 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=/nfRx64Gjx8ERT284bKTBdHY+ilnsEOK+OZCKPju07A=; b=CQnTe64ze22M5crS49KBWPlZuN/6Z5fdUZl5wAUn+W+dT6xlETVkWv8LWclKTu0+Cx/zfm 89TNG0WTy0GI6FBwE8LsnCsdeZ//V7Oidt13VeeduGVkMkogqTXCt9zQ3+ecOXJ/i70hb3 7tttvQCJQvvcQ0Sz6HWR1MGwp5N7qpmAkbE382GQKxanJ+N5tCrrKTZl0K+y8FDFNxeZze piXfWePtjmZGG4kjhlXrksBCgebXaRT2P1cChT8sUYpQK7/ihdjcKhYHs8sLibYWOCeFua gAsEkTt0m36eJWxHSgldJ9QyuVxwtcEVY7q4cF8ySbW7X0YF2KOR/xe9grCs3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781173385; a=rsa-sha256; cv=none; b=Wbu1j9HNSo4K60cT6Yhu/Sj5BA/BZsGylVCDe/gstSdO6CyxiVQWL0I/m6kGXV1vTF1uSM RhtntHjuaaDxq6hGoH09LjDURDUBKtRy2i+oW2N5j8nR9gPiiF3uDiof6LSlFTcCrhylqq 7VrdMZGjnfBK+y5YJy2fQoR5szxBioO/3DlyU+JPYt5M9AoprxIH9vV2kFYKOp8jqqoIot ZZBZ8xjkaermJOO/mYGIcMWbyrQT6q4RlYe5kzoghIwLmSAYRfQM9BdzmUoG1adt7vmdMV PWAs5+GWBmTNq6b50GNny+D2tLYTPx5L6tUApwcTTYuJ0LPmtJf+2wLN9m16BA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781173385; 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=/nfRx64Gjx8ERT284bKTBdHY+ilnsEOK+OZCKPju07A=; b=i62yGsEOfR6D6zxztVDaknR936QtzFDh7xj7fi8ESNtEOn75cUzuEWQTfKDgrbuICkHFDL rwscC/MfMnD9D5fXBJ4AmxxAp8r8EzXKwgwwkc5E+siN8JcMW5IYx2PXa81xnPEu6gZk60 iClH6zt8leBFzkt67gjIy77D8a5epk9LyK1yr9slZUAjItwOfYZsihBwniCUP+404Rup6j OMw7521cqRsB3+Qg8h+mnyUz/c6ytEvdQYZEqhWNBDWmhA0wRiL/Ksp2xz4K2j9cS/9E+E CP7bECZYV+bxu/7uXPPuO5A9d3wPaNG3EdGPy2fUenVKDwEWAz730vrxYr1XJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gbdyK1sjyznG9 for ; Thu, 11 Jun 2026 10:23:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a606 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Jun 2026 10:23:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: de639dcde2e2 - main - routing: Enable hash_outbound during nhgrp allocation 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: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de639dcde2e273a6e6f2e877054c0606f9a8da25 Auto-Submitted: auto-generated Date: Thu, 11 Jun 2026 10:23:00 +0000 Message-Id: <6a2a8c84.3a606.3a6b0317@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=de639dcde2e273a6e6f2e877054c0606f9a8da25 commit de639dcde2e273a6e6f2e877054c0606f9a8da25 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-06-05 12:12:18 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-06-11 10:20:56 +0000 routing: Enable hash_outbound during nhgrp allocation Multipath routes can be added via both RTM_F_CREATE and RTM_F_APPEND. Therefore, it's possible to have mpath routes without calling add_route_flags_mpath. Instead of checking V_fib_hash_outbound for every route append, check it during nhgrp_ctl initialization, which is only called for the first multipath request per rib_head. PR: 293136 Reviewed by: glebius Tested by: Marek Zarychta Differential Revision: https://reviews.freebsd.org/D57469 --- sys/net/route/nhgrp_ctl.c | 6 ++++++ sys/net/route/route_ctl.c | 15 +-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c index d0f954888997..d684cd698284 100644 --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -505,6 +505,12 @@ nhgrp_alloc(uint32_t fibnum, int family, struct weightened_nhop *wn, int num_nho *perror = ENOMEM; return (NULL); } + if (V_fib_hash_outbound == 0) { + /* Enable local outbound connections hashing. */ + if (bootverbose) + printf("FIB: enabled flowid calculation for locally-originated packets\n"); + V_fib_hash_outbound = 1; + } } /* Sort nexthops & check there are no duplicates */ diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index cfa3b52b63a6..fa0f41a0a559 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -876,21 +876,8 @@ add_route_flags_mpath(struct rib_head *rnh, struct rtentry *rt, } return (error); } - error = change_route_conditional(rnh, rt, rnd_orig, &rnd_new, rc); - if (error != 0) - return (error); - - if (V_fib_hash_outbound == 0 && NH_IS_NHGRP(rc->rc_nh_new)) { - /* - * First multipath route got installed. Enable local - * outbound connections hashing. - */ - if (bootverbose) - printf("FIB: enabled flowid calculation for locally-originated packets\n"); - V_fib_hash_outbound = 1; - } - return (0); + return (change_route_conditional(rnh, rt, rnd_orig, &rnd_new, rc)); } /*