diff options
Diffstat (limited to 'drivers/net/macvtap.c')
-rw-r--r-- | drivers/net/macvtap.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 7c88d136e723..58dc117a8d78 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -175,6 +175,14 @@ static struct macvtap_queue *macvtap_get_queue(struct net_device *dev, | |||
175 | if (!numvtaps) | 175 | if (!numvtaps) |
176 | goto out; | 176 | goto out; |
177 | 177 | ||
178 | /* Check if we can use flow to select a queue */ | ||
179 | rxq = skb_get_rxhash(skb); | ||
180 | if (rxq) { | ||
181 | tap = rcu_dereference(vlan->taps[rxq % numvtaps]); | ||
182 | if (tap) | ||
183 | goto out; | ||
184 | } | ||
185 | |||
178 | if (likely(skb_rx_queue_recorded(skb))) { | 186 | if (likely(skb_rx_queue_recorded(skb))) { |
179 | rxq = skb_get_rx_queue(skb); | 187 | rxq = skb_get_rx_queue(skb); |
180 | 188 | ||
@@ -186,14 +194,6 @@ static struct macvtap_queue *macvtap_get_queue(struct net_device *dev, | |||
186 | goto out; | 194 | goto out; |
187 | } | 195 | } |
188 | 196 | ||
189 | /* Check if we can use flow to select a queue */ | ||
190 | rxq = skb_get_rxhash(skb); | ||
191 | if (rxq) { | ||
192 | tap = rcu_dereference(vlan->taps[rxq % numvtaps]); | ||
193 | if (tap) | ||
194 | goto out; | ||
195 | } | ||
196 | |||
197 | /* Everything failed - find first available queue */ | 197 | /* Everything failed - find first available queue */ |
198 | for (rxq = 0; rxq < MAX_MACVTAP_QUEUES; rxq++) { | 198 | for (rxq = 0; rxq < MAX_MACVTAP_QUEUES; rxq++) { |
199 | tap = rcu_dereference(vlan->taps[rxq]); | 199 | tap = rcu_dereference(vlan->taps[rxq]); |