From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id CA8CB7E1F for ; Fri, 5 Dec 2014 20:49:55 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1Xwysy-0006Fv-6V; Fri, 05 Dec 2014 14:49:54 -0500 Date: Fri, 5 Dec 2014 14:49:46 -0500 From: Neil Horman To: Malveeka Tewari Message-ID: <20141205194946.GF29245@hmsreliant.think-freely.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] rte_pmd_init_all() with DPDK 1.7.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 19:49:56 -0000 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