[dpdk-dev] Can not init NIC after merge to DPDK 1.7 problem

Wang, Shawn xingbow at amazon.com
Tue Sep 23 20:53:57 CEST 2014


Hi:

We are using our own Makefile in building dpdk program. Recently we are working on upgrading from DPDK 1.3 to DPDK 1.7. I found the rte_ixgbe_pmd_init has been replaced by PMD_REGISTER_DRIVER. So I delete rte_ixgbe_pmd_init calls. But after that, our dpdk program could not correctly find the NIC anymore. After digging into it a little more, I found the code dose not correctly register the driver type we are using, which is ixgbe.
To isolate the problem, I hacked a smal example l3fwd, and only have the main.c file like this for my testing purpose.

#include <rte_config.h>
#include <rte_eal.h>

#include "main.h"

int
MAIN(int argc, char **argv)
{
        /* init EAL */
        int ret = rte_eal_init(argc, argv);
        printf("ret %d\n", ret);
        return 0;
}

I found if I use the Makefile provided in the example, the program will find the ixgbe NIC. But if I just use these 2 commands to compile and link it. It will not find the ixgbe NIC.

gcc -I../../x86_64-native-linuxapp-gcc/include -L../../x86_64-native-linuxapp-gcc/lib -lrte_eal -c main.c
gcc -o l3fwd main.o -L../../x86_64-native-linuxapp-gcc/lib -lrte_eal -lrte_distributor -lrte_pipeline -lrte_port -lrte_timer -lrte_hash -lrte_acl -lm -lrt -lrte_mbuf -lethdev -lrte_malloc -lrte_mempool -lrte_ring -lc -lm -lrte_cmdline -lrte_cfgfile -lrte_pmd_bond -lrte_pmd_ixgbe -lrte_pmd_e1000 -lrte_pmd_ring -lpthread -ldl -lrt

Can someone share some light on what is magic of the dpdk Makefile to correctly register the NIC type?

Thank you so much.
Xingbo Wang


More information about the dev mailing list