[dpdk-dev] Fwd: rte_eth_rx_queue_setup is returning error -28 (ENOSPC)

Victor Huertas vhuertas at gmail.com
Wed Feb 21 18:44:36 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
below).

    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
-ENOSPC.

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)
                rte_exit(EXIT_FAILURE,
                        "Cannot init mbuf pool on socket %d\n", socketid);
            else
                printf("Allocated mbuf pool on socket %d\n", socketid);

#if (APP_LOOKUP_METHOD == APP_LOOKUP_LPM)
            setup_lpm(socketid);
#else
            setup_hash(socketid);
#endif
        }

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,

-- 
Victor



-- 
Victor


More information about the dev mailing list