diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2026-02-24 12:01:55 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-02-26 06:12:34 +0300 |
| commit | dd53a0e85969c6b2a5a4e4e46ba05b3187231017 (patch) | |
| tree | 6beabac26eb00277a68faa13460a0eae3f07f9fd /scripts/git.orderFile | |
| parent | 819101c3c158f6e220be9a9ded3c48ff5701cf42 (diff) | |
| download | linux-dd53a0e85969c6b2a5a4e4e46ba05b3187231017.tar.xz | |
net: stmmac: fix transmit interrupt coalescing
The accounting for transmit frames does not count the descriptors
correctly. It uses:
tx_packets = (tx_q->cur_tx + 1) - first_tx;
however, these are indexes into a circular buffer, so cur_tx can be
less than first_tx, and when that happens, tx_packets becomes a very
large unsigned integer. When this is added to tx_q->tx_count_frames,
it has the effect of reducing the count of frames, possibly causing
it to also wrap to a very large unsigned integer.
Fix this by using CIRC_CNT() to calculate the number of descriptors
used.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/E1vuoIl-0000000Aouz-0ttb@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/git.orderFile')
0 files changed, 0 insertions, 0 deletions
