diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2013-08-01 11:49:52 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-08-13 14:21:31 -0400 |
commit | 5c5f3f0a74740c8f7bca8255741291bb0d2ebe4b (patch) | |
tree | cbfb99c06499fd0b18d975af6f4fc99e1022c38d /drivers/net/ethernet/mellanox | |
parent | c095ba7224d8edc71dcef0d655911399a8bd4a3f (diff) |
mlx4_core: Fix XRC QPs detection in the resource tracker
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c index f984a89c27df..dd6876321116 100644 --- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | |||
@@ -1909,7 +1909,8 @@ static int qp_get_mtt_size(struct mlx4_qp_context *qpc) | |||
1909 | int log_rq_stride = qpc->rq_size_stride & 7; | 1909 | int log_rq_stride = qpc->rq_size_stride & 7; |
1910 | int srq = (be32_to_cpu(qpc->srqn) >> 24) & 1; | 1910 | int srq = (be32_to_cpu(qpc->srqn) >> 24) & 1; |
1911 | int rss = (be32_to_cpu(qpc->flags) >> 13) & 1; | 1911 | int rss = (be32_to_cpu(qpc->flags) >> 13) & 1; |
1912 | int xrc = (be32_to_cpu(qpc->local_qpn) >> 23) & 1; | 1912 | u32 ts = (be32_to_cpu(qpc->flags) >> 16) & 0xff; |
1913 | int xrc = (ts == MLX4_QP_ST_XRC) ? 1 : 0; | ||
1913 | int sq_size; | 1914 | int sq_size; |
1914 | int rq_size; | 1915 | int rq_size; |
1915 | int total_pages; | 1916 | int total_pages; |