diff mbox

[net] bna: fix interrupts storm caused by erroneous packets

Message ID 1438894103-10597-1-git-send-email-ivecera@redhat.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ivan Vecera Aug. 6, 2015, 8:48 p.m. UTC
The commit "e29aa33 bna: Enable Multi Buffer RX" moved packets counter
increment from the beginning of the NAPI processing loop after the check
for erroneous packets so they are never accounted. This counter is used
to inform firmware about number of processed completions (packets).
As these packets are never acked the firmware fires IRQs for them again
and again.

Fixes: e29aa33 bna: Enable Multi Buffer RX
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
---
 drivers/net/ethernet/brocade/bna/bnad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rasesh Mody Aug. 7, 2015, 6:35 p.m. UTC | #1
> From: Ivan Vecera [mailto:ivecera@redhat.com]
> Sent: Thursday, August 06, 2015 1:48 PM
> 
> The commit "e29aa33 bna: Enable Multi Buffer RX" moved packets counter
> increment from the beginning of the NAPI processing loop after the check
> for erroneous packets so they are never accounted. This counter is used to
> inform firmware about number of processed completions (packets).
> As these packets are never acked the firmware fires IRQs for them again and
> again.
> 
> Fixes: e29aa33 bna: Enable Multi Buffer RX
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Acked-by: Rasesh Mody <rasesh.mody@qlogic.com>

Thanks!
Rasesh
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Aug. 10, 2015, 5:58 p.m. UTC | #2
From: Ivan Vecera <ivecera@redhat.com>
Date: Thu,  6 Aug 2015 22:48:23 +0200

> The commit "e29aa33 bna: Enable Multi Buffer RX" moved packets counter
> increment from the beginning of the NAPI processing loop after the check
> for erroneous packets so they are never accounted. This counter is used
> to inform firmware about number of processed completions (packets).
> As these packets are never acked the firmware fires IRQs for them again
> and again.
> 
> Fixes: e29aa33 bna: Enable Multi Buffer RX
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index 0612b19..506047c 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -676,6 +676,7 @@  bnad_cq_process(struct bnad *bnad, struct bna_ccb *ccb, int budget)
 			if (!next_cmpl->valid)
 				break;
 		}
+		packets++;
 
 		/* TODO: BNA_CQ_EF_LOCAL ? */
 		if (unlikely(flags & (BNA_CQ_EF_MAC_ERROR |
@@ -692,7 +693,6 @@  bnad_cq_process(struct bnad *bnad, struct bna_ccb *ccb, int budget)
 		else
 			bnad_cq_setup_skb_frags(rcb, skb, sop_ci, nvecs, len);
 
-		packets++;
 		rcb->rxq->rx_packets++;
 		rcb->rxq->rx_bytes += totlen;
 		ccb->bytes_per_intr += totlen;