]> 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)
commit084fe6fbf8e4f9db70d20fed2d3e94583e19ac3a
tree72bc1cd4a60af46c4250234ae2a968660eac8d3c
parenteb1db7de4c0e9fa8336259d6cf04f91317f66291
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: 598b1492af02 ("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