netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuval Mintz <yuval.mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <ariel.elior@qlogic.com>, Yuval Mintz <yuval.mintz@qlogic.com>
Subject: [PATCH net 4/4] bnx2x: Enlarge the dorq threshold for VFs
Date: Wed, 11 Jun 2014 16:27:28 +0300	[thread overview]
Message-ID: <1402493248-5427-5-git-send-email-yuval.mintz@qlogic.com> (raw)
In-Reply-To: <1402493248-5427-1-git-send-email-yuval.mintz@qlogic.com>

From: Ariel Elior <ariel.elior@qlogic.com>

A malicious VF might try to starve the other VFs & PF by creating
contineous doorbell floods. In order to negate this, HW has a threshold of
doorbells per client, which will stop the client doorbells from arriving
if crossed.

The threshold currently configured for VFs is too low - under extreme traffic
scenarios, it's possible for a VF to reach the threshold and thus for its
fastpath to stop working.

Signed-off-by: Ariel Elior <ariel.elior@qlogic.com>
Signed-off-by: Yuval Mintz <yuval.mintz@qlogic.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index a93c7af..f7edb42 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1071,8 +1071,10 @@ void bnx2x_iov_init_dq(struct bnx2x *bp)
 	REG_WR(bp, DORQ_REG_VF_TYPE_MIN_MCID_0, 0);
 	REG_WR(bp, DORQ_REG_VF_TYPE_MAX_MCID_0, 0x1ffff);
 
-	/* set the VF doorbell threshold */
-	REG_WR(bp, DORQ_REG_VF_USAGE_CT_LIMIT, 4);
+	/* set the VF doorbell threshold. This threshold represents the amount
+	 * of doorbells allowed in the main DORQ fifo for a specific VF.
+	 */
+	REG_WR(bp, DORQ_REG_VF_USAGE_CT_LIMIT, 64);
 }
 
 void bnx2x_iov_init_dmae(struct bnx2x *bp)
-- 
1.8.1.4

      parent reply	other threads:[~2014-06-11 13:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-11 13:27 [PATCH net 0/4] bnx2x: Bug fixes patch series Yuval Mintz
2014-06-11 13:27 ` [PATCH net 1/4] bnx2x: Fix link for KR with swapped polarity lane Yuval Mintz
2014-06-11 13:36   ` Sergei Shtylyov
2014-06-11 18:40     ` Yuval Mintz
2014-06-11 19:27       ` David Miller
2014-06-11 13:27 ` [PATCH net 2/4] bnx2x: Fix 1G-baseT link Yuval Mintz
2014-06-11 13:27 ` [PATCH net 3/4] bnx2x: Check for UNDI in uncommon branch Yuval Mintz
2014-06-11 13:27 ` Yuval Mintz [this message]

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=1402493248-5427-5-git-send-email-yuval.mintz@qlogic.com \
    --to=yuval.mintz@qlogic.com \
    --cc=ariel.elior@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).