diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-03-21 16:40:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-21 16:40:01 -0400 |
commit | 09a3b1f8b1af7220fd7a3caf18e6841a7f5a6c6e (patch) | |
tree | 55030dcdce17a2b0954bf8539ecb0cb884c247d9 /drivers | |
parent | 9247744e5eaa29aecee5342a0c8694187a6aadcd (diff) |
ixgbe: fix select_queue management
Convert ixgbe to use net_device_ops properly.
Rather than changing the select_queue function pointer
just check the flag.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 8 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index 087cf886f2af..8a9939ee2927 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -102,12 +102,6 @@ static u8 ixgbe_dcbnl_get_state(struct net_device *netdev) | |||
102 | return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED); | 102 | return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED); |
103 | } | 103 | } |
104 | 104 | ||
105 | static u16 ixgbe_dcb_select_queue(struct net_device *dev, struct sk_buff *skb) | ||
106 | { | ||
107 | /* All traffic should default to class 0 */ | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | 105 | static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) |
112 | { | 106 | { |
113 | u8 err = 0; | 107 | u8 err = 0; |
@@ -135,7 +129,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
135 | kfree(adapter->rx_ring); | 129 | kfree(adapter->rx_ring); |
136 | adapter->tx_ring = NULL; | 130 | adapter->tx_ring = NULL; |
137 | adapter->rx_ring = NULL; | 131 | adapter->rx_ring = NULL; |
138 | netdev->select_queue = &ixgbe_dcb_select_queue; | ||
139 | 132 | ||
140 | adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED; | 133 | adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED; |
141 | adapter->flags |= IXGBE_FLAG_DCB_ENABLED; | 134 | adapter->flags |= IXGBE_FLAG_DCB_ENABLED; |
@@ -154,7 +147,6 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
154 | kfree(adapter->rx_ring); | 147 | kfree(adapter->rx_ring); |
155 | adapter->tx_ring = NULL; | 148 | adapter->tx_ring = NULL; |
156 | adapter->rx_ring = NULL; | 149 | adapter->rx_ring = NULL; |
157 | netdev->select_queue = NULL; | ||
158 | 150 | ||
159 | adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; | 151 | adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED; |
160 | adapter->flags |= IXGBE_FLAG_RSS_ENABLED; | 152 | adapter->flags |= IXGBE_FLAG_RSS_ENABLED; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 0956be7c7488..79aa811c403c 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -4321,6 +4321,16 @@ static int ixgbe_maybe_stop_tx(struct net_device *netdev, | |||
4321 | return __ixgbe_maybe_stop_tx(netdev, tx_ring, size); | 4321 | return __ixgbe_maybe_stop_tx(netdev, tx_ring, size); |
4322 | } | 4322 | } |
4323 | 4323 | ||
4324 | static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | ||
4325 | { | ||
4326 | struct ixgbe_adapter *adapter = netdev_priv(dev); | ||
4327 | |||
4328 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) | ||
4329 | return 0; /* All traffic should default to class 0 */ | ||
4330 | |||
4331 | return skb_tx_hash(dev, skb); | ||
4332 | } | ||
4333 | |||
4324 | static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | 4334 | static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev) |
4325 | { | 4335 | { |
4326 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 4336 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
@@ -4450,6 +4460,7 @@ static const struct net_device_ops ixgbe_netdev_ops = { | |||
4450 | .ndo_open = ixgbe_open, | 4460 | .ndo_open = ixgbe_open, |
4451 | .ndo_stop = ixgbe_close, | 4461 | .ndo_stop = ixgbe_close, |
4452 | .ndo_start_xmit = ixgbe_xmit_frame, | 4462 | .ndo_start_xmit = ixgbe_xmit_frame, |
4463 | .ndo_select_queue = ixgbe_select_queue, | ||
4453 | .ndo_get_stats = ixgbe_get_stats, | 4464 | .ndo_get_stats = ixgbe_get_stats, |
4454 | .ndo_set_rx_mode = ixgbe_set_rx_mode, | 4465 | .ndo_set_rx_mode = ixgbe_set_rx_mode, |
4455 | .ndo_set_multicast_list = ixgbe_set_rx_mode, | 4466 | .ndo_set_multicast_list = ixgbe_set_rx_mode, |