Skip to content

Commit 56a12ac

Browse files
edumazetgregkh
authored andcommitted
net: revert 8728c54 ("net: dev_pick_tx() fix")
[ Upstream commit 702821f ] commit 8728c54 ("net: dev_pick_tx() fix") and commit b6fe83e ("bonding: refine IFF_XMIT_DST_RELEASE capability") are quite incompatible : Queue selection is disabled because skb dst was dropped before entering bonding device. This causes major performance regression, mainly because TCP packets for a given flow can be sent to multiple queues. This is particularly visible when using the new FQ packet scheduler with MQ + FQ setup on the slaves. We can safely revert the first commit now that 416186f ("net: Split core bits of netdev_pick_tx into __netdev_pick_tx") properly caps the queue_index. Reported-by: Xi Wang <xii@google.com> Diagnosed-by: Xi Wang <xii@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Tom Herbert <therbert@google.com> Cc: Alexander Duyck <alexander.h.duyck@intel.com> Cc: Denys Fedorysychenko <nuclearcat@nuclearcat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8db07b8 commit 56a12ac

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎net/core/flow_dissector.c‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,9 @@ u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)
345345
if (new_index < 0)
346346
new_index = skb_tx_hash(dev, skb);
347347

348-
if (queue_index != new_index && sk) {
349-
struct dst_entry *dst =
350-
rcu_dereference_check(sk->sk_dst_cache, 1);
351-
352-
if (dst && skb_dst(skb) == dst)
353-
sk_tx_queue_set(sk, queue_index);
354-
355-
}
348+
if (queue_index != new_index && sk &&
349+
rcu_access_pointer(sk->sk_dst_cache))
350+
sk_tx_queue_set(sk, queue_index);
356351

357352
queue_index = new_index;
358353
}

0 commit comments

Comments
 (0)