netvsc: optimize calculation of number of slots
authorstephen hemminger <stephen@networkplumber.org>
Thu, 8 Jun 2017 23:21:18 +0000 (16:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jun 2017 16:15:02 +0000 (12:15 -0400)
commit60b86665af0dfbeebda8aae43f0ba451cd2dcfe5
tree3a1bee4ef1598c9ce45650c51625eb7551d01f7e
parente073782a41bf6018d8db16fd54155384b7e6da65
netvsc: optimize calculation of number of slots

Speed up transmit check for fragmented packets by using existing
macros to compute number of pages, and eliminate loop since
skb fragments each take a page. Number of slots is also unsigned.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c