From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Jesper Dangaard Brouer <jbrouer@redhat.com>
Cc: "Shenwei Wang" <shenwei.wang@nxp.com>,
"Andrew Lunn" <andrew@lunn.ch>,
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" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"Magnus Karlsson" <magnus.karlsson@gmail.com>,
"Björn Töpel" <bjorn@kernel.org>
Subject: Re: [EXT] Re: [PATCH 1/1] net: fec: add initial XDP support
Date: Fri, 7 Oct 2022 11:08:23 +0300 [thread overview]
Message-ID: <CAC_iWjJ7AgpSZeOW+K8nMwgmZ-zC3h_nsfvGsJRrY2Aq2UVqSA@mail.gmail.com> (raw)
In-Reply-To: <eb8d097b-e53b-ed09-f598-71cac24edb7c@redhat.com>
Hi Jesper,
On Thu, 6 Oct 2022 at 11:37, Jesper Dangaard Brouer <jbrouer@redhat.com> wrote:
>
>
>
> On 05/10/2022 14.40, Shenwei Wang wrote:
> > 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
> >
>
> It is very pleasing to see the *huge* performance benefit that page_pool
> provide when recycling pages for SKBs (via skb_mark_for_recycle).
> I did expect a performance boost, but not around a x2 performance boost.
Indeed that's a pleasant surprise. Keep in mind that if we convert
more driver we
can also get rid of copy_break code sprinkled around in drivers.
Thanks
/Ilias
>
> I guess this platform have a larger overhead for DMA-mapping and
> page-allocation.
>
> IMHO it would be valuable to include this result as part of the patch
> description when you post the XDP patch again.
>
> Only strange result is XDP_PASS 'Native' is slower that 'SKB-mode'. I
> cannot explain why, as XDP_PASS essentially does nothing and just follow
> normal driver code to netstack.
>
> Thanks a lot for doing these tests.
> --Jesper
>
> > 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
> >
>
next prev parent reply other threads:[~2022-10-07 8:09 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 15:25 [PATCH 1/1] net: fec: add initial XDP support Shenwei Wang
2022-09-28 21:18 ` kernel test robot
2022-09-29 1:33 ` Andrew Lunn
2022-09-29 12:40 ` [EXT] " Shenwei Wang
2022-09-29 13:22 ` Andrew Lunn
2022-09-29 13:26 ` Shenwei Wang
2022-09-29 15:19 ` Andrew Lunn
2022-09-29 15:28 ` Jesper Dangaard Brouer
2022-09-29 15:39 ` Andrew Lunn
2022-09-29 15:52 ` Shenwei Wang
2022-09-29 18:55 ` Jesper Dangaard Brouer
2022-10-03 12:49 ` Shenwei Wang
2022-10-04 11:21 ` Jesper Dangaard Brouer
2022-10-04 13:12 ` Shenwei Wang
2022-10-04 13:34 ` Shenwei Wang
2022-10-05 12:40 ` Shenwei Wang
2022-10-06 8:37 ` Jesper Dangaard Brouer
2022-10-07 8:08 ` Ilias Apalodimas [this message]
2022-10-07 19:18 ` Shenwei Wang
2022-09-29 1:50 ` Andrew Lunn
2022-09-29 12:46 ` [EXT] " Shenwei Wang
2022-09-29 13:24 ` Andrew Lunn
2022-09-29 13:35 ` Shenwei Wang
2022-09-29 2:43 ` kernel test robot
2022-09-29 10:16 ` Jesper Dangaard Brouer
2022-09-29 13:11 ` [EXT] " Shenwei Wang
2022-09-29 15:44 ` Jesper Dangaard Brouer
2022-10-03 5:41 ` kernel test robot
2022-10-25 20:11 Shenwei Wang
2022-10-25 22:08 ` Andrew Lunn
2022-10-27 1:50 ` [EXT] " Shenwei Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC_iWjJ7AgpSZeOW+K8nMwgmZ-zC3h_nsfvGsJRrY2Aq2UVqSA@mail.gmail.com \
--to=ilias.apalodimas@linaro.org \
--cc=andrew@lunn.ch \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=imx@lists.linux.dev \
--cc=jbrouer@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=magnus.karlsson@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).