]> git.baikalelectronics.ru Git - kernel.git/commit
netvsc: fix calculation of available send sections
authorstephen hemminger <stephen@networkplumber.org>
Tue, 25 Apr 2017 01:33:38 +0000 (18:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 15:56:59 +0000 (11:56 -0400)
commit1581697ac3d68d3c57860416ff6a7d5ce283e9d9
tree72bc1cd4a60af46c4250234ae2a968660eac8d3c
parentc07e955dc54a20770e08e1abaa3df51b5cdba38f
netvsc: fix calculation of available send sections

My change (introduced in 4.11) to use find_first_clear_bit
incorrectly assumed that the size argument was words, not bits.
The effect was only a small limited number of the available send
sections were being actually used. This can cause performance loss
with some workloads.

Since map_words is now used only during initialization, it can
be on stack instead of in per-device data.

Fixes: dd179a8ab527 ("netvsc: simplify get next send section")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c