Lines Matching refs:tcinfo
385 struct bpf_tcinfo_t *tcinfo = cookie; in dump_class_qdisc_nlmsg() local
388 if (tcinfo->is_qdisc) { in dump_class_qdisc_nlmsg()
397 if (tcinfo->used_len == tcinfo->array_len) { in dump_class_qdisc_nlmsg()
398 tcinfo->handle_array = realloc(tcinfo->handle_array, in dump_class_qdisc_nlmsg()
399 (tcinfo->array_len + 16) * sizeof(struct tc_kind_handle)); in dump_class_qdisc_nlmsg()
400 if (!tcinfo->handle_array) in dump_class_qdisc_nlmsg()
403 tcinfo->array_len += 16; in dump_class_qdisc_nlmsg()
405 tcinfo->handle_array[tcinfo->used_len].handle = info->tcm_handle; in dump_class_qdisc_nlmsg()
406 snprintf(tcinfo->handle_array[tcinfo->used_len].kind, in dump_class_qdisc_nlmsg()
407 sizeof(tcinfo->handle_array[tcinfo->used_len].kind), in dump_class_qdisc_nlmsg()
412 tcinfo->used_len++; in dump_class_qdisc_nlmsg()
429 struct bpf_tcinfo_t tcinfo; in show_dev_tc_bpf() local
432 tcinfo.handle_array = NULL; in show_dev_tc_bpf()
433 tcinfo.used_len = 0; in show_dev_tc_bpf()
434 tcinfo.array_len = 0; in show_dev_tc_bpf()
436 tcinfo.is_qdisc = false; in show_dev_tc_bpf()
438 dump_class_qdisc_nlmsg, &tcinfo); in show_dev_tc_bpf()
442 tcinfo.is_qdisc = true; in show_dev_tc_bpf()
444 dump_class_qdisc_nlmsg, &tcinfo); in show_dev_tc_bpf()
450 for (i = 0; i < tcinfo.used_len; i++) { in show_dev_tc_bpf()
451 filter_info.kind = tcinfo.handle_array[i].kind; in show_dev_tc_bpf()
453 tcinfo.handle_array[i].handle, in show_dev_tc_bpf()
482 free(tcinfo.handle_array); in show_dev_tc_bpf()