From: "Bharath Ramesh" <bramesh-PjAqaU27lzQ@public.gmane.org>
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: IB atomic operations
Date: Fri, 25 Feb 2011 02:30:32 -0500 [thread overview]
Message-ID: <00b701cbd4bd$e271fe20$a755fa60$@edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
Hi,
I am trying to use IB atomic operations, specifically fetch and add.
I tried a small example but I am unable to get it to work. The WC status is
IBV_WC_REM_INV_REQ_ERR. My sample code is as follows:
sge.addr = (uintptr_t) &data;
sge.length = sizeof (uint64_t);
sge.lkey = ib_mr->lkey;
wr.opcode = IBV_WR_ATOMIC_FETCH_AND_ADD;
wr.send_flags = IBV_SEND_SIGNALED;
wr.next = NULL;
wr.num_sge = 1;
wr.sg_list = &sge;
wr.wr.atomic.remote_addr = vaddr;
wr.wr.atomic.compare_add = 1;
//wr.wr.atomic.swap = 0;
wr.wr.atomic.rkey = rkey;
wr.wr_id = 1;
ret = ibv_post_send (ib_qp, &wr, &wr_bad);
do {
c = ibv_poll_cq (ib_cq, 1, &wc);
} while (c == 0);
if (c < 0) {
printf ("ERROR: ibv_poll_cq failed.\n");
return -1;
}
if (wc.status != IBV_WC_SUCCESS) {
// print wc info.
// print qp status.
}
Any help on this appreciated.
Regards,
Bharath
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 4985 bytes --]
next reply other threads:[~2011-02-25 7:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 7:30 Bharath Ramesh [this message]
2011-02-25 15:57 ` IB atomic operations frank zago
[not found] ` <4D67D17C.7000405-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-25 16:04 ` Bharath Ramesh
2011-02-25 16:12 ` frank zago
[not found] ` <4D67D4F2.4040404-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-25 16:32 ` Bharath Ramesh
2011-02-25 16:59 ` frank zago
[not found] ` <4D67E006.8000705-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-25 17:29 ` Bharath Ramesh
2011-02-25 18:30 ` Bharath Ramesh
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='00b701cbd4bd$e271fe20$a755fa60$@edu' \
--to=bramesh-pjaqau27lzq@public.gmane.org \
--cc=linux-rdma-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