mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 18:04:38 -04:00
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>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -476,7 +476,7 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
|
||||
rx = 0;
|
||||
cpw16(IntrStatus, cp_rx_intr_mask);
|
||||
|
||||
while (1) {
|
||||
while (rx < budget) {
|
||||
u32 status, len;
|
||||
dma_addr_t mapping, new_mapping;
|
||||
struct sk_buff *skb, *new_skb;
|
||||
@@ -554,9 +554,6 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
|
||||
else
|
||||
desc->opts1 = cpu_to_le32(DescOwn | cp->rx_buf_sz);
|
||||
rx_tail = NEXT_RX(rx_tail);
|
||||
|
||||
if (rx >= budget)
|
||||
break;
|
||||
}
|
||||
|
||||
cp->rx_tail = rx_tail;
|
||||
|
||||
Reference in New Issue
Block a user