Skip to content

Commit 862c76c

Browse files
committed
Remove test codes to retry CI
Signed-off-by: Muyang Tian <[email protected]>
1 parent d167634 commit 862c76c

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

lib/libxdp/tests/test_xsk_non_privileged.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -123,46 +123,6 @@ static struct xsk_umem *create_umem_non_privileged(int sock_fd)
123123
return umem;
124124
}
125125

126-
/* Should use this to replace create_umem_non_privileged() once
127-
* xsk_umem__create() and xsk_umem__create_with_fd() are deprecated.
128-
*/
129-
static struct xsk_umem *create_umem_non_privileged_by_opts(int sock_fd)
130-
{
131-
struct xsk_ring_cons cq;
132-
struct xsk_ring_prod fq;
133-
struct xsk_umem *umem;
134-
void *b;
135-
136-
if (posix_memalign(&b, getpagesize(), UMEM_SIZE)) {
137-
perror("posix_memalign failed");
138-
exit(EXIT_FAILURE);
139-
}
140-
141-
/* Opts initialized with fd unset */
142-
DECLARE_LIBXDP_OPTS(xsk_umem_opts, opts,
143-
.size = UMEM_SIZE,
144-
.fill_size = XSK_RING_PROD__DEFAULT_NUM_DESCS,
145-
.comp_size = XSK_RING_CONS__DEFAULT_NUM_DESCS,
146-
.frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE,
147-
);
148-
/* This variant requires CAP_NET_RAW, so should fail. */
149-
umem = xsk_umem__create_opts(b, &fq, &cq, &opts);
150-
if (umem) {
151-
perror("xsk_umem__create_opts succeeded");
152-
exit(EXIT_FAILURE);
153-
}
154-
155-
/* This variant shouldn't need any capabilities, so should pass. */
156-
opts.fd = sock_fd;
157-
umem = xsk_umem__create_opts(b, &fq, &cq, &opts);
158-
if (!umem) {
159-
perror("xsk_umem__create_opts failed");
160-
exit(EXIT_FAILURE);
161-
}
162-
163-
return umem;
164-
}
165-
166126
static struct xsk_socket *create_xsk_non_privileged(const char *ifname,
167127
struct xsk_umem *umem,
168128
int queue_id)

0 commit comments

Comments
 (0)