DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Fwd: rte_eth_rx_queue_setup is returning error -28 (ENOSPC)
       [not found] <CAGxG5chJncxbr159ZE8st1zLeqOzNzFmUwA3PqkybOTUb76zjg@mail.gmail.com>
@ 2018-02-21 17:44 ` Victor Huertas
  0 siblings, 0 replies; only message in thread
From: Victor Huertas @ 2018-02-21 17:44 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-21 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAGxG5chJncxbr159ZE8st1zLeqOzNzFmUwA3PqkybOTUb76zjg@mail.gmail.com>
2018-02-21 17:44 ` [dpdk-dev] Fwd: rte_eth_rx_queue_setup is returning error -28 (ENOSPC) Victor Huertas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).