bnxt_en: Use napi_complete_done()

For better busy polling and GRO support.  Do not re-arm IRQ if
napi_complete_done() returns false.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michael Chan 2016-12-29 12:13:32 -05:00 committed by David S. Miller
parent b356a2e729
commit e7b9569102
1 changed files with 3 additions and 2 deletions

View File

@ -1778,8 +1778,9 @@ static int bnxt_poll(struct napi_struct *napi, int budget)
break;
if (!bnxt_has_work(bp, cpr)) {
napi_complete(napi);
BNXT_CP_DB_REARM(cpr->cp_doorbell, cpr->cp_raw_cons);
if (napi_complete_done(napi, work_done))
BNXT_CP_DB_REARM(cpr->cp_doorbell,
cpr->cp_raw_cons);
break;
}
}