From: David Miller <davem@davemloft.net>
To: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org, gospo@redhat.com, bphilips@novell.com,
john.r.fastabend@intel.com
Subject: Re: [net-2.6 PATCH 2/2] net: decreasing real_num_tx_queues needs to flush qdisc
Date: Fri, 02 Jul 2010 21:59:57 -0700 (PDT) [thread overview]
Message-ID: <20100702.215957.189703365.davem@davemloft.net> (raw)
In-Reply-To: <20100701232156.15685.69551.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 01 Jul 2010 16:21:57 -0700
> From: John Fastabend <john.r.fastabend@intel.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@intel.com>
> Tested-by: Ross Brattain <ross.b.brattain@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
next prev parent reply other threads:[~2010-07-03 4:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-01 23:21 [net-2.6 PATCH 1/2] sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock Jeff Kirsher
2010-07-01 23:21 ` [net-2.6 PATCH 2/2] net: decreasing real_num_tx_queues needs to flush qdisc Jeff Kirsher
2010-07-03 4:59 ` David Miller [this message]
2010-07-03 4:59 ` [net-2.6 PATCH 1/2] sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100702.215957.189703365.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bphilips@novell.com \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).