From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 6A2CC106B for ; Tue, 14 Jul 2015 20:41:48 +0200 (CEST) Received: by wgjx7 with SMTP id x7so15653382wgj.2 for ; Tue, 14 Jul 2015 11:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FtExOrV931GJ9HtsH8ZRZrqFu3NUlo9HQNkYlcZLsS0=; b=1Dnn9AVPZBYbNbZ2+TTsarHPp4gRf7jIN8tntzc0iPFO6oLKDHRKiRW4rc5SqT0+cd OF/3jQAQPe8ruUlz7x2SM0+GrYaq1Zf3kBwabw35K6XseIZHwzq5VgQAbaJac+Yeit2c jROlzKNC4PawubsGPY+1ReC32D9zC09gjkh6B/y/ORe19aUV+nMiIElhVycLlxl2Pd+q HJaJCm18K1c7aXfdmBuUab3CyDYAK34aqo5kpAwHSgBCrW41zBVib+SyjZCrSR6rZX3/ AhiXgoZ43psdqvTjjguj3H4BJGN4vHuzYPYNHT0+S3VKUjASQnAoFEc3J9Ij/vrJnlVw piRg== MIME-Version: 1.0 X-Received: by 10.194.87.102 with SMTP id w6mr23120261wjz.111.1436899308242; Tue, 14 Jul 2015 11:41:48 -0700 (PDT) Received: by 10.194.36.99 with HTTP; Tue, 14 Jul 2015 11:41:48 -0700 (PDT) In-Reply-To: References: Date: Wed, 15 Jul 2015 03:41:48 +0900 Message-ID: From: Keunhong Lee To: "Polevoy, Igor" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] driver initialization in DPDK 2.0 built into a shared library. 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: Tue, 14 Jul 2015 18:41:48 -0000 Did you tried 'mk/rte_app.mk' to build you application? Simply including -lrte_pmd_xxx may cause problem because PMD_REGISTER_DRIVER uses 'init' attribute, which is called before the 'main' function. See the 'start-group' and 'whole-archive' linker options. Keunhong. 2015-07-15 3:21 GMT+09:00 Polevoy, Igor : > Hi, > We are developing an application that uses DPDK PMD functionality . > We are using a linux shared library which contains the network packets > processing code and it is statically linked with all the necessary DPDK > libs. > The .so is loaded by the main program. > For the DPDK compilation we have added the -fPIC to the GCC options. > > While it all worked fine with DPDK 1.6 where we had the rte_pmd_init_all > method, in the 2.0 version the > drivers registration methods (PMD_REGISTER_DRIVER) are not called when the > shared library is loaded. > > Although, I can go along the lines of the rte_pmd_init all and manually > call the driver registration, I'm concerned > that DPDK has other drivers initialization calls, and I don't actually > know which are needed or could be needed and when. > > Do you have any advice on that? What is the best way to resolve this issue? > > Thank you > Igor. > >