Re: [PATCH net-next 1/1] net: stmmac: enhance XDP ZC driver level switching performance

From: Kurt Kanzenbach
Date: Sun Nov 14 2021 - 10:11:53 EST


On Thu Nov 11 2021, Ong Boon Leong wrote:
> The previous stmmac_xdp_set_prog() implementation uses stmmac_release()
> and stmmac_open() which tear down the PHY device and causes undesirable
> autonegotiation which causes a delay whenever AFXDP ZC is setup.
>
> This patch introduces two new functions that just sufficiently tear
> down DMA descriptors, buffer, NAPI process, and IRQs and reestablish
> them accordingly in both stmmac_xdp_release() and stammac_xdp_open().
>
> As the results of this enhancement, we get rid of transient state
> introduced by the link auto-negotiation:
>
> $ ./xdpsock -i eth0 -t -z
>
> sock0@eth0:0 txonly xdp-drv
> pps pkts 1.00
> rx 0 0
> tx 634444 634560
>
> sock0@eth0:0 txonly xdp-drv
> pps pkts 1.00
> rx 0 0
> tx 632330 1267072
>
> sock0@eth0:0 txonly xdp-drv
> pps pkts 1.00
> rx 0 0
> tx 632438 1899584
>
> sock0@eth0:0 txonly xdp-drv
> pps pkts 1.00
> rx 0 0
> tx 632502 2532160
>
> Reported-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@xxxxxxxxx>

Tested-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature