From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0605AA09EF for ; Tue, 22 Dec 2020 00:21:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E214ECAA3; Tue, 22 Dec 2020 00:21:05 +0100 (CET) Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) by dpdk.org (Postfix) with ESMTP id DF85ACA74 for ; Tue, 22 Dec 2020 00:21:02 +0100 (CET) Received: by mail-oi1-f181.google.com with SMTP id s2so12988989oij.2 for ; Mon, 21 Dec 2020 15:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=softwareradiosystems-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SKriVXXVtttgx4o1X9Zb+azUL3ij4XolF/Ry5KYhW5c=; b=zFM1pQ/J75DUuPCezz4L4emgluyzWDar+bSerUoZutvvcXBZ8CbTQKFRm9Rd4T5xjr 0PTAp/1ndlSeDv9eflHakQfLnR39zBfybqomYaVl3+riAGl5lX+QInutYqCVM7qs6bGH ez3WUa2Vrocy67AbBkHsSQ4phtRXJtuH7XDqLTQzPXacTozvtcLTse2RPtOdnuPMpGCz 6IpdZhdHSmXlwkgGfsBpU2UbmB/MCE26xV0dZEWtokQ9aK7sFQwWSzXADO9QNiaxT1QJ BBbcF7DI7GJWhHGwUHQhS7dlVEZXxiIufEPOYLza8tfVmVMFPPe3ipdJjOmRG7l6mf++ Xo4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SKriVXXVtttgx4o1X9Zb+azUL3ij4XolF/Ry5KYhW5c=; b=ddBJ2j1kE+hm9d4pAGH4/BAwli/rhDsocJvVC0ebIRI8DtC+XpZ2p5ZCpdUu9xcDjZ Zerm8RNnXlbQJw+CjQ26f0FPEdUFaFOnTixMEmF5U7y9jVGNIl5vQ7WRBK8TiQyPFyym RTYLmxhT4J1mFosEqEtoOiE6uxJQYXM4LbiBOv+bCvOjmgxYbNcn6Anc6LuvqqSBgWQ8 tO2WHWXIJ/p6QJAME4Vd31XJNjv3BbqRkQEgcc1mAuUo/WJy+wQ0hbbkvBajZNfv45yf 2gXOohNaluevePgTfXE+buDXfC7R4GTsnFJCJKWwLoNcJEHkbMtWNEJROU3hP0JielMQ t6WQ== X-Gm-Message-State: AOAM533YN6dhPJK9tRdBvlCOiSc0v41aGyLRRa5DL98QYZUzbWTrefAV hC1ZxpdAFc+uNGM2r+ZZnnZD+sYpno91cqz5SIh59SzaXUWmqdyy X-Google-Smtp-Source: ABdhPJyYqMFOigz4UdUTGWHGcb1oQnFWuOw4jQt4cs7u/sXhfJ6vWBRQCLBDwTWLwY0Xavcozv/bUBKa/eVTvOX9AIU= X-Received: by 2002:aca:4d8b:: with SMTP id a133mr12957184oib.79.1608592862094; Mon, 21 Dec 2020 15:21:02 -0800 (PST) MIME-Version: 1.0 References: <20201219112715.75924abe@hermes.local> In-Reply-To: <20201219112715.75924abe@hermes.local> From: Justin Tallon Date: Tue, 22 Dec 2020 00:20:51 +0100 Message-ID: To: Stephen Hemminger Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] using dpdk as a shared library X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hey Stephen, Thanks for the response, I have passed the directory of the dpdk library as you said with the -d flag. However, when I did this, I get the following error. libdpdk.so: invalid ELF header any help with this would be appreciated. Regards, Justin ____ Justin Tallon Ph.D. Software Radio Systems (SRS) http://www.softwareradiosystems.com +353-86-067-0753 | justin.tallon@softwareradiosystems.com On Sat, Dec 19, 2020 at 8:27 PM Stephen Hemminger < stephen@networkplumber.org> wrote: > On Fri, 18 Dec 2020 23:38:28 +0100 > Justin Tallon wrote: > > > Hey guys, > > > > We are trying to use dpdk (dpdk-stable-18.08.1) as a shared library. > > > > We have recompiled as a shared library by setting > > *CONFIG_RTE_BUILD_SHARED_LIB=y* > > > > My program compiles file and I can see the relevant libraries when I use > > ldd on the binary. > > > > I direct my binary look in the correct place by using export > > LD_LIBRARY_PATH and the binary appears to find the libraries. > > However, when the function rte_eth_dev_count_avail returns it returns a 0 > > and exits, when I run the same program with static libraries, it works > > correctly. > > > > Any help on this would be great! > > > > Regards, > > Justin > > > > > > ____ > > Justin Tallon Ph.D. > > > > Software Radio Systems (SRS) > > http://www.softwareradiosystems.com > > > > +353-86-067-0753 | justin.tallon@softwareradiosystems.com > > When used as a shared library DPDK does not automatically load any > required poll > mode driver libraries. You have to pass -d flag to make it load what you > want. > > I consider this a bug (others do not), and think the DPDK should have a > table > mapping PCI device id to the PMD shared library and automatically load the > PMD > shared library (like the Linux kernel module autoloading works). > >