Lines Matching refs:caps

249 	flags &= dev->caps.alloc_res_qp_mask;  in mlx4_qp_reserve_range()
398 (dev->caps.num_qps - 1), qp); in mlx4_qp_alloc()
473 radix_tree_delete(&dev->qp_table_tree, qp->qpn & (dev->caps.num_qps - 1)); in mlx4_qp_remove()
524 err = mlx4_bitmap_init(*bitmap + MLX4_QP_TABLE_ZONE_GENERAL, dev->caps.num_qps, in mlx4_create_zones()
544 dev->caps.reserved_qps_cnt[MLX4_QP_REGION_FW], in mlx4_create_zones()
561 last_offset = dev->caps.reserved_qps_cnt[MLX4_QP_REGION_FW]; in mlx4_create_zones()
724 u32 max_table_offset = dev->caps.dmfs_high_rate_qpn_base + in mlx4_init_qp_table()
725 dev->caps.dmfs_high_rate_qpn_range; in mlx4_init_qp_table()
740 fixed_reserved_from_bot_rv += dev->caps.reserved_qps_cnt[k]; in mlx4_init_qp_table()
753 int last_base = dev->caps.num_qps; in mlx4_init_qp_table()
760 if (dev->caps.reserved_qps_cnt[sort[j]] > in mlx4_init_qp_table()
761 dev->caps.reserved_qps_cnt[sort[j - 1]]) { in mlx4_init_qp_table()
770 last_base -= dev->caps.reserved_qps_cnt[sort[i]]; in mlx4_init_qp_table()
771 dev->caps.reserved_qps_base[sort[i]] = last_base; in mlx4_init_qp_table()
773 dev->caps.reserved_qps_cnt[sort[i]]; in mlx4_init_qp_table()
788 if (reserved_from_bot + reserved_from_top > dev->caps.num_qps) { in mlx4_init_qp_table()
808 dev->caps.qp0_tunnel = kcalloc(dev->caps.num_ports, sizeof (u32), GFP_KERNEL); in mlx4_init_qp_table()
809 dev->caps.qp0_proxy = kcalloc(dev->caps.num_ports, sizeof (u32), GFP_KERNEL); in mlx4_init_qp_table()
810 dev->caps.qp1_tunnel = kcalloc(dev->caps.num_ports, sizeof (u32), GFP_KERNEL); in mlx4_init_qp_table()
811 dev->caps.qp1_proxy = kcalloc(dev->caps.num_ports, sizeof (u32), GFP_KERNEL); in mlx4_init_qp_table()
813 if (!dev->caps.qp0_tunnel || !dev->caps.qp0_proxy || in mlx4_init_qp_table()
814 !dev->caps.qp1_tunnel || !dev->caps.qp1_proxy) { in mlx4_init_qp_table()
819 for (k = 0; k < dev->caps.num_ports; k++) { in mlx4_init_qp_table()
820 dev->caps.qp0_proxy[k] = dev->phys_caps.base_proxy_sqpn + in mlx4_init_qp_table()
822 dev->caps.qp0_tunnel[k] = dev->caps.qp0_proxy[k] + 8 * MLX4_MFUNC_MAX; in mlx4_init_qp_table()
823 dev->caps.qp1_proxy[k] = dev->phys_caps.base_proxy_sqpn + in mlx4_init_qp_table()
825 dev->caps.qp1_tunnel[k] = dev->caps.qp1_proxy[k] + 8 * MLX4_MFUNC_MAX; in mlx4_init_qp_table()
837 kfree(dev->caps.qp0_tunnel); in mlx4_init_qp_table()
838 kfree(dev->caps.qp0_proxy); in mlx4_init_qp_table()
839 kfree(dev->caps.qp1_tunnel); in mlx4_init_qp_table()
840 kfree(dev->caps.qp1_proxy); in mlx4_init_qp_table()
841 dev->caps.qp0_tunnel = dev->caps.qp0_proxy = in mlx4_init_qp_table()
842 dev->caps.qp1_tunnel = dev->caps.qp1_proxy = NULL; in mlx4_init_qp_table()