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()
2110 return reply((struct ib_smp *) ccp); in cc_get_classportinfo()
2113 static int cc_get_congestion_info(struct ib_cc_mad *ccp, in cc_get_congestion_info() argument
2117 (struct ib_cc_info_attr *)ccp->mgmt_data; in cc_get_congestion_info()
2124 return reply((struct ib_smp *) ccp); in cc_get_congestion_info()
2127 static int cc_get_congestion_setting(struct ib_cc_mad *ccp, in cc_get_congestion_setting() argument
2132 (struct ib_cc_congestion_setting_attr *)ccp->mgmt_data; in cc_get_congestion_setting()
2153 return reply((struct ib_smp *) ccp); in cc_get_congestion_setting()
2156 static int cc_get_congestion_control_table(struct ib_cc_mad *ccp, in cc_get_congestion_control_table() argument
2160 (struct ib_cc_table_attr *)ccp->mgmt_data; in cc_get_congestion_control_table()
2163 u32 cct_block_index = be32_to_cpu(ccp->attr_mod); in cc_get_congestion_control_table()
2184 ccp->attr_mod = cpu_to_be32(cct_block_index); in cc_get_congestion_control_table()
2201 return reply((struct ib_smp *) ccp); in cc_get_congestion_control_table()
2204 return reply_failure((struct ib_smp *) ccp); in cc_get_congestion_control_table()
2207 static int cc_set_congestion_setting(struct ib_cc_mad *ccp, in cc_set_congestion_setting() argument
2211 (struct ib_cc_congestion_setting_attr *)ccp->mgmt_data; in cc_set_congestion_setting()
2232 return reply((struct ib_smp *) ccp); in cc_set_congestion_setting()
2235 static int cc_set_congestion_control_table(struct ib_cc_mad *ccp, in cc_set_congestion_control_table() argument
2239 (struct ib_cc_table_attr *)ccp->mgmt_data; in cc_set_congestion_control_table()
2242 u32 cct_block_index = be32_to_cpu(ccp->attr_mod); in cc_set_congestion_control_table()
2285 return reply((struct ib_smp *) ccp); in cc_set_congestion_control_table()
2288 return reply_failure((struct ib_smp *) ccp); in cc_set_congestion_control_table()
2295 struct ib_cc_mad *ccp = (struct ib_cc_mad *)out_mad; in process_cc() local
2298 if (ccp->class_version != 2) { in process_cc()
2299 ccp->status |= IB_SMP_UNSUP_VERSION; in process_cc()
2300 return reply((struct ib_smp *)ccp); in process_cc()
2303 switch (ccp->method) { in process_cc()
2305 switch (ccp->attr_id) { in process_cc()
2307 return cc_get_classportinfo(ccp, ibdev); in process_cc()
2309 return cc_get_congestion_info(ccp, ibdev, port); in process_cc()
2311 return cc_get_congestion_setting(ccp, ibdev, port); in process_cc()
2313 return cc_get_congestion_control_table(ccp, ibdev, port); in process_cc()
2315 ccp->status |= IB_SMP_UNSUP_METH_ATTR; in process_cc()
2316 return reply((struct ib_smp *) ccp); in process_cc()
2319 switch (ccp->attr_id) { in process_cc()
2321 return cc_set_congestion_setting(ccp, ibdev, port); in process_cc()
2323 return cc_set_congestion_control_table(ccp, ibdev, port); in process_cc()
2325 ccp->status |= IB_SMP_UNSUP_METH_ATTR; in process_cc()
2326 return reply((struct ib_smp *) ccp); in process_cc()
2338 ccp->status |= IB_SMP_UNSUP_METHOD; in process_cc()
2339 return reply((struct ib_smp *) ccp); in process_cc()