From 3cc2fb32d75467ff959d192746f072453861c4eb Mon Sep 17 00:00:00 2001 From: Alexander Duyck Date: Fri, 6 Feb 2009 23:15:45 +0000 Subject: [PATCH] --- yaml --- r: 134327 b: refs/heads/master c: 83b7180d0da2a8ff92baa6a35f6871aeb74d9bec h: refs/heads/master i: 134325: 57f355babe0a3b3e2c053ad6815af308335de513 134323: 1196062e9323967aa4efa32c45d62fcd12929ba7 134319: a869175f954f8a14ac8d8084c5cc4d2ae10b45a9 v: v3 --- [refs] | 2 +- trunk/drivers/net/igb/igb_main.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 0467c16ce410..c185c6a8c0c6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: db76176215ec5af7a67386e0eacb5ea53e040f10 +refs/heads/master: 83b7180d0da2a8ff92baa6a35f6871aeb74d9bec diff --git a/trunk/drivers/net/igb/igb_main.c b/trunk/drivers/net/igb/igb_main.c index ec5855a10ffb..6ef0adb7a06d 100644 --- a/trunk/drivers/net/igb/igb_main.c +++ b/trunk/drivers/net/igb/igb_main.c @@ -543,6 +543,11 @@ static void igb_set_interrupt_capability(struct igb_adapter *adapter) int err; int numvecs, i; + /* Number of supported queues. */ + /* Having more queues than CPUs doesn't make sense. */ + adapter->num_rx_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus()); + adapter->num_tx_queues = min_t(u32, IGB_MAX_TX_QUEUES, num_online_cpus()); + numvecs = adapter->num_tx_queues + adapter->num_rx_queues + 1; adapter->msix_entries = kcalloc(numvecs, sizeof(struct msix_entry), GFP_KERNEL); @@ -1450,11 +1455,6 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter) adapter->max_frame_size = netdev->mtu + ETH_HLEN + ETH_FCS_LEN; adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN; - /* Number of supported queues. */ - /* Having more queues than CPUs doesn't make sense. */ - adapter->num_rx_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus()); - adapter->num_tx_queues = min_t(u32, IGB_MAX_TX_QUEUES, num_online_cpus()); - /* This call may decrease the number of queues depending on * interrupt mode. */ igb_set_interrupt_capability(adapter);