From: Jakub Kicinski <kuba@kernel.org>
To: longli@linuxonhyperv.com
Cc: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Ajay Sharma <sharmaajay@microsoft.com>,
Dexuan Cui <decui@microsoft.com>,
"K. Y. Srinivasan" <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Long Li <longli@microsoft.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] net: mana: Batch ringing RX queue doorbell on receiving packets
Date: Sat, 24 Jun 2023 15:10:37 -0700 [thread overview]
Message-ID: <20230624151037.699c50c6@kernel.org> (raw)
In-Reply-To: <1687450956-6407-1-git-send-email-longli@linuxonhyperv.com>
On Thu, 22 Jun 2023 09:22:36 -0700 longli@linuxonhyperv.com wrote:
> 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@vger.kernel.org
> Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
If this is supposed to be a fix, you need to clearly explain what the
performance loss was, so that backporters can make an informed decision.
> drivers/net/ethernet/microsoft/mana/gdma_main.c | 5 ++++-
> drivers/net/ethernet/microsoft/mana/mana_en.c | 10 ++++++++--
> 2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
> index 8f3f78b68592..ef11d09a3655 100644
> --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
> +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
> @@ -300,8 +300,11 @@ static void mana_gd_ring_doorbell(struct gdma_context *gc, u32 db_index,
>
> void mana_gd_wq_ring_doorbell(struct gdma_context *gc, struct gdma_queue *queue)
> {
> + /* BNIC Spec specifies that client should set 0 for rq.wqe_cnt
> + * This value is not used in sq
> + */
> mana_gd_ring_doorbell(gc, queue->gdma_dev->doorbell, queue->type,
> - queue->id, queue->head * GDMA_WQE_BU_SIZE, 1);
> + queue->id, queue->head * GDMA_WQE_BU_SIZE, 0);
> }
This change needs to be explained in the commit message, or should be
a separate patch.
--
pw-bot: cr
next prev parent reply other threads:[~2023-06-24 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-22 16:22 [PATCH v2] net: mana: Batch ringing RX queue doorbell on receiving packets longli
2023-06-22 21:27 ` Haiyang Zhang
2023-06-23 3:00 ` Dexuan Cui
2023-06-24 22:10 ` Jakub Kicinski [this message]
2023-06-26 22:55 ` Long Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230624151037.699c50c6@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=jgg@ziepe.ca \
--cc=kys@microsoft.com \
--cc=leon@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@linuxonhyperv.com \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sharmaajay@microsoft.com \
--cc=stable@vger.kernel.org \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).