RE: [PATCH v2] net: mana: Batch ringing RX queue doorbell on receiving packets

From: Haiyang Zhang
Date: Thu Jun 22 2023 - 17:27:37 EST




> -----Original Message-----
> From: longli@xxxxxxxxxxxxxxxxx <longli@xxxxxxxxxxxxxxxxx>
> Sent: Thursday, June 22, 2023 12:23 PM
> To: Jason Gunthorpe <jgg@xxxxxxxx>; Leon Romanovsky <leon@xxxxxxxxxx>;
> Ajay Sharma <sharmaajay@xxxxxxxxxxxxx>; Dexuan Cui
> <decui@xxxxxxxxxxxxx>; KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang
> <haiyangz@xxxxxxxxxxxxx>; Wei Liu <wei.liu@xxxxxxxxxx>; David S. Miller
> <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>; Jakub
> Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>
> Cc: linux-rdma@xxxxxxxxxxxxxxx; linux-hyperv@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Long Li
> <longli@xxxxxxxxxxxxx>; stable@xxxxxxxxxxxxxxx
> Subject: [PATCH v2] net: mana: Batch ringing RX queue doorbell on receiving
> packets
>
> From: Long Li <longli@xxxxxxxxxxxxx>
>
> It's inefficient to ring the doorbell page every time a WQE is posted to
> the received queue.
>
> Move the code for ringing doorbell page to where after we have posted all
> WQEs to the receive queue during a callback from napi_poll().
>
> Tests showed no regression in network latency benchmarks.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network
> Adapter (MANA)")
> Signed-off-by: Long Li <longli@xxxxxxxxxxxxx>

Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>