aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/if_re_netmap.h
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2023-01-12 18:38:37 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2023-02-14 15:21:19 +0000
commite330262f34fc179ce920c16bb28ba8a1c4a73aff (patch)
treea69292f7d6c730557ee6ba2ee8c427594587e789 /sys/dev/netmap/if_re_netmap.h
parent4366ea339ddb0945d94a646fc991ff293c6ec526 (diff)
Diffstat (limited to 'sys/dev/netmap/if_re_netmap.h')
-rw-r--r--sys/dev/netmap/if_re_netmap.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/netmap/if_re_netmap.h b/sys/dev/netmap/if_re_netmap.h
index 7c356ab4bd22..d658a3e5c8a7 100644
--- a/sys/dev/netmap/if_re_netmap.h
+++ b/sys/dev/netmap/if_re_netmap.h
@@ -47,8 +47,8 @@
static int
re_netmap_reg(struct netmap_adapter *na, int onoff)
{
- struct ifnet *ifp = na->ifp;
- struct rl_softc *adapter = ifp->if_softc;
+ if_t ifp = na->ifp;
+ struct rl_softc *adapter = if_getsoftc(ifp);
RL_LOCK(adapter);
re_stop(adapter); /* also clears IFF_DRV_RUNNING */
@@ -59,7 +59,7 @@ re_netmap_reg(struct netmap_adapter *na, int onoff)
}
re_init_locked(adapter); /* also enables intr */
RL_UNLOCK(adapter);
- return (ifp->if_drv_flags & IFF_DRV_RUNNING ? 0 : 1);
+ return (if_getdrvflags(ifp) & IFF_DRV_RUNNING ? 0 : 1);
}
@@ -70,7 +70,7 @@ static int
re_netmap_txsync(struct netmap_kring *kring, int flags)
{
struct netmap_adapter *na = kring->na;
- struct ifnet *ifp = na->ifp;
+ if_t ifp = na->ifp;
struct netmap_ring *ring = kring->ring;
u_int nm_i; /* index into the netmap ring */
u_int nic_i; /* index into the NIC ring */
@@ -79,7 +79,7 @@ re_netmap_txsync(struct netmap_kring *kring, int flags)
u_int const head = kring->rhead;
/* device-specific */
- struct rl_softc *sc = ifp->if_softc;
+ struct rl_softc *sc = if_getsoftc(ifp);
struct rl_txdesc *txd = sc->rl_ldata.rl_tx_desc;
bus_dmamap_sync(sc->rl_ldata.rl_tx_list_tag,
@@ -172,7 +172,7 @@ static int
re_netmap_rxsync(struct netmap_kring *kring, int flags)
{
struct netmap_adapter *na = kring->na;
- struct ifnet *ifp = na->ifp;
+ if_t ifp = na->ifp;
struct netmap_ring *ring = kring->ring;
u_int nm_i; /* index into the netmap ring */
u_int nic_i; /* index into the NIC ring */
@@ -181,7 +181,7 @@ re_netmap_rxsync(struct netmap_kring *kring, int flags)
int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR;
/* device-specific */
- struct rl_softc *sc = ifp->if_softc;
+ struct rl_softc *sc = if_getsoftc(ifp);
struct rl_rxdesc *rxd = sc->rl_ldata.rl_rx_desc;
if (head > lim)