diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2017-12-11 17:56:58 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-13 19:25:04 +0100 |
commit | 41f61db2cd24d5ad802386719cccde1479aa82a6 (patch) | |
tree | 91243737b9a615be425572561255e9631439e4a0 /drivers/net/hyperv/netvsc_drv.c | |
parent | hv_netvsc: Fix the receive buffer size limit (diff) | |
download | linux-41f61db2cd24d5ad802386719cccde1479aa82a6.tar.xz linux-41f61db2cd24d5ad802386719cccde1479aa82a6.zip |
hv_netvsc: Fix the TX/RX buffer default sizes
The values were not computed correctly. There are no significant
visible impact, though.
The intended size of RX buffer is 16 MB, and the default slot size is 1728.
So, NETVSC_DEFAULT_RX should be 16*1024*1024 / 1728 = 9709.
The intended size of TX buffer is 1 MB, and the slot size is 6144.
So, NETVSC_DEFAULT_TX should be 1024*1024 / 6144 = 170.
The patch puts the formula directly into the macro, and moves them to
hyperv_net.h, together with related macros.
Fixes: 5023a6db73196 ("netvsc: increase default receive buffer size")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc_drv.c')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index dc70de674ca9..b6a434ac64d3 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -47,10 +47,6 @@ #include "hyperv_net.h" #define RING_SIZE_MIN 64 -#define NETVSC_MIN_TX_SECTIONS 10 -#define NETVSC_DEFAULT_TX 192 /* ~1M */ -#define NETVSC_MIN_RX_SECTIONS 10 /* ~64K */ -#define NETVSC_DEFAULT_RX 10485 /* Max ~16M */ #define LINKCHANGE_INT (2 * HZ) #define VF_TAKEOVER_INT (HZ / 10) |