From: "Steve Wise" <swise@opengridcomputing.com>
To: 'Or Gerlitz' <gerlitz.or@gmail.com>
Cc: 'Doug Ledford' <dledford@redhat.com>,
'Roi Dayan' <roid@mellanox.com>,
linux-rdma@vger.kernel.org, 'Sagi Grimberg' <sagig@mellanox.com>,
'Mike Marciniszyn' <infinipath@intel.com>,
target-devel@vger.kernel.org, 'Eli Cohen' <eli@mellanox.com>,
'Or Gerlitz' <ogerlitz@mellanox.com>
Subject: RE: [PATCH V3 4/4] RDMA/isert: Support iWARP transport
Date: Wed, 1 Jul 2015 15:53:19 -0500 [thread overview]
Message-ID: <009a01d0b43f$f5fa8640$e1ef92c0$@opengridcomputing.com> (raw)
In-Reply-To: <CAJ3xEMjWVwbW0sgVsMj3hPLMRZgJ8srMG89gYzUEbvQAHBaUEw@mail.gmail.com>
> -----Original Message-----
> From: Or Gerlitz [mailto:gerlitz.or@gmail.com]
> Sent: Wednesday, July 01, 2015 3:33 PM
> To: Steve Wise
> Cc: Doug Ledford; Roi Dayan; linux-rdma@vger.kernel.org; Sagi Grimberg; Mike Marciniszyn; target-devel@vger.kernel.org; Eli Cohen; Or
> Gerlitz
> Subject: Re: [PATCH V3 4/4] RDMA/isert: Support iWARP transport
>
> On Wed, Jul 1, 2015 at 7:30 PM, Steve Wise <swise@opengridcomputing.com> wrote:
> > Memory regions that are the target of an iWARP RDMA READ RESPONSE need
> > REMOTE_WRITE access rights. So enable REMOTE_WRITE for iWARP devices.
>
> I don't see the point to mess the code with this branching on the
> iwarp specific diffs from IB/RoCE -- note that the MRs for which you
> mangle their access flags are LOCAL and not advertised to external
> entity (initiator), hence why not just OR into the access flags what
> iwarp needs?!
Yes, the MR is a local MR, but it is used for REMOTE access for iWARP, but not IB. It think the reason is that in iWARP there is no distinction between local and remote keys. For iwarp you get 1 key called a Steering Tag or STAG that is used both locally and advertised to the peer (if to be used for REMOTE IO). Further, that STAG is sent to the peer in the RDMA READ REQUEST and the peer iWARP stack uses it to generate READ RESPONSE messages with the advertised STAG as the READ DESTINATION. And thus these STAGs require REMOTE_WRITE access flags. In IB, I believe the "key" sent in the READ REQUEST is not the MR lkey or rkey at all, but a one-shot transaction key, valid for that READ operation only, and the local IB stack uses this key to map to the destination MR/lkey when processing th
e RDMA READ RESPONSE. This difference in the protocols is what drives the access flag difference.
Regardless, I'm not sure what you propose I do differently? The code in this patch does OR the needed access flag if the device is iWARP when creating the DMA_MR.
>
> > Use the device's max_sge_rd capability to compute the target's read sge
> > depth. Save both the read and write max_sge values in the isert_conn
> > struct, and use these when creating RDMA_READ work requests
>
> We have here strictly two related but different changes, break this to
> two patches.
>
Easy enough.
> > +static int any_port_is_iwarp(struct isert_device *device)
> > +{
> > + int i;
> > +
> > + for (i = rdma_start_port(device->ib_device);
> > + i <= rdma_end_port(device->ib_device); i++)
> > + if (rdma_protocol_iwarp(device->ib_device, i))
> > + return 1;
> > + return 0;
> > +}
> > +
>
> If this needed @ all, put in one of the IB core headers, not in a ULP source
As per the consensus on V2 of the series, the core changes to remove any_port_is_iwarp() will be in a subsequent series so we can carefully review the new proposed API and see how it affects the apps that use it (iSER and NFSRDMA). I'll be posting this 2nd series soon.
Thanks!
Steve.
next prev parent reply other threads:[~2015-07-01 20:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-01 16:30 [PATCH V3 0/4] iSER support for iWARP Steve Wise
2015-07-01 16:30 ` [PATCH V3 1/4] mlx4, mlx5, mthca: Expose max_sge_rd correctly Steve Wise
[not found] ` <20150701162936.6501.45512.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2015-07-01 16:30 ` [PATCH V3 2/4] ipath,qib: " Steve Wise
2015-07-01 16:30 ` [PATCH V3 4/4] RDMA/isert: Support iWARP transport Steve Wise
[not found] ` <20150701163058.6501.39171.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2015-07-01 17:16 ` Sagi Grimberg
2015-07-01 20:33 ` Or Gerlitz
2015-07-01 20:53 ` Steve Wise [this message]
2015-07-01 21:03 ` Or Gerlitz
2015-07-02 6:28 ` Sagi Grimberg
[not found] ` <5594DA1E.7040604-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-02 13:17 ` Steve Wise
2015-07-02 16:39 ` Jason Gunthorpe
[not found] ` <20150702163937.GB4642-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-07-04 10:51 ` Sagi Grimberg
2015-07-01 16:30 ` [PATCH V3 3/4] RDMA/iser: limit sg tablesize to device fastreg max depth Steve Wise
[not found] ` <20150701163052.6501.27775.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>
2015-07-01 17:07 ` Sagi Grimberg
[not found] ` <55941E6F.5080208-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-07-01 18:11 ` Steve Wise
2015-07-01 20:27 ` Or Gerlitz
2015-07-01 20:41 ` Steve Wise
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='009a01d0b43f$f5fa8640$e1ef92c0$@opengridcomputing.com' \
--to=swise@opengridcomputing.com \
--cc=dledford@redhat.com \
--cc=eli@mellanox.com \
--cc=gerlitz.or@gmail.com \
--cc=infinipath@intel.com \
--cc=linux-rdma@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=roid@mellanox.com \
--cc=sagig@mellanox.com \
--cc=target-devel@vger.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