Searched refs:old_fd (Results 1 - 7 of 7) sorted by relevance
/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | netlink.c | 134 static int __bpf_set_link_xdp_fd_replace(int ifindex, int fd, int old_fd, in __bpf_set_link_xdp_fd_replace() argument 184 nla_xdp->nla_len = NLA_HDRLEN + sizeof(old_fd); in __bpf_set_link_xdp_fd_replace() 185 memcpy((char *)nla_xdp + NLA_HDRLEN, &old_fd, sizeof(old_fd)); in __bpf_set_link_xdp_fd_replace() 205 int old_fd = -1; in bpf_set_link_xdp_fd_opts() local 210 if (OPTS_HAS(opts, old_fd)) { in bpf_set_link_xdp_fd_opts() 211 old_fd = OPTS_GET(opts, old_fd, -1); in bpf_set_link_xdp_fd_opts() 216 old_fd, in bpf_set_link_xdp_fd_opts()
|
H A D | libbpf.h | 509 int old_fd; member 512 #define bpf_xdp_set_link_opts__last_field old_fd
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | xdp_link.c | 12 DECLARE_LIBBPF_OPTS(bpf_xdp_set_link_opts, opts, .old_fd = -1); in test_xdp_link() 57 opts.old_fd = prog_fd1; in test_xdp_link() 63 opts.old_fd = prog_fd1; in test_xdp_link() 81 opts.old_fd = prog_fd1; in test_xdp_link()
|
H A D | xdp_attach.c | 15 .old_fd = -1); in test_xdp_attach() 56 opts.old_fd = fd1; in test_xdp_attach() 58 if (CHECK(err, "replace_ok", "replace valid old_fd failed")) in test_xdp_attach() 66 if (CHECK(!err, "replace_fail", "replace invalid old_fd didn't fail")) in test_xdp_attach() 70 if (CHECK(!err, "remove_fail", "remove invalid old_fd didn't fail")) in test_xdp_attach() 73 opts.old_fd = fd2; in test_xdp_attach() 75 if (CHECK(err, "remove_ok", "remove valid old_fd failed")) in test_xdp_attach()
|
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | libbpf_internal.h | 555 int old_fd = fd, saved_errno; in ensure_good_fd() local 562 close(old_fd); in ensure_good_fd() 565 pr_warn("failed to dup FD %d to FD > 2: %d\n", old_fd, -saved_errno); in ensure_good_fd()
|
H A D | netlink.c | 286 static int __bpf_set_link_xdp_fd_replace(int ifindex, int fd, int old_fd, in __bpf_set_link_xdp_fd_replace() argument 312 ret = nlattr_add(&req, IFLA_XDP_EXPECTED_FD, &old_fd, in __bpf_set_link_xdp_fd_replace() 313 sizeof(old_fd)); in __bpf_set_link_xdp_fd_replace()
|
H A D | libbpf.h | 1155 int old_fd; member 1158 #define bpf_xdp_set_link_opts__last_field old_fd
|
Completed in 7 milliseconds