aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-13 15:18:50 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-13 15:18:50 -0400
commitcbd84a44949748dbe37051caff2d396d256fc8b8 (patch)
tree5a97cf7f32ec371a55bcb0f5eb4f8105eb41e493 /drivers/net/ethernet/broadcom/bnx2.c
parentconsolidate duplicate code is skb_checksum_setup() helpers (diff)
parent8139cp: Don't receive packets when the napi budget == 0 (diff)
downloadlinux-dev-cbd84a44949748dbe37051caff2d396d256fc8b8.tar.xz
linux-dev-cbd84a44949748dbe37051caff2d396d256fc8b8.zip
Merge branch 'napi_budget_zero'
Eric W. Biederman says: ==================== Don't receive packets when the napi budget == 0 To the best of understanding processing any received packets when the napi budget == 0 is broken driver behavior. At the same time I don't think we have ever cared before so there are a handful of drivers that need fixes. I care now as I will shortly be using htis in netpoll to get the tx queue processing without the rx queue processing. Drivers that need fixes are few and far between, and so far I have only found two of them. More similar patches later if I find more drivers that need fixes. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index c251ca3056de..2e42de239798 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -3132,6 +3132,9 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
struct l2_fhdr *rx_hdr;
int rx_pkt = 0, pg_ring_used = 0;
+ if (budget <= 0)
+ return rx_pkt;
+
hw_cons = bnx2_get_hw_rx_cons(bnapi);
sw_cons = rxr->rx_cons;
sw_prod = rxr->rx_prod;