From nobody Tue Jun 24 10:01:58 2025 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 4bRL8Q5HhBz5yZwx; Tue, 24 Jun 2025 10:01:58 +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 4bRL8Q4QW7z3qRY; Tue, 24 Jun 2025 10:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750759318; 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=mAMyXCkwsB+HQ9uedslW75IGXNo2hyQed0WNdDt9Sgo=; b=Aj5Vt/kJwxkxaS5HlLuuiwZQ5wpLutvJfjcwhRh38ek8JbLglkx2vWBzHX5ZS0q70uj8rT LBhEm0izYuqM0Ao/jVB0TRX0yfGimgnVhPz+er2g3HAxW5JRunVjITNoKrE3w4gHom1GEj jupCMuLBZxRAbcEtoX4+DuMlIZXs/dnCa+QjVgwi+porBLZvc7lH7qL6nMJxgVNNaJRcq2 0TKeZLmJwPjIO3ZS0ievRn76fmXP7T1IHC/4cAxc0JqnWujn4EAwv5mQEsqPiaBVNJL1td 7Fz4yt/3cqV5+XSbkiwk8Z74uCZwukfVtqoEQBSsSizuJ8tGWMKv6j5xEIhQfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1750759318; 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=mAMyXCkwsB+HQ9uedslW75IGXNo2hyQed0WNdDt9Sgo=; b=iGHhNXAEQZLvfBe/czk17Otssj/utYTkk4fJXQsJrzY9dpCynm1qi+MZ01sh+UcCpWUlYG YH/9M3EiC9w5pTwyXI0lZEduZiZbv1fXVicOHyOWxQammbU/JssAZlknRBaKg+SPEcDo3g iy0mA7TmHkOQWfOQQcsdLRLnqMLgMAHpUPVFBXJqc9P2UXcTxmqVF9gq3biq/8+1FV5DSI ruPd13MxQMRyab9+HAvO0i1OmqJhwSCa17n/I6glA6iQyPqKjumGQ3J+Ms2cgxrgcKBNjN 6IM1n39ycxZc4/ahvtSTKnE0kAT2nda836Gep7UsW0OtlgbSp0qj0XZAjbwdOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1750759318; a=rsa-sha256; cv=none; b=NCZPz8gToP2Aw7CZgzCl38F3JGa6ci+Kx4T99g/Ve5jcO5cLn+iTXAlTCeWp4ScegfytxG E35ojliZWMJK0xKCWijs8PEMX5DP53OZ1OErQLyRjr3PQ2PjTWfX/ZXQX06SEC0jS35xAY sbxY7zckbdXuon3FraMe/z8st6u55FeCSrFmsPGz7Tqto1lc6C0xT/EU5c23CpV7VXWzZa Wo/IA6KqsWMNLISBNuJqSjItIuce1zPW16a5duwLzoxE+CM5j6Kjmv7/gM+o6NMJI4Nxej cF5HsI2S2ijIm32ptVkXNUs3qOK5zh8ajFOMToSwNgyMaa8L3oWRBcB5IH97NQ== 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 4bRL8Q3jVtzk65; Tue, 24 Jun 2025 10:01:58 +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 55OA1wvt042178; Tue, 24 Jun 2025 10:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55OA1wms042175; Tue, 24 Jun 2025 10:01:58 GMT (envelope-from git) Date: Tue, 24 Jun 2025 10:01:58 GMT Message-Id: <202506241001.55OA1wms042175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 0b4c4833ee3e - main - ifnet: Eliminate unnecessary synchronization of the interface index in the link layer address 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b4c4833ee3eab0ce46b3bdbf054bca4b6bb7429 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0b4c4833ee3eab0ce46b3bdbf054bca4b6bb7429 commit 0b4c4833ee3eab0ce46b3bdbf054bca4b6bb7429 Author: Zhenlei Huang AuthorDate: 2025-06-24 10:01:18 +0000 Commit: Zhenlei Huang CommitDate: 2025-06-24 10:01:18 +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 --- sys/net/if.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 2363c48a24da..9048fcb0a16a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -930,21 +930,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);