On Fri, Jul 1, 2016 at 8:18 AM, Eric Dumazet <eric.duma...@gmail.com> wrote:
> On Fri, 2016-07-01 at 04:50 +0000, Yuval Mintz wrote:
>> > currently all the device driver call  netif_tx_start_all_queues(dev)
>> > on open to W/A this issue. which is strange since only
>> > real_num_tx_queues are active.
>>
>> You could also argue that netif_tx_start_all_queues() should
>> only enable the real_num_tx_queues.
>> [Although that would obviously cause all drivers to reach the
>> 'problem' you're currently fixing].
>
> Yep. Basically what I pointed out.
>
> It seems inconsistent to have loops using num_tx_queues, and others
> using real_num_tx_queues.
>
> Instead of 'fixing' one of them, we should take a deeper look, even if
> the change looks fine.
>
> num_tx_queues should be used in code that runs once, like
> netdev_lockdep_set_classes(), but other loops should probably use
> real_num_tx_queues.
>
> Anyway all these changes should definitely target net-next, not net
> tree.
>

Thank you Eric and Yuval,

Although i slightly disagree, this patch is good as is, even with the
inconsistency, which is there due to a bad design.
I don't' see why new drivers need to keep copy from old wrong
implementations and workarounds.

But for the long term, you have a point.
We will consider a deeper fix for net-next as you suggested, and drop
this temporary fix.

Thanks
Saeed.

Reply via email to