Lines Matching refs:ccp

2092 static int cc_get_classportinfo(struct ib_cc_mad *ccp,  in cc_get_classportinfo()  argument
2096 (struct ib_cc_classportinfo_attr *)ccp->mgmt_data; in cc_get_classportinfo()
2098 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_classportinfo()
2109 return reply((struct ib_smp *) ccp); in cc_get_classportinfo()
2112 static int cc_get_congestion_info(struct ib_cc_mad *ccp, in cc_get_congestion_info() argument
2116 (struct ib_cc_info_attr *)ccp->mgmt_data; in cc_get_congestion_info()
2120 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_congestion_info()
2125 return reply((struct ib_smp *) ccp); in cc_get_congestion_info()
2128 static int cc_get_congestion_setting(struct ib_cc_mad *ccp, in cc_get_congestion_setting() argument
2133 (struct ib_cc_congestion_setting_attr *)ccp->mgmt_data; in cc_get_congestion_setting()
2138 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_congestion_setting()
2156 return reply((struct ib_smp *) ccp); in cc_get_congestion_setting()
2159 static int cc_get_congestion_control_table(struct ib_cc_mad *ccp, in cc_get_congestion_control_table() argument
2163 (struct ib_cc_table_attr *)ccp->mgmt_data; in cc_get_congestion_control_table()
2166 u32 cct_block_index = be32_to_cpu(ccp->attr_mod); in cc_get_congestion_control_table()
2176 memset(ccp->mgmt_data, 0, sizeof(ccp->mgmt_data)); in cc_get_congestion_control_table()
2189 ccp->attr_mod = cpu_to_be32(cct_block_index); in cc_get_congestion_control_table()
2206 return reply((struct ib_smp *) ccp); in cc_get_congestion_control_table()
2209 return reply_failure((struct ib_smp *) ccp); in cc_get_congestion_control_table()
2212 static int cc_set_congestion_setting(struct ib_cc_mad *ccp, in cc_set_congestion_setting() argument
2216 (struct ib_cc_congestion_setting_attr *)ccp->mgmt_data; in cc_set_congestion_setting()
2237 return reply((struct ib_smp *) ccp); in cc_set_congestion_setting()
2240 static int cc_set_congestion_control_table(struct ib_cc_mad *ccp, in cc_set_congestion_control_table() argument
2244 (struct ib_cc_table_attr *)ccp->mgmt_data; in cc_set_congestion_control_table()
2247 u32 cct_block_index = be32_to_cpu(ccp->attr_mod); in cc_set_congestion_control_table()
2290 return reply((struct ib_smp *) ccp); in cc_set_congestion_control_table()
2293 return reply_failure((struct ib_smp *) ccp); in cc_set_congestion_control_table()
2297 struct ib_cc_mad *ccp, int mad_flags) in check_cc_key() argument
2306 struct ib_cc_mad *ccp = (struct ib_cc_mad *)out_mad; in process_cc() local
2312 if (ccp->class_version != 2) { in process_cc()
2313 ccp->status |= IB_SMP_UNSUP_VERSION; in process_cc()
2314 ret = reply((struct ib_smp *)ccp); in process_cc()
2318 ret = check_cc_key(ibp, ccp, mad_flags); in process_cc()
2322 switch (ccp->method) { in process_cc()
2324 switch (ccp->attr_id) { in process_cc()
2326 ret = cc_get_classportinfo(ccp, ibdev); in process_cc()
2330 ret = cc_get_congestion_info(ccp, ibdev, port); in process_cc()
2334 ret = cc_get_congestion_setting(ccp, ibdev, port); in process_cc()
2338 ret = cc_get_congestion_control_table(ccp, ibdev, port); in process_cc()
2343 ccp->status |= IB_SMP_UNSUP_METH_ATTR; in process_cc()
2344 ret = reply((struct ib_smp *) ccp); in process_cc()
2349 switch (ccp->attr_id) { in process_cc()
2351 ret = cc_set_congestion_setting(ccp, ibdev, port); in process_cc()
2355 ret = cc_set_congestion_control_table(ccp, ibdev, port); in process_cc()
2360 ccp->status |= IB_SMP_UNSUP_METH_ATTR; in process_cc()
2361 ret = reply((struct ib_smp *) ccp); in process_cc()
2376 ccp->status |= IB_SMP_UNSUP_METHOD; in process_cc()
2377 ret = reply((struct ib_smp *) ccp); in process_cc()