From nobody Sat Mar 11 16:43:23 2023 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 4PYpdR6PcSz3xqPG; Sat, 11 Mar 2023 16:43:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PYpdR5dTJz3QVl; Sat, 11 Mar 2023 16:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678553003; 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=v4MjbYJzdS3VQvitt9BNe46wX5caqtn7KKyjdSoMVxU=; b=RRRATddaDbMejlKCO6P0CAtf5QT/AjPDsCDlrPxcvt0+JbHfF6rbwkJsD0gCcM7V8h+48p S4a9zjMRMzL9FSq5ogZ7P7aTzhVJQ4wQJdrGilAlloKWHPDgD+FY7szUB/eGf6h88FFSxG 48I2Sr2IxcWnGFjFATiouzK+iGnFhPd5qs+pALqOJmuGeZ2lR8oconG9ixC3Kjxitu2xVP +3dcW5jyjJCBJ3wKrQrQTaEIFOVhVOESXp22mss4H7T32fDD0ydX3KT2//YyknayU3OqOk BwlW7j2kDRyR3CO2aTC3h4gX6P9kzHEuf/6bjit7Ml8CPrtinqKeEmiK1mQh+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678553003; 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=v4MjbYJzdS3VQvitt9BNe46wX5caqtn7KKyjdSoMVxU=; b=njXN4cQ9+yECkPclm19y/LYnn2BTjzkRxFzslv3/f005UmBnNWmlfXeX3vw/NphZSKo2ke /i4QNoeXnfUXAHMjmn03OCWhKymvayfxkM8vxwepBwqdM7TAqAtJ2O3yqybGxgu+bLTo8l IBsoYvfImlj0zJHLRMS2P3JIiab7B92o+xN7NwLpboj8PwE2K0yy2u5No/stE2m/HYpYNM MXJ7z6y2MWpHRPhPQnVyRajoBe/ZSvbpTD8Be7eojq/RzUg36NMq1ZVSrVfSeuesdlXMx0 jPUUoRQ7sMi+eWo0bcb/z7g6VfBnYKVSBw9EOOLom7ww+G6LF7S8TGf4XyspiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678553003; a=rsa-sha256; cv=none; b=nSdnKlJbzkqu/L5zk6teKnPYWQvBEwp3m/4wL8Y51JUeD2TDdh5Wa3Y8ZTl7JyPLnorGph /AyKywvDhWC6B7cGX9aN0qtTfnqm3lGBy4Gcxfeg7MfRmzdKXNTyrkr0mnlUfgbtQh8HaN TgSw1uuM6vE9UrgOq2EmyVhsQuPSC0fe18n0QBNZW4Rsjwbenq2QTPGMAyxeAFOuTcY2m9 TtgDPkn8nIcIQBd0r/ndBmUYPsxpJnb7HWg2hyyT5JNkwT31RI3hkfftyCmReQWLd2twlf dpNd47KJOY/wYX7PALNYkb2WXU3iOUjwpjAMeCjHwCNk1oHMQQBUcSXjBbL3DA== 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 4PYpdR4PDgzd8p; Sat, 11 Mar 2023 16:43:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32BGhNkh087279; Sat, 11 Mar 2023 16:43:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32BGhNbC087278; Sat, 11 Mar 2023 16:43:23 GMT (envelope-from git) Date: Sat, 11 Mar 2023 16:43:23 GMT Message-Id: <202303111643.32BGhNbC087278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 1510005c94b8 - main - dtsec: Complete mechanical conversion 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1510005c94b81671545128b9b6c3357df859dc54 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=1510005c94b81671545128b9b6c3357df859dc54 commit 1510005c94b81671545128b9b6c3357df859dc54 Author: Justin Hibbits AuthorDate: 2023-03-07 20:41:38 +0000 Commit: Justin Hibbits CommitDate: 2023-03-11 16:34:42 +0000 dtsec: Complete mechanical conversion to IfAPI Some changes were missed in 0083fc5c76. Sponsored by: Juniper Networks, Inc. --- sys/dev/dpaa/if_dtsec.c | 8 ++++---- sys/dev/dpaa/if_dtsec_im.c | 8 ++++---- sys/dev/dpaa/if_dtsec_rm.c | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/dev/dpaa/if_dtsec.c b/sys/dev/dpaa/if_dtsec.c index cc34c2cbb416..877611c6cebe 100644 --- a/sys/dev/dpaa/if_dtsec.c +++ b/sys/dev/dpaa/if_dtsec.c @@ -359,7 +359,7 @@ dtsec_if_enable_locked(struct dtsec_softc *sc) if (error != E_OK) return (EIO); - sc->sc_ifnet->if_drv_flags |= IFF_DRV_RUNNING; + if_setdrvflagbits(sc->sc_ifnet, IFF_DRV_RUNNING, 0); /* Refresh link state */ dtsec_miibus_statchg(sc->sc_dev); @@ -386,7 +386,7 @@ dtsec_if_disable_locked(struct dtsec_softc *sc) if (error != E_OK) return (EIO); - sc->sc_ifnet->if_drv_flags &= ~IFF_DRV_RUNNING; + if_setdrvflagbits(sc->sc_ifnet, 0, IFF_DRV_RUNNING); return (0); } @@ -415,7 +415,7 @@ dtsec_if_ioctl(if_t ifp, u_long command, caddr_t data) case SIOCSIFFLAGS: DTSEC_LOCK(sc); - if (sc->sc_ifnet->if_flags & IFF_UP) + if (if_getflags(sc->sc_ifnet) & IFF_UP) error = dtsec_if_enable_locked(sc); else error = dtsec_if_disable_locked(sc); @@ -482,7 +482,7 @@ dtsec_if_init_locked(struct dtsec_softc *sc) if (sc->sc_mii) callout_reset(&sc->sc_tick_callout, hz, dtsec_if_tick, sc); - if (sc->sc_ifnet->if_flags & IFF_UP) { + if (if_getflags(sc->sc_ifnet) & IFF_UP) { error = dtsec_if_enable_locked(sc); if (error != 0) goto err; diff --git a/sys/dev/dpaa/if_dtsec_im.c b/sys/dev/dpaa/if_dtsec_im.c index cae0499c282b..2b25b935b657 100644 --- a/sys/dev/dpaa/if_dtsec_im.c +++ b/sys/dev/dpaa/if_dtsec_im.c @@ -77,7 +77,7 @@ dtsec_im_fm_port_rx_callback(t_Handle app, uint8_t *data, uint16_t length, m = m_devget(data, length, 0, sc->sc_ifnet, NULL); if (m) - (*sc->sc_ifnet->if_input)(sc->sc_ifnet, m); + if_input(sc->sc_ifnet, m); XX_FreeSmart(data); @@ -234,11 +234,11 @@ dtsec_im_if_start_locked(struct dtsec_softc *sc) if ((sc->sc_mii->mii_media_status & IFM_ACTIVE) == 0) return; - if ((sc->sc_ifnet->if_drv_flags & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) + if ((if_getdrvflags(sc->sc_ifnet) & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) return; - while (!IFQ_DRV_IS_EMPTY(&sc->sc_ifnet->if_snd)) { - IFQ_DRV_DEQUEUE(&sc->sc_ifnet->if_snd, m); + while (!if_sendq_empty(sc->sc_ifnet)) { + m = if_dequeue(sc->sc_ifnet); if (m == NULL) break; diff --git a/sys/dev/dpaa/if_dtsec_rm.c b/sys/dev/dpaa/if_dtsec_rm.c index d42973915b6b..73e75de65174 100644 --- a/sys/dev/dpaa/if_dtsec_rm.c +++ b/sys/dev/dpaa/if_dtsec_rm.c @@ -389,7 +389,7 @@ dtsec_rm_fqr_rx_callback(t_Handle app, t_Handle fqr, t_Handle portal, m->m_len = DPAA_FD_GET_LENGTH(frame); m_fixhdr(m); - (*sc->sc_ifnet->if_input)(sc->sc_ifnet, m); + if_input(sc->sc_ifnet, m); return (e_RX_STORE_RESPONSE_CONTINUE); @@ -555,10 +555,10 @@ dtsec_rm_if_start_locked(struct dtsec_softc *sc) if ((sc->sc_mii->mii_media_status & IFM_ACTIVE) == 0) return; - if ((sc->sc_ifnet->if_drv_flags & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) + if ((if_getdrvflags(sc->sc_ifnet) & IFF_DRV_RUNNING) != IFF_DRV_RUNNING) return; - while (!IFQ_DRV_IS_EMPTY(&sc->sc_ifnet->if_snd)) { + while (!if_sendq_empty(sc->sc_ifnet)) { /* Check length of the TX queue */ qlen = qman_fqr_get_counter(sc->sc_tx_fqr, 0, e_QM_FQR_COUNTERS_FRAME); @@ -572,7 +572,7 @@ dtsec_rm_if_start_locked(struct dtsec_softc *sc) if (fi == NULL) return; - IFQ_DRV_DEQUEUE(&sc->sc_ifnet->if_snd, m0); + m0 = if_dequeue(sc->sc_ifnet); if (m0 == NULL) { dtsec_rm_fi_free(sc, fi); return;