Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Yonatan Nachum <ynachum@amazon.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org, mrgolin@amazon.com,
	sleybo@amazon.com, matua@amazon.com, gal.pressman@linux.dev,
	Daniel Kranzdorf <dkkranzd@amazon.com>
Subject: Re: [PATCH for-next] RDMA/efa: Validate SQ depth based on WQE size
Date: Sun, 17 May 2026 18:52:53 +0300	[thread overview]
Message-ID: <20260517155253.GK33515@unreal> (raw)
In-Reply-To: <20260514204521.GA14420@dev-dsk-ynachum-1b-aa121316.eu-west-1.amazon.com>

On Thu, May 14, 2026 at 08:45:21PM +0000, Yonatan Nachum wrote:
> On Thu, May 14, 2026 at 07:28:12PM +0300, Leon Romanovsky wrote:
> > On Wed, May 13, 2026 at 07:24:51PM +0000, Yonatan Nachum wrote:
> > > On Wed, May 13, 2026 at 08:38:12PM +0300, Leon Romanovsky wrote:
> > > > On Thu, May 07, 2026 at 11:21:10AM +0000, Yonatan Nachum wrote:
> > > > > From: Michael Margolin <mrgolin@amazon.com>
> > > > > 
> > > > > Change the SQ depth validation to take into account the SQ WQE size.
> > > > > This is needed since when using 128-byte WQE the max SQ depth is cut in
> > > > > half. On create QP command, userspace provides SQ ring size which is SQ
> > > > > depth X WQE size so we can calculate the requested WQE size in the
> > > > > kernel.
> > > > > 
> > > > > Reviewed-by: Daniel Kranzdorf <dkkranzd@amazon.com>
> > > > > Reviewed-by: Michael Margolin <mrgolin@amazon.com>
> > > > > Signed-off-by: Yonatan Nachum <ynachum@amazon.com>
> > > > > ---
> > > > >  drivers/infiniband/hw/efa/efa_verbs.c | 39 ++++++++++++++++++---------
> > > > >  1 file changed, 27 insertions(+), 12 deletions(-)
> > > > 
> > > > Please add Fixes line.
> > > > 
> > > > Thanks
> > > 
> > > There is no Fixes tag as this is not a bug fix. The existing validation
> > > works but is overly permissive — it doesn't account for WQE size when
> > > checking max SQ depth. Without it, the device would reject the request
> > > downstream. This patch tightens the validation to fail early in the
> > > kernel.
> > 
> > So why do we need kernel patch after all?
> > 
> > Thanks
> 
> The driver already validates max_send_wr against max_sq_depth — this
> patch just makes that check accurate for the 128-byte WQE case. This
> also gives better error reporting as opposed to device failure.

We seem to be going in circles. You stated that no Fixes tag is needed
and that the previous code behaved correctly. However, as justification
for the change, you described it as providing more accurate and improved
reporting, which effectively sounds like a fix to me.

Thanks

      reply	other threads:[~2026-05-17 15:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 11:21 [PATCH for-next] RDMA/efa: Validate SQ depth based on WQE size Yonatan Nachum
2026-05-13 17:38 ` Leon Romanovsky
2026-05-13 19:24   ` Yonatan Nachum
2026-05-14 16:28     ` Leon Romanovsky
2026-05-14 20:45       ` Yonatan Nachum
2026-05-17 15:52         ` Leon Romanovsky [this message]

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=20260517155253.GK33515@unreal \
    --to=leon@kernel.org \
    --cc=dkkranzd@amazon.com \
    --cc=gal.pressman@linux.dev \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=matua@amazon.com \
    --cc=mrgolin@amazon.com \
    --cc=sleybo@amazon.com \
    --cc=ynachum@amazon.com \
    /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