From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: Tetsuya.Mukawa <mukawa@igel.co.jp>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] How to know corresponding device from port number
Date: Tue, 26 Nov 2013 10:38:53 +0000 [thread overview]
Message-ID: <59AF69C657FD0841A61C55336867B5B01A9778E3@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <529474D5.80306@igel.co.jp>
>
> Hi,
>
> I have a question about how to know corresponding device from port
> number.
> For example, if I have 4 Ethernet devices and 2 Ring PMDs, I will get 6 ports
> during initialization.
> In the case, how can I know which port corresponds last Ring PMD?
[BR] Firstly, to identify the ring PMD's vs the ethernet device PMDs you can use the information in the rte_eth_dev structure. For each device x, (0 <= x <=5), if you check rte_eth_devices[x], the ring pmd's will have a NULL driver pointer and the pci address given in the pci_dev structure will be all-zeros.
As for distinguishing two different ring ethdevs from each other, I'm not aware of any way to do this, they will just have different eth_dev indexes.
next prev parent reply other threads:[~2013-11-26 10:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 10:15 Tetsuya.Mukawa
2013-11-26 10:38 ` Richardson, Bruce [this message]
2013-11-27 1:47 ` Tetsuya.Mukawa
2013-11-28 10:46 ` Richardson, Bruce
2013-12-06 6:22 ` Tetsuya.Mukawa
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=59AF69C657FD0841A61C55336867B5B01A9778E3@IRSMSX103.ger.corp.intel.com \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=mukawa@igel.co.jp \
/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).