From nobody Fri Sep 20 11:39:58 2024 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 4X99RM1l81z5Wf3t; Fri, 20 Sep 2024 11:39:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X99RL6r9Sz4lVn; Fri, 20 Sep 2024 11:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726832399; 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=9wnMn8n7PxKWHGY8vejlKAlw/Z9GFZJ6j/obOfsKWzc=; b=qBsuIXnxM2Jj1n8WJaU4xURkUW7lcwJbFk89oEHeJE/vcVXu3r/g1W9hnXI6T56FmE9ouc 8QAK55C8T2Q01FqGD3sqlLvql2aXk0CJVpLKsmlnKfRYmFJinOjrpo/r9CgU+ICeqTF//Z PQ7IofbzWkTjyUwqR1gWLnnUfK2g3NFnC2s8yco5A9DMnbg00JgcRCl/6RvzbF1xyTkIhu pjVR3zXHJGZ7ggec/w6mhe9yo63zaNE/bKdH7J4uCjXNcvhuyC8abehmnZ9eeBHBInyR16 fuesIrh2WnPvYRDpq3bfN0qy+WQj8NoSmql6XEkUTsgh08VyjFtE8dGn2QqOFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726832399; a=rsa-sha256; cv=none; b=TAYX3wo4QnLnl2fNO16PTt/NS+bfh8YcBu7vJlty1ilL2WOLxWtUveIdlapewWVaqZS4vj z6q5k9/kezL8gybvAgwsI/ciD38wKkluHx+KUkv0Pvz4j1UGQnmIGMBcL9YHu5PqzZZxAM EkiSdAoDtfRc3/M+ekNPJixU+ALmgK0E5ba+k4MvUmv3QMksSJ1bspOU3m+td372J4Qg3z hHta9FMTU+i3dkxnDqpFVy9/ClzQJxa/3vYkHGQAUUyxiwCfB+Vymd33hDpefhRocEuPyb IYZIorcIr1fvm0IiTLvzFTdHahcvsPFrLFp1mC6mL5rAH7p7tHHgERjYReSDyw== 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=1726832399; 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=9wnMn8n7PxKWHGY8vejlKAlw/Z9GFZJ6j/obOfsKWzc=; b=PQnDKpZgKCSEMzJ+j9wRPK0F8JZ379Uh7XJYpAfm1VBYNywMoHXdLO4tbcFdr8if5kyxvt n2npEsfRN1oI7L9tWhrVvnJ1mycbrGQ7Y6NI4MPepWUkL1V+jku901hDel/8ub/GtBNmw4 wV7JbHCmfahS0QXSEH987D5mRLTUffYC6y4ytgMXmDW2FF12bRKG+IWbDhRU4AmbMsHmvM GslGBAwTXf6PT1m7B03rfkHRmd6aJ2/UhZi5zMkL38f4xm1eMR2kGC1ArwMfyj2F1EGzJW ofe7pj2aY+b2opD0jNS0aa1BFVbheBtmHRcrd+UeYRGz3nUh3l+Gvr+fBIK6Ew== 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 4X99RL6Rq0zp2K; Fri, 20 Sep 2024 11:39: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 48KBdwgW004448; Fri, 20 Sep 2024 11:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48KBdwIF004445; Fri, 20 Sep 2024 11:39:58 GMT (envelope-from git) Date: Fri, 20 Sep 2024 11:39:58 GMT Message-Id: <202409201139.48KBdwIF004445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b513c311d0db - stable/14 - ifnet: Remove if_getamcount() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b513c311d0db5c301c939b1cf44b2826e09011d3 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b513c311d0db5c301c939b1cf44b2826e09011d3 commit b513c311d0db5c301c939b1cf44b2826e09011d3 Author: Mark Johnston AuthorDate: 2024-09-04 13:07:11 +0000 Commit: Mark Johnston CommitDate: 2024-09-20 11:39:16 +0000 ifnet: Remove if_getamcount() All uses of this function were incorrect. if_amcount is a reference count which tracks the number of times the network stack internally set IFF_ALLMULTI. (if_pcount is the corresponding counter for IFF_PROMISC.) Remove if_getamcount() and fix up callers to get the number of assigned multicast addresses instead, since that's what they actually want. Sponsored by: Klara, Inc. Reviewed by: zlei, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46523 (cherry picked from commit 408c909dc64f77d2696d6fec77a2e0b00255cf96) --- sys/dev/bxe/bxe.c | 2 +- sys/dev/liquidio/lio_ioctl.c | 2 +- sys/net/if.c | 6 ------ sys/net/if_var.h | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c index 05bc22c0c981..45e8f654c36a 100644 --- a/sys/dev/bxe/bxe.c +++ b/sys/dev/bxe/bxe.c @@ -12174,7 +12174,7 @@ bxe_set_rx_mode(struct bxe_softc *sc) if (if_getflags(ifp) & IFF_PROMISC) { rx_mode = BXE_RX_MODE_PROMISC; } else if ((if_getflags(ifp) & IFF_ALLMULTI) || - ((if_getamcount(ifp) > BXE_MAX_MULTICAST) && + (if_llmaddr_count(ifp) > BXE_MAX_MULTICAST && CHIP_IS_E1(sc))) { rx_mode = BXE_RX_MODE_ALLMULTI; } else { diff --git a/sys/dev/liquidio/lio_ioctl.c b/sys/dev/liquidio/lio_ioctl.c index 10c88b209051..b2fd54f59580 100644 --- a/sys/dev/liquidio/lio_ioctl.c +++ b/sys/dev/liquidio/lio_ioctl.c @@ -481,7 +481,7 @@ lio_get_new_flags(if_t ifp) * Accept all multicast addresses if there are more than we * can handle */ - if (if_getamcount(ifp) > LIO_MAX_MULTICAST_ADDR) + if (if_llmaddr_count(ifp) > LIO_MAX_MULTICAST_ADDR) f |= LIO_IFFLAG_ALLMULTI; } if (if_getflags(ifp) & IFF_BROADCAST) diff --git a/sys/net/if.c b/sys/net/if.c index 110ab73f2aad..9beac09d54c9 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -4783,12 +4783,6 @@ if_getifaddr(const if_t ifp) return (ifp->if_addr); } -int -if_getamcount(const if_t ifp) -{ - return (ifp->if_amcount); -} - int if_setsendqready(if_t ifp) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 48a503df7ffe..74692e916558 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -660,7 +660,6 @@ u_int if_lladdr_count(if_t); u_int if_llmaddr_count(if_t); bool if_maddr_empty(if_t); -int if_getamcount(const if_t ifp); struct ifaddr * if_getifaddr(const if_t ifp); typedef u_int if_addr_cb_t(void *, struct ifaddr *, u_int); u_int if_foreach_addr_type(if_t ifp, int type, if_addr_cb_t cb, void *cb_arg);