On Mon, Oct 25, 2010 at 06:36:43AM -0700, Roland Dreier wrote:
>
> I suspect I broke either the UD header packing or the build_mlx_header
> function when I "cleaned up" the patches. I see the same problem, I'll
> take a look today.
I think this will fix things up. The + operator has precedence over
the ? operator so we end up with packet_length equal IB_GRH_BYTES / 4
which is wrong.
diff --git a/drivers/infiniband/core/ud_header.c
b/drivers/infiniband/core/ud_header.c
index 7e5d224..bb7e192 100644
--- a/drivers/infiniband/core/ud_header.c
+++ b/drivers/infiniband/core/ud_header.c
@@ -241,7 +241,7 @@ void ib_ud_header_init(int
payload_bytes,
packet_length = (IB_LRH_BYTES +
IB_BTH_BYTES +
IB_DETH_BYTES +
- grh_present ? IB_GRH_BYTES : 0 +
+ (grh_present ? IB_GRH_BYTES : 0) +
payload_bytes +
4 + /* ICRC */
3) / 4; /* round up */
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html