From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Wei Fang <wei.fang@nxp.com>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <shenwei.wang@nxp.com>,
<xiaoning.wang@nxp.com>, <ast@kernel.org>, <daniel@iogearbox.net>,
<hawk@kernel.org>, <john.fastabend@gmail.com>,
<larysa.zaremba@intel.com>, <jbrouer@redhat.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
<netdev@vger.kernel.org>, <linux-imx@nxp.com>,
<linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org>
Subject: Re: [PATCH V6 net-next 2/2] net: fec: improve XDP_TX performance
Date: Wed, 16 Aug 2023 14:57:55 +0200 [thread overview]
Message-ID: <5b00e2c6-738e-7025-91c0-315d67422a0e@intel.com> (raw)
In-Reply-To: <20230815051955.150298-3-wei.fang@nxp.com>
From: Wei Fang <wei.fang@nxp.com>
Date: Tue, 15 Aug 2023 13:19:55 +0800
> As suggested by Jesper and Alexander, we can avoid converting xdp_buff
> to xdp_frame in case of XDP_TX to save a bunch of CPU cycles, so that
> we can further improve the XDP_TX performance.
>
> Before this patch on i.MX8MP-EVK board, the performance shows as follows.
> root@imx8mpevk:~# ./xdp2 eth0
> proto 17: 353918 pkt/s
> proto 17: 352923 pkt/s
> proto 17: 353900 pkt/s
> proto 17: 352672 pkt/s
> proto 17: 353912 pkt/s
> proto 17: 354219 pkt/s
>
> After applying this patch, the performance is improved.
> root@imx8mpevk:~# ./xdp2 eth0
> proto 17: 369261 pkt/s
> proto 17: 369267 pkt/s
> proto 17: 369206 pkt/s
> proto 17: 369214 pkt/s
> proto 17: 369126 pkt/s
> proto 17: 369272 pkt/s
>
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> Suggested-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Suggested-by: Jesper Dangaard Brouer <hawk@kernel.org>
BTW I forgot to mention that it was Maciej Fijalkowski
<maciej.fijalkowski@intel.com> who initially told me that converting
xdp_buff -> xdp_frame is expensive and we can avoid that on XDP_TX (he
introduced that improved to the ice driver half a year ago). Now I feel
like he must've been credited, but it's too late already, sorry :z
> Reviewed-by: Jesper Dangaard Brouer <hawk@kernel.org>
> ---
> V5 changes:
> New patch. Separated from the first patch, to keep track of the changes
> and improvements (suggested by Jesper).
>
> V6 changes:
> No changes.
> ---
> drivers/net/ethernet/freescale/fec.h | 5 +-
> drivers/net/ethernet/freescale/fec_main.c | 140 ++++++++++++----------
> 2 files changed, 75 insertions(+), 70 deletions(-)
[...]
Thanks,
Olek
next prev parent reply other threads:[~2023-08-16 12:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 5:19 [PATCH V6 net-next 0/2] net: fec: add XDP_TX feature support Wei Fang
2023-08-15 5:19 ` [PATCH V6 net-next 1/2] " Wei Fang
2023-08-15 5:19 ` [PATCH V6 net-next 2/2] net: fec: improve XDP_TX performance Wei Fang
2023-08-16 12:57 ` Alexander Lobakin [this message]
2023-08-15 7:39 ` [PATCH V6 net-next 0/2] net: fec: add XDP_TX feature support Jesper Dangaard Brouer
2023-08-16 6:50 ` patchwork-bot+netdevbpf
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=5b00e2c6-738e-7025-91c0-315d67422a0e@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=jbrouer@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.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
all inboxes | Powered by JetHome®