From: Mike Marciniszyn <mike.marciniszyn@intel•com>
To: venkat.x.venkatsubra@oracle•com
Cc: linux-rdma@vger•kernel.org, roland@kernel•org,
rds-devel@oss•oracle.com, davem@davemloft•net,
netdev@vger•kernel.org
Subject: [PATCH 1/2] IB/rds: Correct ib_api use with gs_dma_address/sg_dma_len
Date: Fri, 21 Dec 2012 13:01:49 -0500 [thread overview]
Message-ID: <20121221180149.23716.54707.stgit@phlsvslse11.ph.intel.com> (raw)
In-Reply-To: <20121221175857.23716.46975.stgit@phlsvslse11.ph.intel.com>
0b088e00 ("RDS: Use page_remainder_alloc() for recv bufs")
added uses of sg_dma_len() and sg_dma_address(). This makes
RDS DOA with the qib driver.
IB ulps should use ib_sg_dma_len() and ib_sg_dma_address
respectively since some HCAs overload ib_sg_dma* operations.
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel•com>
---
net/rds/ib_recv.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 8c5bc85..8eb9501 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -339,8 +339,8 @@ static int rds_ib_recv_refill_one(struct rds_connection *conn,
sge->length = sizeof(struct rds_header);
sge = &recv->r_sge[1];
- sge->addr = sg_dma_address(&recv->r_frag->f_sg);
- sge->length = sg_dma_len(&recv->r_frag->f_sg);
+ sge->addr = ib_sg_dma_address(ic->i_cm_id->device, &recv->r_frag->f_sg);
+ sge->length = ib_sg_dma_len(ic->i_cm_id->device, &recv->r_frag->f_sg);
ret = 0;
out:
@@ -381,7 +381,10 @@ void rds_ib_recv_refill(struct rds_connection *conn, int prefill)
ret = ib_post_recv(ic->i_cm_id->qp, &recv->r_wr, &failed_wr);
rdsdebug("recv %p ibinc %p page %p addr %lu ret %d\n", recv,
recv->r_ibinc, sg_page(&recv->r_frag->f_sg),
- (long) sg_dma_address(&recv->r_frag->f_sg), ret);
+ (long) ib_sg_dma_address(
+ ic->i_cm_id->device,
+ &recv->r_frag->f_sg),
+ ret);
if (ret) {
rds_ib_conn_error(conn, "recv post on "
"%pI4 returned %d, disconnecting and "
next prev parent reply other threads:[~2012-12-21 18:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 18:01 [PATCH 0/2] Re-submit RDS patches Mike Marciniszyn
2012-12-21 18:01 ` Mike Marciniszyn [this message]
[not found] ` <20121221180149.23716.54707.stgit-K+u1se/DcYrLESAwzcoQNrvm/XP+8Wra@public.gmane.org>
2012-12-25 12:10 ` [PATCH 1/2] IB/rds: Correct ib_api use with gs_dma_address/sg_dma_len Bart Van Assche
[not found] ` <50D997D0.2020004-HInyCGIudOg@public.gmane.org>
2012-12-26 23:21 ` David Miller
2012-12-26 23:18 ` David Miller
2012-12-21 18:01 ` [PATCH 2/2] IB/rds: suppress incompatible protocol when version is known Mike Marciniszyn
2012-12-26 23:18 ` David Miller
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=20121221180149.23716.54707.stgit@phlsvslse11.ph.intel.com \
--to=mike.marciniszyn@intel$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=rds-devel@oss$(echo .)oracle.com \
--cc=roland@kernel$(echo .)org \
--cc=venkat.x.venkatsubra@oracle$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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