diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2016-09-12 12:16:19 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-09-16 14:14:08 -0400 |
commit | baa0be7026e2f7d1d40bfd45909044169e9e3c68 (patch) | |
tree | d5770c6bf7e4af2acdefefe3bec8591bacb65b40 /drivers/infiniband/hw/mlx4 | |
parent | e5ac40cd66c2f3cd11bc5edc658f012661b16347 (diff) |
IB/mlx4: Fix code indentation in QP1 MAD flow
The indentation in the QP1 GRH flow in procedure build_mlx_header is
really confusing. Fix it, in preparation for a commit which touches
this code.
Fixes: 1ffeb2eb8be9 ("IB/mlx4: SR-IOV IB context objects and proxy/tunnel SQP support")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r-- | drivers/infiniband/hw/mlx4/qp.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index 768085f59566..e398c04903fa 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -2493,24 +2493,26 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr, | |||
2493 | sqp->ud_header.grh.flow_label = | 2493 | sqp->ud_header.grh.flow_label = |
2494 | ah->av.ib.sl_tclass_flowlabel & cpu_to_be32(0xfffff); | 2494 | ah->av.ib.sl_tclass_flowlabel & cpu_to_be32(0xfffff); |
2495 | sqp->ud_header.grh.hop_limit = ah->av.ib.hop_limit; | 2495 | sqp->ud_header.grh.hop_limit = ah->av.ib.hop_limit; |
2496 | if (is_eth) | 2496 | if (is_eth) { |
2497 | memcpy(sqp->ud_header.grh.source_gid.raw, sgid.raw, 16); | 2497 | memcpy(sqp->ud_header.grh.source_gid.raw, sgid.raw, 16); |
2498 | else { | 2498 | } else { |
2499 | if (mlx4_is_mfunc(to_mdev(ib_dev)->dev)) { | 2499 | if (mlx4_is_mfunc(to_mdev(ib_dev)->dev)) { |
2500 | /* When multi-function is enabled, the ib_core gid | 2500 | /* When multi-function is enabled, the ib_core gid |
2501 | * indexes don't necessarily match the hw ones, so | 2501 | * indexes don't necessarily match the hw ones, so |
2502 | * we must use our own cache */ | 2502 | * we must use our own cache |
2503 | sqp->ud_header.grh.source_gid.global.subnet_prefix = | 2503 | */ |
2504 | to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1]. | 2504 | sqp->ud_header.grh.source_gid.global.subnet_prefix = |
2505 | subnet_prefix; | 2505 | to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1]. |
2506 | sqp->ud_header.grh.source_gid.global.interface_id = | 2506 | subnet_prefix; |
2507 | to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1]. | 2507 | sqp->ud_header.grh.source_gid.global.interface_id = |
2508 | guid_cache[ah->av.ib.gid_index]; | 2508 | to_mdev(ib_dev)->sriov.demux[sqp->qp.port - 1]. |
2509 | } else | 2509 | guid_cache[ah->av.ib.gid_index]; |
2510 | ib_get_cached_gid(ib_dev, | 2510 | } else { |
2511 | be32_to_cpu(ah->av.ib.port_pd) >> 24, | 2511 | ib_get_cached_gid(ib_dev, |
2512 | ah->av.ib.gid_index, | 2512 | be32_to_cpu(ah->av.ib.port_pd) >> 24, |
2513 | &sqp->ud_header.grh.source_gid, NULL); | 2513 | ah->av.ib.gid_index, |
2514 | &sqp->ud_header.grh.source_gid, NULL); | ||
2515 | } | ||
2514 | } | 2516 | } |
2515 | memcpy(sqp->ud_header.grh.destination_gid.raw, | 2517 | memcpy(sqp->ud_header.grh.destination_gid.raw, |
2516 | ah->av.ib.dgid, 16); | 2518 | ah->av.ib.dgid, 16); |