From: Leon Romanovsky <leon@kernel.org>
To: "Marciniszyn, Mike" <mike.marciniszyn@cornelisnetworks.com>
Cc: Haakon Bugge <haakon.bugge@oracle.com>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
OFED mailing list <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH for-rc] IB/rdmavt: Validate remote_addr during loopback atomic tests
Date: Tue, 25 Jan 2022 09:34:44 +0200 [thread overview]
Message-ID: <Ye+oFAX/GzOD3MzU@unreal> (raw)
In-Reply-To: <CH0PR01MB7153A251BF2D1F2C4A8ACFDAF25E9@CH0PR01MB7153.prod.exchangelabs.com>
On Mon, Jan 24, 2022 at 01:20:56PM +0000, Marciniszyn, Mike wrote:
> > From: Haakon Bugge <haakon.bugge@oracle.com>
> > Sent: Monday, January 24, 2022 7:44 AM
> > To: Leon Romanovsky <leon@kernel.org>
> > Cc: Marciniszyn, Mike <mike.marciniszyn@cornelisnetworks.com>;
> > jgg@ziepe.ca; OFED mailing list <linux-rdma@vger.kernel.org>
> > Subject: Re: [PATCH for-rc] IB/rdmavt: Validate remote_addr during
> > loopback atomic tests
> > > And is IBTA restriction applicable to hfi1?
> >
> > For hfi1, I do not know. But this fix was in drivers/infiniband/sw/rdmavt, for
> > which the first commit message states:
> >
> > This patch introduces the basics for a new module called rdma_vt. This new
> > driver is a software implementation of the InfiniBand verbs...
> >
> >
> > More importantly, the check we discuss is not about being page-aligned, but
> > about being naturally aligned, right?
> >
>
> Hardware supported by rdamvt strives to be 100% compatible with the verbs API.
>
> And yes, the natural alignment is the objective for the test.
>
> According to the IB Spec (V1-Rel1.2.1 section 9.4.5 ATOMIC OPERATIONS):
> "The virtual address in the ATOMIC Command Request packet shall
> be naturally aligned to an 8 byte boundary. The responding CA
> checks this and returns an Invalid Request NAK if it is not naturally
> aligned."
>
> The recent additions to the rdma-core test suite caught this issue.
>
> The test is consistent with input packet parsing:
>
> case OP(COMPARE_SWAP):
> case OP(FETCH_ADD): {
> <snip>
> if (unlikely(vaddr & (sizeof(u64) - 1)))
> goto nack_inv_unlck;
I see, thanks Mike and Haakon.
next prev parent reply other threads:[~2022-01-25 7:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 9:28 [PATCH for-rc] IB/rdmavt: Validate remote_addr during loopback atomic tests mike.marciniszyn
2022-01-23 10:34 ` Leon Romanovsky
2022-01-24 12:25 ` Haakon Bugge
2022-01-24 12:33 ` Leon Romanovsky
2022-01-24 12:43 ` Haakon Bugge
2022-01-24 13:20 ` Marciniszyn, Mike
2022-01-25 7:34 ` Leon Romanovsky [this message]
2022-01-28 16:51 ` Jason Gunthorpe
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=Ye+oFAX/GzOD3MzU@unreal \
--to=leon@kernel.org \
--cc=haakon.bugge@oracle.com \
--cc=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=mike.marciniszyn@cornelisnetworks.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