DPDK patches and discussions
 help / color / mirror / Atom feed
From: Moon-Sang Lee <sang0627@gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [Q] l2fwd in examples directory
Date: Sun, 18 Oct 2015 14:51:04 +0900	[thread overview]
Message-ID: <CAACK=XdKGwR9DEBiNinE5zuNLO6nEz2U=03m+EASv-Ke+GG9dw@mail.gmail.com> (raw)
In-Reply-To: <20151016134320.GE9980@bricha3-MOBL3>

thanks bruce.

I didn't know that PCI slots have direct socket affinity.
is it static or configurable through PCI configuration space?
well, my NUT, two node NUMA, seems always returns -1 on calling
rte_eth_dev_socket_id(portid) whenever portid is 0, 1, or other values.
I appreciate if you explain more about getting the affinity.

p.s.
I'm using intel Xeon processor and 1G NIC(82576).




On Fri, Oct 16, 2015 at 10:43 PM, Bruce Richardson <
bruce.richardson@intel.com> wrote:

> On Thu, Oct 15, 2015 at 11:08:57AM +0900, Moon-Sang Lee wrote:
> > 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.
>
> Can you perhaps clarify what you mean here. On modern NUMA systems, such
> as those
> from Intel :-), the PCI slots are directly connected to the CPU sockets,
> so the
> ethernet ports do indeed have a direct NUMA affinity. It's not something
> that
> the app needs to specify.
>
> /Bruce
>
> > (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*
>



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

  reply	other threads:[~2015-10-18  5:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-15  2:08 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 [this message]
2015-10-19  7:39       ` Moon-Sang Lee
2015-10-19  7:51         ` Moon-Sang Lee
2015-10-19  9:34         ` Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAACK=XdKGwR9DEBiNinE5zuNLO6nEz2U=03m+EASv-Ke+GG9dw@mail.gmail.com' \
    --to=sang0627@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).