Home
last modified time | relevance | path

Searched refs:xsk (Results 1 – 10 of 10) sorted by relevance

/tools/testing/selftests/bpf/prog_tests/
Dxdp_metadata.c37 struct xsk { struct
47 static int open_xsk(int ifindex, struct xsk *xsk) in open_xsk() argument
66 xsk->umem_area = mmap(NULL, UMEM_SIZE, PROT_READ | PROT_WRITE, mmap_flags, -1, 0); in open_xsk()
67 if (!ASSERT_NEQ(xsk->umem_area, MAP_FAILED, "mmap")) in open_xsk()
70 ret = xsk_umem__create(&xsk->umem, in open_xsk()
71 xsk->umem_area, UMEM_SIZE, in open_xsk()
72 &xsk->fill, in open_xsk()
73 &xsk->comp, in open_xsk()
78 ret = xsk_socket__create(&xsk->socket, ifindex, QUEUE_ID, in open_xsk()
79 xsk->umem, in open_xsk()
[all …]
/tools/testing/selftests/bpf/
Dxdp_hw_metadata.c39 struct xsk { struct
50 struct xsk *rx_xsk; argument
57 static int open_xsk(int ifindex, struct xsk *xsk, __u32 queue_id) in open_xsk() argument
76 xsk->umem_area = mmap(NULL, UMEM_SIZE, PROT_READ | PROT_WRITE, mmap_flags, -1, 0); in open_xsk()
77 if (xsk->umem_area == MAP_FAILED) in open_xsk()
80 ret = xsk_umem__create(&xsk->umem, in open_xsk()
81 xsk->umem_area, UMEM_SIZE, in open_xsk()
82 &xsk->fill, in open_xsk()
83 &xsk->comp, in open_xsk()
88 ret = xsk_socket__create(&xsk->socket, ifindex, queue_id, in open_xsk()
[all …]
Dxsk.c97 int xsk_socket__fd(const struct xsk_socket *xsk) in xsk_socket__fd() argument
99 return xsk ? xsk->fd : -EINVAL; in xsk_socket__fd()
445 int xsk_update_xskmap(struct bpf_map *map, struct xsk_socket *xsk) in xsk_update_xskmap() argument
451 sock_fd = xsk_socket__fd(xsk); in xsk_update_xskmap()
500 static struct xsk_ctx *xsk_create_ctx(struct xsk_socket *xsk, in xsk_create_ctx() argument
514 err = xsk_create_umem_rings(umem, xsk->fd, fill, comp); in xsk_create_ctx()
549 struct xsk_socket *xsk; in xsk_socket__create_shared() local
558 xsk = calloc(1, sizeof(*xsk)); in xsk_socket__create_shared()
559 if (!xsk) in xsk_socket__create_shared()
562 err = xsk_set_xdp_socket_config(&xsk->config, usr_config); in xsk_socket__create_shared()
[all …]
Dxskxceiver.c225 static void enable_busy_poll(struct xsk_socket_info *xsk) in enable_busy_poll() argument
230 if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_PREFER_BUSY_POLL, in enable_busy_poll()
235 if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_BUSY_POLL, in enable_busy_poll()
240 if (setsockopt(xsk_socket__fd(xsk->xsk), SOL_SOCKET, SO_BUSY_POLL_BUDGET, in enable_busy_poll()
245 static int __xsk_configure_socket(struct xsk_socket_info *xsk, struct xsk_umem_info *umem, in __xsk_configure_socket() argument
252 xsk->umem = umem; in __xsk_configure_socket()
253 cfg.rx_size = xsk->rxqsize; in __xsk_configure_socket()
261 txr = ifobject->tx_on ? &xsk->tx : NULL; in __xsk_configure_socket()
262 rxr = ifobject->rx_on ? &xsk->rx : NULL; in __xsk_configure_socket()
263 return xsk_socket__create(&xsk->xsk, ifobject->ifindex, 0, umem->umem, rxr, txr, &cfg); in __xsk_configure_socket()
[all …]
Dxsk.h188 int xsk_socket__fd(const struct xsk_socket *xsk);
207 int xsk_update_xskmap(struct bpf_map *map, struct xsk_socket *xsk);
223 int xsk_socket__create(struct xsk_socket **xsk,
240 void xsk_socket__delete(struct xsk_socket *xsk);
Dxskxceiver.h120 struct xsk_socket *xsk; member
147 struct xsk_socket_info *xsk; member
DMakefile272 $(OUTPUT)/xsk.o: $(BPFOBJ)
584 cap_helpers.c test_loader.c xsk.c disasm.c \
643 $(OUTPUT)/xskxceiver: xskxceiver.c xskxceiver.h $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BP…
647 $(OUTPUT)/xdp_hw_metadata: xdp_hw_metadata.c $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/…
/tools/testing/selftests/bpf/progs/
Dxsk_xdp_progs.c13 } xsk SEC(".maps");
20 return bpf_redirect_map(&xsk, 0, XDP_DROP); in xsk_def_prog()
29 return bpf_redirect_map(&xsk, 0, XDP_DROP); in xsk_xdp_drop()
52 return bpf_redirect_map(&xsk, 0, XDP_DROP); in xsk_xdp_populate_metadata()
Dxdp_metadata.c13 } xsk SEC(".maps");
61 return bpf_redirect_map(&xsk, ctx->rx_queue_index, XDP_PASS); in rx()
Dxdp_hw_metadata.c13 } xsk SEC(".maps");
90 return bpf_redirect_map(&xsk, ctx->rx_queue_index, XDP_PASS); in rx()