aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2014-10-24 23:24:34 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-11-11 09:02:00 -0500
commitcc0529271f23896208723e310fd75c2c88b3fd8c (patch)
tree037a8b55b9e2756d0e13c00501d379a1d9b1e4f6 /drivers/net/ethernet/intel
parentf8d4db35e870896dd7b2ba70a30f4dfc53c39472 (diff)
i40evf: don't use more queues than CPUs
It's kind of silly to configure and attempt to use a bunch of queue pairs when you're running on a single (virtual) CPU. Instead of unconditionally configuring all of the queues that the PF gives us, clamp the number of queue pairs to the number of CPUs. Change-ID: I321714c9e15072ee76de8f95ab9a81f86ed347d1 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Patrick Lu <patrick.lu@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf.h1
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c16
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c50
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c6
4 files changed, 41 insertions, 32 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h
index 30ef519d4b91..1113f8a2d3b6 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf.h
+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h
@@ -191,6 +191,7 @@ struct i40evf_adapter {
191 struct i40e_q_vector *q_vector[MAX_MSIX_Q_VECTORS]; 191 struct i40e_q_vector *q_vector[MAX_MSIX_Q_VECTORS];
192 struct list_head vlan_filter_list; 192 struct list_head vlan_filter_list;
193 char misc_vector_name[IFNAMSIZ + 9]; 193 char misc_vector_name[IFNAMSIZ + 9];
194 int num_active_queues;
194 195
195 /* TX */ 196 /* TX */
196 struct i40e_ring *tx_rings[I40E_MAX_VSI_QP]; 197 struct i40e_ring *tx_rings[I40E_MAX_VSI_QP];
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
index efee6b290c0f..876411c39ee0 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c
@@ -59,7 +59,7 @@ static const struct i40evf_stats i40evf_gstrings_stats[] = {
59#define I40EVF_GLOBAL_STATS_LEN ARRAY_SIZE(i40evf_gstrings_stats) 59#define I40EVF_GLOBAL_STATS_LEN ARRAY_SIZE(i40evf_gstrings_stats)
60#define I40EVF_QUEUE_STATS_LEN(_dev) \ 60#define I40EVF_QUEUE_STATS_LEN(_dev) \
61 (((struct i40evf_adapter *) \ 61 (((struct i40evf_adapter *) \
62 netdev_priv(_dev))->vsi_res->num_queue_pairs \ 62 netdev_priv(_dev))->num_active_queues \
63 * 2 * (sizeof(struct i40e_queue_stats) / sizeof(u64))) 63 * 2 * (sizeof(struct i40e_queue_stats) / sizeof(u64)))
64#define I40EVF_STATS_LEN(_dev) \ 64#define I40EVF_STATS_LEN(_dev) \
65 (I40EVF_GLOBAL_STATS_LEN + I40EVF_QUEUE_STATS_LEN(_dev)) 65 (I40EVF_GLOBAL_STATS_LEN + I40EVF_QUEUE_STATS_LEN(_dev))
@@ -121,11 +121,11 @@ static void i40evf_get_ethtool_stats(struct net_device *netdev,
121 p = (char *)adapter + i40evf_gstrings_stats[i].stat_offset; 121 p = (char *)adapter + i40evf_gstrings_stats[i].stat_offset;
122 data[i] = *(u64 *)p; 122 data[i] = *(u64 *)p;
123 } 123 }
124 for (j = 0; j < adapter->vsi_res->num_queue_pairs; j++) { 124 for (j = 0; j < adapter->num_active_queues; j++) {
125 data[i++] = adapter->tx_rings[j]->stats.packets; 125 data[i++] = adapter->tx_rings[j]->stats.packets;
126 data[i++] = adapter->tx_rings[j]->stats.bytes; 126 data[i++] = adapter->tx_rings[j]->stats.bytes;
127 } 127 }
128 for (j = 0; j < adapter->vsi_res->num_queue_pairs; j++) { 128 for (j = 0; j < adapter->num_active_queues; j++) {
129 data[i++] = adapter->rx_rings[j]->stats.packets; 129 data[i++] = adapter->rx_rings[j]->stats.packets;
130 data[i++] = adapter->rx_rings[j]->stats.bytes; 130 data[i++] = adapter->rx_rings[j]->stats.bytes;
131 } 131 }
@@ -151,13 +151,13 @@ static void i40evf_get_strings(struct net_device *netdev, u32 sset, u8 *data)
151 ETH_GSTRING_LEN); 151 ETH_GSTRING_LEN);
152 p += ETH_GSTRING_LEN; 152 p += ETH_GSTRING_LEN;
153 } 153 }
154 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 154 for (i = 0; i < adapter->num_active_queues; i++) {
155 snprintf(p, ETH_GSTRING_LEN, "tx-%u.packets", i); 155 snprintf(p, ETH_GSTRING_LEN, "tx-%u.packets", i);
156 p += ETH_GSTRING_LEN; 156 p += ETH_GSTRING_LEN;
157 snprintf(p, ETH_GSTRING_LEN, "tx-%u.bytes", i); 157 snprintf(p, ETH_GSTRING_LEN, "tx-%u.bytes", i);
158 p += ETH_GSTRING_LEN; 158 p += ETH_GSTRING_LEN;
159 } 159 }
160 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 160 for (i = 0; i < adapter->num_active_queues; i++) {
161 snprintf(p, ETH_GSTRING_LEN, "rx-%u.packets", i); 161 snprintf(p, ETH_GSTRING_LEN, "rx-%u.packets", i);
162 p += ETH_GSTRING_LEN; 162 p += ETH_GSTRING_LEN;
163 snprintf(p, ETH_GSTRING_LEN, "rx-%u.bytes", i); 163 snprintf(p, ETH_GSTRING_LEN, "rx-%u.bytes", i);
@@ -430,7 +430,7 @@ static int i40evf_get_rxnfc(struct net_device *netdev,
430 430
431 switch (cmd->cmd) { 431 switch (cmd->cmd) {
432 case ETHTOOL_GRXRINGS: 432 case ETHTOOL_GRXRINGS:
433 cmd->data = adapter->vsi_res->num_queue_pairs; 433 cmd->data = adapter->num_active_queues;
434 ret = 0; 434 ret = 0;
435 break; 435 break;
436 case ETHTOOL_GRXFH: 436 case ETHTOOL_GRXFH:
@@ -598,12 +598,12 @@ static void i40evf_get_channels(struct net_device *netdev,
598 struct i40evf_adapter *adapter = netdev_priv(netdev); 598 struct i40evf_adapter *adapter = netdev_priv(netdev);
599 599
600 /* Report maximum channels */ 600 /* Report maximum channels */
601 ch->max_combined = adapter->vsi_res->num_queue_pairs; 601 ch->max_combined = adapter->num_active_queues;
602 602
603 ch->max_other = NONQ_VECS; 603 ch->max_other = NONQ_VECS;
604 ch->other_count = NONQ_VECS; 604 ch->other_count = NONQ_VECS;
605 605
606 ch->combined_count = adapter->vsi_res->num_queue_pairs; 606 ch->combined_count = adapter->num_active_queues;
607} 607}
608 608
609/** 609/**
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index b2f01eb2f9e5..f0d07ad54198 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -397,8 +397,8 @@ static int i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter)
397 int q_vectors; 397 int q_vectors;
398 int v_start = 0; 398 int v_start = 0;
399 int rxr_idx = 0, txr_idx = 0; 399 int rxr_idx = 0, txr_idx = 0;
400 int rxr_remaining = adapter->vsi_res->num_queue_pairs; 400 int rxr_remaining = adapter->num_active_queues;
401 int txr_remaining = adapter->vsi_res->num_queue_pairs; 401 int txr_remaining = adapter->num_active_queues;
402 int i, j; 402 int i, j;
403 int rqpv, tqpv; 403 int rqpv, tqpv;
404 int err = 0; 404 int err = 0;
@@ -584,7 +584,7 @@ static void i40evf_configure_tx(struct i40evf_adapter *adapter)
584{ 584{
585 struct i40e_hw *hw = &adapter->hw; 585 struct i40e_hw *hw = &adapter->hw;
586 int i; 586 int i;
587 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) 587 for (i = 0; i < adapter->num_active_queues; i++)
588 adapter->tx_rings[i]->tail = hw->hw_addr + I40E_QTX_TAIL1(i); 588 adapter->tx_rings[i]->tail = hw->hw_addr + I40E_QTX_TAIL1(i);
589} 589}
590 590
@@ -629,7 +629,7 @@ static void i40evf_configure_rx(struct i40evf_adapter *adapter)
629 rx_buf_len = ALIGN(max_frame, 1024); 629 rx_buf_len = ALIGN(max_frame, 1024);
630 } 630 }
631 631
632 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 632 for (i = 0; i < adapter->num_active_queues; i++) {
633 adapter->rx_rings[i]->tail = hw->hw_addr + I40E_QRX_TAIL1(i); 633 adapter->rx_rings[i]->tail = hw->hw_addr + I40E_QRX_TAIL1(i);
634 adapter->rx_rings[i]->rx_buf_len = rx_buf_len; 634 adapter->rx_rings[i]->rx_buf_len = rx_buf_len;
635 } 635 }
@@ -918,7 +918,7 @@ static void i40evf_configure(struct i40evf_adapter *adapter)
918 i40evf_configure_rx(adapter); 918 i40evf_configure_rx(adapter);
919 adapter->aq_required |= I40EVF_FLAG_AQ_CONFIGURE_QUEUES; 919 adapter->aq_required |= I40EVF_FLAG_AQ_CONFIGURE_QUEUES;
920 920
921 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 921 for (i = 0; i < adapter->num_active_queues; i++) {
922 struct i40e_ring *ring = adapter->rx_rings[i]; 922 struct i40e_ring *ring = adapter->rx_rings[i];
923 i40evf_alloc_rx_buffers(ring, ring->count); 923 i40evf_alloc_rx_buffers(ring, ring->count);
924 ring->next_to_use = ring->count - 1; 924 ring->next_to_use = ring->count - 1;
@@ -950,7 +950,7 @@ static void i40evf_clean_all_rx_rings(struct i40evf_adapter *adapter)
950{ 950{
951 int i; 951 int i;
952 952
953 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) 953 for (i = 0; i < adapter->num_active_queues; i++)
954 i40evf_clean_rx_ring(adapter->rx_rings[i]); 954 i40evf_clean_rx_ring(adapter->rx_rings[i]);
955} 955}
956 956
@@ -962,7 +962,7 @@ static void i40evf_clean_all_tx_rings(struct i40evf_adapter *adapter)
962{ 962{
963 int i; 963 int i;
964 964
965 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) 965 for (i = 0; i < adapter->num_active_queues; i++)
966 i40evf_clean_tx_ring(adapter->tx_rings[i]); 966 i40evf_clean_tx_ring(adapter->tx_rings[i]);
967} 967}
968 968
@@ -1064,7 +1064,7 @@ static void i40evf_free_queues(struct i40evf_adapter *adapter)
1064 1064
1065 if (!adapter->vsi_res) 1065 if (!adapter->vsi_res)
1066 return; 1066 return;
1067 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 1067 for (i = 0; i < adapter->num_active_queues; i++) {
1068 if (adapter->tx_rings[i]) 1068 if (adapter->tx_rings[i])
1069 kfree_rcu(adapter->tx_rings[i], rcu); 1069 kfree_rcu(adapter->tx_rings[i], rcu);
1070 adapter->tx_rings[i] = NULL; 1070 adapter->tx_rings[i] = NULL;
@@ -1084,7 +1084,7 @@ static int i40evf_alloc_queues(struct i40evf_adapter *adapter)
1084{ 1084{
1085 int i; 1085 int i;
1086 1086
1087 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 1087 for (i = 0; i < adapter->num_active_queues; i++) {
1088 struct i40e_ring *tx_ring; 1088 struct i40e_ring *tx_ring;
1089 struct i40e_ring *rx_ring; 1089 struct i40e_ring *rx_ring;
1090 1090
@@ -1130,7 +1130,7 @@ static int i40evf_set_interrupt_capability(struct i40evf_adapter *adapter)
1130 err = -EIO; 1130 err = -EIO;
1131 goto out; 1131 goto out;
1132 } 1132 }
1133 pairs = adapter->vsi_res->num_queue_pairs; 1133 pairs = adapter->num_active_queues;
1134 1134
1135 /* It's easy to be greedy for MSI-X vectors, but it really 1135 /* It's easy to be greedy for MSI-X vectors, but it really
1136 * doesn't do us much good if we have a lot more vectors 1136 * doesn't do us much good if we have a lot more vectors
@@ -1210,7 +1210,7 @@ static void i40evf_free_q_vectors(struct i40evf_adapter *adapter)
1210 int napi_vectors; 1210 int napi_vectors;
1211 1211
1212 num_q_vectors = adapter->num_msix_vectors - NONQ_VECS; 1212 num_q_vectors = adapter->num_msix_vectors - NONQ_VECS;
1213 napi_vectors = adapter->vsi_res->num_queue_pairs; 1213 napi_vectors = adapter->num_active_queues;
1214 1214
1215 for (q_idx = 0; q_idx < num_q_vectors; q_idx++) { 1215 for (q_idx = 0; q_idx < num_q_vectors; q_idx++) {
1216 struct i40e_q_vector *q_vector = adapter->q_vector[q_idx]; 1216 struct i40e_q_vector *q_vector = adapter->q_vector[q_idx];
@@ -1265,8 +1265,8 @@ int i40evf_init_interrupt_scheme(struct i40evf_adapter *adapter)
1265 } 1265 }
1266 1266
1267 dev_info(&adapter->pdev->dev, "Multiqueue %s: Queue pair count = %u", 1267 dev_info(&adapter->pdev->dev, "Multiqueue %s: Queue pair count = %u",
1268 (adapter->vsi_res->num_queue_pairs > 1) ? "Enabled" : 1268 (adapter->num_active_queues > 1) ? "Enabled" :
1269 "Disabled", adapter->vsi_res->num_queue_pairs); 1269 "Disabled", adapter->num_active_queues);
1270 1270
1271 return 0; 1271 return 0;
1272err_alloc_queues: 1272err_alloc_queues:
@@ -1425,7 +1425,7 @@ static int next_queue(struct i40evf_adapter *adapter, int j)
1425{ 1425{
1426 j += 1; 1426 j += 1;
1427 1427
1428 return j >= adapter->vsi_res->num_queue_pairs ? 0 : j; 1428 return j >= adapter->num_active_queues ? 0 : j;
1429} 1429}
1430 1430
1431/** 1431/**
@@ -1446,9 +1446,14 @@ static void i40evf_configure_rss(struct i40evf_adapter *adapter)
1446 0xc135cafa, 0x7a6f7e2d, 0xe7102d28, 0x163cd12e, 1446 0xc135cafa, 0x7a6f7e2d, 0xe7102d28, 0x163cd12e,
1447 0x4954b126 }; 1447 0x4954b126 };
1448 1448
1449 /* Hash type is configured by the PF - we just supply the key */ 1449 /* No RSS for single queue. */
1450 if (adapter->num_active_queues == 1) {
1451 wr32(hw, I40E_VFQF_HENA(0), 0);
1452 wr32(hw, I40E_VFQF_HENA(1), 0);
1453 return;
1454 }
1450 1455
1451 /* Fill out hash function seed */ 1456 /* Hash type is configured by the PF - we just supply the key */
1452 for (i = 0; i <= I40E_VFQF_HKEY_MAX_INDEX; i++) 1457 for (i = 0; i <= I40E_VFQF_HKEY_MAX_INDEX; i++)
1453 wr32(hw, I40E_VFQF_HKEY(i), seed[i]); 1458 wr32(hw, I40E_VFQF_HKEY(i), seed[i]);
1454 1459
@@ -1458,7 +1463,7 @@ static void i40evf_configure_rss(struct i40evf_adapter *adapter)
1458 wr32(hw, I40E_VFQF_HENA(1), (u32)(hena >> 32)); 1463 wr32(hw, I40E_VFQF_HENA(1), (u32)(hena >> 32));
1459 1464
1460 /* Populate the LUT with max no. of queues in round robin fashion */ 1465 /* Populate the LUT with max no. of queues in round robin fashion */
1461 j = adapter->vsi_res->num_queue_pairs; 1466 j = adapter->num_active_queues;
1462 for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) { 1467 for (i = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++) {
1463 j = next_queue(adapter, j); 1468 j = next_queue(adapter, j);
1464 lut = j; 1469 lut = j;
@@ -1703,7 +1708,7 @@ static void i40evf_free_all_tx_resources(struct i40evf_adapter *adapter)
1703{ 1708{
1704 int i; 1709 int i;
1705 1710
1706 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) 1711 for (i = 0; i < adapter->num_active_queues; i++)
1707 if (adapter->tx_rings[i]->desc) 1712 if (adapter->tx_rings[i]->desc)
1708 i40evf_free_tx_resources(adapter->tx_rings[i]); 1713 i40evf_free_tx_resources(adapter->tx_rings[i]);
1709 1714
@@ -1723,7 +1728,7 @@ static int i40evf_setup_all_tx_resources(struct i40evf_adapter *adapter)
1723{ 1728{
1724 int i, err = 0; 1729 int i, err = 0;
1725 1730
1726 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 1731 for (i = 0; i < adapter->num_active_queues; i++) {
1727 adapter->tx_rings[i]->count = adapter->tx_desc_count; 1732 adapter->tx_rings[i]->count = adapter->tx_desc_count;
1728 err = i40evf_setup_tx_descriptors(adapter->tx_rings[i]); 1733 err = i40evf_setup_tx_descriptors(adapter->tx_rings[i]);
1729 if (!err) 1734 if (!err)
@@ -1751,7 +1756,7 @@ static int i40evf_setup_all_rx_resources(struct i40evf_adapter *adapter)
1751{ 1756{
1752 int i, err = 0; 1757 int i, err = 0;
1753 1758
1754 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) { 1759 for (i = 0; i < adapter->num_active_queues; i++) {
1755 adapter->rx_rings[i]->count = adapter->rx_desc_count; 1760 adapter->rx_rings[i]->count = adapter->rx_desc_count;
1756 err = i40evf_setup_rx_descriptors(adapter->rx_rings[i]); 1761 err = i40evf_setup_rx_descriptors(adapter->rx_rings[i]);
1757 if (!err) 1762 if (!err)
@@ -1774,7 +1779,7 @@ static void i40evf_free_all_rx_resources(struct i40evf_adapter *adapter)
1774{ 1779{
1775 int i; 1780 int i;
1776 1781
1777 for (i = 0; i < adapter->vsi_res->num_queue_pairs; i++) 1782 for (i = 0; i < adapter->num_active_queues; i++)
1778 if (adapter->rx_rings[i]->desc) 1783 if (adapter->rx_rings[i]->desc)
1779 i40evf_free_rx_resources(adapter->rx_rings[i]); 1784 i40evf_free_rx_resources(adapter->rx_rings[i]);
1780} 1785}
@@ -2150,6 +2155,9 @@ static void i40evf_init_task(struct work_struct *work)
2150 adapter->watchdog_timer.data = (unsigned long)adapter; 2155 adapter->watchdog_timer.data = (unsigned long)adapter;
2151 mod_timer(&adapter->watchdog_timer, jiffies + 1); 2156 mod_timer(&adapter->watchdog_timer, jiffies + 1);
2152 2157
2158 adapter->num_active_queues = min_t(int,
2159 adapter->vsi_res->num_queue_pairs,
2160 (int)(num_online_cpus()));
2153 adapter->tx_desc_count = I40EVF_DEFAULT_TXD; 2161 adapter->tx_desc_count = I40EVF_DEFAULT_TXD;
2154 adapter->rx_desc_count = I40EVF_DEFAULT_RXD; 2162 adapter->rx_desc_count = I40EVF_DEFAULT_RXD;
2155 err = i40evf_init_interrupt_scheme(adapter); 2163 err = i40evf_init_interrupt_scheme(adapter);
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index ff8676147c14..49bfdb5421c8 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -210,7 +210,7 @@ void i40evf_configure_queues(struct i40evf_adapter *adapter)
210{ 210{
211 struct i40e_virtchnl_vsi_queue_config_info *vqci; 211 struct i40e_virtchnl_vsi_queue_config_info *vqci;
212 struct i40e_virtchnl_queue_pair_info *vqpi; 212 struct i40e_virtchnl_queue_pair_info *vqpi;
213 int pairs = adapter->vsi_res->num_queue_pairs; 213 int pairs = adapter->num_active_queues;
214 int i, len; 214 int i, len;
215 215
216 if (adapter->current_op != I40E_VIRTCHNL_OP_UNKNOWN) { 216 if (adapter->current_op != I40E_VIRTCHNL_OP_UNKNOWN) {
@@ -276,7 +276,7 @@ void i40evf_enable_queues(struct i40evf_adapter *adapter)
276 } 276 }
277 adapter->current_op = I40E_VIRTCHNL_OP_ENABLE_QUEUES; 277 adapter->current_op = I40E_VIRTCHNL_OP_ENABLE_QUEUES;
278 vqs.vsi_id = adapter->vsi_res->vsi_id; 278 vqs.vsi_id = adapter->vsi_res->vsi_id;
279 vqs.tx_queues = (1 << adapter->vsi_res->num_queue_pairs) - 1; 279 vqs.tx_queues = (1 << adapter->num_active_queues) - 1;
280 vqs.rx_queues = vqs.tx_queues; 280 vqs.rx_queues = vqs.tx_queues;
281 adapter->aq_pending |= I40EVF_FLAG_AQ_ENABLE_QUEUES; 281 adapter->aq_pending |= I40EVF_FLAG_AQ_ENABLE_QUEUES;
282 adapter->aq_required &= ~I40EVF_FLAG_AQ_ENABLE_QUEUES; 282 adapter->aq_required &= ~I40EVF_FLAG_AQ_ENABLE_QUEUES;
@@ -302,7 +302,7 @@ void i40evf_disable_queues(struct i40evf_adapter *adapter)
302 } 302 }
303 adapter->current_op = I40E_VIRTCHNL_OP_DISABLE_QUEUES; 303 adapter->current_op = I40E_VIRTCHNL_OP_DISABLE_QUEUES;
304 vqs.vsi_id = adapter->vsi_res->vsi_id; 304 vqs.vsi_id = adapter->vsi_res->vsi_id;
305 vqs.tx_queues = (1 << adapter->vsi_res->num_queue_pairs) - 1; 305 vqs.tx_queues = (1 << adapter->num_active_queues) - 1;
306 vqs.rx_queues = vqs.tx_queues; 306 vqs.rx_queues = vqs.tx_queues;
307 adapter->aq_pending |= I40EVF_FLAG_AQ_DISABLE_QUEUES; 307 adapter->aq_pending |= I40EVF_FLAG_AQ_DISABLE_QUEUES;
308 adapter->aq_required &= ~I40EVF_FLAG_AQ_DISABLE_QUEUES; 308 adapter->aq_required &= ~I40EVF_FLAG_AQ_DISABLE_QUEUES;