diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2007-12-24 13:54:01 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-03 19:14:05 -0800 |
commit | b2b26f8a73108f971ade988fac3eb9d0446bbbb6 (patch) | |
tree | 516770d6348ea669d32d6c344347adec78c32e9f | |
parent | 03554590f8b5fcf673d424dd48d66dd465c27bed (diff) | |
download | libmlx4-b2b26f8a73108f971ade988fac3eb9d0446bbbb6.tar.gz |
Fix test for GRH presence in mlx4_poll_one()
The CQE member g_mlpath_rqpn is 32 bits, so we need to use ntohl().
Found by Reuven Amitai of Mellanox.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | src/cq.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |