Lines Matching full:sb

96 	struct creq_query_func_resp_sb *sb;  in bnxt_qplib_get_dev_attr()  local
109 sbuf.size = ALIGN(sizeof(*sb), BNXT_QPLIB_CMDQE_UNITS); in bnxt_qplib_get_dev_attr()
110 sbuf.sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_get_dev_attr()
112 if (!sbuf.sb) in bnxt_qplib_get_dev_attr()
114 sb = sbuf.sb; in bnxt_qplib_get_dev_attr()
123 attr->max_qp = le32_to_cpu(sb->max_qp); in bnxt_qplib_get_dev_attr()
127 sb->max_qp_rd_atom > BNXT_QPLIB_MAX_OUT_RD_ATOM ? in bnxt_qplib_get_dev_attr()
128 BNXT_QPLIB_MAX_OUT_RD_ATOM : sb->max_qp_rd_atom; in bnxt_qplib_get_dev_attr()
130 sb->max_qp_init_rd_atom > BNXT_QPLIB_MAX_OUT_RD_ATOM ? in bnxt_qplib_get_dev_attr()
131 BNXT_QPLIB_MAX_OUT_RD_ATOM : sb->max_qp_init_rd_atom; in bnxt_qplib_get_dev_attr()
132 attr->max_qp_wqes = le16_to_cpu(sb->max_qp_wr) - 1; in bnxt_qplib_get_dev_attr()
146 min_t(u32, sb->max_sge_var_wqe, BNXT_VAR_MAX_SGE) : 6; in bnxt_qplib_get_dev_attr()
147 attr->max_cq = le32_to_cpu(sb->max_cq); in bnxt_qplib_get_dev_attr()
148 attr->max_cq_wqes = le32_to_cpu(sb->max_cqe); in bnxt_qplib_get_dev_attr()
152 attr->max_mr = le32_to_cpu(sb->max_mr); in bnxt_qplib_get_dev_attr()
153 attr->max_mw = le32_to_cpu(sb->max_mw); in bnxt_qplib_get_dev_attr()
155 attr->max_mr_size = le64_to_cpu(sb->max_mr_size); in bnxt_qplib_get_dev_attr()
157 attr->max_raw_ethy_qp = le32_to_cpu(sb->max_raw_eth_qp); in bnxt_qplib_get_dev_attr()
158 attr->max_ah = le32_to_cpu(sb->max_ah); in bnxt_qplib_get_dev_attr()
160 attr->max_srq = le16_to_cpu(sb->max_srq); in bnxt_qplib_get_dev_attr()
161 attr->max_srq_wqes = le32_to_cpu(sb->max_srq_wr) - 1; in bnxt_qplib_get_dev_attr()
162 attr->max_srq_sges = sb->max_srq_sge; in bnxt_qplib_get_dev_attr()
164 attr->max_inline_data = le32_to_cpu(sb->max_inline_data); in bnxt_qplib_get_dev_attr()
166 attr->l2_db_size = (sb->l2_db_space_size + 1) * in bnxt_qplib_get_dev_attr()
174 attr->max_sgid = le32_to_cpu(sb->max_gid); in bnxt_qplib_get_dev_attr()
176 attr->dev_cap_flags = le16_to_cpu(sb->dev_cap_flags); in bnxt_qplib_get_dev_attr()
177 attr->dev_cap_flags2 = le16_to_cpu(sb->dev_cap_ext_flags_2); in bnxt_qplib_get_dev_attr()
180 attr->max_srq += le16_to_cpu(sb->max_srq_ext); in bnxt_qplib_get_dev_attr()
185 temp = le32_to_cpu(sb->tqm_alloc_reqs[i]); in bnxt_qplib_get_dev_attr()
194 attr->max_dpi = le32_to_cpu(sb->max_dpi); in bnxt_qplib_get_dev_attr()
199 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_get_dev_attr()
747 struct creq_query_roce_stats_resp_sb *sb; in bnxt_qplib_get_roce_stats() local
757 sbuf.size = ALIGN(sizeof(*sb), BNXT_QPLIB_CMDQE_UNITS); in bnxt_qplib_get_roce_stats()
758 sbuf.sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_get_roce_stats()
760 if (!sbuf.sb) in bnxt_qplib_get_roce_stats()
762 sb = sbuf.sb; in bnxt_qplib_get_roce_stats()
771 stats->to_retransmits = le64_to_cpu(sb->to_retransmits); in bnxt_qplib_get_roce_stats()
772 stats->seq_err_naks_rcvd = le64_to_cpu(sb->seq_err_naks_rcvd); in bnxt_qplib_get_roce_stats()
773 stats->max_retry_exceeded = le64_to_cpu(sb->max_retry_exceeded); in bnxt_qplib_get_roce_stats()
774 stats->rnr_naks_rcvd = le64_to_cpu(sb->rnr_naks_rcvd); in bnxt_qplib_get_roce_stats()
775 stats->missing_resp = le64_to_cpu(sb->missing_resp); in bnxt_qplib_get_roce_stats()
776 stats->unrecoverable_err = le64_to_cpu(sb->unrecoverable_err); in bnxt_qplib_get_roce_stats()
777 stats->bad_resp_err = le64_to_cpu(sb->bad_resp_err); in bnxt_qplib_get_roce_stats()
778 stats->local_qp_op_err = le64_to_cpu(sb->local_qp_op_err); in bnxt_qplib_get_roce_stats()
779 stats->local_protection_err = le64_to_cpu(sb->local_protection_err); in bnxt_qplib_get_roce_stats()
780 stats->mem_mgmt_op_err = le64_to_cpu(sb->mem_mgmt_op_err); in bnxt_qplib_get_roce_stats()
781 stats->remote_invalid_req_err = le64_to_cpu(sb->remote_invalid_req_err); in bnxt_qplib_get_roce_stats()
782 stats->remote_access_err = le64_to_cpu(sb->remote_access_err); in bnxt_qplib_get_roce_stats()
783 stats->remote_op_err = le64_to_cpu(sb->remote_op_err); in bnxt_qplib_get_roce_stats()
784 stats->dup_req = le64_to_cpu(sb->dup_req); in bnxt_qplib_get_roce_stats()
785 stats->res_exceed_max = le64_to_cpu(sb->res_exceed_max); in bnxt_qplib_get_roce_stats()
786 stats->res_length_mismatch = le64_to_cpu(sb->res_length_mismatch); in bnxt_qplib_get_roce_stats()
787 stats->res_exceeds_wqe = le64_to_cpu(sb->res_exceeds_wqe); in bnxt_qplib_get_roce_stats()
788 stats->res_opcode_err = le64_to_cpu(sb->res_opcode_err); in bnxt_qplib_get_roce_stats()
789 stats->res_rx_invalid_rkey = le64_to_cpu(sb->res_rx_invalid_rkey); in bnxt_qplib_get_roce_stats()
790 stats->res_rx_domain_err = le64_to_cpu(sb->res_rx_domain_err); in bnxt_qplib_get_roce_stats()
791 stats->res_rx_no_perm = le64_to_cpu(sb->res_rx_no_perm); in bnxt_qplib_get_roce_stats()
792 stats->res_rx_range_err = le64_to_cpu(sb->res_rx_range_err); in bnxt_qplib_get_roce_stats()
793 stats->res_tx_invalid_rkey = le64_to_cpu(sb->res_tx_invalid_rkey); in bnxt_qplib_get_roce_stats()
794 stats->res_tx_domain_err = le64_to_cpu(sb->res_tx_domain_err); in bnxt_qplib_get_roce_stats()
795 stats->res_tx_no_perm = le64_to_cpu(sb->res_tx_no_perm); in bnxt_qplib_get_roce_stats()
796 stats->res_tx_range_err = le64_to_cpu(sb->res_tx_range_err); in bnxt_qplib_get_roce_stats()
797 stats->res_irrq_oflow = le64_to_cpu(sb->res_irrq_oflow); in bnxt_qplib_get_roce_stats()
798 stats->res_unsup_opcode = le64_to_cpu(sb->res_unsup_opcode); in bnxt_qplib_get_roce_stats()
799 stats->res_unaligned_atomic = le64_to_cpu(sb->res_unaligned_atomic); in bnxt_qplib_get_roce_stats()
800 stats->res_rem_inv_err = le64_to_cpu(sb->res_rem_inv_err); in bnxt_qplib_get_roce_stats()
801 stats->res_mem_error = le64_to_cpu(sb->res_mem_error); in bnxt_qplib_get_roce_stats()
802 stats->res_srq_err = le64_to_cpu(sb->res_srq_err); in bnxt_qplib_get_roce_stats()
803 stats->res_cmp_err = le64_to_cpu(sb->res_cmp_err); in bnxt_qplib_get_roce_stats()
804 stats->res_invalid_dup_rkey = le64_to_cpu(sb->res_invalid_dup_rkey); in bnxt_qplib_get_roce_stats()
805 stats->res_wqe_format_err = le64_to_cpu(sb->res_wqe_format_err); in bnxt_qplib_get_roce_stats()
806 stats->res_cq_load_err = le64_to_cpu(sb->res_cq_load_err); in bnxt_qplib_get_roce_stats()
807 stats->res_srq_load_err = le64_to_cpu(sb->res_srq_load_err); in bnxt_qplib_get_roce_stats()
808 stats->res_tx_pci_err = le64_to_cpu(sb->res_tx_pci_err); in bnxt_qplib_get_roce_stats()
809 stats->res_rx_pci_err = le64_to_cpu(sb->res_rx_pci_err); in bnxt_qplib_get_roce_stats()
811 rcfw->oos_prev = le64_to_cpu(sb->res_oos_drop_count); in bnxt_qplib_get_roce_stats()
815 (le64_to_cpu(sb->res_oos_drop_count) - in bnxt_qplib_get_roce_stats()
817 rcfw->oos_prev = le64_to_cpu(sb->res_oos_drop_count); in bnxt_qplib_get_roce_stats()
822 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_get_roce_stats()
830 struct creq_query_roce_stats_ext_resp_sb *sb; in bnxt_qplib_qext_stat() local
836 sbuf.size = ALIGN(sizeof(*sb), BNXT_QPLIB_CMDQE_UNITS); in bnxt_qplib_qext_stat()
837 sbuf.sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_qext_stat()
839 if (!sbuf.sb) in bnxt_qplib_qext_stat()
842 sb = sbuf.sb; in bnxt_qplib_qext_stat()
858 estat->tx_atomic_req = le64_to_cpu(sb->tx_atomic_req_pkts); in bnxt_qplib_qext_stat()
859 estat->tx_read_req = le64_to_cpu(sb->tx_read_req_pkts); in bnxt_qplib_qext_stat()
860 estat->tx_read_res = le64_to_cpu(sb->tx_read_res_pkts); in bnxt_qplib_qext_stat()
861 estat->tx_write_req = le64_to_cpu(sb->tx_write_req_pkts); in bnxt_qplib_qext_stat()
862 estat->tx_send_req = le64_to_cpu(sb->tx_send_req_pkts); in bnxt_qplib_qext_stat()
863 estat->tx_roce_pkts = le64_to_cpu(sb->tx_roce_pkts); in bnxt_qplib_qext_stat()
864 estat->tx_roce_bytes = le64_to_cpu(sb->tx_roce_bytes); in bnxt_qplib_qext_stat()
865 estat->rx_atomic_req = le64_to_cpu(sb->rx_atomic_req_pkts); in bnxt_qplib_qext_stat()
866 estat->rx_read_req = le64_to_cpu(sb->rx_read_req_pkts); in bnxt_qplib_qext_stat()
867 estat->rx_read_res = le64_to_cpu(sb->rx_read_res_pkts); in bnxt_qplib_qext_stat()
868 estat->rx_write_req = le64_to_cpu(sb->rx_write_req_pkts); in bnxt_qplib_qext_stat()
869 estat->rx_send_req = le64_to_cpu(sb->rx_send_req_pkts); in bnxt_qplib_qext_stat()
870 estat->rx_roce_pkts = le64_to_cpu(sb->rx_roce_pkts); in bnxt_qplib_qext_stat()
871 estat->rx_roce_bytes = le64_to_cpu(sb->rx_roce_bytes); in bnxt_qplib_qext_stat()
872 estat->rx_roce_good_pkts = le64_to_cpu(sb->rx_roce_good_pkts); in bnxt_qplib_qext_stat()
873 estat->rx_roce_good_bytes = le64_to_cpu(sb->rx_roce_good_bytes); in bnxt_qplib_qext_stat()
874 estat->rx_out_of_buffer = le64_to_cpu(sb->rx_out_of_buffer_pkts); in bnxt_qplib_qext_stat()
875 estat->rx_out_of_sequence = le64_to_cpu(sb->rx_out_of_sequence_pkts); in bnxt_qplib_qext_stat()
876 estat->tx_cnp = le64_to_cpu(sb->tx_cnp_pkts); in bnxt_qplib_qext_stat()
877 estat->rx_cnp = le64_to_cpu(sb->rx_cnp_pkts); in bnxt_qplib_qext_stat()
878 estat->rx_ecn_marked = le64_to_cpu(sb->rx_ecn_marked_pkts); in bnxt_qplib_qext_stat()
882 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_qext_stat()
1004 sbuf.sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_read_context()
1006 if (!sbuf.sb) in bnxt_qplib_read_context()
1023 memcpy(resp_va, sbuf.sb, resp_size); in bnxt_qplib_read_context()
1025 dma_free_coherent(&rcfw->pdev->dev, sbuf.size, sbuf.sb, sbuf.dma_addr); in bnxt_qplib_read_context()
1030 struct creq_query_roce_cc_gen1_resp_sb_tlv *sb) in bnxt_qplib_read_cc_gen1() argument
1032 cc_ext->inact_th_hi = le16_to_cpu(sb->inactivity_th_hi); in bnxt_qplib_read_cc_gen1()
1033 cc_ext->min_delta_cnp = le16_to_cpu(sb->min_time_between_cnps); in bnxt_qplib_read_cc_gen1()
1034 cc_ext->init_cp = le16_to_cpu(sb->init_cp); in bnxt_qplib_read_cc_gen1()
1035 cc_ext->tr_update_mode = sb->tr_update_mode; in bnxt_qplib_read_cc_gen1()
1036 cc_ext->tr_update_cyls = sb->tr_update_cycles; in bnxt_qplib_read_cc_gen1()
1037 cc_ext->fr_rtt = sb->fr_num_rtts; in bnxt_qplib_read_cc_gen1()
1038 cc_ext->ai_rate_incr = sb->ai_rate_increase; in bnxt_qplib_read_cc_gen1()
1039 cc_ext->rr_rtt_th = le16_to_cpu(sb->reduction_relax_rtts_th); in bnxt_qplib_read_cc_gen1()
1040 cc_ext->ar_cr_th = le16_to_cpu(sb->additional_relax_cr_th); in bnxt_qplib_read_cc_gen1()
1041 cc_ext->cr_min_th = le16_to_cpu(sb->cr_min_th); in bnxt_qplib_read_cc_gen1()
1042 cc_ext->bw_avg_weight = sb->bw_avg_weight; in bnxt_qplib_read_cc_gen1()
1043 cc_ext->cr_factor = sb->actual_cr_factor; in bnxt_qplib_read_cc_gen1()
1044 cc_ext->cr_th_max_cp = le16_to_cpu(sb->max_cp_cr_th); in bnxt_qplib_read_cc_gen1()
1045 cc_ext->cp_bias_en = sb->cp_bias_en; in bnxt_qplib_read_cc_gen1()
1046 cc_ext->cp_bias = sb->cp_bias; in bnxt_qplib_read_cc_gen1()
1047 cc_ext->cnp_ecn = sb->cnp_ecn; in bnxt_qplib_read_cc_gen1()
1048 cc_ext->rtt_jitter_en = sb->rtt_jitter_en; in bnxt_qplib_read_cc_gen1()
1049 cc_ext->bytes_per_usec = le16_to_cpu(sb->link_bytes_per_usec); in bnxt_qplib_read_cc_gen1()
1050 cc_ext->cc_cr_reset_th = le16_to_cpu(sb->reset_cc_cr_th); in bnxt_qplib_read_cc_gen1()
1051 cc_ext->cr_width = sb->cr_width; in bnxt_qplib_read_cc_gen1()
1052 cc_ext->min_quota = sb->quota_period_min; in bnxt_qplib_read_cc_gen1()
1053 cc_ext->max_quota = sb->quota_period_max; in bnxt_qplib_read_cc_gen1()
1054 cc_ext->abs_max_quota = sb->quota_period_abs_max; in bnxt_qplib_read_cc_gen1()
1055 cc_ext->tr_lb = le16_to_cpu(sb->tr_lower_bound); in bnxt_qplib_read_cc_gen1()
1056 cc_ext->cr_prob_fac = sb->cr_prob_factor; in bnxt_qplib_read_cc_gen1()
1057 cc_ext->tr_prob_fac = sb->tr_prob_factor; in bnxt_qplib_read_cc_gen1()
1058 cc_ext->fair_cr_th = le16_to_cpu(sb->fairness_cr_th); in bnxt_qplib_read_cc_gen1()
1059 cc_ext->red_div = sb->red_div; in bnxt_qplib_read_cc_gen1()
1060 cc_ext->cnp_ratio_th = sb->cnp_ratio_th; in bnxt_qplib_read_cc_gen1()
1061 cc_ext->ai_ext_rtt = le16_to_cpu(sb->exp_ai_rtts); in bnxt_qplib_read_cc_gen1()
1062 cc_ext->exp_crcp_ratio = sb->exp_ai_cr_cp_ratio; in bnxt_qplib_read_cc_gen1()
1063 cc_ext->low_rate_en = sb->use_rate_table; in bnxt_qplib_read_cc_gen1()
1064 cc_ext->cpcr_update_th = le16_to_cpu(sb->cp_exp_update_th); in bnxt_qplib_read_cc_gen1()
1065 cc_ext->ai_rtt_th1 = le16_to_cpu(sb->high_exp_ai_rtts_th1); in bnxt_qplib_read_cc_gen1()
1066 cc_ext->ai_rtt_th2 = le16_to_cpu(sb->high_exp_ai_rtts_th2); in bnxt_qplib_read_cc_gen1()
1067 cc_ext->cf_rtt_th = le16_to_cpu(sb->actual_cr_cong_free_rtts_th); in bnxt_qplib_read_cc_gen1()
1068 cc_ext->sc_cr_th1 = le16_to_cpu(sb->severe_cong_cr_th1); in bnxt_qplib_read_cc_gen1()
1069 cc_ext->sc_cr_th2 = le16_to_cpu(sb->severe_cong_cr_th2); in bnxt_qplib_read_cc_gen1()
1070 cc_ext->l64B_per_rtt = le32_to_cpu(sb->link64B_per_rtt); in bnxt_qplib_read_cc_gen1()
1071 cc_ext->cc_ack_bytes = sb->cc_ack_bytes; in bnxt_qplib_read_cc_gen1()
1072 cc_ext->reduce_cf_rtt_th = le16_to_cpu(sb->reduce_init_cong_free_rtts_th); in bnxt_qplib_read_cc_gen1()
1081 struct creq_query_roce_cc_resp_sb *sb; in bnxt_qplib_query_cc_param() local
1094 resp_size = sizeof(*sb); in bnxt_qplib_query_cc_param()
1097 sbuf.sb = dma_alloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_query_cc_param()
1099 if (!sbuf.sb) in bnxt_qplib_query_cc_param()
1109 ext_sb = sbuf.sb; in bnxt_qplib_query_cc_param()
1110 sb = bnxt_qplib_is_chip_gen_p5_p7(res->cctx) ? &ext_sb->base_sb : in bnxt_qplib_query_cc_param()
1113 cc_param->enable = sb->enable_cc & CREQ_QUERY_ROCE_CC_RESP_SB_ENABLE_CC; in bnxt_qplib_query_cc_param()
1114 cc_param->tos_ecn = (sb->tos_dscp_tos_ecn & in bnxt_qplib_query_cc_param()
1117 cc_param->tos_dscp = (sb->tos_dscp_tos_ecn & in bnxt_qplib_query_cc_param()
1120 cc_param->alt_tos_dscp = sb->alt_tos_dscp; in bnxt_qplib_query_cc_param()
1121 cc_param->alt_vlan_pcp = sb->alt_vlan_pcp; in bnxt_qplib_query_cc_param()
1123 cc_param->g = sb->g; in bnxt_qplib_query_cc_param()
1124 cc_param->nph_per_state = sb->num_phases_per_state; in bnxt_qplib_query_cc_param()
1125 cc_param->init_cr = le16_to_cpu(sb->init_cr); in bnxt_qplib_query_cc_param()
1126 cc_param->init_tr = le16_to_cpu(sb->init_tr); in bnxt_qplib_query_cc_param()
1127 cc_param->cc_mode = sb->cc_mode; in bnxt_qplib_query_cc_param()
1128 cc_param->inact_th = le16_to_cpu(sb->inactivity_th); in bnxt_qplib_query_cc_param()
1129 cc_param->rtt = le16_to_cpu(sb->rtt); in bnxt_qplib_query_cc_param()
1130 cc_param->tcp_cp = le16_to_cpu(sb->tcp_cp); in bnxt_qplib_query_cc_param()
1131 cc_param->time_pph = sb->time_per_phase; in bnxt_qplib_query_cc_param()
1132 cc_param->pkts_pph = sb->pkts_per_phase; in bnxt_qplib_query_cc_param()
1138 dma_free_coherent(&rcfw->pdev->dev, sbuf.size, sbuf.sb, sbuf.dma_addr); in bnxt_qplib_query_cc_param()