public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: therbert@google.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: Allocate RX and TX queues in alloc_netdev_mq
Date: Thu, 28 Oct 2010 10:49:42 -0700 (PDT)	[thread overview]
Message-ID: <20101028.104942.179929434.davem@davemloft.net> (raw)
In-Reply-To: <alpine.DEB.1.00.1010281036350.22486@pokey.mtv.corp.google.com>

From: Tom Herbert <therbert@google.com>
Date: Thu, 28 Oct 2010 10:45:45 -0700 (PDT)

> Both TX and RX queue allocations in the netdev structure had been moved
> to register_device with the idea that the number of queues could be
> changed between device allocation and registration.  It was determined
> that changing the num_queues after the call to alloc_netdev_mq was not
> a good idea, so that was abandoned.  Also, some drivers call
> netif_queue_start without registering device, which causes panic
> when dev->_tx queue structure is accessed.  This patch moves queue
> allocations back to alloc_netdev_mq to fix these issues.
> 
> Signed-off-by: Tom Herbert <therbert@google.com>

Changing the TX queue state with a netif_stop_queue() call or
similar was always completely pointless and frankly a bug.

So that should not influence the motivation behind this change
at all.

In fact I _like_ that it crashes now so that we are forced
to fix these cases.

Really, the queue state is absolutely immaterial during
device allocation and registration.  It's state is
%100 "don't care" until ->open() is invoked.

So any code that touches the queue state at these earlier points in
time is completely extraneous if not broken.

  reply	other threads:[~2010-10-28 17:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 17:45 [PATCH] net: Allocate RX and TX queues in alloc_netdev_mq Tom Herbert
2010-10-28 17:49 ` David Miller [this message]
2010-10-28 18:08   ` Tom Herbert
2010-10-28 18:10     ` David Miller
2010-10-28 18:11       ` Tom Herbert

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=20101028.104942.179929434.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.com \
    /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