<div dir="ltr">Dear Reshma,<div><br></div><div>Thanks for your kind response ! Unfortunately, it still can't work.</div><div><br></div><div>1) I double checked the return value (int) of these two functions, both of them return 0.</div><div>2) About the DPDK building, we are not using the shared library build.</div><div><img src="cid:ii_kurt1rc11" alt="Screenshot from 2021-10-15 10-19-29.png" width="290" height="81"></div><div>The DPDK library is for static (.a), by the way, for the primary application we used, I already added static library (librte_pdump.a, librte_pmd_pcap.a) in the Makefile (<a href="https://drive.google.com/file/d/1Y2Oua1T41U86qPUiiOtw7_XCIJzqJDmP/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1Y2Oua1T41U86qPUiiOtw7_XCIJzqJDmP/view?usp=sharing</a>).</div><div><img src="cid:ii_kurt4sc12" alt="Screenshot from 2021-10-15 10-29-18.png" width="562" height="238"></div><div>3) For the primary side, I saw the log showed "<span style="background-color:rgb(247,247,247);color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap">-w 0000:00:00.0", </span>which are the input of function rte_eal_init(). Therefore, I also tried to parse "<span style="letter-spacing:0.35px;background-color:rgb(247,247,247);color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;white-space:pre-wrap">-w 0000:00:00.0"</span> on pdump side, however, it still got the error.</div><div><b>- Log in pdump side</b></div><div><a href="https://drive.google.com/file/d/1QIHRr4A-4lh3QvfQUF8CLwJkutY23OPO/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1QIHRr4A-4lh3QvfQUF8CLwJkutY23OPO/view?usp=sharing</a><b><br></b></div><div><div><span style="box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px;background-color:rgb(242,222,222)"><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><b><br></b></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><b>- Log in primary side (Red font I think is related to DPDK)</b></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><a href="https://drive.google.com/file/d/1_ItKwrDebaA1skuei8RExkftudUlXiAS/view?usp=sharing" target="_blank">https://drive.google.com/file/d/1_ItKwrDebaA1skuei8RExkftudUlXiAS/view?usp=sharing</a><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap;background-color:rgb(247,247,247)"> </span><b style="color:rgb(34,34,34)"><br></b></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)">---------------------</div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)">P.S 1. On primary side, If we change  "<span style="letter-spacing:0.35px;background-color:rgb(247,247,247);color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;white-space:pre-wrap">-w 0000:00:00.0" </span>to  "<span style="letter-spacing:0.35px;background-color:rgb(247,247,247);color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;white-space:pre-wrap">-w 0000:86:02.0 -w 0000:86:02.1" </span>which is the two bus-info we bind for DPDK.</div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><img src="cid:ii_kuru6mni3" alt="Screenshot from 2021-10-15 11-52-53.png" width="562" height="179"><span style="background-color:rgb(242,222,222);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;letter-spacing:0.35px"></span><br></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)">We will get the error  <b>EAL: Failed to attach device on primary process, </b> do you have any idea what is the root cause of this issue ?<br></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap;background-color:rgb(247,247,247)">xran_ethdi_init_dpdk_io: Calling rte_eal_init:wls_0 -c 0x2000021 -n2 --iova-mode=pa --socket-mem=8192 --socket-limit=8192 --proc-type=auto --file-prefix wls_0 -w 0000:86:02.0 -w 0000:86:02.1   
EAL: Detected 40 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Auto-detected process type: PRIMARY
EAL: Multi-process socket /var/run/dpdk/wls_0/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:86:02.0 on NUMA socket 1
EAL:   probe driver: 8086:154c net_i40e_vf
EAL:   using IOMMU type 1 (Type 1)
EAL: PCI device 0000:86:02.1 on NUMA socket 1
EAL:   probe driver: 8086:154c net_i40e_vf
Return value (int) of rte_pdump_init() : 0
EAL: PCI device 0000:86:02.0 on NUMA socket 1
</span><span style="font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap;background-color:rgb(247,247,247)"><font color="#b45f06">EAL: Failed to attach device on primary process</font></span><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap;background-color:rgb(247,247,247)">
initializing port 0 for TX, drv=net_i40e_vf
Port 0 MAC: 00 11 22 33 44 66
Port 0: nb_rxd 4096 nb_txd 4096

