public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Sagi Grimberg <sagig-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Steve Wise
	<swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Nicholas A. Bellinger"
	<nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org>
Cc: Roi Dayan <roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH V3 4/4] RDMA/isert: Support iWARP transport
Date: Wed, 1 Jul 2015 20:16:26 +0300	[thread overview]
Message-ID: <5594206A.90001@dev.mellanox.co.il> (raw)
In-Reply-To: <20150701163058.6501.39171.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org>

On 7/1/2015 7:30 PM, Steve Wise 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.
>
> 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
>
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
>   drivers/infiniband/ulp/isert/ib_isert.c |   54 ++++++++++++++++++++++++++-----
>   drivers/infiniband/ulp/isert/ib_isert.h |    3 +-
>   2 files changed, 47 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
> index 9e7b492..8334dd0 100644
> --- a/drivers/infiniband/ulp/isert/ib_isert.c
> +++ b/drivers/infiniband/ulp/isert/ib_isert.c
> @@ -163,7 +163,9 @@ isert_create_qp(struct isert_conn *isert_conn,
>   	 * outgoing control PDU responses.
>   	 */
>   	attr.cap.max_send_sge = max(2, device->dev_attr.max_sge - 2);
> -	isert_conn->max_sge = attr.cap.max_send_sge;
> +	isert_conn->max_write_sge = attr.cap.max_send_sge;
> +	isert_conn->max_read_sge = min_t(u32, device->dev_attr.max_sge_rd,
> +					 attr.cap.max_send_sge);
>
>   	attr.cap.max_recv_sge = 1;
>   	attr.sq_sig_type = IB_SIGNAL_REQ_WR;
> @@ -348,6 +350,17 @@ out_cq:
>   	return ret;
>   }
>
> +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;
> +}
> +

Lets get rid of that as soon as possible...

However,
Reviewed-by: Sagi Grimberg <sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>


Nic,

I think it makes sense that this will go via doug's tree.
Any objection?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-07-01 17:16 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 [this message]
2015-07-01 20:33     ` Or Gerlitz
2015-07-01 20:53       ` Steve Wise
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=5594206A.90001@dev.mellanox.co.il \
    --to=sagig-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=eli-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=infinipath-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nab-IzHhD5pYlfBP7FQvKIMDCQ@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roid-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sagig-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org \
    --cc=target-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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