DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Q] l2fwd in examples directory
@ 2015-10-15  2:08 Moon-Sang Lee
  2015-10-15  2:08 ` Moon-Sang Lee
  0 siblings, 1 reply; 7+ messages in thread
From: Moon-Sang Lee @ 2015-10-15  2:08 UTC (permalink / raw)
  To: dev

There is codes as below in examples/l2fwd/main.c and I think
rte_eth_dev_socket_id(portid)
always returns -1(SOCKET_ID_ANY) since there is no association code between
port and
lcore in the example codes. (i.e. I need to find a matching lcore from
lcore_queue_conf[] with portid
and call rte_lcore_to_socket_id(lcore_id).)

        /* init one RX queue */
        fflush(stdout);
        ret = rte_eth_rx_queue_setup(portid, 0, nb_rxd,
                         rte_eth_dev_socket_id(portid),
                         NULL,
                         l2fwd_pktmbuf_pool);
        if (ret < 0)
            rte_exit(EXIT_FAILURE, "rte_eth_rx_queue_setup:err=%d,
port=%u\n",
                  ret, (unsigned) portid);

It works fine even though memory is allocated in different NUMA node. But I
wonder there is
a DPDK API that associates inlcore to port internally,
thus rte_eth_devices[portid].pci_dev->numa_node contains proper node.


-- 
Moon-Sang Lee, SW Engineer
Email: sang0627@gmail.com
Wisdom begins in wonder. *Socrates*

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-19  9:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15  2:08 [dpdk-dev] [Q] l2fwd in examples directory Moon-Sang Lee
2015-10-15  2:08 ` Moon-Sang Lee
2015-10-16 13:43   ` Bruce Richardson
2015-10-18  5:51     ` Moon-Sang Lee
2015-10-19  7:39       ` Moon-Sang Lee
2015-10-19  7:51         ` Moon-Sang Lee
2015-10-19  9:34         ` Bruce Richardson

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