Home
last modified time | relevance | path

Searched refs:xdp_flags (Results 1 – 15 of 15) sorted by relevance

/kernel/linux/linux-5.10/samples/bpf/
Dxdp_redirect_map_user.c28 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 …]
Dxdp_redirect_user.c28 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 …]
Dxdp1_user.c22 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()
Dxdp_adjust_tail_user.c29 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()
Dxdp_fwd_user.c30 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()
Dxdp_sample_pkts_user.c23 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()
Dxdp_tx_iptunnel_user.c26 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()
Dxdp_rxq_info_user.c34 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()
Dxdp_redirect_cpu_user.c38 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()
Dxsk_fwd.c731 .xdp_flags = XDP_FLAGS_DRV_MODE,
975 port_params[i].xsk_cfg.xdp_flags); in remove_xdp_program()
Dxdpsock_user.c860 cfg.xdp_flags = opt_xdp_flags; in xsk_configure_socket()
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/
Dxdping.c27 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()
/kernel/linux/linux-5.10/tools/lib/bpf/
Dxsk.c147 cfg->xdp_flags = 0; in xsk_set_xdp_socket_config()
158 cfg->xdp_flags = usr_cfg->xdp_flags; in xsk_set_xdp_socket_config()
430 xsk->config.xdp_flags); in xsk_load_xdp_prog()
579 xsk->config.xdp_flags); in xsk_setup_xdp_prog()
Dxsk.h211 __u32 xdp_flags; member
/kernel/linux/linux-5.10/net/core/
Drtnetlink.c2887 u32 xdp_flags = 0; in do_setlink() local
2901 xdp_flags = nla_get_u32(xdp[IFLA_XDP_FLAGS]); in do_setlink()
2902 if (xdp_flags & ~XDP_FLAGS_MASK) { in do_setlink()
2906 if (hweight32(xdp_flags & XDP_FLAGS_MODES) > 1) { in do_setlink()
2915 if (xdp_flags & XDP_FLAGS_REPLACE) { in do_setlink()
2927 xdp_flags); in do_setlink()