/Linux-v5.10/samples/bpf/ |
D | xdp_redirect_map_user.c | 28 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 35 if (bpf_get_link_xdp_id(ifindex_in, &curr_prog_id, xdp_flags)) { in int_exit() 40 bpf_set_link_xdp_fd(ifindex_in, -1, xdp_flags); in int_exit() 49 xdp_flags)) { in int_exit() 54 bpf_set_link_xdp_fd(ifindex_out, -1, xdp_flags); in int_exit() 116 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 122 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 130 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 131 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 181 if (bpf_set_link_xdp_fd(ifindex_in, prog_fd, xdp_flags) < 0) { in main() [all …]
|
D | xdp_redirect_user.c | 28 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 35 if (bpf_get_link_xdp_id(ifindex_in, &curr_prog_id, xdp_flags)) { in int_exit() 40 bpf_set_link_xdp_fd(ifindex_in, -1, xdp_flags); in int_exit() 49 xdp_flags)) { in int_exit() 54 bpf_set_link_xdp_fd(ifindex_out, -1, xdp_flags); in int_exit() 117 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 123 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 131 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 132 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 182 if (bpf_set_link_xdp_fd(ifindex_in, prog_fd, xdp_flags) < 0) { in main() [all …]
|
D | xdp1_user.c | 22 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 29 if (bpf_get_link_xdp_id(ifindex, &curr_prog_id, xdp_flags)) { in int_exit() 34 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in int_exit() 98 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 104 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 112 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 113 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 152 if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) { in main()
|
D | xdp_adjust_tail_user.c | 29 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 37 if (bpf_get_link_xdp_id(ifindex, &curr_prog_id, xdp_flags)) { in int_exit() 42 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in int_exit() 120 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 126 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 135 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 136 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 182 if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) { in main()
|
D | xdp_fwd_user.c | 30 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 36 err = bpf_set_link_xdp_fd(idx, prog_fd, xdp_flags); in do_attach() 54 err = bpf_set_link_xdp_fd(idx, -1, xdp_flags); in do_detach() 94 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 97 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 108 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 109 xdp_flags |= XDP_FLAGS_DRV_MODE; in main()
|
D | xdp_sample_pkts_user.c | 23 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 33 err = bpf_set_link_xdp_fd(idx, fd, xdp_flags); in do_attach() 54 err = bpf_get_link_xdp_id(idx, &curr_prog_id, xdp_flags); in do_detach() 60 err = bpf_set_link_xdp_fd(idx, -1, xdp_flags); in do_detach() 127 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 130 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 138 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 139 xdp_flags |= XDP_FLAGS_DRV_MODE; in main()
|
D | xdp_tx_iptunnel_user.c | 26 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 35 if (bpf_get_link_xdp_id(ifindex, &curr_prog_id, xdp_flags)) { in int_exit() 40 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in int_exit() 231 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 237 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 246 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 247 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 297 if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) { in main() 311 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in main()
|
D | xdp_rxq_info_user.c | 34 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 65 if (bpf_get_link_xdp_id(ifindex, &curr_prog_id, xdp_flags)) { in int_exit() 73 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in int_exit() 522 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 538 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 548 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 549 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 591 if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) { in main()
|
D | xdp_redirect_cpu_user.c | 38 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 103 if (bpf_get_link_xdp_id(ifindex, &curr_prog_id, xdp_flags)) { in int_exit() 111 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in int_exit() 862 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 904 xdp_flags &= ~XDP_FLAGS_UPDATE_IF_NOEXIST; in main() 915 if (!(xdp_flags & XDP_FLAGS_SKB_MODE)) in main() 916 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 963 if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) { in main()
|
D | xsk_fwd.c | 731 .xdp_flags = XDP_FLAGS_DRV_MODE, 975 port_params[i].xsk_cfg.xdp_flags); in remove_xdp_program()
|
D | xdpsock_user.c | 860 cfg.xdp_flags = opt_xdp_flags; in xsk_configure_socket()
|
/Linux-v5.10/tools/testing/selftests/bpf/ |
D | xdping.c | 27 static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST; variable 31 bpf_set_link_xdp_fd(ifindex, -1, xdp_flags); in cleanup() 128 xdp_flags |= XDP_FLAGS_DRV_MODE; in main() 135 xdp_flags |= XDP_FLAGS_SKB_MODE; in main() 152 if ((xdp_flags & mode_flags) == mode_flags) { in main() 206 if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) { in main()
|
/Linux-v5.10/tools/lib/bpf/ |
D | xsk.c | 145 cfg->xdp_flags = 0; in xsk_set_xdp_socket_config() 156 cfg->xdp_flags = usr_cfg->xdp_flags; in xsk_set_xdp_socket_config() 428 xsk->config.xdp_flags); in xsk_load_xdp_prog() 576 xsk->config.xdp_flags); in xsk_setup_xdp_prog()
|
D | xsk.h | 211 __u32 xdp_flags; member
|
/Linux-v5.10/net/core/ |
D | rtnetlink.c | 2886 u32 xdp_flags = 0; in do_setlink() local 2900 xdp_flags = nla_get_u32(xdp[IFLA_XDP_FLAGS]); in do_setlink() 2901 if (xdp_flags & ~XDP_FLAGS_MASK) { in do_setlink() 2905 if (hweight32(xdp_flags & XDP_FLAGS_MODES) > 1) { in do_setlink() 2914 if (xdp_flags & XDP_FLAGS_REPLACE) { in do_setlink() 2926 xdp_flags); in do_setlink()
|