Re: [PATCH V6 net-next 2/2] net: fec: improve XDP_TX performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wei Fang <wei.fang@xxxxxxx>
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@xxxxxxx>
> Suggested-by: Alexander Lobakin <aleksander.lobakin@xxxxxxxxx>
> Suggested-by: Jesper Dangaard Brouer <hawk@xxxxxxxxxx>

BTW I forgot to mention that it was Maciej Fijalkowski
<maciej.fijalkowski@xxxxxxxxx> 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@xxxxxxxxxx>
> ---
> 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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux