[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH7PR21MB3116FB2C7E12556B0007C9BFCA58A@PH7PR21MB3116.namprd21.prod.outlook.com>
Date: Fri, 16 Jun 2023 16:49:07 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: "longli@...uxonhyperv.com" <longli@...uxonhyperv.com>, KY Srinivasan
<kys@...rosoft.com>, Wei Liu <wei.liu@...nel.org>, Dexuan Cui
<decui@...rosoft.com>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Leon Romanovsky <leon@...nel.org>, Shradha Gupta
<shradhagupta@...ux.microsoft.com>, Ajay Sharma <sharmaajay@...rosoft.com>,
Shachar Raindel <shacharr@...rosoft.com>, Stephen Hemminger
<stephen@...workplumber.org>, "linux-hyperv@...r.kernel.org"
<linux-hyperv@...r.kernel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
CC: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>, Long Li
<longli@...rosoft.com>, "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH] net: mana: Batch ringing RX queue doorbell on receiving
packets
> -----Original Message-----
> From: longli@...uxonhyperv.com <longli@...uxonhyperv.com>
> Sent: Thursday, June 15, 2023 7:28 PM
> To: KY Srinivasan <kys@...rosoft.com>; Haiyang Zhang
> <haiyangz@...rosoft.com>; Wei Liu <wei.liu@...nel.org>; Dexuan Cui
> <decui@...rosoft.com>; David S. Miller <davem@...emloft.net>; Eric
> Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo
> Abeni <pabeni@...hat.com>; Leon Romanovsky <leon@...nel.org>; Shradha
> Gupta <shradhagupta@...ux.microsoft.com>; Ajay Sharma
> <sharmaajay@...rosoft.com>; Shachar Raindel <shacharr@...rosoft.com>;
> Stephen Hemminger <stephen@...workplumber.org>; linux-
> hyperv@...r.kernel.org; netdev@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Cc: linux-rdma@...r.kernel.org; Long Li <longli@...rosoft.com>;
> stable@...r.kernel.org
> Subject: [PATCH] net: mana: Batch ringing RX queue doorbell on receiving
> packets
>
> From: Long Li <longli@...rosoft.com>
>
> 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@...r.kernel.org
> Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network
> Adapter (MANA)")
> Signed-off-by: Long Li <longli@...rosoft.com>
> ---
> drivers/net/ethernet/microsoft/mana/mana_en.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c
> b/drivers/net/ethernet/microsoft/mana/mana_en.c
> index cd4d5ceb9f2d..ef1f0ce8e44d 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> @@ -1383,8 +1383,8 @@ static void mana_post_pkt_rxq(struct mana_rxq
> *rxq)
>
> recv_buf_oob = &rxq->rx_oobs[curr_index];
>
> - err = mana_gd_post_and_ring(rxq->gdma_rq, &recv_buf_oob-
> >wqe_req,
> - &recv_buf_oob->wqe_inf);
> + err = mana_gd_post_work_request(rxq->gdma_rq, &recv_buf_oob-
> >wqe_req,
> + &recv_buf_oob->wqe_inf);
> if (WARN_ON_ONCE(err))
> return;
>
> @@ -1654,6 +1654,12 @@ static void mana_poll_rx_cq(struct mana_cq *cq)
> mana_process_rx_cqe(rxq, cq, &comp[i]);
> }
>
> + if (comp_read) {
> + struct gdma_context *gc = rxq->gdma_rq->gdma_dev-
> >gdma_context;
> +
> + mana_gd_wq_ring_doorbell(gc, rxq->gdma_rq);
> + }
> +
Thank you!
Reviewed-by: Haiyang Zhang <haiyangz@...rosoft.com>
Powered by blists - more mailing lists