netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Leon Romanovsky <leon@kernel.org>,
	Haiyang Zhang <haiyangz@microsoft.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Ajay Sharma <sharmaajay@microsoft.com>,
	Dexuan Cui <decui@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>, Wei Liu <wei.liu@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing
Date: Tue, 9 May 2023 19:08:36 +0000	[thread overview]
Message-ID: <PH7PR21MB326324A880890867496A60C5CE769@PH7PR21MB3263.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20230509073034.GA38143@unreal>

> Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to
> enable RX coalescing
> 
> On Mon, May 08, 2023 at 02:45:44PM +0000, Haiyang Zhang wrote:
> >
> >
> > > -----Original Message-----
> > > From: Leon Romanovsky <leon@kernel.org>
> > > Sent: Monday, May 8, 2023 2:10 AM
> > > To: Haiyang Zhang <haiyangz@microsoft.com>
> > > Cc: Long Li <longli@microsoft.com>; Jason Gunthorpe <jgg@ziepe.ca>;
> > > Ajay Sharma <sharmaajay@microsoft.com>; Dexuan Cui
> > > <decui@microsoft.com>; KY Srinivasan <kys@microsoft.com>; Wei Liu
> <wei.liu@kernel.org>; David S.
> > > Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>;
> > > Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>;
> > > linux- rdma@vger.kernel.org; linux-hyperv@vger.kernel.org;
> > > netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> > > Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
> > > cfg_rx_steer_req to enable RX coalescing
> > >
> > > On Sun, May 07, 2023 at 09:39:27PM +0000, Haiyang Zhang wrote:
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Leon Romanovsky <leon@kernel.org>
> > > > > Sent: Sunday, May 7, 2023 4:11 AM
> > > > > To: Long Li <longli@microsoft.com>
> > > > > Cc: Jason Gunthorpe <jgg@ziepe.ca>; Ajay Sharma
> > > > > <sharmaajay@microsoft.com>; Dexuan Cui <decui@microsoft.com>; KY
> > > > > 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>;
> Jakub
> > > > > Kicinski <kuba@kernel.org>;
> > > Paolo
> > > > > Abeni <pabeni@redhat.com>; linux-rdma@vger.kernel.org; linux-
> > > > > hyperv@vger.kernel.org; netdev@vger.kernel.org; linux-
> > > > > kernel@vger.kernel.org
> > > > > Subject: Re: [PATCH] RDMA/mana_ib: Use v2 version of
> > > > > cfg_rx_steer_req
> > > to
> > > > > enable RX coalescing
> > > > >
> > > > > On Fri, May 05, 2023 at 11:51:48AM -0700,
> > > > > longli@linuxonhyperv.com
> > > > > wrote:
> > > > > > From: Long Li <longli@microsoft.com>
> > > > > >
> > > > > > With RX coalescing, one CQE entry can be used to indicate
> > > > > > multiple
> > > packets
> > > > > > on the receive queue. This saves processing time and PCI
> > > > > > bandwidth over the CQ.
> > > > > >
> > > > > > Signed-off-by: Long Li <longli@microsoft.com>
> > > > > > ---
> > > > > >  drivers/infiniband/hw/mana/qp.c |  5 ++++-
> > > > > >  include/net/mana/mana.h         | 17 +++++++++++++++++
> > > > > >  2 files changed, 21 insertions(+), 1 deletion(-)
> > > > >
> > > > > Why didn't you change mana_cfg_vport_steering() too?
> > > >
> > > > The mana_cfg_vport_steering() is for mana_en (Enthernet) driver,
> > > > not the mana_ib driver.
> > > >
> > > > The changes for mana_en will be done in a separate patch together
> > > > with changes for mana_en RX code patch to support multiple packets /
> CQE.
> > >
> > > I'm aware of the difference between mana_en and mana_ib.
> > >
> > > The change you proposed doesn't depend on "support multiple packets
> > > / CQE."
> > > and works perfectly with one packet/CQE also, does it?
> >
> > No.
> > If we add the following setting to the mana_en /
> > mana_cfg_vport_steering(), the NIC may put multiple packets in one
> > CQE, so we need to have the changes for mana_en RX code path to support
> multiple packets / CQE.
> > +	req->cqe_coalescing_enable = true;
> 
> You can leave "cqe_coalescing_enable = false" for ETH and still reuse your new
> v2 struct.

I think your proposal will work for both Ethernet and IB.

The idea is that we want this patch to change the behavior of the IB driver. We plan to make another patch for the Ethernet driver. This makes it easier to track all changes for a driver.

> 
> H>
> > So we plan to set this cqe_coalescing_enable, and the changes for
> > mana_en RX code path to support multiple packets / CQE in another patch.
> 
> And how does it work with IB without changing anything except this proposed
> patch?

The RX CQE Coalescing is implemented in the user-mode. This feature is always turned on from cluster. The user-mode code is written in a way that can deal with both CQE Coalescing and CQE non-coalescing, so it doesn't depend on kernel version for the correct behavior.
Thanks,
Long

  reply	other threads:[~2023-05-09 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 18:51 [PATCH] RDMA/mana_ib: Use v2 version of cfg_rx_steer_req to enable RX coalescing longli
2023-05-07  8:10 ` Leon Romanovsky
2023-05-07 21:39   ` Haiyang Zhang
2023-05-08  6:09     ` Leon Romanovsky
2023-05-08 14:45       ` Haiyang Zhang
2023-05-09  7:30         ` Leon Romanovsky
2023-05-09 19:08           ` Long Li [this message]
2023-05-10  6:58             ` Leon Romanovsky
2023-05-10 16:37               ` Long Li
2023-05-10 16:57                 ` Leon Romanovsky

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=PH7PR21MB326324A880890867496A60C5CE769@PH7PR21MB3263.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --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=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sharmaajay@microsoft.com \
    --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).