Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/ixgbe/if_ix.c
Show First 20 Lines • Show All 2,015 Lines • ▼ Show 20 Lines | if (adapter->feat_en & IXGBE_FEATURE_RSS) { | ||||
/* | /* | ||||
* The queue ID is used as the RSS layer bucket ID. | * The queue ID is used as the RSS layer bucket ID. | ||||
* We look up the queue ID -> RSS CPU ID and select | * We look up the queue ID -> RSS CPU ID and select | ||||
* that. | * that. | ||||
*/ | */ | ||||
cpu_id = rss_getcpu(i % rss_getnumbuckets()); | cpu_id = rss_getcpu(i % rss_getnumbuckets()); | ||||
} else { | } else { | ||||
/* | /* | ||||
* Bind the msix vector, and thus the | * Bind the MSI-X vector, and thus the | ||||
* rings to the corresponding cpu. | * rings to the corresponding cpu. | ||||
* | * | ||||
* This just happens to match the default RSS | * This just happens to match the default RSS | ||||
* round-robin bucket -> queue -> CPU allocation. | * round-robin bucket -> queue -> CPU allocation. | ||||
*/ | */ | ||||
if (adapter->num_rx_queues > 1) | if (adapter->num_rx_queues > 1) | ||||
cpu_id = i; | cpu_id = i; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,776 Lines • ▼ Show 20 Lines | |||||
************************************************************************/ | ************************************************************************/ | ||||
static void | static void | ||||
ixgbe_free_pci_resources(if_ctx_t ctx) | ixgbe_free_pci_resources(if_ctx_t ctx) | ||||
{ | { | ||||
struct adapter *adapter = iflib_get_softc(ctx); | struct adapter *adapter = iflib_get_softc(ctx); | ||||
struct ix_rx_queue *que = adapter->rx_queues; | struct ix_rx_queue *que = adapter->rx_queues; | ||||
device_t dev = iflib_get_dev(ctx); | device_t dev = iflib_get_dev(ctx); | ||||
/* Release all msix queue resources */ | /* Release all MSI-X queue resources */ | ||||
if (adapter->intr_type == IFLIB_INTR_MSIX) | if (adapter->intr_type == IFLIB_INTR_MSIX) | ||||
iflib_irq_free(ctx, &adapter->irq); | iflib_irq_free(ctx, &adapter->irq); | ||||
if (que != NULL) { | if (que != NULL) { | ||||
for (int i = 0; i < adapter->num_rx_queues; i++, que++) { | for (int i = 0; i < adapter->num_rx_queues; i++, que++) { | ||||
iflib_irq_free(ctx, &que->que_irq); | iflib_irq_free(ctx, &que->que_irq); | ||||
} | } | ||||
} | } | ||||
/* | |||||
* Free link/admin interrupt | |||||
*/ | |||||
if (adapter->pci_mem != NULL) | if (adapter->pci_mem != NULL) | ||||
bus_release_resource(dev, SYS_RES_MEMORY, | bus_release_resource(dev, SYS_RES_MEMORY, | ||||
PCIR_BAR(0), adapter->pci_mem); | rman_get_rid(adapter->pci_mem), adapter->pci_mem); | ||||
} /* ixgbe_free_pci_resources */ | } /* ixgbe_free_pci_resources */ | ||||
/************************************************************************ | /************************************************************************ | ||||
* ixgbe_sysctl_flowcntl | * ixgbe_sysctl_flowcntl | ||||
* | * | ||||
* SYSCTL wrapper around setting Flow Control | * SYSCTL wrapper around setting Flow Control | ||||
************************************************************************/ | ************************************************************************/ | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 719 Lines • Show Last 20 Lines |