diff --git a/lib/src/dev/mt_af_xdp.c b/lib/src/dev/mt_af_xdp.c index dbe673ebc..5345e138b 100644 --- a/lib/src/dev/mt_af_xdp.c +++ b/lib/src/dev/mt_af_xdp.c @@ -317,13 +317,13 @@ static int xdp_umem_init(struct mt_xdp_priv* xdp, struct mt_xdp_queue* xq) { umem_size); ret = xsk_umem__create(&xq->umem, aligned_base_addr, umem_size, &xq->rx_prod, &xq->tx_cons, &cfg); - if (ret < 0) { + if (ret) { err("%s(%d,%u), umem create fail %d %s\n", __func__, port, q, ret, strerror(errno)); if (ret == -EPERM) err("%s(%d,%u), please add capability for the app: sudo setcap 'cap_net_raw+ep' " "\n", __func__, port, q); - return ret; + return -EINVAL; } xq->umem_buffer = aligned_base_addr;