From nobody Mon Jul 7 10:07:03 2025 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 4bbKfJ0cmcz61JhB; Mon, 07 Jul 2025 10:07:04 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bbKfH605Gz3dvj; Mon, 07 Jul 2025 10:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751882823; 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=Pr3Q9wd7BuNUQYHIWfXEQIZad5E2tuCKR7Gz9qmUXbM=; b=SyeK42PXVVCLK+jmn/GIPGu8P1plLSg2bel219peklN3xzzedLbXuI+uFSnSipykguWSle XQIgWL79JnSb80/oJ0rwqpy5apS95VqNFBfNys8L5RDCGq7b7U6jJJ7hjgNMW/TW1Fpb0K NMv2HQHulP0BeVlhxhtkOu0reOF8dPD8pEEMOKfMFmUmbGUQmloq67cZYz60iLbUBsX0l5 VDG9whqpROG5lW8NQo0t3dFv/J+Z8t7/FvNyr75xmMgeBlIPadMoA7Rhd2y/Xqj6tmxopn IqOLv7tIMjogWBtgHJCOJFfgzcarxWsOx3cfbdL6G/rFArtfkVwn1h+otrcnrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751882823; 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=Pr3Q9wd7BuNUQYHIWfXEQIZad5E2tuCKR7Gz9qmUXbM=; b=f9VNdrdKf9ItsY+Kg88VUVlhJwX94W9INcXOLr/4XytZKaw/45KCUnMlx7lQLVschZf2L0 CooelV7Sh0Nf3iMT9mbQGheULcbe3wUtBCiEJWiVgxaI2t4+BvmLnXEg6FY6o0V2xUYEKY RbDUtmc15Jbq1hvg0GzYN705m2/8KpPx2erkh1GJrsf6wgVUQmJTT7C9aM7nzrPChIJXHt ECGHvM/sy5HyfrSYeDNSH0Ma111yVLZrtAt632HzHLCN3zSvICkuPb6pKYbw2o2gNoMlfN Dpz15YyWfzmcYjTTu/r9gAks2bAiQq56tE/NhnqVWdGAyzVij0ik0wPsmLjPxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751882823; a=rsa-sha256; cv=none; b=YNemwG+WJhfbMXMnLpt1xMKSEgabONOKtNH5b238eK6C1xZ7Ovpazf5v/7G1yFndo8TilS PStpBanld8oWSIvk75x+xH62ZzDXrWPdgXHepsuCh6iS05A1/voStV++wsuZPO35+/Awa1 tsJCMu0QrLKfCfbfNJKBjZ7Pnnu28RR6aI7lmvTGnJhVct+I8w6UkRKkx6Zvoe+d/cIGe/ LaWlII1KYPc7l4MmjhI4VEiimJ5uSe6uKEaNGFr4UM038p6as72Q3K9QEqr1X4xAm8KExT cyCwYO1mc6Gy8E/oDXmambxt1Z+Dh6EuqNkVaeEUjSHEHtDaGXU4KRdRTY0eiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bbKfH5Vw7zmsH; Mon, 07 Jul 2025 10:07:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 567A73fa053598; Mon, 7 Jul 2025 10:07:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 567A738e053595; Mon, 7 Jul 2025 10:07:03 GMT (envelope-from git) Date: Mon, 7 Jul 2025 10:07:03 GMT Message-Id: <202507071007.567A738e053595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 99d4e2870c03 - stable/14 - ifnet: Eliminate unnecessary synchronization of the interface index in the link layer address 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 99d4e2870c03ce86855fa2edab2fe9af0d3ff410 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=99d4e2870c03ce86855fa2edab2fe9af0d3ff410 commit 99d4e2870c03ce86855fa2edab2fe9af0d3ff410 Author: Zhenlei Huang AuthorDate: 2025-06-24 10:01:18 +0000 Commit: Zhenlei Huang CommitDate: 2025-07-07 10:05:10 +0000 ifnet: Eliminate unnecessary synchronization of the interface index in the link layer address Change 80e60e236d85 made the if_index global, and for the whole lifecycle of an interface its index never changes, then there is no need to synchronize the interface index in the link layer address when moving interfaces from one vnet to another. No functional change intended. Reviewed by: glebius Fixes: 80e60e236d85 ifnet: make if_index global MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50975 (cherry picked from commit 0b4c4833ee3eab0ce46b3bdbf054bca4b6bb7429) --- sys/net/if.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index a0570aed32e9..39854489f5f7 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -932,21 +932,6 @@ if_attach_internal(struct ifnet *ifp, bool vmove) } #endif } -#ifdef VIMAGE - else { - /* - * Update the interface index in the link layer address - * of the interface. - */ - for (ifa = ifp->if_addr; ifa != NULL; - ifa = CK_STAILQ_NEXT(ifa, ifa_link)) { - if (ifa->ifa_addr->sa_family == AF_LINK) { - sdl = (struct sockaddr_dl *)ifa->ifa_addr; - sdl->sdl_index = ifp->if_index; - } - } - } -#endif if (domain_init_status >= 2) if_attachdomain1(ifp);