aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/ib_pack.h
diff options
context:
space:
mode:
authorEli Cohen <eli@mellanox.co.il>2010-02-08 06:40:37 -0500
committerRoland Dreier <rolandd@cisco.com>2010-02-24 17:54:10 -0500
commit920d706c892e8f8cfff95f46aeb95fc6344f0bd5 (patch)
treea4219e9b0bc285bb080b4239107cf9e391017c66 /include/rdma/ib_pack.h
parentccbe9f0b11b137c9453771a7ca3bf417dc7ce152 (diff)
IB/core: Fix and clean up ib_ud_header_init()
ib_ud_header_init() first clears header and then fills up the various fields. Later on, it tests header->immediate_present, which it has already cleared, so the condition is always false. Fix this by adding an immediate_present parameter and setting header->immediate_present as is done with grh_present. Also remove unused calculation of header_len. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/rdma/ib_pack.h')
-rw-r--r--include/rdma/ib_pack.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rdma/ib_pack.h b/include/rdma/ib_pack.h
index d7fc45c4eba9..cbb50f4da3dd 100644
--- a/include/rdma/ib_pack.h
+++ b/include/rdma/ib_pack.h
@@ -232,6 +232,7 @@ void ib_unpack(const struct ib_field *desc,
232 232
233void ib_ud_header_init(int payload_bytes, 233void ib_ud_header_init(int payload_bytes,
234 int grh_present, 234 int grh_present,
235 int immediate_present,
235 struct ib_ud_header *header); 236 struct ib_ud_header *header);
236 237
237int ib_ud_header_pack(struct ib_ud_header *header, 238int ib_ud_header_pack(struct ib_ud_header *header,