From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH/libmlx4] Fix generation of IBV_WC_GRH
Date: Fri, 4 Mar 2011 19:45:46 -0700 [thread overview]
Message-ID: <20110305024546.GA29147@obsidianresearch.com> (raw)
Byte swap was erroneously using short not long, so the test always
returns false as 0x80000000 is greater than 16 bits.
Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
src/cq.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Found and tested on a MT25418
Looks like this is a cut and paste error from libmthca which has a
similar line.
Also confirmed that the kernel has a correct version.
diff --git a/src/cq.c b/src/cq.c
index 2d04883..bc53f9b 100644
--- a/src/cq.c
+++ b/src/cq.c
@@ -317,7 +317,7 @@ static int mlx4_poll_one(struct mlx4_cq *cq,
wc->src_qp = ntohl(cqe->g_mlpath_rqpn) & 0xffffff;
wc->dlid_path_bits = (ntohl(cqe->g_mlpath_rqpn) >> 24) & 0x7f;
wc->pkey_index = ntohl(cqe->immed_rss_invalid) >> 16;
- wc->wc_flags |= ntohs(cqe->g_mlpath_rqpn) & 0x80000000 ?
+ wc->wc_flags |= ntohl(cqe->g_mlpath_rqpn) & 0x80000000 ?
IBV_WC_GRH : 0;
}
--
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 reply other threads:[~2011-03-05 2:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-05 2:45 Jason Gunthorpe [this message]
[not found] ` <20110305024546.GA29147-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-03-08 18:04 ` [PATCH/libmlx4] Fix generation of IBV_WC_GRH Roland Dreier
[not found] ` <AANLkTimu6dGc1NcsgP60iPqNmzGR+cmtwGHjsU_c=LWz-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-03-08 18:32 ` Jason Gunthorpe
2011-03-09 7:48 ` Or Gerlitz
[not found] ` <4D7730C4.2000109-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2011-03-09 7:51 ` Or Gerlitz
2011-03-09 7:51 ` Roland Dreier
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=20110305024546.GA29147@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.