diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-04-09 22:27:59 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-04-09 18:17:12 -0700 |
commit | a93580a02dbf9e67c4f801e2ff1b32ec4c748516 (patch) | |
tree | ce11238d71fe248676ee0711b93eb21203998c4a /net/tipc/eth_media.c | |
parent | 95b5c291322be25431391d08020db0138631c8b2 (diff) | |
download | linux-stable-a93580a02dbf9e67c4f801e2ff1b32ec4c748516.tar.gz linux-stable-a93580a02dbf9e67c4f801e2ff1b32ec4c748516.tar.bz2 linux-stable-a93580a02dbf9e67c4f801e2ff1b32ec4c748516.zip |
net: enetc: fix TX ring interrupt storm
The blamed commit introduced a bit in the TX software buffer descriptor
structure for determining whether a BD is final or not; we rearm the TX
interrupt vector for every frame (hence final BD) transmitted.
But there is a problem with the patch: it replaced a condition whose
expression is a bool which was evaluated at the beginning of the "while"
loop with a bool expression that is evaluated on the spot: tx_swbd->is_eof.
The problem with the latter expression is that the tx_swbd has already
been incremented at that stage, so the tx_swbd->is_eof check is in fact
with the _next_ software BD. Which is _not_ final.
The effect is that the CPU is in 100% load with ksoftirqd because it
does not acknowledge the TX interrupt, so the handler keeps getting
called again and again.
The fix is to restore the code structure, and keep the local bool is_eof
variable, just to assign it the tx_swbd->is_eof value instead of
!!tx_swbd->skb.
Fixes: d504498d2eb3 ("net: enetc: add a dedicated is_eof bit in the TX software BD")
Reported-by: Alex Marginean <alexandru.marginean@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://lore.kernel.org/r/20210409192759.3895104-1-olteanv@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tipc/eth_media.c')
0 files changed, 0 insertions, 0 deletions