mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Merge branch 'stmmac-some-xdp-fixes-in-xdp_tx-path'
Lorenzo Bianconi says: ==================== stmmac: some XDP fixes in XDP_TX path - Fix page address lookup for compound pages in XDP_TX path. - Disable TX checksum offload for jumbo frames in XDP_TX path. ==================== Link: https://patch.msgid.link/20261012-stmmac-xdp-tx-pre-fixes-v1-0-05fd0c90f7e1@oss.qualcomm.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
da499b5527
|
|
@ -5278,6 +5278,14 @@ static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
|
|||
return STMMAC_XDP_CONSUMED;
|
||||
}
|
||||
|
||||
/* Disable TX checksum offload for jumbo frames on cores where
|
||||
* checksum insertion is broken for oversized frames, matching the
|
||||
* stmmac_fix_features() workaround used by the skb path.
|
||||
*/
|
||||
if (priv->plat->bugged_jumbo &&
|
||||
xdp_get_frame_len(xdpf) > ETH_FRAME_LEN)
|
||||
csum = false;
|
||||
|
||||
while (true) {
|
||||
skb_frag_t *frag = i ? &sinfo->frags[i - 1] : NULL;
|
||||
int len = frag ? skb_frag_size(frag) : xdpf->len;
|
||||
|
|
@ -5303,7 +5311,7 @@ static int stmmac_xdp_xmit_xdpf(struct stmmac_priv *priv, int queue,
|
|||
struct page *page;
|
||||
|
||||
page = frag ? skb_frag_page(frag)
|
||||
: virt_to_page(xdpf->data);
|
||||
: virt_to_head_page(xdpf->data);
|
||||
dma_addr = page_pool_get_dma_addr(page);
|
||||
if (frag)
|
||||
dma_addr += skb_frag_off(frag);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user