[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-12 Thread Tetsuya Mukawa
On 2015/03/12 11:05, Tetsuya Mukawa wrote:
> On 2015/03/12 7:25, Mcnamara, John wrote:
>> From: David Marchand [mailto:david.marchand at 6wind.com] 
>> Sent: Wednesday, March 11, 2015 9:30 PM
>> To: Mcnamara, John
>> Cc: Tetsuya Mukawa; dev at dpdk.org
>> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
>>
>>>> I just tested the patch with testpmd and it fixes the previous issue.
>>> Ok, thanks, just for the record, can you add your setup ?
>>> linux / bsd, uio / vfio (if linux), which pmd ?
>> Hi David,
>>
>> I always complain when people don't send enough details in bug reports or 
>> updates, so sorry about that.
>>
>> Here we go, it is pretty vanilla but I sure you will get other data points 
>> by morning:
>>
>> $ uname -a   
>> Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64
>> #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>> 
>> UIO with testpmd and skeleton forwarding app
>>
>> John.
>> --
>>
> Hi David,
>
> I've checked the patch on following environments, and make sure it works
> fine.
>
> - igb_uio:
> - vfio:
> - uio_pci_generic
> Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.
>
> - nic_uio
> Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.
>
> Thanks,
> Tetsuya
>
Sorry for my bad English.
I've already made sure above.
Everything works fine with the patch on my environments.

Tetsuya


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-12 Thread Tetsuya Mukawa
On 2015/03/12 7:25, Mcnamara, John wrote:
>
> From: David Marchand [mailto:david.marchand at 6wind.com] 
> Sent: Wednesday, March 11, 2015 9:30 PM
> To: Mcnamara, John
> Cc: Tetsuya Mukawa; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
>
>>> I just tested the patch with testpmd and it fixes the previous issue.
>> Ok, thanks, just for the record, can you add your setup ?
>> linux / bsd, uio / vfio (if linux), which pmd ?
>
> Hi David,
>
> I always complain when people don't send enough details in bug reports or 
> updates, so sorry about that.
>
> Here we go, it is pretty vanilla but I sure you will get other data points by 
> morning:
>
> $ uname -a   
> Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64
> #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> 
> UIO with testpmd and skeleton forwarding app
>
> John.
> --
>

Hi David,

I've checked the patch on following environments, and make sure it works
fine.

- igb_uio:
- vfio:
- uio_pci_generic
Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.

- nic_uio
Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.

Thanks,
Tetsuya



[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-12 Thread Liu, Yong
Hi David,
I have verified this patch working with ivshmem and vfio driver.

Testing environment:
Commit: 0a530f0d58b0304d3f7515bb14f81fd2b6e6931e
OS: Fedora20(3.11.10-301.fc20.x86_64)
GCC: gcc version 4.8.3 20140911
QEMU: 1.5.2 with additional ivshmem patch
NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection 
[8086:10fb]

> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of David Marchand
> Sent: Thursday, March 12, 2015 1:44 PM
> To: Tetsuya Mukawa; Mcnamara, John
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
> 
> Hello John, Tetsuya,
> 
> On Thu, Mar 12, 2015 at 3:05 AM, Tetsuya Mukawa  wrote:
> 
> > On 2015/03/12 7:25, Mcnamara, John wrote:
> > > Here we go, it is pretty vanilla but I sure you will get other data
> > points by morning:
> > >
> > > $ uname -a
> > > Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64
> > > #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> > >
> > > UIO with testpmd and skeleton forwarding app
> >
> > I've checked the patch on following environments, and make sure it works
> > fine.
> >
> > - igb_uio:
> > - vfio:
> > - uio_pci_generic
> > Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.
> >
> > - nic_uio
> > Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.
> >
> 
> Ok, good.
> Big thanks to both of you :-).
> 
> The only case remaining would be ivshmem.
> 
> 
> --
> David Marchand


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-12 Thread David Marchand
Hello John, Tetsuya,

On Thu, Mar 12, 2015 at 3:05 AM, Tetsuya Mukawa  wrote:

> On 2015/03/12 7:25, Mcnamara, John wrote:
> > Here we go, it is pretty vanilla but I sure you will get other data
> points by morning:
> >
> > $ uname -a
> > Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64
> > #1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
> >
> > UIO with testpmd and skeleton forwarding app
>
> I've checked the patch on following environments, and make sure it works
> fine.
>
> - igb_uio:
> - vfio:
> - uio_pci_generic
> Tested on Ubuntu14.04 (3.13.0-30-generic) with e1000 PMD.
>
> - nic_uio
> Tested on FreeBSD 10.1-RELEASE #0 r274401 with e1000 PMD.
>

Ok, good.
Big thanks to both of you :-).

