[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-07-29 Thread Thomas Monjalon
2015-03-06 08:20, Stephen Hemminger: > The issue is that virtio has no place it can do iopl() and have the IRQ thread > work. It only shows up on real code where application is daemon, not in a toy > demo or test application. > > Right now: > gcc start >rte_virtio_pmd_init >

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-09 Thread David Marchand
So, a little summary. On Fri, Mar 6, 2015 at 5:20 PM, Stephen Hemminger < stephen at networkplumber.org> wrote: > > > The virtio driver needs to use in/out instructions therefore it must > initialize > > > using iopl(2) system call. The problem is that virtio initialization > happens very > > > e

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-07 Thread David Marchand
On Sat, Mar 7, 2015 at 12:43 AM, Stephen Hemminger < stephen at networkplumber.org> wrote: > On Fri, 6 Mar 2015 23:04:33 +0100 > David Marchand wrote: > > > In the end, the fix would be to move rte_eal_intr_init() after > rte_eal_dev_init(). > > > That would work, but was worried it would break o

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread David Marchand
On Fri, Mar 6, 2015 at 5:55 PM, Stephen Hemminger < stephen at networkplumber.org> wrote: > No virtio_dev_init is called too late, after interrupt handling > threads are spawned. > > /* Launch threads, called at application init(). */ > int > rte_eal_init(int argc, char **argv) > { > int i

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread David Marchand
Hello Stephen, On Fri, Mar 6, 2015 at 5:20 PM, Stephen Hemminger < stephen at networkplumber.org> wrote: > The issue is that virtio has no place it can do iopl() and have the IRQ > thread > work. It only shows up on real code where application is daemon, not in a > toy > demo or test application.

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread Stephen Hemminger
On Fri, 6 Mar 2015 23:04:33 +0100 David Marchand wrote: > In the end, the fix would be to move rte_eal_intr_init() after > rte_eal_dev_init(). That would work, but was worried it would break other devices.

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread Stephen Hemminger
On Fri, 6 Mar 2015 17:33:58 +0100 David Marchand wrote: > Is eth_virtio_dev_init() not a better place rather than eal ? > > I prefer avoiding #ifdef pmd in eal. No virtio_dev_init is called too late, after interrupt handling threads are spawned. /* Launch threads, called at application init().

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread Stephen Hemminger
On Fri, 6 Mar 2015 03:41:25 + "Ouyang, Changchun" wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Stephen > > Hemminger > > Sent: Friday, March 6, 2015 8:45 AM > > To: dev at dpdk.

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-06 Thread Ouyang, Changchun
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Stephen > Hemminger > Sent: Friday, March 6, 2015 8:45 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is > initialized > > The vi

[dpdk-dev] [PATCH 1/2] virtio: initialize iopl when device is initialized

2015-03-05 Thread Stephen Hemminger
The virtio driver needs to use in/out instructions therefore it must initialize using iopl(2) system call. The problem is that virtio initialization happens very early, and any application that uses daemon() or calls eal_init later in another context will fail. The fix is to move the iopl into rte