Re: [PATCH net-next v2 4/6] net: stmmac: Add initial XDP support

2021-03-30 Thread Jakub Kicinski
On Tue, 30 Mar 2021 10:49:47 +0800 Ong Boon Leong wrote: > + if (!skb) { > + dma_sync_single_for_cpu(priv->device, buf->addr, > + buf1_len, dma_dir); > + > + xdp.data = page_address(buf->page) + buf->pag

[PATCH net-next v2 4/6] net: stmmac: Add initial XDP support

2021-03-29 Thread Ong Boon Leong
This patch adds the initial XDP support to stmmac driver. It supports XDP_PASS, XDP_DROP and XDP_ABORTED actions. Upcoming patches will add support for XDP_TX and XDP_REDIRECT. To support XDP headroom, this patch adds page_offset into RX buffer and change the dma_sync_single_for_device|cpu(). The