diff options
author | Eli Cohen <eli@mellanox.co.il> | 2010-02-08 06:40:37 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-02-24 17:54:10 -0500 |
commit | 920d706c892e8f8cfff95f46aeb95fc6344f0bd5 (patch) | |
tree | a4219e9b0bc285bb080b4239107cf9e391017c66 /drivers/infiniband/hw/mlx4 | |
parent | ccbe9f0b11b137c9453771a7ca3bf417dc7ce152 (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 'drivers/infiniband/hw/mlx4')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 2a97c964b9ef..a1823523d7a2 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1228,7 +1228,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_send_wr *wr, | |||
1228 | for (i = 0; i < wr->num_sge; ++i) | 1228 | for (i = 0; i < wr->num_sge; ++i) |
1229 | send_size += wr->sg_list[i].length; | 1229 | send_size += wr->sg_list[i].length; |
1230 | 1230 | ||
1231 | ib_ud_header_init(send_size, mlx4_ib_ah_grh_present(ah), &sqp->ud_header); | 1231 | ib_ud_header_init(send_size, mlx4_ib_ah_grh_present(ah), 0, &sqp->ud_header); |
1232 | 1232 | ||
1233 | sqp->ud_header.lrh.service_level = | 1233 | sqp->ud_header.lrh.service_level = |
1234 | be32_to_cpu(ah->av.sl_tclass_flowlabel) >> 28; | 1234 | be32_to_cpu(ah->av.sl_tclass_flowlabel) >> 28; |