summaryrefslogtreecommitdiffstats
path: root/sys/dev/ixgbe
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ixgbe')
-rw-r--r--sys/dev/ixgbe/if_ix.c25
-rw-r--r--sys/dev/ixgbe/if_ixv.c3
-rw-r--r--sys/dev/ixgbe/ix_txrx.c7
-rw-r--r--sys/dev/ixgbe/ixgbe.h3
4 files changed, 4 insertions, 34 deletions
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
index 65e868a..48ee76b 100644
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -718,9 +718,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);
}
@@ -1464,13 +1462,10 @@ ixgbe_handle_que(void *context, int pending)
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);
}
@@ -1513,13 +1508,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 */
@@ -1575,13 +1567,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? */
@@ -2398,9 +2387,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 */
@@ -2420,9 +2407,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);
@@ -2555,9 +2540,7 @@ ixgbe_allocate_msix(struct adapter *adapter)
#endif /* IXGBE_DEBUG */
-#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);
@@ -2840,15 +2823,15 @@ ixgbe_setup_interface(device_t dev, struct adapter *adapter)
ifp->if_hw_tsomaxsegcount = IXGBE_82599_SCATTER;
ifp->if_hw_tsomaxsegsize = 2048;
#endif
-#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 914f742..f47cf60 100644
--- a/sys/dev/ixgbe/if_ixv.c
+++ b/sys/dev/ixgbe/if_ixv.c
@@ -871,13 +871,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 9e90e0d..ef42714 100644
--- a/sys/dev/ixgbe/ix_txrx.c
+++ b/sys/dev/ixgbe/ix_txrx.c
@@ -102,7 +102,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
*
@@ -164,7 +163,6 @@ ixgbe_start(struct ifnet *ifp)
return;
}
-#else /* ! IXGBE_LEGACY_TX */
/*
** Multiqueue Transmit Entry Point
@@ -316,7 +314,6 @@ ixgbe_qflush(struct ifnet *ifp)
}
if_qflush(ifp);
}
-#endif /* IXGBE_LEGACY_TX */
/*********************************************************************
@@ -697,10 +694,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;
@@ -2187,7 +2182,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);
@@ -2197,7 +2191,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 558b532..008ced3 100644
--- a/sys/dev/ixgbe/ixgbe.h
+++ b/sys/dev/ixgbe/ixgbe.h
@@ -728,15 +728,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 *);
OpenPOWER on IntegriCloud