]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Handle all NQ notifications in bnxt_poll_p5().
authorMichael Chan <michael.chan@broadcom.com>
Sun, 8 Mar 2020 22:45:47 +0000 (18:45 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Mar 2020 04:54:46 +0000 (21:54 -0700)
commitfaaf4396f60c9fd9a8f58eef6bb45f69b0a47106
tree6c41dae967347159b6ed45f6633d944779c97e20
parente44b63b75435f07bc92c1aa7cea780a7e677873c
bnxt_en: Handle all NQ notifications in bnxt_poll_p5().

In bnxt_poll_p5(), the logic polls for up to 2 completion rings (RX and
TX) for work.  In the current code, if we reach budget polling the
first completion ring, we will stop.  If the other completion ring
has work to do, we will handle it when NAPI calls us back.

This is not optimal.  We potentially leave an unproceesed entry in
the NQ.  When we are finally done with NAPI polling and re-enable
interrupt, the remaining entry in the NQ will cause interrupt to
be triggered immediately for no reason.

Modify the code in bnxt_poll_p5() to keep looping until all NQ
entries are handled even if the first completion ring has reached
budget.

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