diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2014-09-10 10:15:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-10 18:22:43 -0400 |
commit | 8e1a03b63c62bfa622c3989f8aead17ea845db7d (patch) | |
tree | 1116a38699e9932c513c27d55d685b17887d152c /drivers/infiniband/hw/mlx4 | |
parent | 7319a1a49781d6b845e541d13fd2e5d1303ec18b (diff) |
mlx4: Fix wrong endianess access with QP context flags
We wrongly tested QP context bits without BE conversion
as was spotted by sparse...
drivers/infiniband/hw/mlx4/qp.c:1685:38: sparse: restricted __be32 degrades to integer
Fix that!
Fixes: d2fce8a ('mlx4: Set user-space raw Ethernet QPs to properly handle VXLAN traffic')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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 efb9eff8906c..836503927dea 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c | |||
@@ -1682,7 +1682,7 @@ static int __mlx4_ib_modify_qp(struct ib_qp *ibqp, | |||
1682 | MLX4_IB_LINK_TYPE_ETH; | 1682 | MLX4_IB_LINK_TYPE_ETH; |
1683 | if (dev->dev->caps.tunnel_offload_mode == MLX4_TUNNEL_OFFLOAD_MODE_VXLAN) { | 1683 | if (dev->dev->caps.tunnel_offload_mode == MLX4_TUNNEL_OFFLOAD_MODE_VXLAN) { |
1684 | /* set QP to receive both tunneled & non-tunneled packets */ | 1684 | /* set QP to receive both tunneled & non-tunneled packets */ |
1685 | if (!(context->flags & (1 << MLX4_RSS_QPC_FLAG_OFFSET))) | 1685 | if (!(context->flags & cpu_to_be32(1 << MLX4_RSS_QPC_FLAG_OFFSET))) |
1686 | context->srqn = cpu_to_be32(7 << 28); | 1686 | context->srqn = cpu_to_be32(7 << 28); |
1687 | } | 1687 | } |
1688 | } | 1688 | } |