[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20100702.215957.189703365.davem@davemloft.net>
Date: Fri, 02 Jul 2010 21:59:57 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jeffrey.t.kirsher@...el.com
Cc: netdev@...r.kernel.org, gospo@...hat.com, bphilips@...ell.com,
john.r.fastabend@...el.com
Subject: Re: [net-2.6 PATCH 2/2] net: decreasing real_num_tx_queues needs
to flush qdisc
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Date: Thu, 01 Jul 2010 16:21:57 -0700
> From: John Fastabend <john.r.fastabend@...el.com>
>
> 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@...el.com>
> Tested-by: Ross Brattain <ross.b.brattain@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists