Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-24 Thread Bruce Richardson
On Tue, Jul 23, 2019 at 11:11:14AM -0700, Stephen Hemminger wrote: > On Tue, 23 Jul 2019 13:30:33 +0100 > Bruce Richardson wrote: > > > On Mon, Jul 22, 2019 at 11:53:26AM -0700, Stephen Hemminger wrote: > > > On Mon, 22 Jul 2019 19:31:08 +0200 > > > Thomas Monjalon wrote: > > > > > > > 22/07/

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-23 Thread Stephen Hemminger
On Tue, 23 Jul 2019 13:30:33 +0100 Bruce Richardson wrote: > On Mon, Jul 22, 2019 at 11:53:26AM -0700, Stephen Hemminger wrote: > > On Mon, 22 Jul 2019 19:31:08 +0200 > > Thomas Monjalon wrote: > > > > > 22/07/2019 19:13, Stephen Hemminger: > > > > Thomas Monjalon wrote: > > > > > Are

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-23 Thread Thomas Monjalon
23/07/2019 20:29, Stephen Hemminger: > On Tue, 23 Jul 2019 09:59:04 +0200 > Thomas Monjalon wrote: > > > 22/07/2019 20:34, Stephen Hemminger: > > > On Mon, 22 Jul 2019 19:31:08 +0200 > > > Thomas Monjalon wrote: > > > > > > > 22/07/2019 19:13, Stephen Hemminger: > > > > > Thomas Monjalon w

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-23 Thread Stephen Hemminger
On Tue, 23 Jul 2019 09:59:04 +0200 Thomas Monjalon wrote: > 22/07/2019 20:34, Stephen Hemminger: > > On Mon, 22 Jul 2019 19:31:08 +0200 > > Thomas Monjalon wrote: > > > > > 22/07/2019 19:13, Stephen Hemminger: > > > > Thomas Monjalon wrote: > > > > > Are the constructors run on dlopen

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-23 Thread Stephen Hemminger
On Tue, 23 Jul 2019 13:30:33 +0100 Bruce Richardson wrote: > On Mon, Jul 22, 2019 at 11:53:26AM -0700, Stephen Hemminger wrote: > > On Mon, 22 Jul 2019 19:31:08 +0200 > > Thomas Monjalon wrote: > > > > > 22/07/2019 19:13, Stephen Hemminger: > > > > Thomas Monjalon wrote: > > > > > Are

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-23 Thread Bruce Richardson
On Mon, Jul 22, 2019 at 11:53:26AM -0700, Stephen Hemminger wrote: > On Mon, 22 Jul 2019 19:31:08 +0200 > Thomas Monjalon wrote: > > > 22/07/2019 19:13, Stephen Hemminger: > > > Thomas Monjalon wrote: > > > > Are the constructors run on dlopen of the bus driver? > > > > > > Yes, constructor

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-23 Thread Thomas Monjalon
22/07/2019 20:34, Stephen Hemminger: > On Mon, 22 Jul 2019 19:31:08 +0200 > Thomas Monjalon wrote: > > > 22/07/2019 19:13, Stephen Hemminger: > > > Thomas Monjalon wrote: > > > > Are the constructors run on dlopen of the bus driver? > > > > > > Yes, constructors are run on dlopen. > > > But

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Stephen Hemminger
On Mon, 22 Jul 2019 19:31:08 +0200 Thomas Monjalon wrote: > 22/07/2019 19:13, Stephen Hemminger: > > Thomas Monjalon wrote: > > > Are the constructors run on dlopen of the bus driver? > > > > Yes, constructors are run on dlopen. > > But application should not have to ask DPDK to dlopen the

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Stephen Hemminger
On Mon, 22 Jul 2019 19:31:08 +0200 Thomas Monjalon wrote: > 22/07/2019 19:13, Stephen Hemminger: > > Thomas Monjalon wrote: > > > Are the constructors run on dlopen of the bus driver? > > > > Yes, constructors are run on dlopen. > > But application should not have to ask DPDK to dlopen the

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Thomas Monjalon
22/07/2019 19:13, Stephen Hemminger: > Thomas Monjalon wrote: > > Are the constructors run on dlopen of the bus driver? > > Yes, constructors are run on dlopen. > But application should not have to ask DPDK to dlopen the bus devices. > > The core principle is that dynamic build of DPDK should ac

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Stephen Hemminger
On Mon, 22 Jul 2019 19:04:55 +0200 Thomas Monjalon wrote: > 22/07/2019 18:43, Stephen Hemminger: > > On Mon, 22 Jul 2019 10:06:11 +0100 > > Bruce Richardson wrote: > > > On Mon, Jul 22, 2019 at 09:38:27AM +0200, Thomas Monjalon wrote: > > > > 19/07/2019 22:55, Stephen Hemminger: > > > >

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Thomas Monjalon
22/07/2019 18:43, Stephen Hemminger: > On Mon, 22 Jul 2019 10:06:11 +0100 > Bruce Richardson wrote: > > On Mon, Jul 22, 2019 at 09:38:27AM +0200, Thomas Monjalon wrote: > > > 19/07/2019 22:55, Stephen Hemminger: > > > > The root cause is that recent gcc won't run constructor on unused > > > > l

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Stephen Hemminger
On Mon, 22 Jul 2019 10:06:11 +0100 Bruce Richardson wrote: > On Mon, Jul 22, 2019 at 09:38:27AM +0200, Thomas Monjalon wrote: > > 19/07/2019 22:55, Stephen Hemminger: > > > On Tue, 16 Jul 2019 09:46:04 +0100 > > > Bruce Richardson wrote: > > > > > > > On Mon, Jul 15, 2019 at 05:19:12PM -070

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Bruce Richardson
On Mon, Jul 22, 2019 at 09:38:27AM +0200, Thomas Monjalon wrote: > 19/07/2019 22:55, Stephen Hemminger: > > On Tue, 16 Jul 2019 09:46:04 +0100 > > Bruce Richardson wrote: > > > > > On Mon, Jul 15, 2019 at 05:19:12PM -0700, Stephen Hemminger wrote: > > > > On Mon, 15 Jul 2019 16:41:36 -0700 > > >

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-22 Thread Thomas Monjalon
19/07/2019 22:55, Stephen Hemminger: > On Tue, 16 Jul 2019 09:46:04 +0100 > Bruce Richardson wrote: > > > On Mon, Jul 15, 2019 at 05:19:12PM -0700, Stephen Hemminger wrote: > > > On Mon, 15 Jul 2019 16:41:36 -0700 > > > Stephen Hemminger wrote: > > > > > > > If DPDK is built as a shared libra

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-19 Thread Stephen Hemminger
On Tue, 16 Jul 2019 09:46:04 +0100 Bruce Richardson wrote: > On Mon, Jul 15, 2019 at 05:19:12PM -0700, Stephen Hemminger wrote: > > On Mon, 15 Jul 2019 16:41:36 -0700 > > Stephen Hemminger wrote: > > > > > If DPDK is built as a shared library, then any application linked > > > with rte.app.mk

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-19 Thread Stephen Hemminger
On Tue, 16 Jul 2019 09:46:04 +0100 Bruce Richardson wrote: > On Mon, Jul 15, 2019 at 05:19:12PM -0700, Stephen Hemminger wrote: > > On Mon, 15 Jul 2019 16:41:36 -0700 > > Stephen Hemminger wrote: > > > > > If DPDK is built as a shared library, then any application linked > > > with rte.app.mk

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-19 Thread Stephen Hemminger
On Tue, 16 Jul 2019 09:46:04 +0100 Bruce Richardson wrote: > I don't think the position of these is going to be the cause here, the more > likely cause is that the pci bus driver - and all other drivers - are not > linked into apps for shared library builds. You always need to pass "-d" > paramet

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-16 Thread Stephen Hemminger
On Tue, 16 Jul 2019 09:46:04 +0100 Bruce Richardson wrote: > On Mon, Jul 15, 2019 at 05:19:12PM -0700, Stephen Hemminger wrote: > > On Mon, 15 Jul 2019 16:41:36 -0700 > > Stephen Hemminger wrote: > > > > > If DPDK is built as a shared library, then any application linked > > > with rte.app.mk

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-16 Thread Bruce Richardson
On Mon, Jul 15, 2019 at 05:19:12PM -0700, Stephen Hemminger wrote: > On Mon, 15 Jul 2019 16:41:36 -0700 > Stephen Hemminger wrote: > > > If DPDK is built as a shared library, then any application linked > > with rte.app.mk will not find any PCI devices. When the application > > is started no ethe

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 16:41:36 -0700 Stephen Hemminger wrote: > If DPDK is built as a shared library, then any application linked > with rte.app.mk will not find any PCI devices. When the application > is started no ethernet devices are found. > > This is because the link order of libraries on the

Re: [dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-15 Thread Stephen Hemminger
On Mon, 15 Jul 2019 16:41:36 -0700 Stephen Hemminger wrote: > If DPDK is built as a shared library, then any application linked > with rte.app.mk will not find any PCI devices. When the application > is started no ethernet devices are found. > > This is because the link order of libraries on the

[dpdk-dev] [PATCH] pci: fix missing pci bus with shared library build

2019-07-15 Thread Stephen Hemminger
If DPDK is built as a shared library, then any application linked with rte.app.mk will not find any PCI devices. When the application is started no ethernet devices are found. This is because the link order of libraries on the command line matters. And PCI is before EAL. That causes there to be no