The only case remaining would be ivshmem.


-- 
David Marchand


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-11 Thread David Marchand
Hello John,

On Wed, Mar 11, 2015 at 9:24 PM, Mcnamara, John 
wrote:

> > On Wed, Mar 11, 2015 at 9:47 AM, David Marchand <
> david.marchand at 6wind.com>
> > wrote:
> >
> > Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
> > Can you try it ?
>
> I just tested the patch with testpmd and it fixes the previous issue.
>

Ok, thanks, just for the record, can you add your setup ?
linux / bsd, uio / vfio (if linux), which pmd ?


-- 
David Marchand


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-11 Thread Mcnamara, John


From: David Marchand [mailto:david.march...@6wind.com] 
Sent: Wednesday, March 11, 2015 9:30 PM
To: Mcnamara, John
Cc: Tetsuya Mukawa; dev at dpdk.org
Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

>> I just tested the patch with testpmd and it fixes the previous issue.

> Ok, thanks, just for the record, can you add your setup ?
> linux / bsd, uio / vfio (if linux), which pmd ?


Hi David,

I always complain when people don't send enough details in bug reports or 
updates, so sorry about that.

Here we go, it is pretty vanilla but I sure you will get other data points by 
morning:

$ uname -a   
Linux sie-lab-214-036.ir.intel.com 3.6.10-4.fc18.x86_64
#1 SMP Tue Dec 11 18:01:27 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

UIO with testpmd and skeleton forwarding app

John.
--



