diff options
author | mlaier <mlaier@FreeBSD.org> | 2004-07-02 12:16:02 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2004-07-02 12:16:02 +0000 |
commit | 7bc770a2546e8a5f93ee931634d4064b3b6e08f2 (patch) | |
tree | 65f0224543a217107b8c639eebd90136c5b1386d /sys/dev/em | |
parent | 1ddf2fdcc0eaea7a1f7848fe9957f173c396c23c (diff) | |
download | FreeBSD-src-7bc770a2546e8a5f93ee931634d4064b3b6e08f2.zip FreeBSD-src-7bc770a2546e8a5f93ee931634d4064b3b6e08f2.tar.gz |
Bring in the first chunk of altq driver modifications. This covers the
following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4),
sis(4) and xl(4)
More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take
a look and tell me if "your" driver is missing, so I can fix this.
Tested-by: many
No-objection: -current, -net
Diffstat (limited to 'sys/dev/em')
-rw-r--r-- | sys/dev/em/if_em.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/em/if_em.c b/sys/dev/em/if_em.c index 47eb067..28aafa4 100644 --- a/sys/dev/em/if_em.c +++ b/sys/dev/em/if_em.c @@ -610,15 +610,15 @@ em_start_locked(struct ifnet *ifp) if (!adapter->link_active) return; - while (ifp->if_snd.ifq_head != NULL) { + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - IF_DEQUEUE(&ifp->if_snd, m_head); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; if (em_encap(adapter, m_head)) { ifp->if_flags |= IFF_OACTIVE; - IF_PREPEND(&ifp->if_snd, m_head); + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); break; } @@ -918,7 +918,7 @@ em_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) em_clean_transmit_interrupts(adapter); } - if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head != NULL) + if (ifp->if_flags & IFF_RUNNING && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp); } @@ -988,7 +988,7 @@ em_intr(void *arg) loop_cnt--; } - if (ifp->if_flags & IFF_RUNNING && ifp->if_snd.ifq_head != NULL) + if (ifp->if_flags & IFF_RUNNING && IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp); EM_UNLOCK(adapter); @@ -1854,7 +1854,9 @@ em_setup_interface(device_t dev, struct adapter * adapter) ifp->if_ioctl = em_ioctl; ifp->if_start = em_start; ifp->if_watchdog = em_watchdog; - ifp->if_snd.ifq_maxlen = adapter->num_tx_desc - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 1); + ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 1; + IFQ_SET_READY(&ifp->if_snd); #if __FreeBSD_version < 500000 ether_ifattach(ifp, ETHER_BPF_SUPPORTED); |