bnxt_en: Use napi_complete_done()
authorMichael Chan <michael.chan@broadcom.com>
Thu, 29 Dec 2016 17:13:32 +0000 (12:13 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 29 Dec 2016 19:37:23 +0000 (14:37 -0500)
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>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index b53f958ffcb80d557c71536faf6f52432077e664..3fbc8427be2ee5957ff244646bca7af63a581d24 100644 (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;
                }
        }