From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 2/2] nvme-rdma: add support for arbitrary sg lists mapping
Date: Wed, 12 Apr 2017 19:17:59 +0200 [thread overview]
Message-ID: <20170412171759.GC8639@lst.de> (raw)
In-Reply-To: <1491948109-9224-2-git-send-email-maxg@mellanox.com>
> - req->mr = ib_alloc_mr(dev->pd, IB_MR_TYPE_MEM_REG,
> + req->mr = ib_alloc_mr(dev->pd, req->mr_type,
> ctrl->max_fr_pages);
> if (IS_ERR(req->mr)) {
> ret = PTR_ERR(req->mr);
> @@ -348,8 +349,12 @@ static int __nvme_rdma_init_request(struct nvme_rdma_ctrl *ctrl,
> if (ret)
> return ret;
>
> - req->mr = ib_alloc_mr(dev->pd, IB_MR_TYPE_MEM_REG,
> - ctrl->max_fr_pages);
> + if (ibdev->attrs.device_cap_flags & IB_DEVICE_SG_GAPS_REG)
> + req->mr_type = IB_MR_TYPE_SG_GAPS;
> + else
> + req->mr_type = IB_MR_TYPE_MEM_REG;
Why do we need the req->mr_type member? Can't we just check the device
aps in the reinit path as well?
next prev parent reply other threads:[~2017-04-12 17:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 22:01 [PATCH 1/2] nvme: enable SG gaps support Max Gurtovoy
2017-04-11 22:01 ` [PATCH 2/2] nvme-rdma: add support for arbitrary sg lists mapping Max Gurtovoy
2017-04-12 17:17 ` Christoph Hellwig [this message]
2017-04-12 22:58 ` Max Gurtovoy
2017-04-13 7:07 ` Christoph Hellwig
2017-04-11 22:25 ` [PATCH 1/2] nvme: enable SG gaps support Keith Busch
2017-04-12 17:16 ` Christoph Hellwig
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=20170412171759.GC8639@lst.de \
--to=hch@lst.de \
/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).