summaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_dcb_nl.c
diff options
context:
space:
mode:
authorAlexander Duyck2011-05-20 09:36:17 +0200
committerJeff Kirsher2011-06-24 07:43:53 +0200
commit03ecf91aae757eeb70763a3393227c4597c87b23 (patch)
tree41beb67301a9d5a317c5e51b292f503d3a7291ec /drivers/net/ixgbe/ixgbe_dcb_nl.c
parentixgbe: remove ntuple filtering (diff)
downloadkernel-qcow2-linux-03ecf91aae757eeb70763a3393227c4597c87b23.tar.gz
kernel-qcow2-linux-03ecf91aae757eeb70763a3393227c4597c87b23.tar.xz
kernel-qcow2-linux-03ecf91aae757eeb70763a3393227c4597c87b23.zip
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_dcb_nl.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_dcb_nl.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c
index 08c7aebe99f5..bd2d75265389 100644
--- a/drivers/net/ixgbe/ixgbe_dcb_nl.c
+++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c
@@ -114,11 +114,12 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
u8 err = 0;
struct ixgbe_adapter *adapter = netdev_priv(netdev);
+ /* verify there is something to do, if not then exit */
+ if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
+ return err;
+
if (state > 0) {
/* Turn on DCB */
- if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
- goto out;
-
if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) {
e_err(drv, "Enable failed, needs MSI-X\n");
err = 1;
@@ -143,9 +144,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
ixgbe_setup_tc(netdev, MAX_TRAFFIC_CLASS);
} else {
/* Turn off DCB */
- if (!(adapter->flags & IXGBE_FLAG_DCB_ENABLED))
- goto out;
-
adapter->hw.fc.requested_mode = adapter->last_lfc_mode;
adapter->temp_dcb_cfg.pfc_mode_enable = false;
adapter->dcb_cfg.pfc_mode_enable = false;
@@ -153,7 +151,8 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
switch (adapter->hw.mac.type) {
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
- adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
+ if (!(adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE))
+ adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;
break;
default:
break;