Lines Matching refs:reply

234 static int ovs_meter_cmd_reply_stats(struct sk_buff *reply, u32 meter_id,  in ovs_meter_cmd_reply_stats()  argument
241 if (nla_put_u32(reply, OVS_METER_ATTR_ID, meter_id)) in ovs_meter_cmd_reply_stats()
244 if (nla_put(reply, OVS_METER_ATTR_STATS, in ovs_meter_cmd_reply_stats()
248 if (nla_put_u64_64bit(reply, OVS_METER_ATTR_USED, meter->used, in ovs_meter_cmd_reply_stats()
252 nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); in ovs_meter_cmd_reply_stats()
261 band_nla = nla_nest_start_noflag(reply, OVS_BAND_ATTR_UNSPEC); in ovs_meter_cmd_reply_stats()
262 if (!band_nla || nla_put(reply, OVS_BAND_ATTR_STATS, in ovs_meter_cmd_reply_stats()
266 nla_nest_end(reply, band_nla); in ovs_meter_cmd_reply_stats()
268 nla_nest_end(reply, nla); in ovs_meter_cmd_reply_stats()
280 struct sk_buff *reply; in ovs_meter_cmd_features() local
284 reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_FEATURES, in ovs_meter_cmd_features()
286 if (IS_ERR(reply)) in ovs_meter_cmd_features()
287 return PTR_ERR(reply); in ovs_meter_cmd_features()
296 if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, in ovs_meter_cmd_features()
302 if (nla_put_u32(reply, OVS_METER_ATTR_MAX_BANDS, DP_MAX_BANDS)) in ovs_meter_cmd_features()
305 nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); in ovs_meter_cmd_features()
309 band_nla = nla_nest_start_noflag(reply, OVS_BAND_ATTR_UNSPEC); in ovs_meter_cmd_features()
313 if (nla_put_u32(reply, OVS_BAND_ATTR_TYPE, OVS_METER_BAND_TYPE_DROP)) in ovs_meter_cmd_features()
315 nla_nest_end(reply, band_nla); in ovs_meter_cmd_features()
316 nla_nest_end(reply, nla); in ovs_meter_cmd_features()
318 genlmsg_end(reply, ovs_reply_header); in ovs_meter_cmd_features()
319 return genlmsg_reply(reply, info); in ovs_meter_cmd_features()
324 nlmsg_free(reply); in ovs_meter_cmd_features()
412 struct sk_buff *reply; in ovs_meter_cmd_set() local
428 reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_SET, in ovs_meter_cmd_set()
430 if (IS_ERR(reply)) { in ovs_meter_cmd_set()
431 err = PTR_ERR(reply); in ovs_meter_cmd_set()
459 failed = nla_put_u32(reply, OVS_METER_ATTR_ID, meter_id); in ovs_meter_cmd_set()
464 err = ovs_meter_cmd_reply_stats(reply, meter_id, in ovs_meter_cmd_set()
472 genlmsg_end(reply, ovs_reply_header); in ovs_meter_cmd_set()
473 return genlmsg_reply(reply, info); in ovs_meter_cmd_set()
477 nlmsg_free(reply); in ovs_meter_cmd_set()
489 struct sk_buff *reply; in ovs_meter_cmd_get() local
499 reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_GET, in ovs_meter_cmd_get()
501 if (IS_ERR(reply)) in ovs_meter_cmd_get()
502 return PTR_ERR(reply); in ovs_meter_cmd_get()
520 err = ovs_meter_cmd_reply_stats(reply, meter_id, meter); in ovs_meter_cmd_get()
527 genlmsg_end(reply, ovs_reply_header); in ovs_meter_cmd_get()
528 return genlmsg_reply(reply, info); in ovs_meter_cmd_get()
532 nlmsg_free(reply); in ovs_meter_cmd_get()
542 struct sk_buff *reply; in ovs_meter_cmd_del() local
550 reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_DEL, in ovs_meter_cmd_del()
552 if (IS_ERR(reply)) in ovs_meter_cmd_del()
553 return PTR_ERR(reply); in ovs_meter_cmd_del()
567 err = ovs_meter_cmd_reply_stats(reply, meter_id, old_meter); in ovs_meter_cmd_del()
578 genlmsg_end(reply, ovs_reply_header); in ovs_meter_cmd_del()
579 return genlmsg_reply(reply, info); in ovs_meter_cmd_del()
583 nlmsg_free(reply); in ovs_meter_cmd_del()