DPDK usage discussions
 help / color / mirror / Atom feed
From: Justin Tallon <justin.tallon@softwareradiosystems.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] using dpdk as a shared library
Date: Tue, 22 Dec 2020 00:20:51 +0100
Message-ID: <CA+uMv7coF73PMu8Gy+9yrAfdsm82k6fcr6aDFCaPaTKhCGw4Pg@mail.gmail.com> (raw)
In-Reply-To: <20201219112715.75924abe@hermes.local>

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 <justin.tallon@softwareradiosystems.com> 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).
>
>

  reply	other threads:[~2020-12-21 23:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 22:38 Justin Tallon
2020-12-19 19:27 ` Stephen Hemminger
2020-12-21 23:20   ` Justin Tallon [this message]
2020-12-21 23:32     ` Stephen Hemminger
2021-03-22 21:18       ` Justin Tallon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+uMv7coF73PMu8Gy+9yrAfdsm82k6fcr6aDFCaPaTKhCGw4Pg@mail.gmail.com \
    --to=justin.tallon@softwareradiosystems.com \
    --cc=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ https://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git