From nobody Fri Feb 13 16:02:36 2026 X-Original-To: dev-commits-src-main@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 4fCH4Y3sRbz6S3dy for ; Fri, 13 Feb 2026 16:02:37 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fCH4Y06lSz3kfc for ; Fri, 13 Feb 2026 16:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770998557; 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=6+mzeKBS+ywzDoAQ/+w/E1vnR1Ho3bwSevouIRXtz44=; b=nS2Y2VYhp7ERCgDrUszBdMNpn/I06yw0hOJIXGjFddXbySff93Yub3CCqgFHZJq57t+dCq umWTs/rwG/jQP7QEzrpUvfkpIwx64X5QLdkplkPGfP8Ms/RbEt0ycQuC3nhRvOG37ntKsB P2S25WoaErukRQXYQZ5PZ4fo2WfrLOkO+2RC1+kk+so9awO8wWgxvArcK3lOTVhNqVml2b 3V0126OrtmyqSbG7FyTOLsio+Qv+zSwzfKmdA/bW3FXSfYkXY6LsSBHjH04CsTSyBcnJpx r5VhTUCO5veghPPd9fSyWxz8uzQoAFFQVVqPzbyn3BBfeCCbbbU/hD2ne0TnWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770998557; a=rsa-sha256; cv=none; b=IY54r0wTUEeCnm1sj0T0D2xcB1pqODE8Jq3PWVM/a1SZeCUuQErs30iIcaNlz2jeLuVG+y Nq7tYac5/eUSd3qp7jT8weox0n0JciKmRyW5yX9AwCiAzAAIAkWW/pqS70hXcKWTDlXdyD ZdipQV/2tDNUNsQIXnzfUZnhaPD1UgJ7mD1g8jdQiBgu6LyPSuGy727l7fESfFDDc2eLb9 /j7SBnoGcO/Rd7rg1v8cDq/VLCAYTzbgjWUX3ESAL59j6rLeJ05ccEJyFYPzvLWCNcbt7D kwAuEjdC9O6KlVa4YqOZI//uEAPL6tvhUYXPRJrPuEtjpA2E+tZc+hdgtULf0A== 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=1770998557; 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=6+mzeKBS+ywzDoAQ/+w/E1vnR1Ho3bwSevouIRXtz44=; b=VifGDXT5vPxVk7C5qvlT77o+NyC6CZF+9Wn3ZL7SflKIXSEuUuoFFIdQy4hpb62Le1HvTk E6l5Q85VXF50hdCmYfAnViMtMgf5qSWk1FzGSPgms4wzhH7byCDwlCy0zPWsn//jJ7gtYe 3sUHq6ccMq+P4WnCYYHaTwhslkiCRbm6C7KUOG0GFsCsw/vcX1lHEFxNwbM80NNyiRSPjh 9h5yKSKVmzKXPewOwYoBCKO+oQpRvkJLnqmOcCq12NnmU2PcQ9MbgIepUvLlaUUbn6drnG +3ruoCi73Cg5zPys6Q+CfbzGRI2fs4y6wkbYjKyLSPC/raBNkHFnDoa9cZD3Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fCH4X6r6LzCv3 for ; Fri, 13 Feb 2026 16:02:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fa7c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Feb 2026 16:02:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a8b8feced998 - main - atf_python/vnet: Make it possible to set the FIB of vnet interfaces List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8b8feced998c8c74f9a572f069bcb689cabd09d Auto-Submitted: auto-generated Date: Fri, 13 Feb 2026 16:02:36 +0000 Message-Id: <698f4b1c.1fa7c.35299909@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a8b8feced998c8c74f9a572f069bcb689cabd09d commit a8b8feced998c8c74f9a572f069bcb689cabd09d Author: Mark Johnston AuthorDate: 2026-02-13 15:50:39 +0000 Commit: Mark Johnston CommitDate: 2026-02-13 16:02:09 +0000 atf_python/vnet: Make it possible to set the FIB of vnet interfaces Reviewed by: zlei, ngie MFC after: 1 week Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54972 --- tests/atf_python/sys/net/vnet.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index a6e620b49d59..029813fbc587 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -57,6 +57,7 @@ class VnetInterface(object): self.addr_map: Dict[str, Dict] = {"inet6": {}, "inet": {}} self.prefixes4: List[List[str]] = [] self.prefixes6: List[List[str]] = [] + self.fib: int if iface_name.startswith("lo"): self.iftype = self.IFT_LOOP else: @@ -106,7 +107,7 @@ class VnetInterface(object): run_cmd("/sbin/ifconfig {} -txcsum -txcsum6".format(name)) if2 = cls(alias_name, name[:-1] + "b") if1.epairb = if2 - ret.append(if2); + ret.append(if2) return ret def set_mtu(self, mtu): @@ -141,6 +142,10 @@ class VnetInterface(object): cmd = "/sbin/ifconfig {} up".format(self.name) self.run_cmd(cmd) + def setfib(self, fib: int): + cmd = "/sbin/ifconfig {} fib {}".format(self.name, fib) + self.run_cmd(cmd) + def enable_ipv6(self): cmd = "/usr/sbin/ndp -i {} -- -disabled".format(self.name) self.run_cmd(cmd) @@ -375,6 +380,9 @@ class VnetTestTemplate(BaseTest): prefixes6 = topo[iface.alias].get("prefixes6", []) prefixes4 = topo[iface.alias].get("prefixes4", []) mtu = topo[iface.alias].get("mtu", 0) + if "fib" in topo[iface.alias]: + fib = topo[iface.alias]["fib"] + iface.setfib(fib[idx]) if prefixes6 or prefixes4: ipv6_ifaces.append(iface) iface.turn_up() @@ -423,16 +431,22 @@ class VnetTestTemplate(BaseTest): for obj_name, obj_data in topo.items(): if obj_name.startswith("vnet"): vnet_ifaces = [] + maxfib = 0 for iface_alias in obj_data["ifaces"]: # epair creates 2 interfaces, grab first _available_ # and map it to the VNET being created idx = len(iface_map[iface_alias].vnet_aliases) iface_map[iface_alias].vnet_aliases.append(obj_name) vnet_ifaces.append(iface_map[iface_alias].ifaces[idx]) + fib = topo[iface_alias].get("fib", (0, 0)) + maxfib = max(maxfib, fib[idx]) opts = [] if "opts" in obj_data: opts = obj_data["opts"] vnet = vnet_factory.create_vnet(obj_name, vnet_ifaces, opts) + if maxfib != 0: + # Make sure the VNET has enough FIBs. + vnet.run_vnet_cmd("/sbin/sysctl net.fibs={}".format(maxfib + 1)) vnet_map[obj_name] = vnet # Allow reference to VNETs as attributes setattr(self, obj_name, vnet)