Lines Matching refs:sb

84 	struct creq_query_func_resp_sb *sb;  in bnxt_qplib_get_dev_attr()  local
100 sbuf.size = sizeof(*sb); in bnxt_qplib_get_dev_attr()
101 sbuf.sb = dma_zalloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_get_dev_attr()
103 if (!sbuf.sb) in bnxt_qplib_get_dev_attr()
106 sb = sbuf.sb; in bnxt_qplib_get_dev_attr()
115 attr->max_qp = le32_to_cpu(sb->max_qp); in bnxt_qplib_get_dev_attr()
120 sb->max_qp_rd_atom > BNXT_QPLIB_MAX_OUT_RD_ATOM ? in bnxt_qplib_get_dev_attr()
121 BNXT_QPLIB_MAX_OUT_RD_ATOM : sb->max_qp_rd_atom; in bnxt_qplib_get_dev_attr()
123 sb->max_qp_init_rd_atom > BNXT_QPLIB_MAX_OUT_RD_ATOM ? in bnxt_qplib_get_dev_attr()
124 BNXT_QPLIB_MAX_OUT_RD_ATOM : sb->max_qp_init_rd_atom; in bnxt_qplib_get_dev_attr()
128 attr->max_qp_wqes = le16_to_cpu(sb->max_qp_wr) - 1; in bnxt_qplib_get_dev_attr()
141 attr->max_qp_sges = sb->max_sge; in bnxt_qplib_get_dev_attr()
144 attr->max_qp_sges = sb->max_sge_var_wqe; in bnxt_qplib_get_dev_attr()
145 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()
154 attr->max_mw = le32_to_cpu(sb->max_mw); in bnxt_qplib_get_dev_attr()
157 attr->max_mr_size = le64_to_cpu(sb->max_mr_size); in bnxt_qplib_get_dev_attr()
159 attr->max_raw_ethy_qp = le32_to_cpu(sb->max_raw_eth_qp); in bnxt_qplib_get_dev_attr()
160 attr->max_ah = le32_to_cpu(sb->max_ah); in bnxt_qplib_get_dev_attr()
163 attr->max_fmr = le32_to_cpu(sb->max_fmr); in bnxt_qplib_get_dev_attr()
164 attr->max_map_per_fmr = sb->max_map_per_fmr; in bnxt_qplib_get_dev_attr()
166 attr->max_srq = le16_to_cpu(sb->max_srq); in bnxt_qplib_get_dev_attr()
168 attr->max_srq_wqes = le32_to_cpu(sb->max_srq_wr) - 1; in bnxt_qplib_get_dev_attr()
169 attr->max_srq_sges = sb->max_srq_sge; in bnxt_qplib_get_dev_attr()
173 le32_to_cpu(sb->max_inline_data) : in bnxt_qplib_get_dev_attr()
174 le16_to_cpu(sb->max_inline_data_var_wqe); in bnxt_qplib_get_dev_attr()
176 attr->l2_db_size = (sb->l2_db_space_size + 1) * in bnxt_qplib_get_dev_attr()
179 attr->max_sgid = le32_to_cpu(sb->max_gid); in bnxt_qplib_get_dev_attr()
184 attr->dev_cap_flags = le16_to_cpu(sb->dev_cap_flags); in bnxt_qplib_get_dev_attr()
190 temp = le32_to_cpu(sb->tqm_alloc_reqs[i]); in bnxt_qplib_get_dev_attr()
199 attr->max_dpi = le32_to_cpu(sb->max_dpi); in bnxt_qplib_get_dev_attr()
204 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_get_dev_attr()
880 struct creq_query_roce_cc_gen1_resp_sb_tlv *sb) in bnxt_qplib_read_cc_gen1() argument
882 cc_ext->inact_th_hi = le16_to_cpu(sb->inactivity_th_hi); in bnxt_qplib_read_cc_gen1()
883 cc_ext->min_delta_cnp = le16_to_cpu(sb->min_time_between_cnps); in bnxt_qplib_read_cc_gen1()
884 cc_ext->init_cp = le16_to_cpu(sb->init_cp); in bnxt_qplib_read_cc_gen1()
885 cc_ext->tr_update_mode = sb->tr_update_mode; in bnxt_qplib_read_cc_gen1()
886 cc_ext->tr_update_cyls = sb->tr_update_cycles; in bnxt_qplib_read_cc_gen1()
887 cc_ext->fr_rtt = sb->fr_num_rtts; in bnxt_qplib_read_cc_gen1()
888 cc_ext->ai_rate_incr = sb->ai_rate_increase; in bnxt_qplib_read_cc_gen1()
889 cc_ext->rr_rtt_th = le16_to_cpu(sb->reduction_relax_rtts_th); in bnxt_qplib_read_cc_gen1()
890 cc_ext->ar_cr_th = le16_to_cpu(sb->additional_relax_cr_th); in bnxt_qplib_read_cc_gen1()
891 cc_ext->cr_min_th = le16_to_cpu(sb->cr_min_th); in bnxt_qplib_read_cc_gen1()
892 cc_ext->bw_avg_weight = sb->bw_avg_weight; in bnxt_qplib_read_cc_gen1()
893 cc_ext->cr_factor = sb->actual_cr_factor; in bnxt_qplib_read_cc_gen1()
894 cc_ext->cr_th_max_cp = le16_to_cpu(sb->max_cp_cr_th); in bnxt_qplib_read_cc_gen1()
895 cc_ext->cp_bias_en = sb->cp_bias_en; in bnxt_qplib_read_cc_gen1()
896 cc_ext->cp_bias = sb->cp_bias; in bnxt_qplib_read_cc_gen1()
897 cc_ext->cnp_ecn = sb->cnp_ecn; in bnxt_qplib_read_cc_gen1()
898 cc_ext->rtt_jitter_en = sb->rtt_jitter_en; in bnxt_qplib_read_cc_gen1()
899 cc_ext->bytes_per_usec = le16_to_cpu(sb->link_bytes_per_usec); in bnxt_qplib_read_cc_gen1()
900 cc_ext->cc_cr_reset_th = le16_to_cpu(sb->reset_cc_cr_th); in bnxt_qplib_read_cc_gen1()
901 cc_ext->cr_width = sb->cr_width; in bnxt_qplib_read_cc_gen1()
902 cc_ext->min_quota = sb->quota_period_min; in bnxt_qplib_read_cc_gen1()
903 cc_ext->max_quota = sb->quota_period_max; in bnxt_qplib_read_cc_gen1()
904 cc_ext->abs_max_quota = sb->quota_period_abs_max; in bnxt_qplib_read_cc_gen1()
905 cc_ext->tr_lb = le16_to_cpu(sb->tr_lower_bound); in bnxt_qplib_read_cc_gen1()
906 cc_ext->cr_prob_fac = sb->cr_prob_factor; in bnxt_qplib_read_cc_gen1()
907 cc_ext->tr_prob_fac = sb->tr_prob_factor; in bnxt_qplib_read_cc_gen1()
908 cc_ext->fair_cr_th = le16_to_cpu(sb->fairness_cr_th); in bnxt_qplib_read_cc_gen1()
909 cc_ext->red_div = sb->red_div; in bnxt_qplib_read_cc_gen1()
910 cc_ext->cnp_ratio_th = sb->cnp_ratio_th; in bnxt_qplib_read_cc_gen1()
911 cc_ext->ai_ext_rtt = le16_to_cpu(sb->exp_ai_rtts); in bnxt_qplib_read_cc_gen1()
912 cc_ext->exp_crcp_ratio = sb->exp_ai_cr_cp_ratio; in bnxt_qplib_read_cc_gen1()
913 cc_ext->low_rate_en = sb->use_rate_table; in bnxt_qplib_read_cc_gen1()
914 cc_ext->cpcr_update_th = le16_to_cpu(sb->cp_exp_update_th); in bnxt_qplib_read_cc_gen1()
915 cc_ext->ai_rtt_th1 = le16_to_cpu(sb->high_exp_ai_rtts_th1); in bnxt_qplib_read_cc_gen1()
916 cc_ext->ai_rtt_th2 = le16_to_cpu(sb->high_exp_ai_rtts_th2); in bnxt_qplib_read_cc_gen1()
917 cc_ext->cf_rtt_th = le16_to_cpu(sb->actual_cr_cong_free_rtts_th); in bnxt_qplib_read_cc_gen1()
918 cc_ext->sc_cr_th1 = le16_to_cpu(sb->severe_cong_cr_th1); in bnxt_qplib_read_cc_gen1()
919 cc_ext->sc_cr_th2 = le16_to_cpu(sb->severe_cong_cr_th2); in bnxt_qplib_read_cc_gen1()
920 cc_ext->l64B_per_rtt = le32_to_cpu(sb->link64B_per_rtt); in bnxt_qplib_read_cc_gen1()
921 cc_ext->cc_ack_bytes = sb->cc_ack_bytes; in bnxt_qplib_read_cc_gen1()
922 cc_ext->reduce_cf_rtt_th = le16_to_cpu(sb->reduce_init_cong_free_rtts_th); in bnxt_qplib_read_cc_gen1()
932 struct creq_query_roce_cc_resp_sb *sb; in bnxt_qplib_query_cc_param() local
945 resp_size = sizeof(*sb); in bnxt_qplib_query_cc_param()
947 sbuf.sb = dma_zalloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_query_cc_param()
949 if (!sbuf.sb) in bnxt_qplib_query_cc_param()
962 ext_sb = sbuf.sb; in bnxt_qplib_query_cc_param()
964 sb = _is_chip_gen_p5_p7(res->cctx) ? &ext_sb->base_sb : in bnxt_qplib_query_cc_param()
967 cc_param->enable = sb->enable_cc & CREQ_QUERY_ROCE_CC_RESP_SB_ENABLE_CC; in bnxt_qplib_query_cc_param()
968 cc_param->tos_ecn = (sb->tos_dscp_tos_ecn & in bnxt_qplib_query_cc_param()
971 cc_param->tos_dscp = (sb->tos_dscp_tos_ecn & in bnxt_qplib_query_cc_param()
974 cc_param->alt_tos_dscp = sb->alt_tos_dscp; in bnxt_qplib_query_cc_param()
975 cc_param->alt_vlan_pcp = sb->alt_vlan_pcp; in bnxt_qplib_query_cc_param()
977 cc_param->g = sb->g; in bnxt_qplib_query_cc_param()
978 cc_param->nph_per_state = sb->num_phases_per_state; in bnxt_qplib_query_cc_param()
979 cc_param->init_cr = le16_to_cpu(sb->init_cr); in bnxt_qplib_query_cc_param()
980 cc_param->init_tr = le16_to_cpu(sb->init_tr); in bnxt_qplib_query_cc_param()
981 cc_param->cc_mode = sb->cc_mode; in bnxt_qplib_query_cc_param()
982 cc_param->inact_th = le16_to_cpu(sb->inactivity_th); in bnxt_qplib_query_cc_param()
983 cc_param->rtt = le16_to_cpu(sb->rtt); in bnxt_qplib_query_cc_param()
984 cc_param->tcp_cp = le16_to_cpu(sb->tcp_cp); in bnxt_qplib_query_cc_param()
985 cc_param->time_pph = sb->time_per_phase; in bnxt_qplib_query_cc_param()
986 cc_param->pkts_pph = sb->pkts_per_phase; in bnxt_qplib_query_cc_param()
991 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_query_cc_param()
1001 struct creq_query_roce_stats_resp_sb *sb; in bnxt_qplib_get_roce_error_stats() local
1012 sbuf.size = sizeof(*sb); in bnxt_qplib_get_roce_error_stats()
1013 sbuf.sb = dma_zalloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_get_roce_error_stats()
1015 if (!sbuf.sb) in bnxt_qplib_get_roce_error_stats()
1017 sb = sbuf.sb; in bnxt_qplib_get_roce_error_stats()
1057 stats->to_retransmits = le64_to_cpu(sb->to_retransmits); in bnxt_qplib_get_roce_error_stats()
1058 stats->seq_err_naks_rcvd = le64_to_cpu(sb->seq_err_naks_rcvd); in bnxt_qplib_get_roce_error_stats()
1059 stats->max_retry_exceeded = le64_to_cpu(sb->max_retry_exceeded); in bnxt_qplib_get_roce_error_stats()
1060 stats->rnr_naks_rcvd = le64_to_cpu(sb->rnr_naks_rcvd); in bnxt_qplib_get_roce_error_stats()
1061 stats->missing_resp = le64_to_cpu(sb->missing_resp); in bnxt_qplib_get_roce_error_stats()
1062 stats->unrecoverable_err = le64_to_cpu(sb->unrecoverable_err); in bnxt_qplib_get_roce_error_stats()
1063 stats->bad_resp_err = le64_to_cpu(sb->bad_resp_err); in bnxt_qplib_get_roce_error_stats()
1064 stats->local_qp_op_err = le64_to_cpu(sb->local_qp_op_err); in bnxt_qplib_get_roce_error_stats()
1065 stats->local_protection_err = le64_to_cpu(sb->local_protection_err); in bnxt_qplib_get_roce_error_stats()
1066 stats->mem_mgmt_op_err = le64_to_cpu(sb->mem_mgmt_op_err); in bnxt_qplib_get_roce_error_stats()
1067 stats->remote_invalid_req_err = le64_to_cpu(sb->remote_invalid_req_err); in bnxt_qplib_get_roce_error_stats()
1068 stats->remote_access_err = le64_to_cpu(sb->remote_access_err); in bnxt_qplib_get_roce_error_stats()
1069 stats->remote_op_err = le64_to_cpu(sb->remote_op_err); in bnxt_qplib_get_roce_error_stats()
1070 stats->dup_req = le64_to_cpu(sb->dup_req); in bnxt_qplib_get_roce_error_stats()
1071 stats->res_exceed_max = le64_to_cpu(sb->res_exceed_max); in bnxt_qplib_get_roce_error_stats()
1072 stats->res_length_mismatch = le64_to_cpu(sb->res_length_mismatch); in bnxt_qplib_get_roce_error_stats()
1073 stats->res_exceeds_wqe = le64_to_cpu(sb->res_exceeds_wqe); in bnxt_qplib_get_roce_error_stats()
1074 stats->res_opcode_err = le64_to_cpu(sb->res_opcode_err); in bnxt_qplib_get_roce_error_stats()
1075 stats->res_rx_invalid_rkey = le64_to_cpu(sb->res_rx_invalid_rkey); in bnxt_qplib_get_roce_error_stats()
1076 stats->res_rx_domain_err = le64_to_cpu(sb->res_rx_domain_err); in bnxt_qplib_get_roce_error_stats()
1077 stats->res_rx_no_perm = le64_to_cpu(sb->res_rx_no_perm); in bnxt_qplib_get_roce_error_stats()
1078 stats->res_rx_range_err = le64_to_cpu(sb->res_rx_range_err); in bnxt_qplib_get_roce_error_stats()
1079 stats->res_tx_invalid_rkey = le64_to_cpu(sb->res_tx_invalid_rkey); in bnxt_qplib_get_roce_error_stats()
1080 stats->res_tx_domain_err = le64_to_cpu(sb->res_tx_domain_err); in bnxt_qplib_get_roce_error_stats()
1081 stats->res_tx_no_perm = le64_to_cpu(sb->res_tx_no_perm); in bnxt_qplib_get_roce_error_stats()
1082 stats->res_tx_range_err = le64_to_cpu(sb->res_tx_range_err); in bnxt_qplib_get_roce_error_stats()
1083 stats->res_irrq_oflow = le64_to_cpu(sb->res_irrq_oflow); in bnxt_qplib_get_roce_error_stats()
1084 stats->res_unsup_opcode = le64_to_cpu(sb->res_unsup_opcode); in bnxt_qplib_get_roce_error_stats()
1085 stats->res_unaligned_atomic = le64_to_cpu(sb->res_unaligned_atomic); in bnxt_qplib_get_roce_error_stats()
1086 stats->res_rem_inv_err = le64_to_cpu(sb->res_rem_inv_err); in bnxt_qplib_get_roce_error_stats()
1087 stats->res_mem_error = le64_to_cpu(sb->res_mem_error); in bnxt_qplib_get_roce_error_stats()
1088 stats->res_srq_err = le64_to_cpu(sb->res_srq_err); in bnxt_qplib_get_roce_error_stats()
1089 stats->res_cmp_err = le64_to_cpu(sb->res_cmp_err); in bnxt_qplib_get_roce_error_stats()
1090 stats->res_invalid_dup_rkey = le64_to_cpu(sb->res_invalid_dup_rkey); in bnxt_qplib_get_roce_error_stats()
1091 stats->res_wqe_format_err = le64_to_cpu(sb->res_wqe_format_err); in bnxt_qplib_get_roce_error_stats()
1092 stats->res_cq_load_err = le64_to_cpu(sb->res_cq_load_err); in bnxt_qplib_get_roce_error_stats()
1093 stats->res_srq_load_err = le64_to_cpu(sb->res_srq_load_err); in bnxt_qplib_get_roce_error_stats()
1094 stats->res_tx_pci_err = le64_to_cpu(sb->res_tx_pci_err); in bnxt_qplib_get_roce_error_stats()
1095 stats->res_rx_pci_err = le64_to_cpu(sb->res_rx_pci_err); in bnxt_qplib_get_roce_error_stats()
1098 rcfw->oos_prev = le64_to_cpu(sb->res_oos_drop_count); in bnxt_qplib_get_roce_error_stats()
1101 stats->res_oos_drop_count += (le64_to_cpu(sb->res_oos_drop_count) - in bnxt_qplib_get_roce_error_stats()
1104 rcfw->oos_prev = le64_to_cpu(sb->res_oos_drop_count); in bnxt_qplib_get_roce_error_stats()
1107 stats->active_qp_count_p0 = le64_to_cpu(sb->active_qp_count_p0); in bnxt_qplib_get_roce_error_stats()
1108 stats->active_qp_count_p1 = le64_to_cpu(sb->active_qp_count_p1); in bnxt_qplib_get_roce_error_stats()
1109 stats->active_qp_count_p2 = le64_to_cpu(sb->active_qp_count_p2); in bnxt_qplib_get_roce_error_stats()
1110 stats->active_qp_count_p3 = le64_to_cpu(sb->active_qp_count_p3); in bnxt_qplib_get_roce_error_stats()
1113 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_get_roce_error_stats()
1161 struct creq_query_roce_stats_ext_resp_sb *sb; in bnxt_qplib_qext_stat() local
1167 sbuf.size = sizeof(*sb); in bnxt_qplib_qext_stat()
1168 sbuf.sb = dma_zalloc_coherent(&rcfw->pdev->dev, sbuf.size, in bnxt_qplib_qext_stat()
1170 if (!sbuf.sb) { in bnxt_qplib_qext_stat()
1175 sb = sbuf.sb; in bnxt_qplib_qext_stat()
1201 print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, sb, sizeof(*sb)); in bnxt_qplib_qext_stat()
1202 estat->tx_atomic_req = le64_to_cpu(sb->tx_atomic_req_pkts); in bnxt_qplib_qext_stat()
1203 estat->tx_read_req = le64_to_cpu(sb->tx_read_req_pkts); in bnxt_qplib_qext_stat()
1204 estat->tx_read_res = le64_to_cpu(sb->tx_read_res_pkts); in bnxt_qplib_qext_stat()
1205 estat->tx_write_req = le64_to_cpu(sb->tx_write_req_pkts); in bnxt_qplib_qext_stat()
1206 estat->tx_send_req = le64_to_cpu(sb->tx_send_req_pkts); in bnxt_qplib_qext_stat()
1207 estat->tx_roce_pkts = le64_to_cpu(sb->tx_roce_pkts); in bnxt_qplib_qext_stat()
1208 estat->tx_roce_bytes = le64_to_cpu(sb->tx_roce_bytes); in bnxt_qplib_qext_stat()
1209 estat->rx_atomic_req = le64_to_cpu(sb->rx_atomic_req_pkts); in bnxt_qplib_qext_stat()
1210 estat->rx_read_req = le64_to_cpu(sb->rx_read_req_pkts); in bnxt_qplib_qext_stat()
1211 estat->rx_read_res = le64_to_cpu(sb->rx_read_res_pkts); in bnxt_qplib_qext_stat()
1212 estat->rx_write_req = le64_to_cpu(sb->rx_write_req_pkts); in bnxt_qplib_qext_stat()
1213 estat->rx_send_req = le64_to_cpu(sb->rx_send_req_pkts); in bnxt_qplib_qext_stat()
1214 estat->rx_roce_pkts = le64_to_cpu(sb->rx_roce_pkts); in bnxt_qplib_qext_stat()
1215 estat->rx_roce_bytes = le64_to_cpu(sb->rx_roce_bytes); in bnxt_qplib_qext_stat()
1216 estat->rx_roce_good_pkts = le64_to_cpu(sb->rx_roce_good_pkts); in bnxt_qplib_qext_stat()
1217 estat->rx_roce_good_bytes = le64_to_cpu(sb->rx_roce_good_bytes); in bnxt_qplib_qext_stat()
1218 estat->rx_out_of_buffer = le64_to_cpu(sb->rx_out_of_buffer_pkts); in bnxt_qplib_qext_stat()
1219 estat->rx_out_of_sequence = le64_to_cpu(sb->rx_out_of_sequence_pkts); in bnxt_qplib_qext_stat()
1220 estat->tx_cnp = le64_to_cpu(sb->tx_cnp_pkts); in bnxt_qplib_qext_stat()
1221 estat->rx_cnp = le64_to_cpu(sb->rx_cnp_pkts); in bnxt_qplib_qext_stat()
1222 estat->rx_ecn_marked = le64_to_cpu(sb->rx_ecn_marked_pkts); in bnxt_qplib_qext_stat()
1223 estat->seq_err_naks_rcvd = le64_to_cpu(sb->seq_err_naks_rcvd); in bnxt_qplib_qext_stat()
1224 estat->rnr_naks_rcvd = le64_to_cpu(sb->rnr_naks_rcvd); in bnxt_qplib_qext_stat()
1225 estat->missing_resp = le64_to_cpu(sb->missing_resp); in bnxt_qplib_qext_stat()
1226 estat->to_retransmits = le64_to_cpu(sb->to_retransmit); in bnxt_qplib_qext_stat()
1227 estat->dup_req = le64_to_cpu(sb->dup_req); in bnxt_qplib_qext_stat()
1228 estat->rx_dcn_payload_cut = le64_to_cpu(sb->rx_dcn_payload_cut); in bnxt_qplib_qext_stat()
1229 estat->te_bypassed = le64_to_cpu(sb->te_bypassed); in bnxt_qplib_qext_stat()
1232 sbuf.sb, sbuf.dma_addr); in bnxt_qplib_qext_stat()