diff options
author | Ariel Elior <ariel.elior@qlogic.com> | 2014-06-12 00:55:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-12 13:28:18 -0400 |
commit | f2cfa997ef77bcfc3900eb968fa5254f951bb8f2 (patch) | |
tree | 555f786ec35500d64f95c03605bc041a178c2543 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | |
parent | b17b0ca1642c23f0cd4e4cf52cdb9970798f3501 (diff) |
bnx2x: Enlarge the dorq threshold for VFs
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 |
1 files 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 a93c7af7afe6..f7edb4204f91 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) | |||
1071 | REG_WR(bp, DORQ_REG_VF_TYPE_MIN_MCID_0, 0); | 1071 | REG_WR(bp, DORQ_REG_VF_TYPE_MIN_MCID_0, 0); |
1072 | REG_WR(bp, DORQ_REG_VF_TYPE_MAX_MCID_0, 0x1ffff); | 1072 | REG_WR(bp, DORQ_REG_VF_TYPE_MAX_MCID_0, 0x1ffff); |
1073 | 1073 | ||
1074 | /* set the VF doorbell threshold */ | 1074 | /* set the VF doorbell threshold. This threshold represents the amount |
1075 | REG_WR(bp, DORQ_REG_VF_USAGE_CT_LIMIT, 4); | 1075 | * of doorbells allowed in the main DORQ fifo for a specific VF. |
1076 | */ | ||
1077 | REG_WR(bp, DORQ_REG_VF_USAGE_CT_LIMIT, 64); | ||
1076 | } | 1078 | } |
1077 | 1079 | ||
1078 | void bnx2x_iov_init_dmae(struct bnx2x *bp) | 1080 | void bnx2x_iov_init_dmae(struct bnx2x *bp) |