[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101028.104942.179929434.davem@davemloft.net>
Date: Thu, 28 Oct 2010 10:49:42 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: therbert@...gle.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] net: Allocate RX and TX queues in alloc_netdev_mq
From: Tom Herbert <therbert@...gle.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@...gle.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.
--
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