linux/drivers/net/ixgbe
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
..
Makefile Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2010-01-23 00:31:06 -08:00
ixgbe.h ixgbe:add support for a new 82599 10G Base-T device 2010-05-20 23:07:06 -07:00
ixgbe_82598.c ixgbe:add support for a new 82599 10G Base-T device 2010-05-20 23:07:06 -07:00
ixgbe_82599.c ixgbe:add support for a new 82599 10G Base-T device 2010-05-20 23:07:06 -07:00
ixgbe_common.c ixgbe: return IXGBE_ERR_RAR_INDEX when out of range 2010-06-03 03:28:28 -07:00
ixgbe_common.h ixgbe: Refactor common code between 82598 & 82599 to accommodate new hardware 2010-05-13 21:07:34 -07:00
ixgbe_dcb.c ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_dcb.h ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_dcb_82598.c ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_dcb_82598.h ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_dcb_82599.c ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_dcb_82599.h ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_dcb_nl.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
ixgbe_ethtool.c ixgbe: fix automatic LRO/RSC settings for low latency 2010-06-13 18:20:53 -07:00
ixgbe_fcoe.c ixgbe: remove some redundant code in setting FCoE FIP filter 2010-05-18 19:44:18 -07:00
ixgbe_fcoe.h ixgbe: update copyright dates 2010-01-13 17:12:45 -08:00
ixgbe_main.c net: decreasing real_num_tx_queues needs to flush qdisc 2010-07-02 21:59:07 -07:00
ixgbe_mbx.c ixgbe: Mailbox header and code module 2010-01-10 13:34:24 -08:00
ixgbe_mbx.h ixgbe: Mailbox header and code module 2010-01-10 13:34:24 -08:00
ixgbe_phy.c ixgbe: add comment on SFP+ ID for Active DA 2010-06-16 14:47:30 -07:00
ixgbe_phy.h ixgbe:add support for a new 82599 10G Base-T device 2010-05-20 23:07:06 -07:00
ixgbe_sriov.c ixgbe: Streamline MC filter setup for VFs 2010-05-06 00:31:44 -07:00
ixgbe_sriov.h ixgbe: Add support for VF MAC and VLAN configuration 2010-05-05 21:15:33 -07:00
ixgbe_type.h ixgbe: return IXGBE_ERR_RAR_INDEX when out of range 2010-06-03 03:28:28 -07:00