Re: [EXT] Re: [PATCH 1/1] net: fec: add initial XDP support

Andrew Lunn
2022-09-29T15:40:14Z

On Thu, Sep 29, 2022 at 05:28:43PM +0200, Jesper Dangaard Brouer wrote:
>
>
> On 29/09/2022 15.26, Shenwei Wang wrote:
> >
> > > From: Andrew Lunn <andrew@lunn.ch>
> > > Sent: Thursday, September 29, 2022 8:23 AM
> [...]
> > >
> > > > I actually did some compare testing regarding the page pool for normal
> > > > traffic. So far I don't see significant improvement in the current
> > > > implementation. The performance for large packets improves a little,
> > > > and the performance for small packets get a little worse.
> > >
> > > What hardware was this for? imx51? imx6? imx7 Vybrid? These all use the FEC.
> >
> > I tested on imx8qxp platform. It is ARM64.
>
> On mvneta driver/platform we saw huge speedup replacing:
>
> page_pool_release_page(rxq->page_pool, page);
> with
> skb_mark_for_recycle(skb);
>
> As I mentioned: Today page_pool have SKB recycle support (you might have
> looked at drivers that didn't utilize this yet), thus you don't need to
> release the page (page_pool_release_page) here. Instead you could simply
> mark the SKB for recycling, unless driver does some page refcnt tricks I
> didn't notice.
>
> On the mvneta driver/platform the DMA unmap (in page_pool_release_page) was
> very expensive. This imx8qxp platform might have faster DMA unmap in case is
> it cache-coherent.

I don't know about imx8qxp, but i've played with imx6 and Vybrid, and
cache flush and invalidate are very expensive.

Andrew