[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-11 Thread Mcnamara, John
> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of David Marchand
> Sent: Wednesday, March 11, 2015 5:29 PM
> To: Tetsuya Mukawa
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup
> 
> On Wed, Mar 11, 2015 at 9:47 AM, David Marchand 
> wrote:
> 
> Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
> Can you try it ?

Hi David,

I just tested the patch with testpmd and it fixes the previous issue.

John.
-- 




[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-11 Thread David Marchand
On Wed, Mar 11, 2015 at 9:47 AM, David Marchand 
wrote:

> On Wed, Mar 11, 2015 at 8:44 AM, Tetsuya Mukawa  wrote:
>
>>
>> $ T=x86_64-native-linuxapp-gcc make install
>> $ sudo ./tools/dpdk_nic_bind.py -b igb_uio 
>> $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -- -i
>> EAL: Detected lcore 0 as core 0 on socket 0
>>
>> (snip)
>>
>> EAL: PCI device :84:00.0 on NUMA socket 1
>> EAL:   probe driver: 8086:1521 rte_igb_pmd
>> EAL:   PCI memory mapped at 0x7fffc000
>> EAL:   PCI memory mapped at 0x7fffc010
>> $
>>
>> As a result of bisecting, it seems one of following commits may cause
>> the issue.
>>
>> 95b6a46 tailq: remove static slots
>> a234816 tailq: move to dynamic tailq
>>
>
> Hum, ok, there is something wrong with my commit...
> It can't work, because pci_init is called before tailqs_init.
> Weird, I really should have seen this before.
>

Just sent a fix : http://dpdk.org/dev/patchwork/patch/3976/
Can you try it ?

Thanks.

-- 
David Marchand


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-11 Thread Tetsuya Mukawa
On 2015/03/10 20:20, Thomas Monjalon wrote:
> 2015-03-05 19:26, Neil Horman:
>> On Wed, Mar 04, 2015 at 10:50:00PM +0100, David Marchand wrote:
>>> This is a first cleanup at trying to remove references to other dpdk 
>>> libraries
>>> from eal.
>>>
>>> This cleanup is focused on rte_tailq api which has been marked as "for 
>>> internal
>>> use" for quite some time now.
>>> Rather than have a static list in eal for all users of rte_tailq, a new 
>>> register
>>> system is introduced.
>>> This register system uses constructors which have no access to dpdk shared
>>> memory, so a two step registration is done: first step inserts the requested
>>> tailq in a local list ("local" in multi process context), then in second 
>>> step,
>>> eal init allocates/looks up for a real tailq from shared memory for all 
>>> elements
>>> of this local list.
>>>
>>> I have tried to think of different cases (libraries loaded before/after eal
>>> init...). The unit tests have been updated accordingly.
>>>
>>>
>> This all seems pretty reasonable.
>>
>> It might make sense to add a deprecation notice for this, since its removing
>> public macros, but since we're not really doing that until the 2.0 release is
>> out, I think we can skip it
>>
>> For the series
>> Acked-by: Neil Horman 
> Applied, thanks

Hi David,

It seems I cannot invoke testpmd with igb_uio device using latest master
branch.
Here are steps I did.

$ T=x86_64-native-linuxapp-gcc make install
$ sudo ./tools/dpdk_nic_bind.py -b igb_uio 
$ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -- -i
EAL: Detected lcore 0 as core 0 on socket 0

(snip)

EAL: PCI device :84:00.0 on NUMA socket 1
EAL:   probe driver: 8086:1521 rte_igb_pmd
EAL:   PCI memory mapped at 0x7fffc000
EAL:   PCI memory mapped at 0x7fffc010
$

As a result of bisecting, it seems one of following commits may cause
the issue.

95b6a46 tailq: remove static slots
a234816 tailq: move to dynamic tailq

Could you please check it?

Thanks,
Tetsuya


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-11 Thread David Marchand
Hello Tetsuya,

On Wed, Mar 11, 2015 at 8:44 AM, Tetsuya Mukawa  wrote:

>
> $ T=x86_64-native-linuxapp-gcc make install
> $ sudo ./tools/dpdk_nic_bind.py -b igb_uio 
> $ sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 1 -- -i
> EAL: Detected lcore 0 as core 0 on socket 0
>
> (snip)
>
> EAL: PCI device :84:00.0 on NUMA socket 1
> EAL:   probe driver: 8086:1521 rte_igb_pmd
> EAL:   PCI memory mapped at 0x7fffc000
> EAL:   PCI memory mapped at 0x7fffc010
> $
>
> As a result of bisecting, it seems one of following commits may cause
> the issue.
>
> 95b6a46 tailq: remove static slots
> a234816 tailq: move to dynamic tailq
>

Hum, ok, there is something wrong with my commit...
It can't work, because pci_init is called before tailqs_init.
Weird, I really should have seen this before.

Will send a fix.

-- 
David Marchand


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-10 Thread Thomas Monjalon
2015-03-05 19:26, Neil Horman:
> On Wed, Mar 04, 2015 at 10:50:00PM +0100, David Marchand wrote:
> > This is a first cleanup at trying to remove references to other dpdk 
> > libraries
> > from eal.
> > 
> > This cleanup is focused on rte_tailq api which has been marked as "for 
> > internal
> > use" for quite some time now.
> > Rather than have a static list in eal for all users of rte_tailq, a new 
> > register
> > system is introduced.
> > This register system uses constructors which have no access to dpdk shared
> > memory, so a two step registration is done: first step inserts the requested
> > tailq in a local list ("local" in multi process context), then in second 
> > step,
> > eal init allocates/looks up for a real tailq from shared memory for all 
> > elements
> > of this local list.
> > 
> > I have tried to think of different cases (libraries loaded before/after eal
> > init...). The unit tests have been updated accordingly.
> > 
> > 
> This all seems pretty reasonable.
> 
> It might make sense to add a deprecation notice for this, since its removing
> public macros, but since we're not really doing that until the 2.0 release is
> out, I think we can skip it
> 
> For the series
> Acked-by: Neil Horman 

Applied, thanks


[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-05 Thread Neil Horman
On Wed, Mar 04, 2015 at 10:50:00PM +0100, David Marchand wrote:
> This is a first cleanup at trying to remove references to other dpdk libraries
> from eal.
> 
> This cleanup is focused on rte_tailq api which has been marked as "for 
> internal
> use" for quite some time now.
> Rather than have a static list in eal for all users of rte_tailq, a new 
> register
> system is introduced.
> This register system uses constructors which have no access to dpdk shared
> memory, so a two step registration is done: first step inserts the requested
> tailq in a local list ("local" in multi process context), then in second step,
> eal init allocates/looks up for a real tailq from shared memory for all 
> elements
> of this local list.
> 
> I have tried to think of different cases (libraries loaded before/after eal
> init...). The unit tests have been updated accordingly.
> 
> 
> -- 
> David Marchand
> 
> David Marchand (10):
>   eal: remove yet another remaining reference to pm
>   pci: use lookup tailq api
>   tailq: remove unneeded inclusion of rte_tailq.h
>   tailq: use a single cast macro
>   tailq: get rid of broken "reserve" api
>   tailq: remove unused RTE_EAL_TAILQ_* macros
>   tailq: introduce dynamic register system
>   tailq: move to dynamic tailq
>   tailq: remove static slots
>   eal: no need for E_RTE_NO_TAILQ anymore
> 
>  app/test-pipeline/config.c |1 -
>  app/test-pipeline/init.c   |1 -
>  app/test-pipeline/main.c   |1 -
>  app/test-pipeline/runtime.c|1 -
>  app/test-pmd/cmdline.c |1 -
>  app/test-pmd/config.c  |1 -
>  app/test-pmd/csumonly.c|1 -
>  app/test-pmd/flowgen.c |1 -
>  app/test-pmd/ieee1588fwd.c |1 -
>  app/test-pmd/iofwd.c   |1 -
>  app/test-pmd/macfwd-retry.c|1 -
>  app/test-pmd/macfwd.c  |1 -
>  app/test-pmd/macswap.c |1 -
>  app/test-pmd/parameters.c  |1 -
>  app/test-pmd/rxonly.c  |1 -
>  app/test-pmd/testpmd.c |1 -
>  app/test-pmd/txonly.c  |1 -
>  app/test/commands.c|1 -
>  app/test/test.c|1 -
>  app/test/test_atomic.c |1 -
>  app/test/test_errno.c  |2 +-
>  app/test/test_func_reentrancy.c|1 -
>  app/test/test_hash.c   |1 -
>  app/test/test_hash_perf.c  |1 -
>  app/test/test_logs.c   |1 -
>  app/test/test_malloc.c |1 -
>  app/test/test_mbuf.c   |1 -
>  app/test/test_mempool.c|1 -
>  app/test/test_mempool_perf.c   |1 -
>  app/test/test_memzone.c|1 -
>  app/test/test_mp_secondary.c   |1 -
>  app/test/test_per_lcore.c  |1 -
>  app/test/test_ring.c   |1 -
>  app/test/test_rwlock.c |1 -
>  app/test/test_spinlock.c   |1 -
>  app/test/test_tailq.c  |  125 
>  app/test/test_timer.c  |1 -
>  examples/bond/main.c   |1 -
>  examples/cmdline/main.c|1 -
>  examples/dpdk_qat/crypto.c |1 -
>  examples/dpdk_qat/main.c   |1 -
>  examples/exception_path/main.c |1 -
>  examples/helloworld/main.c |1 -
>  examples/ip_fragmentation/main.c   |1 -
>  examples/ip_pipeline/config.c  |1 -
>  examples/ip_pipeline/init.c|1 -
>  examples/ip_pipeline/main.c|1 -
>  examples/ip_reassembly/main.c  |1 -
>  examples/ipv4_multicast/main.c |1 -
>  examples/kni/main.c|1 -
>  examples/l2fwd-ivshmem/guest/guest.c   |1 -
>  examples/l2fwd-jobstats/main.c |1 -
>  examples/l2fwd/main.c  |1 -
>  examples/l3fwd-acl/main.c  |1 -
>  examples/l3fwd-power/main.c|1 -
>  examples/l3fwd-vf/main.c   |1 -
>  examples/l3fwd/main.c  |1 -
>  examples/link_status_interrupt/main.c

[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-04 Thread Thomas Monjalon
2015-03-04 22:50, David Marchand:
> 143 files changed, 310 insertions(+), 685 deletions(-)

Great job.
As it removes more lines than it adds, it's probably a good cleanup patchset ;)

-- 
Thomas
When there is no more things to remove, it's becoming perfect.



[dpdk-dev] [PATCH 00/10] eal: rte_tailq api cleanup

2015-03-04 Thread David Marchand
This is a first cleanup at trying to remove references to other dpdk libraries
from eal.

This cleanup is focused on rte_tailq api which has been marked as "for internal
use" for quite some time now.
Rather than have a static list in eal for all users of rte_tailq, a new register
system is introduced.
This register system uses constructors which have no access to dpdk shared
memory, so a two step registration is done: first step inserts the requested
tailq in a local list ("local" in multi process context), then in second step,
eal init allocates/looks up for a real tailq from shared memory for all elements
of this local list.

I have tried to think of different cases (libraries loaded before/after eal
init...). The unit tests have been updated accordingly.


-- 
David Marchand

David Marchand (10):
  eal: remove yet another remaining reference to pm
  pci: use lookup tailq api
  tailq: remove unneeded inclusion of rte_tailq.h
  tailq: use a single cast macro
  tailq: get rid of broken "reserve" api
  tailq: remove unused RTE_EAL_TAILQ_* macros
  tailq: introduce dynamic register system
  tailq: move to dynamic tailq
  tailq: remove static slots
  eal: no need for E_RTE_NO_TAILQ anymore

 app/test-pipeline/config.c |1 -
 app/test-pipeline/init.c   |1 -
 app/test-pipeline/main.c   |1 -
 app/test-pipeline/runtime.c|1 -
 app/test-pmd/cmdline.c |1 -
 app/test-pmd/config.c  |1 -
 app/test-pmd/csumonly.c|1 -
 app/test-pmd/flowgen.c |1 -
 app/test-pmd/ieee1588fwd.c |1 -
 app/test-pmd/iofwd.c   |1 -
 app/test-pmd/macfwd-retry.c|1 -
 app/test-pmd/macfwd.c  |1 -
 app/test-pmd/macswap.c |1 -
 app/test-pmd/parameters.c  |1 -
 app/test-pmd/rxonly.c  |1 -
 app/test-pmd/testpmd.c |1 -
 app/test-pmd/txonly.c  |1 -
 app/test/commands.c|1 -
 app/test/test.c|1 -
 app/test/test_atomic.c |1 -
 app/test/test_errno.c  |2 +-
 app/test/test_func_reentrancy.c|1 -
 app/test/test_hash.c   |1 -
 app/test/test_hash_perf.c  |1 -
 app/test/test_logs.c   |1 -
 app/test/test_malloc.c |1 -
 app/test/test_mbuf.c   |1 -
 app/test/test_mempool.c|1 -
 app/test/test_mempool_perf.c   |1 -
 app/test/test_memzone.c|1 -
 app/test/test_mp_secondary.c   |1 -
 app/test/test_per_lcore.c  |1 -
 app/test/test_ring.c   |1 -
 app/test/test_rwlock.c |1 -
 app/test/test_spinlock.c   |1 -
 app/test/test_tailq.c  |  125 
 app/test/test_timer.c  |1 -
 examples/bond/main.c   |1 -
 examples/cmdline/main.c|1 -
 examples/dpdk_qat/crypto.c |1 -
 examples/dpdk_qat/main.c   |1 -
 examples/exception_path/main.c |1 -
 examples/helloworld/main.c |1 -
 examples/ip_fragmentation/main.c   |1 -
 examples/ip_pipeline/config.c  |1 -
 examples/ip_pipeline/init.c|1 -
 examples/ip_pipeline/main.c|1 -
 examples/ip_reassembly/main.c  |1 -
 examples/ipv4_multicast/main.c |1 -
 examples/kni/main.c|1 -
 examples/l2fwd-ivshmem/guest/guest.c   |1 -
 examples/l2fwd-jobstats/main.c |1 -
 examples/l2fwd/main.c  |1 -
 examples/l3fwd-acl/main.c  |1 -
 examples/l3fwd-power/main.c|1 -
 examples/l3fwd-vf/main.c   |1 -
 examples/l3fwd/main.c  |1 -
 examples/link_status_interrupt/main.c  |1 -
 examples/load_balancer/config.c|1 -
 examples/load_balancer/init.c  |1 -
 examples/load_balancer/main.c  |1 -
 examples/load_balancer/runtime.c   |