Thank you for your reply Bruce. Still having issues with shared-lib DPDK. I tried both options and get two distinct issues. I tried running the l2fwd example with e1000 driver and get little farther. This time it does find the devices but there is an error with MBUF
root:build$./l2fwd -d /home/sp2/dpdk-18.08/x86_64-native-linuxapp-gcc/lib/librte_pmd_e1000.so EAL: Detected 6 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: No free hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... EAL: PCI device 0000:00:19.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1502 net_e1000_em EAL: PCI device 0000:06:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:06:00.1 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:06:00.2 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:06:00.3 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:08:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:10d3 net_e1000_em MAC updating enabled MBUF: error setting mempool handler EAL: Error - exiting with code: 1 Cause: Cannot init mbuf pool 2nd Option of setting CONFIG_RTE_EAL_PMD_PATH option is ideal, but I run into issue with as well. I am configuring and installing the DPDK with CONFIG_RTE_EAL_PMD_PATH set as CONFIG_RTE_EAL_PMD_PATH=$(HOME)/dpdk-18.08/x86_64-native-linuxapp-gcc/lib I this case I get following error when I run l2fwd root:build$./l2fwd EAL: Detected 6 lcore(s) EAL: Detected 1 NUMA nodes EAL: /home/sp2/dpdk-18.08/x86_64-native-linuxapp-gcc/lib/libdpdk.so: invalid ELF header EAL: FATAL: Cannot init plugins EAL: Cannot init plugins EAL: Error - exiting with code: 1 Cause: Invalid EAL arguments Regards, Chai -----Original Message----- From: Richardson, Bruce <bruce.richard...@intel.com> Sent: Friday, September 07, 2018 09:22 AM To: Shubhachint, Chaitanya <chaitanya.shubhach...@netscout.com>; dev@dpdk.org Subject: RE: DPDK Shared lib: No Ethernet ports [EXTERNAL EMAIL] > -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Shubhachint, > Chaitanya > Sent: Friday, September 7, 2018 3:18 PM > To: dev@dpdk.org > Subject: [dpdk-dev] DPDK Shared lib: No Ethernet ports > > Hello, > > I recently started working with DPDK and gone through the initial > steps of getting source code installed and trying out few examples. To > integrate DPDK with our product, I need to build the share-lib version of > DPDK. > I run into an issue when I build DPDK as shared, I don't see this > issue when DPDK is built as static. DPDK built with default > configuration, I can run the examples and get expected results. When > built as shared, EAL detects no Ethernet ports. > > I am building shared-lib version using steps below: > . switch the CONFIG_RTE_BUILD_SHARED_LIB to y in the config/common_base . > make config T=x86_64-native-linuxapp-gcc . make install > T=x86_64-native- linuxapp-gcc . export RTE_SDK=$HOME/dpdk-18.08 . > export RTE_TARGET=x86_64- native-linuxapp-gcc . build examples. > . Set LD_LIBRARY_PATH to point to $HOME/dpdk-18.08/ x86_64-native- > linuxapp-gcc/lib > > I am using Intel I350 Quad port NIC, and have switched to > uio_pci_generic driver => Network devices using DPDK-compatible driver > ============================================ > 0000:06:00.0 'I350 Gigabit Network Connection 1521' > drv=uio_pci_generic unused=igb > 0000:06:00.1 'I350 Gigabit Network Connection 1521' > drv=uio_pci_generic unused=igb > 0000:06:00.2 'I350 Gigabit Network Connection 1521' > drv=uio_pci_generic unused=igb > 0000:06:00.3 'I350 Gigabit Network Connection 1521' > drv=uio_pci_generic unused=igb > > When I run any examples, I get error 'No Ethernet ports'. > > root:l2fwd$./build/l2fwd > EAL: Detected 6 lcore(s) > EAL: Detected 1 NUMA nodes > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket > EAL: No free hugepages reported in hugepages-1048576kB > EAL: Probing VFIO support... > MAC updating enabled > EAL: Error - exiting with code: 1 > Cause: No Ethernet ports - bye > > Interestingly, same code base built with 'CONFIG_RTE_BUILD_SHARED_LIB=n' > works just fine. The ports get detected correctly and I can run all > the examples and applications. > > Your help is appreciated. With shared library builds, the drivers are not linked in automatically. You need to explicitly load them via "-d" EAL flag - either individually or by passing in the path to a directory of drivers which can be loaded. See also in the build config the setting "CONFIG_RTE_EAL_PMD_PATH" which can be used to set a default search path for loading drivers. Regards, /Bruce