All of lore.kernel.org
 help / color / mirror / Atom feed
* rte_eth_dev_count() returns 0 in shared library mode.
@ 2018-03-19 15:34 Venkatesh N
  2018-03-20 12:24 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Venkatesh N @ 2018-03-19 15:34 UTC (permalink / raw)
  To: dev

Hi Everyone,

Need urgent help over here.

After cloning the latest git, when i compiled the dpdk
in shared library mode by modifying the common_base config file
and rebuild the examples the api rte_eth_dev_count() returns 0

However in the static library mode, rte_eth_dev_count() returns  2.
Can someone please let me know what iam missing over here.

Here are details

-- Code --

  /* Check that there is an even number of ports to send/receive on. */
        nb_ports = rte_eth_dev_count();
        if (nb_ports < 2 || (nb_ports & 1))
                rte_exit(EXIT_FAILURE, "Error: number of ports must be even\n");


#make config T=x86_64-native-linuxapp-gcc install examples
---------------------------------------
Libraries built by changing the SHARED_LIB.

config/common_base
+++ b/config/common_base
@@ -38,7 +38,7 @@ CONFIG_RTE_ARCH_STRICT_ALIGN=n
 #
 # Compile to share library
 #
-CONFIG_RTE_BUILD_SHARED_LIB=n
+CONFIG_RTE_BUILD_SHARED_LIB=y
----------------------------------------


------------------------------------------------------------------------------------------

[root@localhost dpdk_new]#
./examples/skeleton/x86_64-native-linuxapp-gcc/basicfwd
EAL: Detected 72 lcore(s)
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: Error - exiting with code: 1
  Cause: Error: number of ports must be even
------------------------------------------------------------------------------------------
[root@localhost dpdk_new]# ldd
./examples/skeleton/x86_64-native-linuxapp-gcc/basicfwd
        linux-vdso.so.1 =>  (0x00007fffa858a000)
        librte_flow_classify.so.1.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_flow_classify.so.1.1
(0x00007f7272f5f000)
        librte_pipeline.so.3.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_pipeline.so.3.1
(0x00007f7272d58000)
        librte_table.so.3.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_table.so.3.1
(0x00007f7272b3e000)
        librte_port.so.3.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_port.so.3.1
(0x00007f727291d000)
        librte_pdump.so.2.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_pdump.so.2.1
(0x00007f7272513000)
        librte_distributor.so.1.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_distributor.so.1.1
(0x00007f727230d000)
        librte_ip_frag.so.1.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_ip_frag.so.1.1
(0x00007f7272103000)
        librte_gro.so.1.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_gro.so.1.1
(0x00007f7271efc000)
        librte_gso.so.1.1 =>
/root/DPDK/dpdk_new/x86_64-native-linuxapp-gcc/lib/librte_gso.so.1.1
(0x00007f7271cf7000)
--snip--

[root@localhost dpdk_new]# ./usertools/dpdk-devbind.py --status

Network devices using DPDK-compatible driver
============================================
0000:04:00.0 'I350 Gigabit Network Connection 1521' drv=igb_uio unused=
0000:04:00.1 'I350 Gigabit Network Connection 1521' drv=igb_uio unused=

------------ Static Library Mode ---------------------

[root@localhost dpdk_new]#
./examples/skeleton/x86_64-native-linuxapp-gcc/basicfwd
EAL: Detected 72 lcore(s)
EAL: Multi-process socket /var/run/.rte_unix
EAL: Probing VFIO support...
EAL: PCI device 0000:04:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.2 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:04:00.3 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:05:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL: PCI device 0000:05:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
Port 0 MAC: 14 02 ec 6b 36 10
Port 1 MAC: 14 02 ec 6b 36 11

-----------------------------------

Git Log
-------
commit 09e1e8d256b0832a64af6d13bf96fcb49e1e7ded
Author: Hemant Agrawal <hemant.agrawal@nxp.com>
Date:   Fri Feb 23 15:28:03 2018 +0530

    mk: fix dependencies of dpaaX drivers

    This  patch fixes the build dependency of various
    dpaaX components, when the dpaa or fslmc bus is disabled,
    or VFIO is disabled.

Regards,
Venky

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-21 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 15:34 rte_eth_dev_count() returns 0 in shared library mode Venkatesh N
2018-03-20 12:24 ` Ferruh Yigit
2018-03-21 15:08   ` Venkatesh N

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.