Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit a7f99d0f authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

hv_netvsc: use reciprocal divide to speed up percent calculation


Every packet sent checks the available ring space. The calculation
can be sped up by using reciprocal divide which is multiplication.

Since ring_size can only be configured by module parameter, so it doesn't
have to be passed around everywhere. Also it should be unsigned
since it is number of pages.

Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b85e06f7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment