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