Checking link status portid [0]   ... done
Port 0 Link Up - speed 10000 Mbps - full-duplex
EAL: PCI device 0000:86:02.1 on NUMA socket 1
</span><span style="font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap;background-color:rgb(247,247,247)"><font color="#b45f06">EAL: Failed to attach device on primary process</font></span><span style="color:rgb(51,51,51);font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:13.6px;letter-spacing:0.35px;white-space:pre-wrap;background-color:rgb(247,247,247)">
initializing port 1 for TX, drv=net_i40e_vf
Port 1 MAC: 00 11 22 33 44 66
Port 1: nb_rxd 4096 nb_txd 4096

Checking link status portid [1]   ... done
Port 1 Link Up - speed 10000 Mbps - full-duplex
vf 0 local  SRC MAC: 00 11 22 33 44 66
vf 0 remote DST MAC: 00 11 22 33 44 55
vf 1 local  SRC MAC: 00 11 22 33 44 66
vf 1 remote DST MAC: 00 11 22 33 44 55</span><br></div><br><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)">P.S. 2 : For the DPDK environment we to build, we select <span style="color:rgb(51,51,51);font-weight:700;letter-spacing:0.35px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px">x86_64-native-linuxapp-icc </span>and <span style="color:rgb(51,51,51);font-weight:700;letter-spacing:0.35px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px">Insert VFIO module.</span></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)">Best Regards,<br></div><div style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;letter-spacing:normal;background-color:rgb(255,255,255)">Shu-hua, Liao</div></span></div><div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Pattan, Reshma <<a href="mailto:reshma.pattan@intel.com" target="_blank">reshma.pattan@intel.com</a>> 於 2021年10月14日 週四 下午5:52寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> -----Original Message-----<br>
> From: 廖書華 <<a href="mailto:sim860927@gmail.com" target="_blank">sim860927@gmail.com</a>><br>
<br>
<br>
> Yes, I already set *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and<br>
> *CONFIG_RTE_LIBRTE_PDUMP=y *in the file "dpdk-<br>
> 19.11/config/common_base"<br>
> then build DPDK.<br>
> Also, in the files "dpdk-19.11/x86_64-native-linuxapp-icc/.config" and "dpdk-<br>
> 19.11/x86_64-native-linuxapp-icc/.config.orig", they also show that<br>
> *CONFIG_RTE_LIBRTE_PMD_PCAP=y *and *CONFIG_RTE_LIBRTE_PDUMP=y.*<br>
> <br>
> It seems that it already enabled pcap PMD of DPDK.<br>
> Do you have other suggestions ?<br>
<br>
Hi,<br>
<br>
Few options you can double check<br>
1)Make sure your primary application is calling rte_pdump_init()/ret_pudmp_uninit() to initialize/uninitialize the pdump library.<br>
2)If you are using a shared library build,   double check you are  linking pcap pmd properly in primary build as explained in below link<br>
<a href="https://www.mail-archive.com/users@dpdk.org/msg05039.html" rel="noreferrer" target="_blank">https://www.mail-archive.com/users@dpdk.org/msg05039.html</a><br>
<a href="https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/62795017/dpdk-pdump-failed-to-hotplug-add-device</a><br>
3)If you are passing any pci device using  eal "-w" option to primary,  try to pass the same device to secondary also using "-w" option . <br>
<br>
If you still see the issue please paste the full primary and secondary application run log with command that you are running.<br>
Also what kind of build you are using.<br>
<br>
Thanks,<br>
Reshma<br>
<br>
</blockquote></div></div>