public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: kys@microsoft•com, haiyangz@microsoft•com, sthemmin@microsoft•com
Cc: devel@linuxdriverproject•org, netdev@vger•kernel.org
Subject: [PATCH net 3/3] hv_netvsc: Fix the default receive buffer size
Date: Thu,  7 Dec 2017 16:10:55 -0800	[thread overview]
Message-ID: <20171208001055.24670-4-sthemmin@microsoft.com> (raw)
In-Reply-To: <20171208001055.24670-1-sthemmin@microsoft.com>

From: Haiyang Zhang <haiyangz@microsoft•com>

The intended size is 16 MB, and the default slot size is 1728.
So, NETVSC_DEFAULT_RX should be 16*1024*1024 / 1728 = 9709.

Fixes: 5023a6db73196 ("netvsc: increase default receive buffer size")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft•com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft•com>
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index dc70de674ca9..edfcde5d3621 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -50,7 +50,7 @@
 #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 NETVSC_DEFAULT_RX	9709    /* ~16M */
 
 #define LINKCHANGE_INT (2 * HZ)
 #define VF_TAKEOVER_INT (HZ / 10)
-- 
2.11.0

  parent reply	other threads:[~2017-12-08  0:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08  0:10 [PATCH net 0/3] netvsc fix buffer size issues Stephen Hemminger
2017-12-08  0:10 ` [PATCH net 1/3] hv_netvsc: Correct the max receive buffer size Stephen Hemminger
2017-12-08 10:33   ` Dan Carpenter
2017-12-08 16:03     ` David Miller
2017-12-08 16:11     ` Haiyang Zhang
2017-12-08  0:10 ` [PATCH net 2/3] hv_netvsc: Limit the receive buffer size for legacy hosts Stephen Hemminger
2017-12-08  0:10 ` Stephen Hemminger [this message]
2017-12-08 10:44   ` [PATCH net 3/3] hv_netvsc: Fix the default receive buffer size Dan Carpenter
2017-12-08 16:18     ` Haiyang Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171208001055.24670-4-sthemmin@microsoft.com \
    --to=stephen@networkplumber$(echo .)org \
    --cc=devel@linuxdriverproject$(echo .)org \
    --cc=haiyangz@microsoft$(echo .)com \
    --cc=kys@microsoft$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sthemmin@microsoft$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox