• Home
  • Raw
  • Download

Lines Matching refs:dev_cap

407 int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)  in mlx4_QUERY_DEV_CAP()  argument
491 dev_cap->flags2 = 0; in mlx4_QUERY_DEV_CAP()
503 dev_cap->reserved_qps = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
505 dev_cap->max_qps = 1 << (field & 0x1f); in mlx4_QUERY_DEV_CAP()
507 dev_cap->reserved_srqs = 1 << (field >> 4); in mlx4_QUERY_DEV_CAP()
509 dev_cap->max_srqs = 1 << (field & 0x1f); in mlx4_QUERY_DEV_CAP()
511 dev_cap->max_cq_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
513 dev_cap->reserved_cqs = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
515 dev_cap->max_cqs = 1 << (field & 0x1f); in mlx4_QUERY_DEV_CAP()
517 dev_cap->max_mpts = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
519 dev_cap->reserved_eqs = field & 0xf; in mlx4_QUERY_DEV_CAP()
521 dev_cap->max_eqs = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
523 dev_cap->reserved_mtts = 1 << (field >> 4); in mlx4_QUERY_DEV_CAP()
525 dev_cap->max_mrw_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
527 dev_cap->reserved_mrws = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
529 dev_cap->max_mtt_seg = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
531 dev_cap->max_requester_per_qp = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
533 dev_cap->max_responder_per_qp = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
537 dev_cap->max_gso_sz = 0; in mlx4_QUERY_DEV_CAP()
539 dev_cap->max_gso_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
543 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_RSS_XOR; in mlx4_QUERY_DEV_CAP()
545 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_RSS_TOP; in mlx4_QUERY_DEV_CAP()
548 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_RSS; in mlx4_QUERY_DEV_CAP()
549 dev_cap->max_rss_tbl_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
551 dev_cap->max_rss_tbl_sz = 0; in mlx4_QUERY_DEV_CAP()
553 dev_cap->max_rdma_global = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
555 dev_cap->local_ca_ack_delay = field & 0x1f; in mlx4_QUERY_DEV_CAP()
557 dev_cap->num_ports = field & 0xf; in mlx4_QUERY_DEV_CAP()
559 dev_cap->max_msg_sz = 1 << (field & 0x1f); in mlx4_QUERY_DEV_CAP()
562 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FS_EN; in mlx4_QUERY_DEV_CAP()
563 dev_cap->fs_log_max_ucast_qp_range_size = field & 0x1f; in mlx4_QUERY_DEV_CAP()
565 dev_cap->fs_max_num_qp_per_entry = field; in mlx4_QUERY_DEV_CAP()
567 dev_cap->stat_rate_support = stat_rate; in mlx4_QUERY_DEV_CAP()
570 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_TS; in mlx4_QUERY_DEV_CAP()
573 dev_cap->flags = flags | (u64)ext_flags << 32; in mlx4_QUERY_DEV_CAP()
575 dev_cap->reserved_uars = field >> 4; in mlx4_QUERY_DEV_CAP()
577 dev_cap->uar_size = 1 << ((field & 0x3f) + 20); in mlx4_QUERY_DEV_CAP()
579 dev_cap->min_page_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
584 dev_cap->bf_reg_size = 1 << (field & 0x1f); in mlx4_QUERY_DEV_CAP()
586 if ((1 << (field & 0x3f)) > (PAGE_SIZE / dev_cap->bf_reg_size)) in mlx4_QUERY_DEV_CAP()
588 dev_cap->bf_regs_per_page = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
590 dev_cap->bf_reg_size, dev_cap->bf_regs_per_page); in mlx4_QUERY_DEV_CAP()
592 dev_cap->bf_reg_size = 0; in mlx4_QUERY_DEV_CAP()
597 dev_cap->max_sq_sg = field; in mlx4_QUERY_DEV_CAP()
599 dev_cap->max_sq_desc_sz = size; in mlx4_QUERY_DEV_CAP()
602 dev_cap->max_qp_per_mcg = 1 << field; in mlx4_QUERY_DEV_CAP()
604 dev_cap->reserved_mgms = field & 0xf; in mlx4_QUERY_DEV_CAP()
606 dev_cap->max_mcgs = 1 << field; in mlx4_QUERY_DEV_CAP()
608 dev_cap->reserved_pds = field >> 4; in mlx4_QUERY_DEV_CAP()
610 dev_cap->max_pds = 1 << (field & 0x3f); in mlx4_QUERY_DEV_CAP()
612 dev_cap->reserved_xrcds = field >> 4; in mlx4_QUERY_DEV_CAP()
614 dev_cap->max_xrcds = 1 << (field & 0x1f); in mlx4_QUERY_DEV_CAP()
617 dev_cap->rdmarc_entry_sz = size; in mlx4_QUERY_DEV_CAP()
619 dev_cap->qpc_entry_sz = size; in mlx4_QUERY_DEV_CAP()
621 dev_cap->aux_entry_sz = size; in mlx4_QUERY_DEV_CAP()
623 dev_cap->altc_entry_sz = size; in mlx4_QUERY_DEV_CAP()
625 dev_cap->eqc_entry_sz = size; in mlx4_QUERY_DEV_CAP()
627 dev_cap->cqc_entry_sz = size; in mlx4_QUERY_DEV_CAP()
629 dev_cap->srq_entry_sz = size; in mlx4_QUERY_DEV_CAP()
631 dev_cap->cmpt_entry_sz = size; in mlx4_QUERY_DEV_CAP()
633 dev_cap->mtt_entry_sz = size; in mlx4_QUERY_DEV_CAP()
635 dev_cap->dmpt_entry_sz = size; in mlx4_QUERY_DEV_CAP()
638 dev_cap->max_srq_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
640 dev_cap->max_qp_sz = 1 << field; in mlx4_QUERY_DEV_CAP()
642 dev_cap->resize_srq = field & 1; in mlx4_QUERY_DEV_CAP()
644 dev_cap->max_rq_sg = field; in mlx4_QUERY_DEV_CAP()
646 dev_cap->max_rq_desc_sz = size; in mlx4_QUERY_DEV_CAP()
648 MLX4_GET(dev_cap->bmme_flags, outbox, in mlx4_QUERY_DEV_CAP()
650 MLX4_GET(dev_cap->reserved_lkey, outbox, in mlx4_QUERY_DEV_CAP()
654 dev_cap->flags2 |= MLX4_DEV_CAP_FLAGS2_REASSIGN_MAC_EN; in mlx4_QUERY_DEV_CAP()
655 MLX4_GET(dev_cap->max_icm_sz, outbox, in mlx4_QUERY_DEV_CAP()
657 if (dev_cap->flags & MLX4_DEV_CAP_FLAG_COUNTERS) in mlx4_QUERY_DEV_CAP()
658 MLX4_GET(dev_cap->max_counters, outbox, in mlx4_QUERY_DEV_CAP()
663 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_VLAN_CONTROL; in mlx4_QUERY_DEV_CAP()
665 dev_cap->flags2 |= MLX4_DEV_CAP_FLAG2_FSM; in mlx4_QUERY_DEV_CAP()
668 for (i = 1; i <= dev_cap->num_ports; ++i) { in mlx4_QUERY_DEV_CAP()
670 dev_cap->max_vl[i] = field >> 4; in mlx4_QUERY_DEV_CAP()
672 dev_cap->ib_mtu[i] = field >> 4; in mlx4_QUERY_DEV_CAP()
673 dev_cap->max_port_width[i] = field & 0xf; in mlx4_QUERY_DEV_CAP()
675 dev_cap->max_gids[i] = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
677 dev_cap->max_pkeys[i] = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
692 for (i = 1; i <= dev_cap->num_ports; ++i) { in mlx4_QUERY_DEV_CAP()
699 dev_cap->supported_port_types[i] = field & 3; in mlx4_QUERY_DEV_CAP()
700 dev_cap->suggested_type[i] = (field >> 3) & 1; in mlx4_QUERY_DEV_CAP()
701 dev_cap->default_sense[i] = (field >> 4) & 1; in mlx4_QUERY_DEV_CAP()
703 dev_cap->ib_mtu[i] = field & 0xf; in mlx4_QUERY_DEV_CAP()
705 dev_cap->max_port_width[i] = field & 0xf; in mlx4_QUERY_DEV_CAP()
707 dev_cap->max_gids[i] = 1 << (field >> 4); in mlx4_QUERY_DEV_CAP()
708 dev_cap->max_pkeys[i] = 1 << (field & 0xf); in mlx4_QUERY_DEV_CAP()
710 dev_cap->max_vl[i] = field & 0xf; in mlx4_QUERY_DEV_CAP()
712 dev_cap->log_max_macs[i] = field & 0xf; in mlx4_QUERY_DEV_CAP()
713 dev_cap->log_max_vlans[i] = field >> 4; in mlx4_QUERY_DEV_CAP()
714 MLX4_GET(dev_cap->eth_mtu[i], outbox, QUERY_PORT_ETH_MTU_OFFSET); in mlx4_QUERY_DEV_CAP()
715 MLX4_GET(dev_cap->def_mac[i], outbox, QUERY_PORT_MAC_OFFSET); in mlx4_QUERY_DEV_CAP()
717 dev_cap->trans_type[i] = field32 >> 24; in mlx4_QUERY_DEV_CAP()
718 dev_cap->vendor_oui[i] = field32 & 0xffffff; in mlx4_QUERY_DEV_CAP()
719 MLX4_GET(dev_cap->wavelength[i], outbox, QUERY_PORT_WAVELENGTH_OFFSET); in mlx4_QUERY_DEV_CAP()
720 MLX4_GET(dev_cap->trans_code[i], outbox, QUERY_PORT_TRANS_CODE_OFFSET); in mlx4_QUERY_DEV_CAP()
725 dev_cap->bmme_flags, dev_cap->reserved_lkey); in mlx4_QUERY_DEV_CAP()
732 dev_cap->reserved_eqs = max(dev_cap->reserved_uars * 4, in mlx4_QUERY_DEV_CAP()
733 dev_cap->reserved_eqs); in mlx4_QUERY_DEV_CAP()
736 (unsigned long long) dev_cap->max_icm_sz >> 20); in mlx4_QUERY_DEV_CAP()
738 dev_cap->max_qps, dev_cap->reserved_qps, dev_cap->qpc_entry_sz); in mlx4_QUERY_DEV_CAP()
740 dev_cap->max_srqs, dev_cap->reserved_srqs, dev_cap->srq_entry_sz); in mlx4_QUERY_DEV_CAP()
742 dev_cap->max_cqs, dev_cap->reserved_cqs, dev_cap->cqc_entry_sz); in mlx4_QUERY_DEV_CAP()
744 dev_cap->max_eqs, dev_cap->reserved_eqs, dev_cap->eqc_entry_sz); in mlx4_QUERY_DEV_CAP()
746 dev_cap->reserved_mrws, dev_cap->reserved_mtts); in mlx4_QUERY_DEV_CAP()
748 dev_cap->max_pds, dev_cap->reserved_pds, dev_cap->reserved_uars); in mlx4_QUERY_DEV_CAP()
750 dev_cap->max_pds, dev_cap->reserved_mgms); in mlx4_QUERY_DEV_CAP()
752 dev_cap->max_cq_sz, dev_cap->max_qp_sz, dev_cap->max_srq_sz); in mlx4_QUERY_DEV_CAP()
754 dev_cap->local_ca_ack_delay, 128 << dev_cap->ib_mtu[1], in mlx4_QUERY_DEV_CAP()
755 dev_cap->max_port_width[1]); in mlx4_QUERY_DEV_CAP()
757 dev_cap->max_sq_desc_sz, dev_cap->max_sq_sg); in mlx4_QUERY_DEV_CAP()
759 dev_cap->max_rq_desc_sz, dev_cap->max_rq_sg); in mlx4_QUERY_DEV_CAP()
760 mlx4_dbg(dev, "Max GSO size: %d\n", dev_cap->max_gso_sz); in mlx4_QUERY_DEV_CAP()
761 mlx4_dbg(dev, "Max counters: %d\n", dev_cap->max_counters); in mlx4_QUERY_DEV_CAP()
762 mlx4_dbg(dev, "Max RSS Table size: %d\n", dev_cap->max_rss_tbl_sz); in mlx4_QUERY_DEV_CAP()
764 dump_dev_cap_flags(dev, dev_cap->flags); in mlx4_QUERY_DEV_CAP()
765 dump_dev_cap_flags2(dev, dev_cap->flags2); in mlx4_QUERY_DEV_CAP()