Searched refs:ifindex_out (Results 1 – 3 of 3) sorted by relevance
| /OK3568_Linux_fs/kernel/samples/bpf/ |
| H A D | xdp_redirect_map_user.c | 23 static int ifindex_out; variable 48 if (bpf_get_link_xdp_id(ifindex_out, &curr_prog_id, in int_exit() 54 bpf_set_link_xdp_fd(ifindex_out, -1, xdp_flags); in int_exit() 147 ifindex_out = if_nametoindex(argv[optind + 1]); in main() 148 if (!ifindex_out) in main() 149 ifindex_out = strtoul(argv[optind + 1], NULL, 0); in main() 151 printf("input: %d output: %d\n", ifindex_in, ifindex_out); in main() 194 if (bpf_set_link_xdp_fd(ifindex_out, dummy_prog_fd, in main() 196 printf("WARN: link set xdp fd failed on %d\n", ifindex_out); in main() 212 ret = bpf_map_update_elem(tx_port_map_fd, &key, &ifindex_out, 0); in main() [all …]
|
| H A D | xdp_redirect_user.c | 23 static int ifindex_out; variable 48 if (bpf_get_link_xdp_id(ifindex_out, &curr_prog_id, in int_exit() 54 bpf_set_link_xdp_fd(ifindex_out, -1, xdp_flags); in int_exit() 148 ifindex_out = if_nametoindex(argv[optind + 1]); in main() 149 if (!ifindex_out) in main() 150 ifindex_out = strtoul(argv[optind + 1], NULL, 0); in main() 152 printf("input: %d output: %d\n", ifindex_in, ifindex_out); in main() 195 if (bpf_set_link_xdp_fd(ifindex_out, dummy_prog_fd, in main() 197 printf("WARN: link set xdp fd failed on %d\n", ifindex_out); in main() 213 ret = bpf_map_update_elem(tx_port_map_fd, &key, &ifindex_out, 0); in main() [all …]
|
| H A D | xdp_redirect_cpu_user.c | 742 int err, map_fd, ifindex_out, key = 0; in load_cpumap_prog() local 748 ifindex_out = if_nametoindex(redir_interface); in load_cpumap_prog() 749 if (!ifindex_out) in load_cpumap_prog() 752 err = bpf_map_update_elem(map_fd, &key, &ifindex_out, 0); in load_cpumap_prog()
|