diff options
author | John Fastabend <john.r.fastabend@intel.com> | 2012-01-27 20:22:35 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-02-09 04:27:41 -0500 |
commit | 5facb8e0c4dc1c8c47b71fd7f376defe16185733 (patch) | |
tree | a6a24fd9586d8c74ef665f1a9c01366f51059082 /drivers | |
parent | 9d837ea2b72321ffbdaf83c980923d23ae898baa (diff) |
ixgbe: dcb: up2tc mapping lost on disable/enable CEE DCB state
Users expect the up2tc mapping to be maintained across a DCB
enable/disable/enable transition. And since we maintain all
the other DCB attributes we should do this for up2tc mappings
as well just to be consistent. Also without this we break
user space applications that expect this to occur that
previously worked.
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@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')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c index 005e5f25600d..79a92fe987b9 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c | |||
@@ -112,6 +112,8 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev) | |||
112 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | 112 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) |
113 | { | 113 | { |
114 | u8 err = 0; | 114 | u8 err = 0; |
115 | u8 prio_tc[MAX_USER_PRIORITY] = {0}; | ||
116 | int i; | ||
115 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 117 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
116 | 118 | ||
117 | /* Fail command if not in CEE mode */ | 119 | /* Fail command if not in CEE mode */ |
@@ -122,10 +124,15 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
122 | if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) | 124 | if (!!state != !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) |
123 | return err; | 125 | return err; |
124 | 126 | ||
125 | if (state > 0) | 127 | if (state > 0) { |
126 | err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs); | 128 | err = ixgbe_setup_tc(netdev, adapter->dcb_cfg.num_tcs.pg_tcs); |
127 | else | 129 | ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc); |
130 | } else { | ||
128 | err = ixgbe_setup_tc(netdev, 0); | 131 | err = ixgbe_setup_tc(netdev, 0); |
132 | } | ||
133 | |||
134 | for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) | ||
135 | netdev_set_prio_tc_map(netdev, i, prio_tc[i]); | ||
129 | 136 | ||
130 | return err; | 137 | return err; |
131 | } | 138 | } |