Lines Matching refs:ifindex
537 static int attach_tc_prog(int ifindex, int igr_fd, int egr_fd)
539 DECLARE_LIBBPF_OPTS(bpf_tc_hook, hook, .ifindex = ifindex,
574 int ifindex;
581 ifindex = if_nametoindex(dev);
582 if (!ASSERT_NEQ(ifindex, 0, "get ifindex"))
585 return attach_tc_prog(ifindex, igr_fd, egr_fd);
590 int ifindex;
595 ifindex = if_nametoindex(dev);
596 if (!ASSERT_NEQ(ifindex, 0, "get ifindex"))
599 return attach_tc_prog(ifindex, igr_fd, -1);
604 int ifindex;
609 ifindex = if_nametoindex(dev);
610 if (!ASSERT_NEQ(ifindex, 0, "get ifindex"))
613 return attach_tc_prog(ifindex, -1, egr_fd);
786 int ifindex;
804 ifindex = if_nametoindex("veth1");
805 if (!ASSERT_NEQ(ifindex, 0, "veth1 ifindex"))
810 err = bpf_xdp_attach(ifindex, xdp_prog_fd, XDP_FLAGS_REPLACE, &opts);