]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Improve -ENOMEM logic in NAPI poll loop.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 28 Aug 2017 17:40:30 +0000 (13:40 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Aug 2017 23:57:10 +0000 (16:57 -0700)
commitb3aad6d18e525c61cd3341cebc6bd15637fa8354
tree880db9002dc26dea7cc3977efa84c309e4d9f26b
parent6a94fa6d7f2cd72105417d337947e53cb49b11f1
bnxt_en: Improve -ENOMEM logic in NAPI poll loop.

If we cannot allocate RX buffers in the NAPI poll loop when processing
an RX event, the current code does not count that event towards the NAPI
budget.  This can cause us to potentially loop forever in NAPI if we
consistently cannot allocate new buffers.  Improve it by counting
-ENOMEM event as 1 towards the NAPI budget.

Cc: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reported-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c