mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
net: mvneta: fix build skb for bm capable devices
Fix build_skb for bm capable devices when they fall-back using swbm path (e.g. when bm properties are configured in device tree but CONFIG_MVNETA_BM_ENABLE is not set). In this case rx_offset_correction is overwritten so we need to use it building skb instead of MVNETA_SKB_HEADROOM directly Fixes:8dc9a0888f
("net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine") Fixes:0db51da7a8
("net: mvneta: add basic XDP support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reported-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f97d139aaa
commit
b37fa92e20
1 changed files with 2 additions and 2 deletions
|
@ -2154,7 +2154,7 @@ mvneta_swbm_rx_frame(struct mvneta_port *pp,
|
|||
prefetch(data);
|
||||
|
||||
xdp->data_hard_start = data;
|
||||
xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE;
|
||||
xdp->data = data + pp->rx_offset_correction + MVNETA_MH_SIZE;
|
||||
xdp->data_end = xdp->data + data_len;
|
||||
xdp_set_data_meta_invalid(xdp);
|
||||
|
||||
|
@ -2219,7 +2219,7 @@ mvneta_swbm_add_rx_fragment(struct mvneta_port *pp,
|
|||
/* refill descriptor with new buffer later */
|
||||
skb_add_rx_frag(rxq->skb,
|
||||
skb_shinfo(rxq->skb)->nr_frags,
|
||||
page, MVNETA_SKB_HEADROOM, data_len,
|
||||
page, pp->rx_offset_correction, data_len,
|
||||
PAGE_SIZE);
|
||||
}
|
||||
page_pool_release_page(rxq->page_pool, page);
|
||||
|
|
Loading…
Add table
Reference in a new issue