[dpdk-users] rte_eth_rx_queue_setup is returning error -28 (ENOSPC)

Victor Huertas vhuertas at gmail.com
Wed Feb 21 18:20:21 CET 2018

Hi all,

I am trying to make an application for having various rx threads capturing
packets from various queues of the same NIC (to increase performance using
RSS on one NIC). I am basing the app on an example called l3fwd-thread.

However, when I try to create the rx queue in a port using the
rte_eth_rx_queue_setup function it returns an -28 error (ENOSPC).

Having a look at source code of rte_ethdev.c, where this function is
implemented, I have seen the only place where ENOSCP value is returned (see

    if (mp->private_data_size < sizeof(struct rte_pktmbuf_pool_private)) {
        RTE_PMD_DEBUG_TRACE("%s private_data_size %d < %d\n",
                mp->name, (int) mp->private_data_size,
                (int) sizeof(struct rte_pktmbuf_pool_private));
        return -ENOSPC;

Executing step by step (using Eclipse), I saw that the private_data_size of
the pktmbuf_pool was set to zero. And that was the reason why it returned

Nevertheless in the init_mem function of the example, when the pktmbuf_pool
is created, the value for private_data_size as parameter is 0.

if (pktmbuf_pool[socketid] == NULL) {
            snprintf(s, sizeof(s), "mbuf_pool_%d", socketid);
            pktmbuf_pool[socketid] =
                rte_pktmbuf_pool_create(s, nb_mbuf,
                    MEMPOOL_CACHE_SIZE, 0,
                    RTE_MBUF_DEFAULT_BUF_SIZE, socketid);
            if (pktmbuf_pool[socketid] == NULL)
                        "Cannot init mbuf pool on socket %d\n", socketid);
                printf("Allocated mbuf pool on socket %d\n", socketid);


So this is contradictory. Why the example initializes the private_data_size
to 0 and then it provokes a bat rx queue initialization?

Or am I understanding it wrongly?

Thanks for your attention,


More information about the users mailing list