==== //depot/user/bms/netdev/sys/dev/ixgb/if_ixgb.c#2 - /home/bms/p4/netdev/sys/dev/ixgb/if_ixgb.c ==== --- /tmp/tmp.25114.0 Thu Mar 15 08:49:51 2007 +++ /home/bms/p4/netdev/sys/dev/ixgb/if_ixgb.c Thu Mar 15 08:49:14 2007 @@ -459,15 +459,15 @@ if (!adapter->link_active) return; - while (ifp->if_snd.ifq_head != NULL) { - IF_DEQUEUE(&ifp->if_snd, m_head); + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { + IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); if (m_head == NULL) break; if (ixgb_encap(adapter, m_head)) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; - IF_PREPEND(&ifp->if_snd, m_head); + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); break; } /* Send a copy of the frame to the BPF listener */ @@ -769,7 +769,7 @@ ixgb_process_receive_interrupts(adapter, count); ixgb_clean_transmit_interrupts(adapter); - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgb_start_locked(ifp); } @@ -851,7 +851,8 @@ IXGB_WRITE_REG(&adapter->hw, IMC, IXGB_INT_RXDMT0); IXGB_WRITE_REG(&adapter->hw, IMS, IXGB_INT_RXDMT0); } - if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_snd.ifq_head != NULL) + if (ifp->if_drv_flags & IFF_DRV_RUNNING && + !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgb_start_locked(ifp); IXGB_UNLOCK(adapter); @@ -1359,7 +1360,10 @@ ifp->if_ioctl = ixgb_ioctl; ifp->if_start = ixgb_start; ifp->if_watchdog = ixgb_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);