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)
commitfdfb70d275223b9d69d5d3abe1f88507da579139
tree72bc1cd4a60af46c4250234ae2a968660eac8d3c
parenta23f6ce6d95900ca83b44b6fa691afe6c7d4b941
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: b58a185801da ("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