Commit dede3413 authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds

[PATCH] InfiniBand/core: set byte_cnt correctly in MAD completion

Integrate Michael Tsirkin's patch to local_completion to set the WC byte_cnt
according to the IBA 1.1 spec (include the GRH size regardless of whether it
is present or not).
Signed-off-by: default avatarHal Rosenstock <halr@voltaire.com>
Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d8628f05
...@@ -2017,9 +2017,10 @@ static void local_completions(void *data) ...@@ -2017,9 +2017,10 @@ static void local_completions(void *data)
wc.status = IB_WC_SUCCESS; wc.status = IB_WC_SUCCESS;
wc.opcode = IB_WC_RECV; wc.opcode = IB_WC_RECV;
wc.vendor_err = 0; wc.vendor_err = 0;
wc.byte_len = sizeof(struct ib_mad); wc.byte_len = sizeof(struct ib_mad) +
sizeof(struct ib_grh);
wc.src_qp = IB_QP0; wc.src_qp = IB_QP0;
wc.wc_flags = 0; wc.wc_flags = 0; /* No GRH */
wc.pkey_index = 0; wc.pkey_index = 0;
wc.slid = IB_LID_PERMISSIVE; wc.slid = IB_LID_PERMISSIVE;
wc.sl = 0; wc.sl = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment