[dpdk-dev] rte_pmd_init_all() with DPDK 1.7.0

Neil Horman nhorman at tuxdriver.com
Fri Dec 5 20:49:46 CET 2014


On Fri, Dec 05, 2014 at 11:30:41AM -0800, Malveeka Tewari wrote:
> Hi all
> 
> I have a very basic DPDK app that runs in two modes: sender and sniffer.
> 
> In the sender mode, the app just reads data from a shared memory buffer and
> sends packets out on a port using rte_eth_tx_burst.
> In the sniffer mode, the app polls for incoming packets on a port using
> rte_eth_rx_burst and writes them to a shared memory buffer.
> 
> I was using DPDK-1.6.0 initially and everything worked fine. However, I
> recently upgraded to DPDK 1.7.0.For that, I had to comment out the
> rte_pmd_init_all() method for the app to compile successfully.
> Now, the sender mode still works fine, but in the sniffer mode, the app is
> not able to receive any packet.
> 
> Am I missing any step in moving from DPDK 1.6.0 to DPDK 1.7.0?
> Is there a way to debug why the app is not receiving packets with the DPDK
> 1.7.0 library?
> 

rte_pmd_init_all no longer exits, as the pmd are initialized via constructors
that run automatically.  The constructors which run are defined by the method
which you use to build and run DPDK.  If you are building as a static library,
every pmd which you compile should be automaticaly initalized if they are
physical device pmds, along with any devices you have created via the --vdev
command line option.  If you've build shared libraries, you need to do one of
two things:

1) Link the pmd with your appilcation (via the gcc/icc/clang -lrte_pmd_* option),
so that you get a DT_NEEDED entry in your binary and the pmd intalizes
automatically

or

2) Use the -d option on the command line to specify a pmd DSO to load via the
dlopen method.


Neil




More information about the dev mailing list