Lines Matching refs:reply
232 static int ovs_meter_cmd_reply_stats(struct sk_buff *reply, u32 meter_id, in ovs_meter_cmd_reply_stats() argument
239 if (nla_put_u32(reply, OVS_METER_ATTR_ID, meter_id)) in ovs_meter_cmd_reply_stats()
242 if (nla_put(reply, OVS_METER_ATTR_STATS, in ovs_meter_cmd_reply_stats()
246 if (nla_put_u64_64bit(reply, OVS_METER_ATTR_USED, meter->used, in ovs_meter_cmd_reply_stats()
250 nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); in ovs_meter_cmd_reply_stats()
259 band_nla = nla_nest_start_noflag(reply, OVS_BAND_ATTR_UNSPEC); in ovs_meter_cmd_reply_stats()
260 if (!band_nla || nla_put(reply, OVS_BAND_ATTR_STATS, in ovs_meter_cmd_reply_stats()
264 nla_nest_end(reply, band_nla); in ovs_meter_cmd_reply_stats()
266 nla_nest_end(reply, nla); in ovs_meter_cmd_reply_stats()
278 struct sk_buff *reply; in ovs_meter_cmd_features() local
282 reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_FEATURES, in ovs_meter_cmd_features()
284 if (IS_ERR(reply)) in ovs_meter_cmd_features()
285 return PTR_ERR(reply); in ovs_meter_cmd_features()
294 if (nla_put_u32(reply, OVS_METER_ATTR_MAX_METERS, in ovs_meter_cmd_features()
300 if (nla_put_u32(reply, OVS_METER_ATTR_MAX_BANDS, DP_MAX_BANDS)) in ovs_meter_cmd_features()
303 nla = nla_nest_start_noflag(reply, OVS_METER_ATTR_BANDS); in ovs_meter_cmd_features()
307 band_nla = nla_nest_start_noflag(reply, OVS_BAND_ATTR_UNSPEC); in ovs_meter_cmd_features()
311 if (nla_put_u32(reply, OVS_BAND_ATTR_TYPE, OVS_METER_BAND_TYPE_DROP)) in ovs_meter_cmd_features()
313 nla_nest_end(reply, band_nla); in ovs_meter_cmd_features()
314 nla_nest_end(reply, nla); in ovs_meter_cmd_features()
316 genlmsg_end(reply, ovs_reply_header); in ovs_meter_cmd_features()
317 return genlmsg_reply(reply, info); in ovs_meter_cmd_features()
322 nlmsg_free(reply); in ovs_meter_cmd_features()
410 struct sk_buff *reply; in ovs_meter_cmd_set() local
426 reply = ovs_meter_cmd_reply_start(info, OVS_METER_CMD_SET, in ovs_meter_cmd_set()
428 if (IS_ERR(reply)) { in ovs_meter_cmd_set()
429 err = PTR_ERR(reply); in ovs_meter_cmd_set()
457 failed = nla_put_u32(reply, OVS_METER_ATTR_ID, meter_id); in ovs_meter_cmd_set()
462 err = ovs_meter_cmd_reply_stats(reply, meter_id, in ovs_meter_cmd_set()
470 genlmsg_end(reply, ovs_reply_header); in ovs_meter_cmd_set()
471 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()