John Fastabend f0796d5c73 net: decreasing real_num_tx_queues needs to flush qdisc
Reducing real_num_queues needs to flush the qdisc otherwise
skbs with queue_mappings greater then real_num_tx_queues can
be sent to the underlying driver.

The flow for this is,

dev_queue_xmit()
	dev_pick_tx()
		skb_tx_hash()  => hash using real_num_tx_queues
		skb_set_queue_mapping()
	...
	qdisc_enqueue_root() => enqueue skb on txq from hash
...
dev->real_num_tx_queues -= n
...
sch_direct_xmit()
	dev_hard_start_xmit()
		ndo_start_xmit(skb,dev) => skb queue set with old hash

skbs are enqueued on the qdisc with skb->queue_mapping set
0 < queue_mappings < real_num_tx_queues.  When the driver
decreases real_num_tx_queues skb's may be dequeued from the
qdisc with a queue_mapping greater then real_num_tx_queues.

This fixes a case in ixgbe where this was occurring with DCB
and FCoE. Because the driver is using queue_mapping to map
skbs to tx descriptor rings we can potentially map skbs to
rings that no longer exist.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-02 21:59:07 -07:00
..
2010-06-01 00:09:22 -07:00
2010-04-14 16:11:33 -07:00
2010-05-10 05:01:31 -07:00
2010-06-13 18:20:53 -07:00
2010-05-10 05:01:31 -07:00
2010-04-14 16:11:33 -07:00
2010-05-17 22:55:10 -07:00
2010-06-04 16:14:48 -07:00
2009-09-01 01:13:50 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2009-04-04 16:51:14 -07:00
2009-08-12 23:03:00 -07:00
2010-02-17 13:35:44 -08:00
2010-02-17 13:35:44 -08:00
2009-11-05 20:00:29 -08:00
2010-04-23 00:10:52 -07:00
2010-02-26 02:10:14 -08:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 17:45:48 -07:00
2009-11-11 19:22:21 -08:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 22:47:34 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 22:55:10 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 22:47:34 -07:00
2010-03-18 21:14:00 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-21 13:40:25 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-04-22 15:48:17 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-17 17:44:36 -07:00
2010-05-10 05:01:31 -07:00
2009-04-29 17:32:34 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-23 14:37:04 -07:00
2010-05-17 22:47:34 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-04-14 16:11:33 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-05-10 05:01:31 -07:00
2010-06-01 00:21:20 -07:00