• Home
  • Raw
  • Download

Lines Matching refs:msg

135 	struct net_dm_alert_msg *msg;  in reset_per_cpu_data()  local
164 msg = nla_data(nla); in reset_per_cpu_data()
165 memset(msg, 0, al); in reset_per_cpu_data()
217 struct net_dm_alert_msg *msg; in trace_drop_common() local
236 msg = nla_data(nla); in trace_drop_common()
237 point = msg->points; in trace_drop_common()
238 for (i = 0; i < msg->entries; i++) { in trace_drop_common()
245 if (msg->entries == dm_hit_limit) in trace_drop_common()
254 msg->entries++; in trace_drop_common()
328 static int net_dm_hw_entry_put(struct sk_buff *msg, in net_dm_hw_entry_put() argument
333 attr = nla_nest_start(msg, NET_DM_ATTR_HW_ENTRY); in net_dm_hw_entry_put()
337 if (nla_put_string(msg, NET_DM_ATTR_HW_TRAP_NAME, hw_entry->trap_name)) in net_dm_hw_entry_put()
340 if (nla_put_u32(msg, NET_DM_ATTR_HW_TRAP_COUNT, hw_entry->count)) in net_dm_hw_entry_put()
343 nla_nest_end(msg, attr); in net_dm_hw_entry_put()
348 nla_nest_cancel(msg, attr); in net_dm_hw_entry_put()
352 static int net_dm_hw_entries_put(struct sk_buff *msg, in net_dm_hw_entries_put() argument
358 attr = nla_nest_start(msg, NET_DM_ATTR_HW_ENTRIES); in net_dm_hw_entries_put()
365 rc = net_dm_hw_entry_put(msg, &hw_entries->entries[i]); in net_dm_hw_entries_put()
370 nla_nest_end(msg, attr); in net_dm_hw_entries_put()
375 nla_nest_cancel(msg, attr); in net_dm_hw_entries_put()
380 net_dm_hw_summary_report_fill(struct sk_buff *msg, in net_dm_hw_summary_report_fill() argument
387 hdr = genlmsg_put(msg, 0, 0, &net_drop_monitor_family, 0, in net_dm_hw_summary_report_fill()
395 if (nla_put(msg, NLA_UNSPEC, sizeof(anc_hdr), &anc_hdr)) in net_dm_hw_summary_report_fill()
398 rc = net_dm_hw_entries_put(msg, hw_entries); in net_dm_hw_summary_report_fill()
402 genlmsg_end(msg, hdr); in net_dm_hw_summary_report_fill()
407 genlmsg_cancel(msg, hdr); in net_dm_hw_summary_report_fill()
415 struct sk_buff *msg; in net_dm_hw_summary_work() local
424 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); in net_dm_hw_summary_work()
425 if (!msg) in net_dm_hw_summary_work()
428 rc = net_dm_hw_summary_report_fill(msg, hw_entries); in net_dm_hw_summary_work()
430 nlmsg_free(msg); in net_dm_hw_summary_work()
434 genlmsg_multicast(&net_drop_monitor_family, msg, 0, 0, GFP_KERNEL); in net_dm_hw_summary_work()
581 static int net_dm_packet_report_in_port_put(struct sk_buff *msg, int ifindex, in net_dm_packet_report_in_port_put() argument
586 attr = nla_nest_start(msg, NET_DM_ATTR_IN_PORT); in net_dm_packet_report_in_port_put()
591 nla_put_u32(msg, NET_DM_ATTR_PORT_NETDEV_IFINDEX, ifindex)) in net_dm_packet_report_in_port_put()
594 if (name && nla_put_string(msg, NET_DM_ATTR_PORT_NETDEV_NAME, name)) in net_dm_packet_report_in_port_put()
597 nla_nest_end(msg, attr); in net_dm_packet_report_in_port_put()
602 nla_nest_cancel(msg, attr); in net_dm_packet_report_in_port_put()
606 static int net_dm_packet_report_fill(struct sk_buff *msg, struct sk_buff *skb, in net_dm_packet_report_fill() argument
615 hdr = genlmsg_put(msg, 0, 0, &net_drop_monitor_family, 0, in net_dm_packet_report_fill()
620 if (nla_put_u16(msg, NET_DM_ATTR_ORIGIN, NET_DM_ORIGIN_SW)) in net_dm_packet_report_fill()
623 if (nla_put_u64_64bit(msg, NET_DM_ATTR_PC, pc, NET_DM_ATTR_PAD)) in net_dm_packet_report_fill()
627 if (nla_put_string(msg, NET_DM_ATTR_SYMBOL, buf)) in net_dm_packet_report_fill()
630 rc = net_dm_packet_report_in_port_put(msg, skb->skb_iif, NULL); in net_dm_packet_report_fill()
634 if (nla_put_u64_64bit(msg, NET_DM_ATTR_TIMESTAMP, in net_dm_packet_report_fill()
638 if (nla_put_u32(msg, NET_DM_ATTR_ORIG_LEN, skb->len)) in net_dm_packet_report_fill()
644 if (nla_put_u16(msg, NET_DM_ATTR_PROTO, be16_to_cpu(skb->protocol))) in net_dm_packet_report_fill()
647 attr = skb_put(msg, nla_total_size(payload_len)); in net_dm_packet_report_fill()
654 genlmsg_end(msg, hdr); in net_dm_packet_report_fill()
659 genlmsg_cancel(msg, hdr); in net_dm_packet_report_fill()
667 struct sk_buff *msg; in net_dm_packet_report() local
682 msg = nlmsg_new(net_dm_packet_report_size(payload_len), GFP_KERNEL); in net_dm_packet_report()
683 if (!msg) in net_dm_packet_report()
686 rc = net_dm_packet_report_fill(msg, skb, payload_len); in net_dm_packet_report()
688 nlmsg_free(msg); in net_dm_packet_report()
692 genlmsg_multicast(&net_drop_monitor_family, msg, 0, 0, GFP_KERNEL); in net_dm_packet_report()
753 static int net_dm_hw_packet_report_fill(struct sk_buff *msg, in net_dm_hw_packet_report_fill() argument
762 hdr = genlmsg_put(msg, 0, 0, &net_drop_monitor_family, 0, in net_dm_hw_packet_report_fill()
767 if (nla_put_u16(msg, NET_DM_ATTR_ORIGIN, NET_DM_ORIGIN_HW)) in net_dm_hw_packet_report_fill()
770 if (nla_put_string(msg, NET_DM_ATTR_HW_TRAP_GROUP_NAME, in net_dm_hw_packet_report_fill()
774 if (nla_put_string(msg, NET_DM_ATTR_HW_TRAP_NAME, in net_dm_hw_packet_report_fill()
782 rc = net_dm_packet_report_in_port_put(msg, dev->ifindex, in net_dm_hw_packet_report_fill()
789 nla_put(msg, NET_DM_ATTR_FLOW_ACTION_COOKIE, in net_dm_hw_packet_report_fill()
794 if (nla_put_u64_64bit(msg, NET_DM_ATTR_TIMESTAMP, in net_dm_hw_packet_report_fill()
798 if (nla_put_u32(msg, NET_DM_ATTR_ORIG_LEN, skb->len)) in net_dm_hw_packet_report_fill()
804 if (nla_put_u16(msg, NET_DM_ATTR_PROTO, be16_to_cpu(skb->protocol))) in net_dm_hw_packet_report_fill()
807 attr = skb_put(msg, nla_total_size(payload_len)); in net_dm_hw_packet_report_fill()
814 genlmsg_end(msg, hdr); in net_dm_hw_packet_report_fill()
819 genlmsg_cancel(msg, hdr); in net_dm_hw_packet_report_fill()
885 struct sk_buff *msg; in net_dm_hw_packet_report() local
899 msg = nlmsg_new(net_dm_hw_packet_report_size(payload_len, hw_metadata), in net_dm_hw_packet_report()
901 if (!msg) in net_dm_hw_packet_report()
904 rc = net_dm_hw_packet_report_fill(msg, skb, payload_len); in net_dm_hw_packet_report()
906 nlmsg_free(msg); in net_dm_hw_packet_report()
910 genlmsg_multicast(&net_drop_monitor_family, msg, 0, 0, GFP_KERNEL); in net_dm_hw_packet_report()
1375 static int net_dm_config_fill(struct sk_buff *msg, struct genl_info *info) in net_dm_config_fill() argument
1379 hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, in net_dm_config_fill()
1384 if (nla_put_u8(msg, NET_DM_ATTR_ALERT_MODE, net_dm_alert_mode)) in net_dm_config_fill()
1387 if (nla_put_u32(msg, NET_DM_ATTR_TRUNC_LEN, net_dm_trunc_len)) in net_dm_config_fill()
1390 if (nla_put_u32(msg, NET_DM_ATTR_QUEUE_LEN, net_dm_queue_len)) in net_dm_config_fill()
1393 genlmsg_end(msg, hdr); in net_dm_config_fill()
1398 genlmsg_cancel(msg, hdr); in net_dm_config_fill()
1404 struct sk_buff *msg; in net_dm_cmd_config_get() local
1407 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); in net_dm_cmd_config_get()
1408 if (!msg) in net_dm_cmd_config_get()
1411 rc = net_dm_config_fill(msg, info); in net_dm_cmd_config_get()
1415 return genlmsg_reply(msg, info); in net_dm_cmd_config_get()
1418 nlmsg_free(msg); in net_dm_cmd_config_get()
1442 static int net_dm_stats_put(struct sk_buff *msg) in net_dm_stats_put() argument
1449 attr = nla_nest_start(msg, NET_DM_ATTR_STATS); in net_dm_stats_put()
1453 if (nla_put_u64_64bit(msg, NET_DM_ATTR_STATS_DROPPED, in net_dm_stats_put()
1457 nla_nest_end(msg, attr); in net_dm_stats_put()
1462 nla_nest_cancel(msg, attr); in net_dm_stats_put()
1486 static int net_dm_hw_stats_put(struct sk_buff *msg) in net_dm_hw_stats_put() argument
1493 attr = nla_nest_start(msg, NET_DM_ATTR_HW_STATS); in net_dm_hw_stats_put()
1497 if (nla_put_u64_64bit(msg, NET_DM_ATTR_STATS_DROPPED, in net_dm_hw_stats_put()
1501 nla_nest_end(msg, attr); in net_dm_hw_stats_put()
1506 nla_nest_cancel(msg, attr); in net_dm_hw_stats_put()
1510 static int net_dm_stats_fill(struct sk_buff *msg, struct genl_info *info) in net_dm_stats_fill() argument
1515 hdr = genlmsg_put(msg, info->snd_portid, info->snd_seq, in net_dm_stats_fill()
1520 rc = net_dm_stats_put(msg); in net_dm_stats_fill()
1524 rc = net_dm_hw_stats_put(msg); in net_dm_stats_fill()
1528 genlmsg_end(msg, hdr); in net_dm_stats_fill()
1533 genlmsg_cancel(msg, hdr); in net_dm_stats_fill()
1539 struct sk_buff *msg; in net_dm_cmd_stats_get() local
1542 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); in net_dm_cmd_stats_get()
1543 if (!msg) in net_dm_cmd_stats_get()
1546 rc = net_dm_stats_fill(msg, info); in net_dm_cmd_stats_get()
1550 return genlmsg_reply(msg, info); in net_dm_cmd_stats_get()
1553 nlmsg_free(msg); in net_dm_cmd_stats_get()