aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2011-05-20 03:36:17 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2011-06-24 01:43:53 -0400
commit03ecf91aae757eeb70763a3393227c4597c87b23 (patch)
tree41beb67301a9d5a317c5e51b292f503d3a7291ec /drivers/net/ixgbe/ixgbe_main.c
parentb29a21694f7d12e40537e1e587ec47725849769b (diff)
ixgbe: fix flags relating to perfect filters to support coexistence
I am removing the requirement that Ntuple filters have the same number of queues and requirements as ATR. As a result this change will make it so that all the Ntuple flag does is disable ATR for now. This change fixes an issue in which we were incorrectly re-enabling ATR when we exited perfect filter mode. This was due to the fact that the logic assumed RSS and DCB were mutually exclusive which is no longer the case. To correct this we just need to add a check to guarantee DCB is disabled before re-enabling ATR. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c34
1 files changed, 12 insertions, 22 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 4cd66ae70ccc..5483b9c3e2c0 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1555,9 +1555,8 @@ static void ixgbe_configure_msix(struct ixgbe_adapter *adapter)
1555 q_vector->eitr = adapter->rx_eitr_param; 1555 q_vector->eitr = adapter->rx_eitr_param;
1556 1556
1557 ixgbe_write_eitr(q_vector); 1557 ixgbe_write_eitr(q_vector);
1558 /* If Flow Director is enabled, set interrupt affinity */ 1558 /* If ATR is enabled, set interrupt affinity */
1559 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || 1559 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
1560 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) {
1561 /* 1560 /*
1562 * Allocate the affinity_hint cpumask, assign the mask 1561 * Allocate the affinity_hint cpumask, assign the mask
1563 * for this vector, and set our affinity_hint for 1562 * for this vector, and set our affinity_hint for
@@ -2468,8 +2467,7 @@ static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter, bool queues,
2468 default: 2467 default:
2469 break; 2468 break;
2470 } 2469 }
2471 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || 2470 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
2472 adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)
2473 mask |= IXGBE_EIMS_FLOW_DIR; 2471 mask |= IXGBE_EIMS_FLOW_DIR;
2474 2472
2475 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask); 2473 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
@@ -3767,8 +3765,6 @@ static void ixgbe_configure(struct ixgbe_adapter *adapter)
3767 adapter->tx_ring[i]->atr_sample_rate = 3765 adapter->tx_ring[i]->atr_sample_rate =
3768 adapter->atr_sample_rate; 3766 adapter->atr_sample_rate;
3769 ixgbe_init_fdir_signature_82599(hw, adapter->fdir_pballoc); 3767 ixgbe_init_fdir_signature_82599(hw, adapter->fdir_pballoc);
3770 } else if (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE) {
3771 ixgbe_init_fdir_perfect_82599(hw, adapter->fdir_pballoc);
3772 } 3768 }
3773 ixgbe_configure_virtualization(adapter); 3769 ixgbe_configure_virtualization(adapter);
3774 3770
@@ -4334,15 +4330,13 @@ static inline bool ixgbe_set_fdir_queues(struct ixgbe_adapter *adapter)
4334 f_fdir->mask = 0; 4330 f_fdir->mask = 0;
4335 4331
4336 /* Flow Director must have RSS enabled */ 4332 /* Flow Director must have RSS enabled */
4337 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED && 4333 if ((adapter->flags & IXGBE_FLAG_RSS_ENABLED) &&
4338 ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE || 4334 (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)) {
4339 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)))) {
4340 adapter->num_tx_queues = f_fdir->indices; 4335 adapter->num_tx_queues = f_fdir->indices;
4341 adapter->num_rx_queues = f_fdir->indices; 4336 adapter->num_rx_queues = f_fdir->indices;
4342 ret = true; 4337 ret = true;
4343 } else { 4338 } else {
4344 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE; 4339 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
4345 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
4346 } 4340 }
4347 return ret; 4341 return ret;
4348} 4342}
@@ -4372,12 +4366,12 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter)
4372 4366
4373 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 4367 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
4374 e_info(probe, "FCoE enabled with RSS\n"); 4368 e_info(probe, "FCoE enabled with RSS\n");
4375 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || 4369 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
4376 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
4377 ixgbe_set_fdir_queues(adapter); 4370 ixgbe_set_fdir_queues(adapter);
4378 else 4371 else
4379 ixgbe_set_rss_queues(adapter); 4372 ixgbe_set_rss_queues(adapter);
4380 } 4373 }
4374
4381 /* adding FCoE rx rings to the end */ 4375 /* adding FCoE rx rings to the end */
4382 f->mask = adapter->num_rx_queues; 4376 f->mask = adapter->num_rx_queues;
4383 adapter->num_rx_queues += f->indices; 4377 adapter->num_rx_queues += f->indices;
@@ -4670,9 +4664,8 @@ static inline bool ixgbe_cache_ring_fdir(struct ixgbe_adapter *adapter)
4670 int i; 4664 int i;
4671 bool ret = false; 4665 bool ret = false;
4672 4666
4673 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED && 4667 if ((adapter->flags & IXGBE_FLAG_RSS_ENABLED) &&
4674 ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || 4668 (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)) {
4675 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))) {
4676 for (i = 0; i < adapter->num_rx_queues; i++) 4669 for (i = 0; i < adapter->num_rx_queues; i++)
4677 adapter->rx_ring[i]->reg_idx = i; 4670 adapter->rx_ring[i]->reg_idx = i;
4678 for (i = 0; i < adapter->num_tx_queues; i++) 4671 for (i = 0; i < adapter->num_tx_queues; i++)
@@ -4701,8 +4694,7 @@ static inline bool ixgbe_cache_ring_fcoe(struct ixgbe_adapter *adapter)
4701 return false; 4694 return false;
4702 4695
4703 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { 4696 if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) {
4704 if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || 4697 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE)
4705 (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
4706 ixgbe_cache_ring_fdir(adapter); 4698 ixgbe_cache_ring_fdir(adapter);
4707 else 4699 else
4708 ixgbe_cache_ring_rss(adapter); 4700 ixgbe_cache_ring_rss(adapter);
@@ -4882,14 +4874,12 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
4882 4874
4883 adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; 4875 adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
4884 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED; 4876 adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
4885 if (adapter->flags & (IXGBE_FLAG_FDIR_HASH_CAPABLE | 4877 if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) {
4886 IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) {
4887 e_err(probe, 4878 e_err(probe,
4888 "Flow Director is not supported while multiple " 4879 "ATR is not supported while multiple "
4889 "queues are disabled. Disabling Flow Director\n"); 4880 "queues are disabled. Disabling Flow Director\n");
4890 } 4881 }
4891 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE; 4882 adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
4892 adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
4893 adapter->atr_sample_rate = 0; 4883 adapter->atr_sample_rate = 0;
4894 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) 4884 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
4895 ixgbe_disable_sriov(adapter); 4885 ixgbe_disable_sriov(adapter);