<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Thank you for your reply!<br>
</p>
<div class="moz-cite-prefix">On 29.03.2022 15:43, Дмитрий Степанов
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CA+-SuJ0jEA+ALt_WZE2H_3v3AN01Gqef9m2qN0BvW-eKYP_Bow@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hey!
<div>Realtek NICs are not supported by DPDK.</div>
<div>You can check the list of supported HW here - <a
href="https://core.dpdk.org/supported/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://core.dpdk.org/supported/</a></div>
<div>As a workaround you can setup virtual machine (e.g. using
KVM) with virtual NIC which is supported by DPDK (e.g.
vmxnet3)</div>
<div><br>
</div>
<div>BTW: here is an article where someone tried to write his
own PMD for Realtek NIC - <a
href="https://medium.com/powerof2/writing-a-pmd-for-dpdk-56e6388467a8"
moz-do-not-send="true" class="moz-txt-link-freetext">https://medium.com/powerof2/writing-a-pmd-for-dpdk-56e6388467a8</a></div>
<div><br>
<div><br>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">вт, 29 мар. 2022 г. в 11:21,
Danil Onishchenko <<a
href="mailto:danil.onishchenko.info@gmail.com"
moz-do-not-send="true" class="moz-txt-link-freetext">danil.onishchenko.info@gmail.com</a>>:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
I'm studying DPDK and trying to create a simple application,
however it <br>
can't see a NIC bound to DPDK.<br>
<br>
1. Here is a list of network devices I have on my machine<br>
<br>
$ dpdk-devbind.py --status-dev net<br>
<br>
Network devices using kernel driver<br>
===================================<br>
0000:01:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet
Controller <br>
8168' if=enp1s0 drv=r8169 unused=vfio-pci *Active*<br>
0000:02:00.0 'RTL8822BE 802.11a/b/g/n/ac WiFi adapter b822'
if=wlp2s0 <br>
drv=rtw_8822be unused=rtw88_8822be,vfio-pci *Active*<br>
<br>
2. I disable my ethernet NIC (it can't be bound to DPDK while
it is <br>
active) and bind it to vfio-pci driver successfully<br>
<br>
$ ip link set enp1s0 down<br>
$ dpdk-devbind.py -b vfio-pci enp1s0<br>
<br>
3. Now dpdk-devbind.py shows that the NIC is using
DPDK-compatible driver<br>
<br>
$ dpdk-devbind.py --status-dev net<br>
<br>
Network devices using DPDK-compatible driver<br>
============================================<br>
0000:01:00.0 'RTL8111/8168/8411 PCI Express Gigabit Ethernet
Controller <br>
8168' drv=vfio-pci unused=r8169<br>
<br>
Network devices using kernel driver<br>
===================================<br>
0000:02:00.0 'RTL8822BE 802.11a/b/g/n/ac WiFi adapter b822'
if=wlp2s0 <br>
drv=rtw_8822be unused=rtw88_8822be,vfio-pci *Active*<br>
<br>
4. However when I run any example DPDK application it says
that there <br>
are no available NIC ports. For instance I wrote a simple
application<br>
<br>
int main(int argc, char *argv[])<br>
{<br>
int ret;<br>
int total_ports, avail_ports;<br>
<br>
ret = rte_eal_init(argc, argv);<br>
if( ret < 0 )<br>
rte_exit(EXIT_FAILURE, "EAL initialization
failed\n");<br>
<br>
total_ports = rte_eth_dev_count_total();<br>
avail_ports = rte_eth_dev_count_avail();<br>
printf("ETH PORTS %d %d\n", total_ports, avail_ports);<br>
<br>
rte_eal_cleanup();<br>
<br>
return 0;<br>
}<br>
<br>
and both rte_eth_dev_count_total() and
rte_eth_dev_count_avail() return 0.<br>
<br>
What am I doing wrong?<br>
<br>
</blockquote>
</div>
</blockquote>
</body>
</html>