diff mbox series

[net,02/13] net: stmmac: Omit last desc flag for non-linear jumbos in chain-mode

Message ID 20230313224237.28757-3-Sergey.Semin@baikalelectronics.ru (mailing list archive)
State Rejected
Delegated to: Netdev Maintainers
Headers show
Series net: stmmac: Fixes bundle #1 | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers warning 3 maintainers not CCed: linux-mediatek@lists.infradead.org angelogioacchino.delregno@collabora.com matthias.bgg@gmail.com
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Serge Semin March 13, 2023, 10:42 p.m. UTC
Indeed similar to the ring mode we need not to set the LS flag in a Tx
DMA descriptor of the last chunk of the linear jumbo-SKB data if it's
supposed to have additional fragments attached. That buffers will be
used to initialized further Tx DMA descriptors later in the common
stmmac_rx() code. The LS flag will be set for the last of them then.

A similar fix has been introduced for the ring-mode in the
commit 58f2ce6f6161 ("net: stmmac: fix jumbo frame sending with
non-linear skbs"). But for some reason it hasn't been done for the
chained descriptors.

Fixes: 58f2ce6f6161 ("net: stmmac: fix jumbo frame sending with non-linear skbs")
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
---
 drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c b/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
index 2e8744ac6b91..60e4fa5060ce 100644
--- a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
+++ b/drivers/net/ethernet/stmicro/stmmac/chain_mode.c
@@ -73,7 +73,8 @@  static int jumbo_frm(void *p, struct sk_buff *skb, int csum)
 			tx_q->tx_skbuff_dma[entry].len = len;
 			/* last descriptor can be set now */
 			stmmac_prepare_tx_desc(priv, desc, 0, len, csum,
-					STMMAC_CHAIN_MODE, 1, true, skb->len);
+					STMMAC_CHAIN_MODE, 1,
+					!skb_is_nonlinear(skb), skb->len);
 			len = 0;
 		}
 	}