From nobody Fri Jul 24 16:01:18 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 4h6CQl0xrkz6mLbD for ; Fri, 24 Jul 2026 16:01:19 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h6CQk5pxTz3b9q for ; Fri, 24 Jul 2026 16:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784908878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0+qoHzH8zq+HNxqhoQhxeOxLTGOKcv5FgXDm+Ww1yqc=; b=vpxaZJl9OhaWChyMVmM2YtqgfBFOgahfBhFKczqHoMDuanXfdju6N2NPOOZzQI4Q4egmEe LB1/gF7Oj9/xVafshBranPbk41ixkCBqmxFX3a9tTeOhEZOEbUcdvilewAObrFyd4D2lwX 8YWSTu3K57k2LqjUyZkxjmEJ+nfM31ai+eGKsVlzpEPswXKXwnw5r9w6PLSv19fVoBMDrG qdu4r6/Z1cwF8eU2eO/3DWqpxeKVwB/aGPnG5sFGqc5m6azwWaR2mKrzjOT0Mt+Wtn2Zj9 mXyd/CXRhPyOGD7ltXokLelPK6R40I7nTxKs7odB/Ne6oamWcCV3RvwgMPUSuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784908878; a=rsa-sha256; cv=none; b=i3amnxqXEa36qDFC8jebMMLvuDpbjVRvhcuoEm/7IgQnT9DUo2zfzYZSRqM4gmgcq4d4lu Bv06zd0RQb7ly+SurpkNM/7CTYjX/v8sy9MvUSS4lGh9vSdQZJ4DPZzvRxGY5wZy+lIvQN 3V6nzmu4DQqpgKDhafBEpdqPKgi3W8L00NFue6G/hLoMFr159OK+FTJFep/asqVrURKlsT Gkrm2Fnq/9OwCxs64xVIYNdJZFC1AtK8285auP7Agrf7JHd7meF8QHFeefkpYmlxSX/d1L HT0yyBExa9Z7jr/p22rhRg4hJwKdjSon26MwdM8bfoXAKSI/vwRi+54tkIWNuQ== 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=1784908878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0+qoHzH8zq+HNxqhoQhxeOxLTGOKcv5FgXDm+Ww1yqc=; b=J8jguyKweSYxOZDSYyA/ant00QGoUoe86jPkIag79QyUMHdpVNJWRYtbWCtUZkNZNDcCHl GzAcA+v//Ororgn4H4SA1iGMuj0feolDgZId0+iRmJZqS+ccuNdeln45vN4QwGMk6aJS86 QppoPpp6YlsdFRU3DLewp/RwSxpZml5W24MoDFQGBHpGBh91Cdi5mlosjWrcQGMpMMlRpg d2XpBU9wef9cc6y0lgj3XdNd2WrlgUiTqe4luDy39LPthmDppVKjbXihChVqfoRxhbmWsy RpttDqfZzwf5lUakWgcxZlylWsn4DxJshIu+uzyCaVCkBnzkX8HK+71RSUcGVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4h6CQk4q33zxx8 for ; Fri, 24 Jul 2026 16:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c5e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 24 Jul 2026 16:01:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Olivier Cochard From: Ed Maste Subject: git: c9ee056af737 - stable/15 - aq(4): Port to IfAPI 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c9ee056af737e79e1748a430f091aefb1ba31b90 Auto-Submitted: auto-generated Date: Fri, 24 Jul 2026 16:01:18 +0000 Message-Id: <6a638c4e.3c5e5.431f0793@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c9ee056af737e79e1748a430f091aefb1ba31b90 commit c9ee056af737e79e1748a430f091aefb1ba31b90 Author: Olivier Cochard AuthorDate: 2025-11-13 03:17:03 +0000 Commit: Ed Maste CommitDate: 2026-07-24 16:00:18 +0000 aq(4): Port to IfAPI Direct access to struct ifnet members is not possible in FreeBSD 15; accessors must be used. These exist in all supported FreeBSD versions, so we do not need to make this conditional. (cherry picked from commit 4756f5ff8f10cdda925cab60c0b66606698e49ee) --- sys/dev/aq/aq_main.c | 16 ++++++++-------- sys/dev/aq/aq_media.c | 12 ++++++------ sys/dev/aq/aq_ring.c | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/dev/aq/aq_main.c b/sys/dev/aq/aq_main.c index 299ed79f9094..7345c7cc2d03 100644 --- a/sys/dev/aq/aq_main.c +++ b/sys/dev/aq/aq_main.c @@ -379,7 +379,7 @@ static int aq_if_attach_pre(if_ctx_t ctx) #else if_t ifp; ifp = iflib_get_ifp(ctx); - ifp->if_capenable = IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_HWCSUM | IFCAP_TSO | + if_setcapenable(ifp, IFCAP_RXCSUM | IFCAP_TXCSUM | IFCAP_HWCSUM | IFCAP_TSO | IFCAP_JUMBO_MTU | IFCAP_VLAN_HWFILTER | IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWCSUM; @@ -718,7 +718,7 @@ static void aq_if_stop(if_ctx_t ctx) static uint64_t aq_if_get_counter(if_ctx_t ctx, ift_counter cnt) { struct aq_dev *softc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); switch (cnt) { case IFCOUNTER_IERRORS: @@ -776,7 +776,7 @@ static bool aq_is_mc_promisc_required(struct aq_dev *softc) static void aq_if_multi_set(if_ctx_t ctx) { struct aq_dev *softc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); struct aq_hw *hw = &softc->hw; AQ_DBG_ENTER(); #if __FreeBSD_version >= 1300054 @@ -786,9 +786,9 @@ static void aq_if_multi_set(if_ctx_t ctx) #endif if (softc->mcnt >= AQ_HW_MAC_MAX) { - aq_hw_set_promisc(hw, !!(ifp->if_flags & IFF_PROMISC), + aq_hw_set_promisc(hw, !!(if_getflags(ifp) & IFF_PROMISC), aq_is_vlan_promisc_required(softc), - !!(ifp->if_flags & IFF_ALLMULTI) || aq_is_mc_promisc_required(softc)); + !!(if_getflags(ifp) & IFF_ALLMULTI) || aq_is_mc_promisc_required(softc)); }else{ #if __FreeBSD_version >= 1300054 if_foreach_llmaddr(iflib_get_ifp(ctx), &aq_mc_filter_apply, softc); @@ -810,7 +810,7 @@ static int aq_if_mtu_set(if_ctx_t ctx, uint32_t mtu) static void aq_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) { - struct ifnet *ifp; + if_t ifp; AQ_DBG_ENTER(); @@ -824,13 +824,13 @@ static void aq_if_media_status(if_ctx_t ctx, struct ifmediareq *ifmr) static int aq_if_media_change(if_ctx_t ctx) { struct aq_dev *softc = iflib_get_softc(ctx); - struct ifnet *ifp = iflib_get_ifp(ctx); + if_t ifp = iflib_get_ifp(ctx); int rc = 0; AQ_DBG_ENTER(); /* Not allowd in UP state, since causes unsync of rings */ - if ((ifp->if_flags & IFF_UP)){ + if ((if_getflags(ifp) & IFF_UP)){ rc = EPERM; goto exit; } diff --git a/sys/dev/aq/aq_media.c b/sys/dev/aq/aq_media.c index 914d3d3eb940..fdf7ef38d2dc 100644 --- a/sys/dev/aq/aq_media.c +++ b/sys/dev/aq/aq_media.c @@ -94,9 +94,9 @@ void aq_mediastatus_update(aq_dev_t *aq_dev, u32 link_speed, const struct aq_hw_ aq_dev->media_active |= IFM_AUTO; } -void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) +void aq_mediastatus(if_t ifp, struct ifmediareq *ifmr) { - aq_dev_t *aq_dev = iflib_get_softc(ifp->if_softc); + aq_dev_t *aq_dev = iflib_get_softc(if_getsoftc(ifp)); ifmr->ifm_active = IFM_ETHER; ifmr->ifm_status = IFM_AVALID; @@ -107,11 +107,11 @@ void aq_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr) ifmr->ifm_active |= aq_dev->media_active; } -int aq_mediachange(struct ifnet *ifp) +int aq_mediachange(if_t ifp) { - aq_dev_t *aq_dev = iflib_get_softc(ifp->if_softc); + aq_dev_t *aq_dev = iflib_get_softc(if_getsoftc(ifp)); struct aq_hw *hw = &aq_dev->hw; - int old_media_rate = ifp->if_baudrate; + int old_media_rate = if_getbaudrate(ifp); int old_link_speed = hw->link_rate; struct ifmedia *ifm = iflib_get_media(aq_dev->ctx); int user_media = IFM_SUBTYPE(ifm->ifm_media); @@ -169,7 +169,7 @@ int aq_mediachange(struct ifnet *ifp) hw->fc.fc_tx = (ifm->ifm_media & IFM_ETH_TXPAUSE) ? 1 : 0; /* In down state just remember new link speed */ - if (!(ifp->if_flags & IFF_UP)) + if (!(if_getflags(ifp) & IFF_UP)) return (0); if ((media_rate != old_media_rate) || (hw->link_rate != old_link_speed)) { diff --git a/sys/dev/aq/aq_ring.c b/sys/dev/aq/aq_ring.c index 1de52ed0fc79..e20527b8c7c2 100644 --- a/sys/dev/aq/aq_ring.c +++ b/sys/dev/aq/aq_ring.c @@ -331,7 +331,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) aq_dev_t *aq_dev = arg; struct aq_ring *ring = aq_dev->rx_rings[ri->iri_qsidx]; aq_rx_desc_t *rx_desc; - struct ifnet *ifp; + if_t ifp; int cidx, rc = 0, i; size_t len, total_len; @@ -370,7 +370,7 @@ static int aq_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri) cidx = aq_next(cidx, ring->rx_size - 1); } while (!rx_desc->wb.eop); - if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) { + if ((if_getcapenable(ifp) & IFCAP_RXCSUM) != 0) { aq_rx_set_cso_flags(rx_desc, ri); } ri->iri_rsstype = bsd_rss_type[rx_desc->wb.rss_type & 0xF];