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

Shenwei Wang
2022-10-05T12:40:13Z

Hi Jesper,

Here is the summary of "xdp_rxq_info" testing.

skb_mark_for_recycle page_pool_release_page

Native SKB-Mode Native SKB-Mode
XDP_DROP 460K 220K 460K 102K
XDP_PASS 80K 113K 60K 62K

The following are the testing log.

Thanks,
Shenwei

### skb_mark_for_recycle solution ###

./xdp_rxq_info --dev eth0 --act XDP_DROP --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_DROP options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 466,553 0
XDP-RX CPU total 466,553

./xdp_rxq_info -S --dev eth0 --act XDP_DROP --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_DROP options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 226,272 0
XDP-RX CPU total 226,272

./xdp_rxq_info --dev eth0 --act XDP_PASS --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_PASS options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 80,518 0
XDP-RX CPU total 80,518

./xdp_rxq_info -S --dev eth0 --act XDP_PASS --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_PASS options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 113,681 0
XDP-RX CPU total 113,681

### page_pool_release_page solution ###

./xdp_rxq_info --dev eth0 --act XDP_DROP --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_DROP options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 463,145 0
XDP-RX CPU total 463,145

./xdp_rxq_info -S --dev eth0 --act XDP_DROP --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_DROP options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 104,443 0
XDP-RX CPU total 104,443

./xdp_rxq_info --dev eth0 --act XDP_PASS --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_PASS options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 60,539 0
XDP-RX CPU total 60,539

./xdp_rxq_info -S --dev eth0 --act XDP_PASS --read

Running XDP on dev:eth0 (ifindex:2) action:XDP_PASS options:read
XDP stats CPU pps issue-pps
XDP-RX CPU 0 62,566 0
XDP-RX CPU total 62,566

> -----Original Message-----
> From: Shenwei Wang
> Sent: Tuesday, October 4, 2022 8:34 AM
> To: Jesper Dangaard Brouer <jbrouer@redhat.com>; Andrew Lunn
> <andrew@lunn.ch>
> Cc: brouer@redhat.com; David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; Alexei Starovoitov <ast@kernel.org>; Daniel Borkmann
> <daniel@iogearbox.net>; Jesper Dangaard Brouer <hawk@kernel.org>; John
> Fastabend <john.fastabend@gmail.com>; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; imx@lists.linux.dev; Magnus Karlsson
> <magnus.karlsson@gmail.com>; Björn Töpel <bjorn@kernel.org>; Ilias
> Apalodimas <ilias.apalodimas@linaro.org>
> Subject: RE: [EXT] Re: [PATCH 1/1] net: fec: add initial XDP support
>
>
>
> > -----Original Message-----
> > From: Shenwei Wang
> > Sent: Tuesday, October 4, 2022 8:13 AM
> > To: Jesper Dangaard Brouer <jbrouer@redhat.com>; Andrew Lunn
> ...
> > I haven't tested xdp_rxq_info yet, and will have a try sometime later today.
> > However, for the XDP_DROP test, I did try xdp2 test case, and the
> > testing result looks reasonable. The performance of Native mode is
> > much higher than skb- mode.
> >
> > # xdp2 eth0
> > proto 0: 475362 pkt/s
> >
> > # xdp2 -S eth0 (page_pool_release_page solution)
> > proto 17: 71999 pkt/s
> >
> > # xdp2 -S eth0 (skb_mark_for_recycle solution)
> > proto 17: 72228 pkt/s
> >
>
> Correction for xdp2 -S eth0 (skb_mark_for_recycle solution)
> proto 0: 0 pkt/s
> proto 17: 122473 pkt/s
>
> Thanks,
> Shenwei