summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuresh Reddy <Suresh.Reddy@avagotech.com>2015-05-06 11:30:36 +0200
committerDavid S. Miller <davem@davemloft.net>2015-05-09 22:27:03 +0200
commitb02e60c86eac4451543f3d2c695545baf093e9ea (patch)
tree77f4cbb744fe4348f422b432334575ac35e3a1aa
parentbe2net: check for INSUFFICIENT_VLANS error (diff)
downloadlinux-b02e60c86eac4451543f3d2c695545baf093e9ea.tar.xz
linux-b02e60c86eac4451543f3d2c695545baf093e9ea.zip
be2net: post full RXQ on interface enable
When an RXQ is created in be_open(), the driver currently posts only 64 buffers. This sometimes results in packet drops when there is a traffic burst as soon as the interface is enabled. This patch fixes this problem by posting the full RXQ on interface enable. Signed-off-by: Suresh Reddy <Suresh.Reddy@avagotech.com> Signed-off-by: Sathya Perla <sathya.perla@avagotech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 770779ec4714..09c3faf7dff9 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -3326,9 +3326,12 @@ static int be_rx_qs_create(struct be_adapter *adapter)
memcpy(rss->rss_hkey, rss_key, RSS_HASH_KEY_LEN);
- /* First time posting */
+ /* Post 1 less than RXQ-len to avoid head being equal to tail,
+ * which is a queue empty condition
+ */
for_all_rx_queues(adapter, rxo, i)
- be_post_rx_frags(rxo, GFP_KERNEL, MAX_RX_POST);
+ be_post_rx_frags(rxo, GFP_KERNEL, RX_Q_LEN - 1);
+
return 0;
}