xdp-tools icon indicating copy to clipboard operation
xdp-tools copied to clipboard

xsk_umem__create() return -22

Open LinArcX opened this issue 1 year ago • 9 comments

I have this function in my application:

void configUmem()
{
	struct xsk_umem_config config = {
		.fill_size = XSK_RING_PROD__DEFAULT_NUM_DESCS,
		.comp_size = XSK_RING_CONS__DEFAULT_NUM_DESCS,
		.frame_size = XSK_UMEM__DEFAULT_FRAME_SIZE,
	};

	struct xsk_umem *umem = NULL;
	struct xsk_ring_cons cq;
	struct xsk_ring_prod fq;
	void *b;
	int ret;

	if (posix_memalign(&b, getpagesize(), UMEM_SIZE)) {
		perror("posix_memalign failed");
		exit(EXIT_FAILURE);
	}
	
	if (xsk_umem__create(&umem, b, UMEM_SIZE, &fq, &cq, &config)) {
		perror("xsk_umem__create() failed");
	}
}

xsk_umem__create() always fails with error = -22. why? any idea?

I use: Debian bullseye(Kernel: 6.1.54)

LinArcX avatar Jan 05 '24 12:01 LinArcX