From 25c92cd2f6d1421a980fda70bd2b045efab65d8f Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Mon, 6 Mar 2023 11:38:05 -0500 Subject: [PATCH] iflib: Further convert to use IfAPI accessors Summary: When iflib was first converted some IfAPI APIs were not yet present, so were tagged with "XXX" comments. Finish the conversion by using these new APIs. Reviewed by: gallatin, erj Sponsored by: Juniper Networks, Inc Differential Revision: https://reviews.freebsd.org/D38928 --- sys/net/iflib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 807ada5eb754..aa16e5d5492b 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2890,7 +2890,7 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) static void iflib_get_ip_forwarding(struct lro_ctrl *lc, bool *v4, bool *v6) { - CURVNET_SET(lc->ifp->if_vnet); /* XXX - DRVAPI */ + CURVNET_SET(if_getvnet(lc->ifp)); #if defined(INET6) *v6 = V_ip6_forwarding; #endif @@ -2980,7 +2980,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) } /* pfil needs the vnet to be set */ - CURVNET_SET_QUIET(ifp->if_vnet); /* XXX - DRVAPI */ + CURVNET_SET_QUIET(if_getvnet(ifp)); for (budget_left = budget; budget_left > 0 && avail > 0;) { if (__predict_false(!CTX_ACTIVE(ctx))) { DBG_COUNTER_INC(rx_ctx_inactive); @@ -4103,7 +4103,7 @@ _task_fn_tx(void *context) goto skip_ifmp; #endif #ifdef ALTQ - if (ALTQ_IS_ENABLED(&ifp->if_snd)) /* XXX - DRVAPI */ + if (if_altq_is_enabled(ifp)) iflib_altq_if_start(ifp); #endif if (txq->ift_db_pending) @@ -4315,7 +4315,7 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) else if (ctx->isc_txq_select) qidx = ctx->isc_txq_select(ctx->ifc_softc, m); /* If not, use iflib's standard method */ - else if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m) && !ALTQ_IS_ENABLED(&ifp->if_snd)) + else if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m) && !if_altq_is_enabled(ifp)) qidx = QIDX(ctx, m); /* Set TX queue */ @@ -4420,7 +4420,7 @@ iflib_altq_if_transmit(if_t ifp, struct mbuf *m) { int err; - if (ALTQ_IS_ENABLED(&ifp->if_snd)) { /* XXX - DRVAPI */ + if (if_altq_is_enabled(ifp)) { IFQ_ENQUEUE(&ifp->if_snd, m, err); /* XXX - DRVAPI */ if (err == 0) iflib_altq_if_start(ifp);