Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixgbe/ixgbe.c
Show First 20 Lines • Show All 2,367 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
ixgbe_allocate_msix(struct adapter *adapter) | ixgbe_allocate_msix(struct adapter *adapter) | ||||
{ | { | ||||
device_t dev = adapter->dev; | device_t dev = adapter->dev; | ||||
struct ix_queue *que = adapter->queues; | struct ix_queue *que = adapter->queues; | ||||
struct tx_ring *txr = adapter->tx_rings; | struct tx_ring *txr = adapter->tx_rings; | ||||
int error, rid, vector = 0; | int error, rid, vector = 0; | ||||
int cpu_id = 0; | int cpu_id = 0; | ||||
#ifdef RSS | |||||
cpuset_t cpu_mask; | |||||
#endif | |||||
#ifdef RSS | #ifdef RSS | ||||
/* | /* | ||||
* If we're doing RSS, the number of queues needs to | * If we're doing RSS, the number of queues needs to | ||||
* match the number of RSS buckets that are configured. | * match the number of RSS buckets that are configured. | ||||
* | * | ||||
* + If there's more queues than RSS buckets, we'll end | * + If there's more queues than RSS buckets, we'll end | ||||
* up with queues that get no traffic. | * up with queues that get no traffic. | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
#ifndef IXGBE_LEGACY_TX | #ifndef IXGBE_LEGACY_TX | ||||
TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); | TASK_INIT(&txr->txq_task, 0, ixgbe_deferred_mq_start, txr); | ||||
#endif | #endif | ||||
TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); | TASK_INIT(&que->que_task, 0, ixgbe_handle_que, que); | ||||
que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, | que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT, | ||||
taskqueue_thread_enqueue, &que->tq); | taskqueue_thread_enqueue, &que->tq); | ||||
#ifdef RSS | #ifdef RSS | ||||
taskqueue_start_threads_pinned(&que->tq, 1, PI_NET, | CPU_ZERO(&cpu_mask); | ||||
cpu_id, | CPU_SET(cpu_id, &cpu_mask); | ||||
taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET, | |||||
&cpu_mask, | |||||
"%s (bucket %d)", | "%s (bucket %d)", | ||||
device_get_nameunit(adapter->dev), | device_get_nameunit(adapter->dev), | ||||
cpu_id); | cpu_id); | ||||
#else | #else | ||||
taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", | taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", | ||||
device_get_nameunit(adapter->dev)); | device_get_nameunit(adapter->dev)); | ||||
#endif | #endif | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,586 Lines • Show Last 20 Lines |