mlx4_core: Fix XRC QPs detection in the resource tracker
authorYishai Hadas <yishaih@mellanox.com>
Thu, 1 Aug 2013 15:49:52 +0000 (18:49 +0300)
committerRoland Dreier <roland@purestorage.com>
Tue, 13 Aug 2013 18:21:31 +0000 (11:21 -0700)
Recognize XRC QPs in the SR-IOV resource tracker based on transport
type.  The previous check didn't match IB_QPT_XRC_INI and caused an
invalid calculation for required mtt pages.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c

index f984a89c27df1afa64a4cfbc10075479ccd76cf9..dd6876321116a0bbad26a5fbea55aca3731e024f 100644 (file)
@@ -1909,7 +1909,8 @@ static int qp_get_mtt_size(struct mlx4_qp_context *qpc)
        int log_rq_stride = qpc->rq_size_stride & 7;
        int srq = (be32_to_cpu(qpc->srqn) >> 24) & 1;
        int rss = (be32_to_cpu(qpc->flags) >> 13) & 1;
-       int xrc = (be32_to_cpu(qpc->local_qpn) >> 23) & 1;
+       u32 ts = (be32_to_cpu(qpc->flags) >> 16) & 0xff;
+       int xrc = (ts == MLX4_QP_ST_XRC) ? 1 : 0;
        int sq_size;
        int rq_size;
        int total_pages;
This page took 0.026538 seconds and 5 git commands to generate.