diff options
| author | Netanel Belgazal <netanel@amazon.com> | 2019-12-10 11:27:44 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-04 19:13:32 +0100 |
| commit | 3990d6909f2f17b44ef43221bd30adffd9b8a5d1 (patch) | |
| tree | 512fb1794830f6fb222d138ea5511a43d4962a83 /include | |
| parent | 779807c74af3748e1265fc580976ccdd4e9530b5 (diff) | |
net: ena: fix napi handler misbehavior when the napi budget is zero
[ Upstream commit 24dee0c7478d1a1e00abdf5625b7f921467325dc ]
In netpoll the napi handler could be called with budget equal to zero.
Current ENA napi handler doesn't take that into consideration.
The napi handler handles Rx packets in a do-while loop.
Currently, the budget check happens only after decrementing the
budget, therefore the napi handler, in rare cases, could run over
MAX_INT packets.
In addition to that, this moves all budget related variables to int
calculation and stop mixing u32 to avoid ambiguity
Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)")
Signed-off-by: Netanel Belgazal <netanel@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
