Commit 478a010
net: bcmgenet: fix TX reclaim accounting for fragments
The GENET driver supports SKB fragments, and succeeds in transmitting
them properly, but when reclaiming these transmitted fragments, we will
only update the count of free buffer descriptors by 1, even for SKBs
with fragments. This leads to the networking stack thinking it has more
room than the hardware has when pushing new SKBs, and backing off
consequently because we return NETDEV_TX_BUSY.
Fix this by accounting for the SKB nr_frags plus one (itself) and update
ring->free_bds accordingly with that value for each iteration loop in
__bcmgenet_tx_reclaim().
Fixes: 1c1008c ("net: bcmgenet: add main driver file")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent a35165c commit 478a010
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
| 878 | + | |
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
| |||
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
| 903 | + | |
902 | 904 | | |
| 905 | + | |
903 | 906 | | |
904 | 907 | | |
905 | 908 | | |
| |||
916 | 919 | | |
917 | 920 | | |
918 | 921 | | |
919 | | - | |
| 922 | + | |
920 | 923 | | |
921 | 924 | | |
922 | 925 | | |
| |||
0 commit comments