diff options
| author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2026-03-14 12:42:30 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-03-18 06:32:07 +0300 |
| commit | a4b1590ee0f09b20cc8551b0c81f38e4739e93f2 (patch) | |
| tree | 9d81e9d27a5be7fbf1aba1db1a7d2864c6cc74ad /include/linux/stackprotector.h | |
| parent | 12b4b16c0c7ed6a4b98cfbec7c4ee69e94973334 (diff) | |
| download | linux-a4b1590ee0f09b20cc8551b0c81f38e4739e93f2.tar.xz | |
net: stmmac: helpers for filling tx_q->tx_skbuff_dma
Add helpers to fill in the transmit queue metadata to ensure that all
entries are initialised when preparing to transmit. This avoids clean
up code running into surprises.
For example, stmmac_clean_desc3() (which calls clean_desc3() in
chain_mode.c or ring_mode.c) looks at the .last_segment, and in the
latter case, .is_jumbo members.
AI believes that there is a missing .buf_type assignment in
stmmac_tso_xmit(), but this is a mis-analysis. AI believes that
stmmac_tso_allocator() which would increment tx_q->cur_tx will be
called within the loop when nfrags is zero, but it's failing to
realise that none of the code within the for() loop will be
executed. In any case, at the point where the loop exits,
tx_q->tx_skbuff_dma[tx_q->cur_tx].buf_type has been correctly set
via the call to stmmac_set_tx_skb_dma_entry() - either the one
before the loop, or the one at the end of the loop block.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1w1LVu-0000000DGRr-0Ni3@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
