]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bnxt_en: Fix TX timeout during netpoll.
authorMichael Chan <michael.chan@broadcom.com>
Wed, 26 Sep 2018 04:41:04 +0000 (00:41 -0400)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:53:10 +0000 (19:53 -0600)
commitf8b0404bc8255b88aed4f9b980c7055e2e380835
treeb10b9698968b5aac096a863fac3ff5310698daff
parentfc5e4fadb2d818bd55b2590757a1fbdbf07288e4
bnxt_en: Fix TX timeout during netpoll.

BugLink: https://bugs.launchpad.net/bugs/1836426
[ Upstream commit 73f21c653f930f438d53eed29b5e4c65c8a0f906 ]

The current netpoll implementation in the bnxt_en driver has problems
that may miss TX completion events.  bnxt_poll_work() in effect is
only handling at most 1 TX packet before exiting.  In addition,
there may be in flight TX completions that ->poll() may miss even
after we fix bnxt_poll_work() to handle all visible TX completions.
netpoll may not call ->poll() again and HW may not generate IRQ
because the driver does not ARM the IRQ when the budget (0 for netpoll)
is reached.

We fix it by handling all TX completions and to always ARM the IRQ
when we exit ->poll() with 0 budget.

Also, the logic to ACK the completion ring in case it is almost filled
with TX completions need to be adjusted to take care of the 0 budget
case, as discussed with Eric Dumazet <edumazet@google.com>

Reported-by: Song Liu <songliubraving@fb.com>
Reviewed-by: Song Liu <songliubraving@fb.com>
Tested-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c