|
|
@@ -1884,8 +1884,11 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
|
|
|
if (TX_CMP_TYPE(txcmp) == CMP_TYPE_TX_L2_CMP) {
|
|
|
tx_pkts++;
|
|
|
/* return full budget so NAPI will complete. */
|
|
|
- if (unlikely(tx_pkts > bp->tx_wake_thresh))
|
|
|
+ if (unlikely(tx_pkts > bp->tx_wake_thresh)) {
|
|
|
rx_pkts = budget;
|
|
|
+ raw_cons = NEXT_RAW_CMP(raw_cons);
|
|
|
+ break;
|
|
|
+ }
|
|
|
} else if ((TX_CMP_TYPE(txcmp) & 0x30) == 0x10) {
|
|
|
if (likely(budget))
|
|
|
rc = bnxt_rx_pkt(bp, bnapi, &raw_cons, &event);
|
|
|
@@ -1913,7 +1916,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
|
|
|
}
|
|
|
raw_cons = NEXT_RAW_CMP(raw_cons);
|
|
|
|
|
|
- if (rx_pkts == budget)
|
|
|
+ if (rx_pkts && rx_pkts == budget)
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
@@ -2027,8 +2030,12 @@ static int bnxt_poll(struct napi_struct *napi, int budget)
|
|
|
while (1) {
|
|
|
work_done += bnxt_poll_work(bp, bnapi, budget - work_done);
|
|
|
|
|
|
- if (work_done >= budget)
|
|
|
+ if (work_done >= budget) {
|
|
|
+ if (!budget)
|
|
|
+ BNXT_CP_DB_REARM(cpr->cp_doorbell,
|
|
|
+ cpr->cp_raw_cons);
|
|
|
break;
|
|
|
+ }
|
|
|
|
|
|
if (!bnxt_has_work(bp, cpr)) {
|
|
|
if (napi_complete_done(napi, work_done))
|