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
This commit is contained in:
parent
f427703f16
commit
25c92cd2f6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user