From: Danil Onishchenko <danil.onishchenko.info@gmail.com>
To: users@dpdk.org
Subject: NIC is unavailable in DPDK application
Date: Mon, 28 Mar 2022 21:18:34 +0700 [thread overview]
Message-ID: <c5ede93b-7fbb-b7df-d26d-9c0ba8ef26d7@gmail.com> (raw)
Hello,
I'm studying DPDK and trying to create a simple application, however it
can't see a NIC bound to DPDK.
1. Here is a list of network devices I have on my machine
$ dpdk-devbind.py --status-dev net
Network devices using kernel driver
===================================
0000:01:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
8168' if=enp1s0 drv=r8169 unused=vfio-pci *Active*
0000:02:00.0 'RTL8822BE 802.11a/b/g/n/ac WiFi adapter b822' if=wlp2s0
drv=rtw_8822be unused=rtw88_8822be,vfio-pci *Active*
2. I disable my ethernet NIC (it can't be bound to DPDK while it is
active) and bind it to vfio-pci driver successfully
$ ip link set enp1s0 down
$ dpdk-devbind.py -b vfio-pci enp1s0
3. Now dpdk-devbind.py shows that the NIC is using DPDK-compatible driver
$ dpdk-devbind.py --status-dev net
Network devices using DPDK-compatible driver
============================================
0000:01:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
8168' drv=vfio-pci unused=r8169
Network devices using kernel driver
===================================
0000:02:00.0 'RTL8822BE 802.11a/b/g/n/ac WiFi adapter b822' if=wlp2s0
drv=rtw_8822be unused=rtw88_8822be,vfio-pci *Active*
4. However when I run any example DPDK application it says that there
are no available NIC ports. For instance I wrote a simple application
int main(int argc, char *argv[])
{
int ret;
int total_ports, avail_ports;
ret = rte_eal_init(argc, argv);
if( ret < 0 )
rte_exit(EXIT_FAILURE, "EAL initialization failed\n");
total_ports = rte_eth_dev_count_total();
avail_ports = rte_eth_dev_count_avail();
printf("ETH PORTS %d %d\n", total_ports, avail_ports);
rte_eal_cleanup();
return 0;
}
and both rte_eth_dev_count_total() and rte_eth_dev_count_avail() return 0.
What am I doing wrong?
next reply other threads:[~2022-03-29 8:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 14:18 Danil Onishchenko [this message]
2022-03-29 8:43 ` Дмитрий Степанов
2022-03-31 13:20 ` Danil Onishchenko
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=c5ede93b-7fbb-b7df-d26d-9c0ba8ef26d7@gmail.com \
--to=danil.onishchenko.info@gmail.com \
--cc=users@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).