* [dpdk-users] How to distribute socket_id from logical cores?
@ 2018-11-02 5:15 Sungho Hong
2018-11-02 11:08 ` Nutman, Richard
0 siblings, 1 reply; 2+ messages in thread
From: Sungho Hong @ 2018-11-02 5:15 UTC (permalink / raw)
To: users
Hello DPDK experts
I am trying to assign 8 rx-queue with each different socket ids from
different logical cores.
For example I am using
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++)
socketid = rte_lcore_to_socket_id(lcore_id);
to get the socket id and trying to assign the pools.
However, even with the examples in DPDK.
All I'am getting is socket number 0 or 1
If you look at the logs you can see that
I have assigned memory pool with different queues and different logical
core but the socket id will not change.
queue 1 mbuf_pool socketid : lcore:2,* sock:0*, nb_mbuf:12800
queue 2 mbuf_pool socketid : lcore:3,* sock:0*, nb_mbuf:12800
queue 3 mbuf_pool socketid : lcore:4,* sock:0*, nb_mbuf:12800
queue 4 mbuf_pool socketid : lcore:5, *sock:0,* nb_mbuf:12800
queue 5 mbuf_pool socketid : lcore:6, sock:0, nb_mbuf:12800
queue 6 mbuf_pool socketid : lcore:7, sock:0, nb_mbuf:12800
queue 7 mbuf_pool socketid : lcore:8, sock:1, nb_mbuf:12800
Any idea of how to allocate with different socket numbers other than zero?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-users] How to distribute socket_id from logical cores?
2018-11-02 5:15 [dpdk-users] How to distribute socket_id from logical cores? Sungho Hong
@ 2018-11-02 11:08 ` Nutman, Richard
0 siblings, 0 replies; 2+ messages in thread
From: Nutman, Richard @ 2018-11-02 11:08 UTC (permalink / raw)
To: users
Hi Sungho,
Socket refers to the physical chip socket, not the core number.
It sounds like you have a dual socket machine there with 8 logical cores on each chip.
So what you have is;
Logical cores 0 to 7 is socket 0, also NUMA 0.
Logical cores 8 to 15 is socket 1, also NUMA 1.
Using the socket number for memory allocation just makes sure you are using local memory, i.e. the right numa node, for that cpu socket.
-Richard.
> -----Original Message-----
> From: Sungho Hong [mailto:maverickjin88@gmail.com]
> Sent: 02 November 2018 05:15
> To: users@dpdk.org
> Subject: [dpdk-users] How to distribute socket_id from logical cores?
>
> Hello DPDK experts
>
> I am trying to assign 8 rx-queue with each different socket ids from different
> logical cores.
>
> For example I am using
> for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++)
> socketid = rte_lcore_to_socket_id(lcore_id);
>
> to get the socket id and trying to assign the pools.
> However, even with the examples in DPDK.
> All I'am getting is socket number 0 or 1
>
> If you look at the logs you can see that I have assigned memory pool with
> different queues and different logical core but the socket id will not change.
>
> queue 1 mbuf_pool socketid : lcore:2,* sock:0*, nb_mbuf:12800 queue 2
> mbuf_pool socketid : lcore:3,* sock:0*, nb_mbuf:12800 queue 3 mbuf_pool
> socketid : lcore:4,* sock:0*, nb_mbuf:12800 queue 4 mbuf_pool socketid :
> lcore:5, *sock:0,* nb_mbuf:12800 queue 5 mbuf_pool socketid : lcore:6,
> sock:0, nb_mbuf:12800 queue 6 mbuf_pool socketid : lcore:7, sock:0,
> nb_mbuf:12800 queue 7 mbuf_pool socketid : lcore:8, sock:1,
> nb_mbuf:12800
>
> Any idea of how to allocate with different socket numbers other than zero?
**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-02 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 5:15 [dpdk-users] How to distribute socket_id from logical cores? Sungho Hong
2018-11-02 11:08 ` Nutman, Richard
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).