Lines Matching refs:caps
101 int dmfs = dev->caps.steering_mode == MLX4_STEERING_MODE_DEVICE_MANAGED; in check_flow_steering_support()
110 (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_DMFS_IPOIB)) && in check_flow_steering_support()
112 (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_FS_EN)); in check_flow_steering_support()
243 if (ibdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2) in mlx4_ib_update_gids()
480 props->fw_ver = dev->dev->caps.fw_ver; in mlx4_ib_query_device()
486 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR) in mlx4_ib_query_device()
488 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR) in mlx4_ib_query_device()
490 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_APM && have_ib_ports) in mlx4_ib_query_device()
492 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UD_AV_PORT) in mlx4_ib_query_device()
494 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_IPOIB_CSUM) in mlx4_ib_query_device()
496 if (dev->dev->caps.max_gso_sz && in mlx4_ib_query_device()
498 (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_BLH)) in mlx4_ib_query_device()
500 if (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_RESERVED_LKEY) in mlx4_ib_query_device()
502 if ((dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_LOCAL_INV) && in mlx4_ib_query_device()
503 (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_REMOTE_INV) && in mlx4_ib_query_device()
504 (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_FAST_REG_WR)) in mlx4_ib_query_device()
506 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC) in mlx4_ib_query_device()
508 if (dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_MEM_WINDOW) in mlx4_ib_query_device()
510 if (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_TYPE_2_WIN) { in mlx4_ib_query_device()
511 if (dev->dev->caps.bmme_flags & MLX4_BMME_FLAG_WIN_TYPE_2B) in mlx4_ib_query_device()
528 props->page_size_cap = dev->dev->caps.page_size_cap; in mlx4_ib_query_device()
530 props->max_qp_wr = dev->dev->caps.max_wqes - MLX4_IB_SQ_MAX_SPARE; in mlx4_ib_query_device()
531 props->max_sge = min(dev->dev->caps.max_sq_sg, in mlx4_ib_query_device()
532 dev->dev->caps.max_rq_sg); in mlx4_ib_query_device()
535 props->max_cqe = dev->dev->caps.max_cqes; in mlx4_ib_query_device()
537 props->max_pd = dev->dev->caps.num_pds - dev->dev->caps.reserved_pds; in mlx4_ib_query_device()
538 props->max_qp_rd_atom = dev->dev->caps.max_qp_dest_rdma; in mlx4_ib_query_device()
539 props->max_qp_init_rd_atom = dev->dev->caps.max_qp_init_rdma; in mlx4_ib_query_device()
542 props->max_srq_wr = dev->dev->caps.max_srq_wqes - 1; in mlx4_ib_query_device()
543 props->max_srq_sge = dev->dev->caps.max_srq_sge; in mlx4_ib_query_device()
545 props->local_ca_ack_delay = dev->dev->caps.local_ca_ack_delay; in mlx4_ib_query_device()
546 props->atomic_cap = dev->dev->caps.flags & MLX4_DEV_CAP_FLAG_ATOMIC ? in mlx4_ib_query_device()
549 props->max_pkeys = dev->dev->caps.pkey_table_len[1]; in mlx4_ib_query_device()
550 props->max_mcast_grp = dev->dev->caps.num_mgms + dev->dev->caps.num_amgms; in mlx4_ib_query_device()
551 props->max_mcast_qp_attach = dev->dev->caps.num_qp_per_mgm; in mlx4_ib_query_device()
554 props->max_map_per_fmr = dev->dev->caps.max_fmr_maps; in mlx4_ib_query_device()
555 props->hca_core_clock = dev->dev->caps.hca_core_clock * 1000UL; in mlx4_ib_query_device()
559 if ((dev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RSS) && in mlx4_ib_query_device()
564 dev->dev->caps.max_rss_tbl_sz; in mlx4_ib_query_device()
583 resp.max_inl_recv_sz = dev->dev->caps.max_rq_sg * in mlx4_ib_query_device()
604 return dev->caps.port_mask[port_num] == MLX4_PORT_TYPE_IB ? in mlx4_ib_port_link_layer()
645 props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port]; in ib_link_query_port()
646 props->max_msg_sz = to_mdev(ibdev)->dev->caps.max_msg_sz; in ib_link_query_port()
647 props->pkey_tbl_len = to_mdev(ibdev)->dev->caps.pkey_table_len[port]; in ib_link_query_port()
731 props->gid_tbl_len = mdev->dev->caps.gid_table_len[port]; in eth_link_query_port()
732 props->max_msg_sz = mdev->dev->caps.max_msg_sz; in eth_link_query_port()
909 for (i = 1; i <= mdev->dev->caps.num_ports; i++) { in mlx4_init_sl2vl_tbl()
910 if (mdev->dev->caps.port_type[i] == MLX4_PORT_TYPE_ETH) in mlx4_init_sl2vl_tbl()
1026 u8 is_eth = mdev->dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH; in mlx4_ib_modify_port()
1069 resp_v3.qp_tab_size = dev->dev->caps.num_qps; in mlx4_ib_alloc_ucontext()
1070 resp_v3.bf_reg_size = dev->dev->caps.bf_reg_size; in mlx4_ib_alloc_ucontext()
1071 resp_v3.bf_regs_per_page = dev->dev->caps.bf_regs_per_page; in mlx4_ib_alloc_ucontext()
1073 resp.dev_caps = dev->dev->caps.userspace_caps; in mlx4_ib_alloc_ucontext()
1074 resp.qp_tab_size = dev->dev->caps.num_qps; in mlx4_ib_alloc_ucontext()
1075 resp.bf_reg_size = dev->dev->caps.bf_reg_size; in mlx4_ib_alloc_ucontext()
1076 resp.bf_regs_per_page = dev->dev->caps.bf_regs_per_page; in mlx4_ib_alloc_ucontext()
1077 resp.cqe_size = dev->dev->caps.cqe_size; in mlx4_ib_alloc_ucontext()
1256 } else if (vma->vm_pgoff == 1 && dev->dev->caps.bf_reg_size != 0) { in mlx4_ib_mmap()
1265 dev->dev->caps.num_uars, in mlx4_ib_mmap()
1345 if (!(to_mdev(ibdev)->dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC)) in mlx4_ib_alloc_xrcd()
1759 if (dev->caps.tunnel_offload_mode != MLX4_TUNNEL_OFFLOAD_MODE_VXLAN || in mlx4_ib_tunnel_steer_add()
1760 dev->caps.dmfs_high_steer_mode == MLX4_STEERING_DMFS_A0_STATIC) in mlx4_ib_tunnel_steer_add()
1782 if (!(dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_DMFS_UC_MC_SNIFFER) || in mlx4_ib_add_dont_trap_rule()
1783 (dev->caps.dmfs_high_steer_mode == MLX4_STEERING_DMFS_A0_STATIC) || in mlx4_ib_add_dont_trap_rule()
1980 if (mdev->dev->caps.steering_mode == in mlx4_ib_mcg_attach()
2059 if (mdev->dev->caps.steering_mode == in mlx4_ib_mcg_detach()
2275 if (ibdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT) in __mlx4_ib_alloc_diag_counters()
2311 if (ibdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_DIAG_PER_PORT) { in mlx4_ib_fill_diag_counters()
2331 bool per_port = !!(ibdev->dev->caps.flags2 & in mlx4_ib_alloc_diag_counters()
2489 for (port = 1; port <= ibdev->dev->caps.num_ports; ++port) { in init_pkeys()
2503 for (port = 1; port <= ibdev->dev->caps.num_ports; ++port) { in init_pkeys()
2517 ibdev->eq_table = kcalloc(dev->caps.num_comp_vectors, in mlx4_ib_alloc_eqs()
2522 for (i = 1; i <= dev->caps.num_ports; i++) { in mlx4_ib_alloc_eqs()
2536 for (i = eq; i < dev->caps.num_comp_vectors; in mlx4_ib_alloc_eqs()
2574 if (mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_IBOE) in mlx4_port_immutable()
2576 if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2) in mlx4_port_immutable()
2600 (int) (dev->dev->caps.fw_ver >> 32), in get_fw_ver_str()
2601 (int) (dev->dev->caps.fw_ver >> 16) & 0xffff, in get_fw_ver_str()
2602 (int) dev->dev->caps.fw_ver & 0xffff); in get_fw_ver_str()
2655 ibdev->ib_dev.local_dma_lkey = dev->caps.reserved_lkey; in mlx4_ib_add()
2659 ibdev->ib_dev.num_comp_vectors = dev->caps.num_comp_vectors; in mlx4_ib_add()
2665 if (dev->caps.userspace_caps) in mlx4_ib_add()
2741 if ((dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RSS) && in mlx4_ib_add()
2768 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_MEM_WINDOW || in mlx4_ib_add()
2769 dev->caps.bmme_flags & MLX4_BMME_FLAG_TYPE_2_WIN) { in mlx4_ib_add()
2778 if (dev->caps.flags & MLX4_DEV_CAP_FLAG_XRC) { in mlx4_ib_add()
2888 if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_DMFS_IPOIB) { in mlx4_ib_add()
2903 for (j = 1; j <= ibdev->dev->caps.num_ports; j++) in mlx4_ib_add()
2904 atomic64_set(&iboe->mac[j - 1], ibdev->dev->caps.def_mac[j]); in mlx4_ib_add()
2926 if (dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_ROCE_V1_V2) { in mlx4_ib_add()
3119 ports = bitmap_weight(actv_ports.ports, dev->caps.num_ports); in do_slave_init()
3120 first_port = find_first_bit(actv_ports.ports, dev->caps.num_ports); in do_slave_init()
3327 !(ibdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_SL_TO_VL_CHANGE_EVENT)) in mlx4_ib_event()