Lines Matching refs:ccp
2095 static int cc_get_classportinfo(struct ib_cc_mad *ccp, in cc_get_classportinfo() argument
2099 (struct ib_cc_classportinfo_attr *)ccp->mgmt_data; in cc_get_classportinfo()
2101 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_classportinfo()
2112 return reply((struct ib_smp *) ccp); in cc_get_classportinfo()
2115 static int cc_get_congestion_info(struct ib_cc_mad *ccp, in cc_get_congestion_info() argument
2119 (struct ib_cc_info_attr *)ccp->mgmt_data; in cc_get_congestion_info()
2123 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_congestion_info()
2128 return reply((struct ib_smp *) ccp); in cc_get_congestion_info()
2131 static int cc_get_congestion_setting(struct ib_cc_mad *ccp, in cc_get_congestion_setting() argument
2136 (struct ib_cc_congestion_setting_attr *)ccp->mgmt_data; in cc_get_congestion_setting()
2141 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_congestion_setting()
2159 return reply((struct ib_smp *) ccp); in cc_get_congestion_setting()
2162 static int cc_get_congestion_control_table(struct ib_cc_mad *ccp, in cc_get_congestion_control_table() argument
2166 (struct ib_cc_table_attr *)ccp->mgmt_data; in cc_get_congestion_control_table()
2169 u32 cct_block_index = be32_to_cpu(ccp->attr_mod); in cc_get_congestion_control_table()
2179 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_congestion_control_table()
2192 ccp->attr_mod = cpu_to_be32(cct_block_index); in cc_get_congestion_control_table()
2209 return reply((struct ib_smp *) ccp); in cc_get_congestion_control_table()
2212 return reply_failure((struct ib_smp *) ccp); in cc_get_congestion_control_table()
2215 static int cc_set_congestion_setting(struct ib_cc_mad *ccp, in cc_set_congestion_setting() argument
2219 (struct ib_cc_congestion_setting_attr *)ccp->mgmt_data; in cc_set_congestion_setting()
2240 return reply((struct ib_smp *) ccp); in cc_set_congestion_setting()
2243 static int cc_set_congestion_control_table(struct ib_cc_mad *ccp, in cc_set_congestion_control_table() argument
2247 (struct ib_cc_table_attr *)ccp->mgmt_data; in cc_set_congestion_control_table()
2250 u32 cct_block_index = be32_to_cpu(ccp->attr_mod); in cc_set_congestion_control_table()
2293 return reply((struct ib_smp *) ccp); in cc_set_congestion_control_table()
2296 return reply_failure((struct ib_smp *) ccp); in cc_set_congestion_control_table()
2300 struct ib_cc_mad *ccp, int mad_flags) in check_cc_key() argument
2309 struct ib_cc_mad *ccp = (struct ib_cc_mad *)out_mad; in process_cc() local
2315 if (ccp->class_version != 2) { in process_cc()
2316 ccp->status |= IB_SMP_UNSUP_VERSION; in process_cc()
2317 ret = reply((struct ib_smp *)ccp); in process_cc()
2321 ret = check_cc_key(ibp, ccp, mad_flags); in process_cc()
2325 switch (ccp->method) { in process_cc()
2327 switch (ccp->attr_id) { in process_cc()
2329 ret = cc_get_classportinfo(ccp, ibdev); in process_cc()
2333 ret = cc_get_congestion_info(ccp, ibdev, port); in process_cc()
2337 ret = cc_get_congestion_setting(ccp, ibdev, port); in process_cc()
2341 ret = cc_get_congestion_control_table(ccp, ibdev, port); in process_cc()
2346 ccp->status |= IB_SMP_UNSUP_METH_ATTR; in process_cc()
2347 ret = reply((struct ib_smp *) ccp); in process_cc()
2352 switch (ccp->attr_id) { in process_cc()
2354 ret = cc_set_congestion_setting(ccp, ibdev, port); in process_cc()
2358 ret = cc_set_congestion_control_table(ccp, ibdev, port); in process_cc()
2363 ccp->status |= IB_SMP_UNSUP_METH_ATTR; in process_cc()
2364 ret = reply((struct ib_smp *) ccp); in process_cc()
2379 ccp->status |= IB_SMP_UNSUP_METHOD; in process_cc()
2380 ret = reply((struct ib_smp *) ccp); in process_cc()