diff options
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r-- | sys/dev/ixgbe/if_ix.c | 25 | ||||
-rw-r--r-- | sys/dev/ixgbe/if_ixv.c | 3 | ||||
-rw-r--r-- | sys/dev/ixgbe/ix_txrx.c | 7 | ||||
-rw-r--r-- | sys/dev/ixgbe/ixgbe.h | 3 |
4 files changed, 4 insertions, 34 deletions
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index c2bf573..a2e71e1 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -621,9 +621,7 @@ ixgbe_detach(device_t dev) for (int i = 0; i < adapter->num_queues; i++, que++, txr++) { if (que->tq) { -#ifndef IXGBE_LEGACY_TX taskqueue_drain(que->tq, &txr->txq_task); -#endif taskqueue_drain(que->tq, &que->que_task); taskqueue_free(que->tq); } @@ -1282,13 +1280,10 @@ ixgbe_handle_que(void *context, int pending) more = ixgbe_rxeof(que); IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#ifndef IXGBE_LEGACY_TX if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#else if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#endif IXGBE_TX_UNLOCK(txr); } @@ -1331,13 +1326,10 @@ ixgbe_legacy_irq(void *arg) IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#ifdef IXGBE_LEGACY_TX if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#else if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#endif IXGBE_TX_UNLOCK(txr); /* Check for fan failure */ @@ -1392,13 +1384,10 @@ ixgbe_msix_que(void *arg) IXGBE_TX_LOCK(txr); ixgbe_txeof(txr); -#ifdef IXGBE_LEGACY_TX - if (!IFQ_DRV_IS_EMPTY(ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#else if (!drbr_empty(ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#endif IXGBE_TX_UNLOCK(txr); /* Do AIM now? */ @@ -2137,9 +2126,7 @@ ixgbe_allocate_legacy(struct adapter *adapter) { device_t dev = adapter->dev; struct ix_queue *que = adapter->queues; -#ifndef IXGBE_LEGACY_TX struct tx_ring *txr = adapter->tx_rings; -#endif int error, rid = 0; /* MSI RID at 1 */ @@ -2159,9 +2146,7 @@ ixgbe_allocate_legacy(struct adapter *adapter) * Try allocating a fast interrupt and the associated deferred * processing contexts. */ -#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); -#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2249,9 +2234,7 @@ ixgbe_allocate_msix(struct adapter *adapter) if (adapter->num_queues > 1) bus_bind_intr(dev, que->res, cpu_id); -#ifndef IXGBE_LEGACY_TX TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); -#endif TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); @@ -2509,15 +2492,15 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter) ifp->if_hw_tsomax = 65518; ifp->if_hw_tsomaxsegcount = IXGBE_82599_SCATTER; ifp->if_hw_tsomaxsegsize = 2048; -#ifndef IXGBE_LEGACY_TX + ifp->if_transmit = ixgbe_mq_start; ifp->if_qflush = ixgbe_qflush; -#else + ifp->if_start = ixgbe_start; IFQ_SET_MAXLEN(&ifp->if_snd, adapter->num_tx_desc - 2); ifp->if_snd.ifq_drv_maxlen = adapter->num_tx_desc - 2; IFQ_SET_READY(&ifp->if_snd); -#endif + ether_ifattach(ifp, adapter->hw.mac.addr); diff --git a/sys/dev/ixgbe/if_ixv.c b/sys/dev/ixgbe/if_ixv.c index a550a85..fbcf948 100644 --- a/sys/dev/ixgbe/if_ixv.c +++ b/sys/dev/ixgbe/if_ixv.c @@ -809,13 +809,10 @@ ixv_msix_que(void *arg) ** has anything queued the task gets ** scheduled to handle it. */ -#ifdef IXGBE_LEGACY_TX if (!IFQ_DRV_IS_EMPTY(&adapter->ifp->if_snd)) ixgbe_start_locked(txr, ifp); -#else if (!drbr_empty(adapter->ifp, txr->br)) ixgbe_mq_start_locked(ifp, txr); -#endif IXGBE_TX_UNLOCK(txr); /* Do AIM now? */ diff --git a/sys/dev/ixgbe/ix_txrx.c b/sys/dev/ixgbe/ix_txrx.c index 35c1ddd..1c35b8e 100644 --- a/sys/dev/ixgbe/ix_txrx.c +++ b/sys/dev/ixgbe/ix_txrx.c @@ -118,7 +118,6 @@ static __inline void ixgbe_rx_discard(struct rx_ring *, int); static __inline void ixgbe_rx_input(struct rx_ring *, struct ifnet *, struct mbuf *, u32); -#ifdef IXGBE_LEGACY_TX /********************************************************************* * Transmit entry point * @@ -180,7 +179,6 @@ ixgbe_start(struct ifnet *ifp) return; } -#else /* ! IXGBE_LEGACY_TX */ /* ** Multiqueue Transmit driver @@ -318,7 +316,6 @@ ixgbe_qflush(struct ifnet *ifp) } if_qflush(ifp); } -#endif /* IXGBE_LEGACY_TX */ /********************************************************************* @@ -698,10 +695,8 @@ ixgbe_free_transmit_buffers(struct tx_ring *txr) tx_buffer->map = NULL; } } -#ifdef IXGBE_LEGACY_TX if (txr->br != NULL) buf_ring_free(txr->br, M_DEVBUF); -#endif if (txr->tx_buffers != NULL) { free(txr->tx_buffers, M_DEVBUF); txr->tx_buffers = NULL; @@ -2160,7 +2155,6 @@ ixgbe_allocate_queues(struct adapter *adapter) error = ENOMEM; goto err_tx_desc; } -#ifndef IXGBE_LEGACY_TX /* Allocate a buf ring */ txr->br = buf_ring_alloc(IXGBE_BR_SIZE, M_DEVBUF, M_WAITOK, &txr->tx_mtx); @@ -2170,7 +2164,6 @@ ixgbe_allocate_queues(struct adapter *adapter) error = ENOMEM; goto err_tx_desc; } -#endif } /* diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index a28bdc8..6f220f9 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -646,15 +646,12 @@ ixv_check_ether_addr(u8 *addr) /* Shared Prototypes */ -#ifdef IXGBE_LEGACY_TX void ixgbe_start(struct ifnet *); void ixgbe_start_locked(struct tx_ring *, struct ifnet *); -#else /* ! IXGBE_LEGACY_TX */ int ixgbe_mq_start(struct ifnet *, struct mbuf *); int ixgbe_mq_start_locked(struct ifnet *, struct tx_ring *); void ixgbe_qflush(struct ifnet *); void ixgbe_deferred_mq_start(void *, int); -#endif /* IXGBE_LEGACY_TX */ int ixgbe_allocate_queues(struct adapter *); int ixgbe_allocate_transmit_buffers(struct tx_ring *); |