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

Jesper Dangaard Brouer
2022-09-29T15:28:51Z

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 would be very interested in knowing if skb_mark_for_recycle() helps on
this platform, for normal network stack performance.

>> By small packets, do you mean those under the copybreak limit?
>>
>> Please provide some benchmark numbers with your next patchset.
>
> Yes, the packet size is 64 bytes and it is under the copybreak limit.
> As the impact is not significant, I would prefer to remove the
> copybreak logic.

+1 to removing this logic if possible, due to maintenance cost.

--Jesper