From: Pramod Kumar <pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org
Cc: swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org,
hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org,
Pramod Kumar <pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH 2/2] cxgb4/rdma: configure 0B MRs to match HW implementation
Date: Thu, 16 Oct 2014 15:06:29 +0530 [thread overview]
Message-ID: <1413452189-5427-3-git-send-email-pramod@chelsio.com> (raw)
In-Reply-To: <1413452189-5427-1-git-send-email-pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
0B MRs need some tweaks to work correctly with HW.
So when writing the TPTE, if the MR length is zero we now do:
1) turn off all permissions
2) set the length to -1
While functionality/capabilities of the MR is the same with these
changes, it resolves a dapltest 0B RDMA Read test failure
Based on original work by Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Signed-off-by: Pramod Kumar <pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Signed-off-by: Hariprasad Shenai <hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
drivers/infiniband/hw/cxgb4/mem.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
index ec7a298..a299ba8 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -369,9 +369,11 @@ static int register_mem(struct c4iw_dev *rhp, struct c4iw_pd *php,
int ret;
ret = write_tpt_entry(&rhp->rdev, 0, &stag, 1, mhp->attr.pdid,
- FW_RI_STAG_NSMR, mhp->attr.perms,
+ FW_RI_STAG_NSMR, mhp->attr.len ?
+ mhp->attr.perms : 0,
mhp->attr.mw_bind_enable, mhp->attr.zbva,
- mhp->attr.va_fbo, mhp->attr.len, shift - 12,
+ mhp->attr.va_fbo, mhp->attr.len ?
+ mhp->attr.len : -1, shift - 12,
mhp->attr.pbl_size, mhp->attr.pbl_addr);
if (ret)
return ret;
--
1.7.1
--
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
next prev parent reply other threads:[~2014-10-16 9:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 9:36 [PATCH 0/2] : cxgb4/rdma patches Pramod Kumar
[not found] ` <1413452189-5427-1-git-send-email-pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-10-16 9:36 ` [PATCH 1/2] cxgb4/rdma:Increase epd buff size for debug interface Pramod Kumar
2014-10-16 9:36 ` Pramod Kumar [this message]
[not found] ` <1413452189-5427-3-git-send-email-pramod-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2014-10-16 10:22 ` [PATCH 2/2] cxgb4/rdma: configure 0B MRs to match HW implementation Or Gerlitz
[not found] ` <543F9C7D.8010401-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-10-16 14:17 ` 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=1413452189-5427-3-git-send-email-pramod@chelsio.com \
--to=pramod-ut6up61k2wzbdgjk7y7tuq@public.gmane.org \
--cc=hariprasad-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@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