lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V6 net-next 2/2] net: fec: improve XDP_TX performance
From
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

\
 
 \ /
  Last update: 2023-08-16 15:00    [W:0.058 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site