[dpdk-dev] [PATCH v5 3/5] eal: Fix memory leaks and needless increment of pci_map_addr

2015-06-26 Thread Tetsuya Mukawa
On 2015/06/25 18:18, David Marchand wrote: > On Thu, Jun 25, 2015 at 5:19 AM, Tetsuya Mukawa <mailto:mukawa at igel.co.jp>> wrote: > > From: "Tetsuya.Mukawa" mailto:mukawa at > igel.co.jp>> > > This patch fixes following memory leaks. >

[dpdk-dev] [PATCH v5 3/5] eal: Fix memory leaks and needless increment of pci_map_addr

2015-06-26 Thread Tetsuya Mukawa
On 2015/06/25 18:16, David Marchand wrote: > Hello Tetsuya, > > > On Thu, Jun 25, 2015 at 5:19 AM, Tetsuya Mukawa <mailto:mukawa at igel.co.jp>> wrote: > > From: "Tetsuya.Mukawa" mailto:mukawa at > igel.co.jp>> > > This patch fixes f

[dpdk-dev] [PATCH v5 5/5] eal: Fix uio mapping differences between linuxapp and bsdapp

2015-06-25 Thread Tetsuya Mukawa
sage of linuxapp. 'pci_uio_map_resource()' is implemented in both linuxapp and bsdapp, but interface is different. The patch fixes the function of bsdapp to do same as linuxapp. After applying it, file descriptor should be opened and closed out of pci_map_resource(). Signed-off-by: Tetsuya Mukawa --- lib/librt

[dpdk-dev] [PATCH v5 4/5] eal/bsdapp: Change names of pci related data structure

2015-06-25 Thread Tetsuya Mukawa
From: "Tetsuya.Mukawa" <muk...@igel.co.jp> To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsda

[dpdk-dev] [PATCH v5 3/5] eal: Fix memory leaks and needless increment of pci_map_addr

2015-06-25 Thread Tetsuya Mukawa
ble. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 14 +++-- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 51 --- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH v5 2/5] eal: Close file descriptor of uio configuration

2015-06-25 Thread Tetsuya Mukawa
From: "Tetsuya.Mukawa" <muk...@igel.co.jp> When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa Acked-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +- 1

[dpdk-dev] [PATCH v5 1/5] eal: Fix coding style of eal_pci.c and eal_pci_uio.c

2015-06-25 Thread Tetsuya Mukawa
From: "Tetsuya.Mukawa" <muk...@igel.co.jp> This patch fixes coding style of below files in linuxapp and bsdapp. - eal_pci.c - eal_pci_uio.c Signed-off-by: Tetsuya Mukawa Acked-by: Stephen Hemminger --- lib/librte_eal/bsdapp/eal/eal_pci.c | 12 +++- lib/librte_

[dpdk-dev] [PATCH v5 0/5] Clean up pci uio implementations

2015-06-25 Thread Tetsuya Mukawa
This patch set cleans up pci uio implementation. These clean up are for consolidating pci uio implementation of linuxapp and bsdapp, and moving consolidated functions in eal common. Because of above, this patch set tries to implement linuxapp and bsdapp almost same. Actual consolidations will be

[dpdk-dev] Can't compile examples

2015-06-25 Thread Tetsuya Mukawa
Hi Jijiang, It seems below patch introduces compile error of examples. - a50245e examples/tep_term: initialize VXLAN sample Here is log. Could you please check it? $ T=x86_64-native-linuxapp-gcc make examples -j12 == Build examples for x86_64-native-linuxapp-gcc == cmdline ==

[dpdk-dev] [PATCH] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-18 Thread Tetsuya Mukawa
On 2015/06/17 20:05, Xie, Huawei wrote: > On 6/17/2015 12:17 PM, Tetsuya Mukawa wrote: >> On 2015/06/02 10:50, Huawei Xie wrote: >>> rte_vhost_driver_unregister will remove the listenfd from event list, and >>> then close it. >>> >>> Signed-of

[dpdk-dev] [PATCH] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-17 Thread Tetsuya Mukawa
On 2015/06/02 10:50, Huawei Xie wrote: > rte_vhost_driver_unregister will remove the listenfd from event list, and > then close it. > > Signed-off-by: Huawei Xie > Signed-off-by: Peng Sun > --- > > +/** > + * Unregister the specified vhost server > + */ > +int >

[dpdk-dev] [PATCH] doc: update port attach and detach in Testpmd Runtime Functions chapter

2015-06-16 Thread Tetsuya Mukawa
+For example, to move a pci device under kernel management: > + > +.. code-block:: console > + > +./tools/dpdk_nic_bind.py -b ixgbe :0a:00.0 > +./tools/dpdk_nic_bind.py --status > + > +Network devices using DPDK-compatible driver > + > + > + > +Network devices using kernel driver > +=== > +:0a:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' if=eth2 > drv=ixgbe unused=igb_uio > + > +To remove a port created by a virtual device, above steps are not needed. > > port start > ~~ Acked-by: Tetsuya Mukawa

[dpdk-dev] [PATCH] app/test: Fix potential null pointer accesses in test_mbuf

2015-06-12 Thread Tetsuya Mukawa
The patch fixes potential null pointer accesses in test_mbuf. if 'm[i]' is null, stop accessing it. Signed-off-by: Tetsuya Mukawa --- app/test/test_mbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 5e8a377..5d13b37 100644 --- a/app

[dpdk-dev] deadline notice

2015-06-11 Thread Tetsuya Mukawa
On 2015/06/11 17:34, Thomas Monjalon wrote: > 2015-06-11 10:30, Tetsuya Mukawa: >> On 2015/06/11 3:39, Thomas Monjalon wrote: >>> Hi, >>> >>> As described in the roadmap (http://dpdk.org/dev/roadmap), >>> starting from this week, >>> every n

[dpdk-dev] deadline notice

2015-06-11 Thread Tetsuya Mukawa
On 2015/06/11 3:39, Thomas Monjalon wrote: > Hi, > > As described in the roadmap (http://dpdk.org/dev/roadmap), > starting from this week, > every new feature submission will be postponed to release 2.2. > The below features, which were submitted earlier, will be accepted in > the release 2.1 if

[dpdk-dev] Vhost user no connection vm2vm

2015-05-22 Thread Tetsuya Mukawa
Hi Maciej, I guess it's nice to make sure guest memory is actually allocated by hugepages. So please check like below. $ cat /sys/kernel/mm/hugepage/x/free_hugepages $ ./start_qemu.sh $ cat /sys/kernel/mm/hugepage/x/free_hugepages If qemu guest allocates memory from hugepages, 2nd cat

[dpdk-dev] [PATCH 8/8] eal: Enable Port Hotplug as default in Linux and BSD

2015-05-19 Thread Tetsuya Mukawa
() - rte_eal_pci_probe_one() - rte_eal_pci_scan() - rte_eal_vdev_init() - rte_eal_vdev_uninit() Signed-off-by: Tetsuya Mukawa --- config/common_bsdapp | 6 -- config/common_linuxapp| 5 - lib/librte_eal/bsdapp/eal/eal_pci.c | 6 +++--- lib

[dpdk-dev] [PATCH 7/8] eal: Consolidate pci uio functions of linuxapp and bsdapp

2015-05-19 Thread Tetsuya Mukawa
The patch consolidates below functions, and implement these in eal_common_pci_uio.c. - pci_uio_map_secondary() - pci_uio_map_resource() - pci_uio_unmap() - pci_uio_find_resource() - pci_uio_unmap_resource() Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/Makefile

[dpdk-dev] [PATCH 6/8] eal: Consolidate pci_map/unmap_resource() of linuxapp and bsdapp

2015-05-19 Thread Tetsuya Mukawa
The patch consolidates below functions, and implemented in common eal code. - pci_map_resource() - pci_unmap_resource() Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c| 22 lib/librte_eal/common/eal_common_pci.c | 42

[dpdk-dev] [PATCH 5/8] eal: Consolidate pci_map/unmap_device() of linuxapp and bsdapp

2015-05-19 Thread Tetsuya Mukawa
The patch consolidates below functions, and implemented in common eal code. - pci_map_device() - pci_unmap_device() Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 12 +++ lib/librte_eal/common/eal_common_pci.c | 57 + lib

[dpdk-dev] [PATCH 4/8] eal: Consolidate rte_eal_pci_probe/close_one_driver() of linuxapp and bsdapp

2015-05-19 Thread Tetsuya Mukawa
to linuxapp one with later patch. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c| 74 ++--- lib/librte_eal/common/eal_common_pci.c | 129 lib/librte_eal/common/eal_private.h| 21 ++--- lib/librte_eal/linuxapp/eal/eal_pci.c | 148

[dpdk-dev] [PATCH 3/8] eal: Consolidate pci_map and mapped_pci_resource of linuxapp and bsdapp

2015-05-19 Thread Tetsuya Mukawa
This patch consolidates below structures, and defines them in common code. - struct pci_map - strucy mapped_pci_resouces Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c| 24 lib/librte_eal/common/include/rte_pci.h| 28

[dpdk-dev] [PATCH 2/8] eal: Add pci_uio_map_uio_resource_by_index()

2015-05-19 Thread Tetsuya Mukawa
This patch adds a new function called pci_uio_map_resource_by_index(). The function hides how to map uio resource in linuxapp and bsdapp. With the function, pci_uio_map_resource() will be more abstracted. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 107

[dpdk-dev] [PATCH 1/8] eal: Add pci_uio_alloc_uio_resource()

2015-05-19 Thread Tetsuya Mukawa
This patch adds a new function called pci_uio_alloc_uio_resource(). The function hides how to prepare uio resource in linuxapp and bsdapp. With the function, pci_uio_map_resource() will be more abstracted. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 70

[dpdk-dev] [PATCH 0/8] Add Port Hotplug support to BSD

2015-05-19 Thread Tetsuya Mukawa
and BSD code. Tetsuya Mukawa (8): eal: Add pci_uio_alloc_uio_resource() eal: Add pci_uio_map_uio_resource_by_index() eal: Consolidate pci_map and mapped_pci_resource of linuxapp and bsdapp eal: Consolidate rte_eal_pci_probe/close_one_driver() of linuxapp and bsdapp eal: Consolidate

[dpdk-dev] [PATCH v4 0/5] Clean up pci uio implementations

2015-05-19 Thread Tetsuya Mukawa
Hi Bernard, I've updated the series, because I've found the issue in BSD code. Also, I have rebased the series for latest master branch. Could you please read my below comments? On 2015/05/19 14:54, Tetsuya Mukawa wrote: > This patch set cleans up pci uio implementation. These clean

[dpdk-dev] [PATCH v4 5/5] eal: Fix uio mapping differences between linuxapp and bsdapp

2015-05-19 Thread Tetsuya Mukawa
and bsdapp, but interface is different. The patch fixes the function of bsdapp to do same as linuxapp. After applying it, file descriptor should be opened and closed out of pci_map_resource(). Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 118

[dpdk-dev] [PATCH v4 4/5] eal/bsdapp: Change names of pci related data structure

2015-05-19 Thread Tetsuya Mukawa
To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 1 file changed

[dpdk-dev] [PATCH v4 3/5] eal: Fix memory leaks and needless increment of pci_map_addr

2015-05-19 Thread Tetsuya Mukawa
be freed. Also, fixes below. - When pci_map_resource() is failed, mapaddr will be MAP_FAILED. In this case, pci_map_addr should not be incremented in pci_uio_map_resource(). - To shrink code, move close(). - Remove fail variable. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH v4 2/5] eal: Close file descriptor of uio configuration

2015-05-19 Thread Tetsuya Mukawa
When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH v4 1/5] eal: Fix coding style of eal_pci.c and eal_pci_uio.c

2015-05-19 Thread Tetsuya Mukawa
This patch fixes coding style of below files in linuxapp and bsdapp. - eal_pci.c - eal_pci_uio.c Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 +--- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 12 2 files changed, 21

[dpdk-dev] [PATCH v4 0/5] Clean up pci uio implementations

2015-05-19 Thread Tetsuya Mukawa
le fixings. - Fix coding style of if-else condition. (Thanks to Richardson, Bruce) Tetsuya Mukawa (5): eal: Fix coding style of eal_pci.c and eal_pci_uio.c eal: Close file descriptor of uio configuration eal: Fix memory leaks and needless increment of pci_map_addr eal/bsdapp: Change na

[dpdk-dev] [PATCH v2 0/2] compile fixes on ICC and clang

2015-05-19 Thread Tetsuya Mukawa
x on ICC 13.0.0 > i40e: compile fix on clang 3.3 > > lib/librte_pmd_i40e/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Acked-by: Tetsuya Mukawa

[dpdk-dev] Can't compile master branch with icc

2015-05-18 Thread Tetsuya Mukawa
Hi Helin, It seems master branch cannot be compiled with icc like below. $ T=x86_64-native-linuxapp-icc make install ...snip dpdk/lib/librte_pmd_i40e/i40e/i40e_nvm.c(1022): error #188: enumerated type mixed with another type hw->aq.asq_last_status = old_asq_status; As a

[dpdk-dev] [PATCH v3 0/5] Clean up pci uio implementations

2015-04-23 Thread Tetsuya Mukawa
On 2015/04/21 22:15, Iremonger, Bernard wrote: >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Friday, March 27, 2015 8:39 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; david.marchand at 6wind.com;

[dpdk-dev] Cannot build doc using DPDK-2.0.0-rc3

2015-04-01 Thread Tetsuya Mukawa
On 2015/04/01 18:29, De Lara Guarch, Pablo wrote: > Hi Tetsuya, > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Tetsuya Mukawa >> Sent: Wednesday, April 01, 2015 10:18 AM >> To: Mcnamara, John >> Cc: dev at dpdk.org >

[dpdk-dev] Cannot build doc using DPDK-2.0.0-rc3

2015-04-01 Thread Tetsuya Mukawa
Hi John, It seems after applying following patch, I cannot build doc. ebf8050 doc: add pdf output --- $ T=x86_64-native-linuxapp-gcc make doc (snip) lookup cache used 2433/65536 hits=6354 misses=2576 finished... sphinx processing guides-html... sphinx processing

[dpdk-dev] [PATCH v3 5/5] eal: Fix uio mapping differences between linuxapp and bsdapp

2015-03-27 Thread Tetsuya Mukawa
structure. 'pci_uio_map_resource()' is implemented in both linuxapp and bsdapp, but interface is different. The patch fixes the function of bsdapp to do same as linuxapp. After applying it, file descriptor should be opened and closed out of pci_map_resource(). Signed-off-by: Tetsuya Mukawa --- lib

[dpdk-dev] [PATCH v3 4/5] eal/bsdapp: Change names of pci related data structure

2015-03-27 Thread Tetsuya Mukawa
To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 1 file changed

[dpdk-dev] [PATCH v3 3/5] eal: Fix memory leaks and needless increment of pci_map_addr

2015-03-27 Thread Tetsuya Mukawa
be freed. Also, fixes below. - When pci_map_resource() is failed, mapaddr will be MAP_FAILED. In this case, pci_map_addr should not be incremented in pci_uio_map_resource(). - To shrink code, move close(). - Remove fail variable. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH v3 2/5] eal: Close file descriptor of uio configuration

2015-03-27 Thread Tetsuya Mukawa
When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH v3 1/5] eal: Fix coding style of eal_pci.c and eal_pci_uio.c

2015-03-27 Thread Tetsuya Mukawa
This patch fixes coding style of below files in linuxapp and bsdapp. - eal_pci.c - eal_pci_uio.c Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 +--- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 12 2 files changed, 21

[dpdk-dev] [PATCH v3 0/5] Clean up pci uio implementations

2015-03-27 Thread Tetsuya Mukawa
Port Hotplug support for BSD" - Set cfg_fd as -1, when cfg_fd is closed. (Thanks to Iremonger, Bernard) - Remove needless coding style fixings. - Fix coding style of if-else condition. (Thanks to Richardson, Bruce) Tetsuya Mukawa (5): eal: Fix coding style of eal_pci.c and eal

[dpdk-dev] [PATCH v2 5/6] eal: Use map_idx in pci_uio_map_resource() of bsdapp to work same as linuxapp

2015-03-27 Thread Tetsuya Mukawa
On 2015/03/26 19:41, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Thursday, March 26, 2015 2:51 AM >> To: Iremonger, Bernard; dev at dpdk.org >> Cc: Richardson, Bruce; david.marchand at 6w

[dpdk-dev] [PATCH v2 2/6] eal: Close file descriptor of uio configuration

2015-03-27 Thread Tetsuya Mukawa
On 2015/03/26 19:03, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Thursday, March 26, 2015 4:19 AM >> To: Stephen Hemminger >> Cc: Iremonger, Bernard; david.marchand at 6wind.com; dev at d

[dpdk-dev] [PATCH v2 2/6] eal: Close file descriptor of uio configuration

2015-03-26 Thread Tetsuya Mukawa
On 2015/03/25 14:07, Stephen Hemminger wrote: > On Wed, 25 Mar 2015 12:17:32 +0900 > Tetsuya Mukawa wrote: > >> On 2015/03/25 3:33, Stephen Hemminger wrote: >>> On Tue, 24 Mar 2015 13:18:33 +0900 >>> Tetsuya Mukawa wrote: >>> >>>> When

[dpdk-dev] [PATCH v2 5/6] eal: Use map_idx in pci_uio_map_resource() of bsdapp to work same as linuxapp

2015-03-26 Thread Tetsuya Mukawa
On 2015/03/26 0:27, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Tuesday, March 24, 2015 4:19 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; david.marchand

[dpdk-dev] [PATCH v2 3/6] eal: Fix memory leaks and needless increment of pci_map_addr

2015-03-26 Thread Tetsuya Mukawa
On 2015/03/26 0:00, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Tuesday, March 24, 2015 4:19 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; david.marchand

[dpdk-dev] [PATCH v2 2/6] eal: Close file descriptor of uio configuration

2015-03-25 Thread Tetsuya Mukawa
On 2015/03/25 3:33, Stephen Hemminger wrote: > On Tue, 24 Mar 2015 13:18:33 +0900 > Tetsuya Mukawa wrote: > >> When pci_uio_unmap_resource() is called, a file descriptor that is used >> for uio configuration should be closed. >> >> Signed-off-by: Tetsuya Mukawa &

[dpdk-dev] [PATCH v2 6/6] eal: Fix interface of pci_map_resource()

2015-03-24 Thread Tetsuya Mukawa
-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 111 ++ lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 21 +++--- 2 files changed, 77 insertions(+), 55 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH v2 5/6] eal: Use map_idx in pci_uio_map_resource() of bsdapp to work same as linuxapp

2015-03-24 Thread Tetsuya Mukawa
This patch changes code that maps pci resources in bsdapp. Linuxapp has almost same code. To consolidate both, fix implementation of bsdapp to work same as linuxapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 1 file changed, 12

[dpdk-dev] [PATCH v2 4/6] eal/bsdapp: Change names of pci related data structure

2015-03-24 Thread Tetsuya Mukawa
To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Also, add 'path' variable to pci_map of bsdapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH v2 3/6] eal: Fix memory leaks and needless increment of pci_map_addr

2015-03-24 Thread Tetsuya Mukawa
, fixes below. - When pci_map_resource() is failed, mapaddr will be MAP_FAILED. In this case, pci_map_addr should not be incremented in pci_uio_map_resource(). - To shrink code, move close(). - Remove fail variable. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c

[dpdk-dev] [PATCH v2 2/6] eal: Close file descriptor of uio configuration

2015-03-24 Thread Tetsuya Mukawa
When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH v2 1/6] eal: Fix coding style of eal_pci.c and eal_pci_uio.c

2015-03-24 Thread Tetsuya Mukawa
This patch fixes coding style of below files in linuxapp and bsdapp. - eal_pci.c - eal_pci_uio.c Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 +--- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 12 2 files changed, 21

[dpdk-dev] [PATCH 6/6] eal: Fix interface of pci_map_resource()

2015-03-24 Thread Tetsuya Mukawa
On 2015/03/20 18:53, Iremonger, Bernard wrote: >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Tuesday, March 17, 2015 9:31 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; Tetsuya Mukawa >> Sub

[dpdk-dev] [PATCH v2 0/6] Clean up pci uio implementations

2015-03-24 Thread Tetsuya Mukawa
is derived from below. "[PATCH v2] eal: Port Hotplug support for BSD" - Set cfg_fd as -1, when cfg_fd is closed. (Thanks to Iremonger, Bernard) - Remove needless coding style fixings. - Fix coding style of if-else condition. (Thanks to Richardson, Bruce) Tetsuya Mukawa (6):

[dpdk-dev] [PATCH 3/6] eal: Fix memory leaks and needless incrementation of pci uio implementation

2015-03-20 Thread Tetsuya Mukawa
On 2015/03/20 1:20, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Tuesday, March 17, 2015 9:31 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; Tetsuya Mukawa >&g

[dpdk-dev] [PATCH 2/6] eal: Close file descriptor of uio configuration

2015-03-20 Thread Tetsuya Mukawa
On 2015/03/20 1:04, Iremonger, Bernard wrote: >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Tuesday, March 17, 2015 9:31 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; Tetsuya Mukawa >>

[dpdk-dev] [PATCH 3/6] eal: Fix memory leaks and needless incrementation of pci uio implementation

2015-03-20 Thread Tetsuya Mukawa
On 2015/03/19 0:39, David Marchand wrote: > On Tue, Mar 17, 2015 at 10:30 AM, Tetsuya Mukawa <mailto:mukawa at igel.co.jp>> wrote: > > When pci_map_resource() is failed but path is allocated correctly, > path won't be freed. Also, when open() is failed, uio_res

[dpdk-dev] [PATCH 2/6] eal: Close file descriptor of uio configuration

2015-03-20 Thread Tetsuya Mukawa
On 2015/03/19 0:19, David Marchand wrote: > On Tue, Mar 17, 2015 at 10:30 AM, Tetsuya Mukawa <mailto:mukawa at igel.co.jp>> wrote: > > When pci_uio_unmap_resource() is called, a file descriptor that is > used > for uio configuration should be closed. > &

[dpdk-dev] [PATCH 6/6] eal: Fix interface of pci_map_resource()

2015-03-17 Thread Tetsuya Mukawa
-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 109 ++ lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 21 +++--- 2 files changed, 75 insertions(+), 55 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH 5/6] eal: Use map_idx in pci_uio_map_resource() of bsdapp to work same as linuxapp

2015-03-17 Thread Tetsuya Mukawa
This patch changes code that maps pci resources in bsdapp. Linuxapp has almost same code. To consolidate both, fix implementation of bsdapp to work same as linuxapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 1 file changed, 12

[dpdk-dev] [PATCH 4/6] eal/bsdapp: Change names of pci related data structure

2015-03-17 Thread Tetsuya Mukawa
To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Also, add 'path' variable to pci_map of bsdapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH 3/6] eal: Fix memory leaks and needless incrementation of pci uio implementation

2015-03-17 Thread Tetsuya Mukawa
. Also, the patch fixes belows. - To shrink code, move close(). - Remove fail variable. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH 2/6] eal: Close file descriptor of uio configuration

2015-03-17 Thread Tetsuya Mukawa
When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH 1/6] eal: Fix cording style of eal_pci.c and eal_pci_uio.c

2015-03-17 Thread Tetsuya Mukawa
This patch fixes cording style of below files in linuxapp and bsdapp. - eal_pci.c - eal_pci_uio.c Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 +--- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 12 2 files changed, 21

[dpdk-dev] [PATCH 0/6] Clean up pci uio implementations

2015-03-17 Thread Tetsuya Mukawa
(Thanks to Richardson, Bruce) Tetsuya Mukawa (6): eal: Fix cording style of eal_pci.c and eal_pci_uio.c eal: Close file descriptor of uio configuration eal: Fix memory leaks and needless incrementation of pci uio implementation eal/bsdapp: Change names of pci related data structure

[dpdk-dev] [PATCH v2 15/15] eal: Enable Port Hotplug as default in Linux and BSD

2015-03-17 Thread Tetsuya Mukawa
On 2015/03/14 0:47, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Thursday, March 12, 2015 10:18 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; Tetsuya Mukawa

[dpdk-dev] [PATCH v2] pcap, null: Fix memory leaks of 'struct rte_kvargs'

2015-03-17 Thread Tetsuya Mukawa
'struct rte_kvargs' is allocated in rte_kvargs_parse(), and should be freed with rte_kvargs_free(). This patch fixes memory leaks of 'struct rte_kvargs' in below PMDs. - pcap PMD - null PMD Reported-by: Mcnamara, John Signed-off-by: Tetsuya Mukawa --- lib/librte_pmd_null/rte_eth_null.c | 13

[dpdk-dev] [PATCH] pcap, af_packet, null: Fix memory leaks of 'struct rte_kvargs'

2015-03-17 Thread Tetsuya Mukawa
On 2015/03/16 20:07, Mcnamara, John wrote: >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Monday, March 16, 2015 3:43 AM >> To: dev at dpdk.org >> Cc: Mcnamara, John; Tetsuya Mukawa >> Subject: [PATCH] pcap,af_pack

[dpdk-dev] [PATCH] pcap, af_packet, null: Fix memory leaks of 'struct rte_kvargs'

2015-03-17 Thread Tetsuya Mukawa
On 2015/03/16 19:47, Neil Horman wrote: > On Mon, Mar 16, 2015 at 12:42:56PM +0900, Tetsuya Mukawa wrote: >> 'struct rte_kvargs' is allocated in rte_kvargs_parse(), and should be >> freed with rte_kvargs_free(). >> This patch fixes memory leaks of 'struct rte_kvargs' in below

[dpdk-dev] [RFC] af_packet: support port hotplug

2015-03-17 Thread Tetsuya Mukawa
On 2015/03/16 23:47, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Monday, March 16, 2015 8:57 AM >> To: Iremonger, Bernard >> Cc: John W. Linville; dev at dpdk.org >> Subject: Re: [

[dpdk-dev] [RFC] af_packet: support port hotplug

2015-03-16 Thread Tetsuya Mukawa
On 2015/03/16 17:38, Tetsuya Mukawa wrote: > On 2015/03/13 19:14, Iremonger, Bernard wrote: >>> -Original Message- >>> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >>> Sent: Friday, March 13, 2015 12:11 AM >>> To: Iremonger, Bernard &g

[dpdk-dev] [RFC] af_packet: support port hotplug

2015-03-16 Thread Tetsuya Mukawa
On 2015/03/13 19:14, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Friday, March 13, 2015 12:11 AM >> To: Iremonger, Bernard >> Cc: John W. Linville; dev at dpdk.org >> Subject: Re: [

[dpdk-dev] [PATCH] null: Fix dereference before null check in eth_null_copy_tx()

2015-03-16 Thread Tetsuya Mukawa
This patch fixes potential null pointer access of eth_null_copy_tx(). Reported-by: Mcnamara, John Signed-off-by: Tetsuya Mukawa --- lib/librte_pmd_null/rte_eth_null.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_null/rte_eth_null.c b/lib/librte_pmd_null

[dpdk-dev] [PATCH] pcap, af_packet, null: Fix memory leaks of 'struct rte_kvargs'

2015-03-16 Thread Tetsuya Mukawa
'struct rte_kvargs' is allocated in rte_kvargs_parse(), and should be freed with rte_kvargs_free(). This patch fixes memory leaks of 'struct rte_kvargs' in below PMDs. - pcap PMD - af_packet PMD - null PMD Reported-by: Mcnamara, John Signed-off-by: Tetsuya Mukawa --- lib

[dpdk-dev] [PATCH v2 00/15] eal: Port Hotplug support for BSD

2015-03-16 Thread Tetsuya Mukawa
On 2015/03/13 20:46, Iremonger, Bernard wrote: > >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Thursday, March 12, 2015 10:18 AM >> To: dev at dpdk.org >> Cc: Iremonger, Bernard; Richardson, Bruce; Tetsuya Mukawa >&

[dpdk-dev] [PATCH v2 01/15] eal: Fix cording style of eal_pci.c and eal_pci_uio.c

2015-03-13 Thread Tetsuya Mukawa
2015-03-12 20:09 GMT+09:00 Bruce Richardson : > On Thu, Mar 12, 2015 at 10:57:18AM +, Qiu, Michael wrote: >> On 3/12/2015 6:50 PM, Bruce Richardson wrote: >> > On Thu, Mar 12, 2015 at 07:17:40PM +0900, Tetsuya Mukawa wrote: >> >> This patch fixes cording st

[dpdk-dev] [RFC] af_packet: support port hotplug

2015-03-13 Thread Tetsuya Mukawa
upport port hotplug >> >> This patch adds finalization code to free resources allocated by the PMD. >> This is based on earlier >> patches for other PMDs by Tetsuya Mukawa , with >> corrections related to data- >> >name. >> >> Sign

[dpdk-dev] [PATCH 1/3] BSD: Support Port Hotplug function

2015-03-12 Thread Tetsuya Mukawa
On 2015/03/09 11:23, Tetsuya Mukawa wrote: > On 2015/03/06 19:32, Iremonger, Bernard wrote: > >> Hi Tetsuya, >> >> The above functions being added to /lib/librte_eal/bsdapp/eal/eal_pci.c are >> very similar to the functions >> in lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH v2 15/15] eal: Enable Port Hotplug as default in Linux and BSD

2015-03-12 Thread Tetsuya Mukawa
() - rte_eal_pci_probe_one() - rte_eal_pci_scan() - rte_eal_vdev_init() - rte_eal_vdev_uninit() Signed-off-by: Tetsuya Mukawa --- config/common_bsdapp | 6 -- config/common_linuxapp| 5 - lib/librte_eal/bsdapp/eal/eal_pci.c | 6 +++--- lib

[dpdk-dev] [PATCH v2 14/15] eal: Consolidate pci uio functions of linuxapp and bsdapp

2015-03-12 Thread Tetsuya Mukawa
The patch consolidates below functions, and implement these in eal_common_pci_uio.c. - pci_uio_map_secondary() - pci_uio_map_resource() - pci_uio_unmap() - pci_uio_find_resource() - pci_uio_unmap_resource() Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/Makefile

[dpdk-dev] [PATCH v2 13/15] eal: Consolidate pci_map/unmap_resource() of linuxapp and bsdapp

2015-03-12 Thread Tetsuya Mukawa
The patch consolidates below functions, and implemented in common eal code. - pci_map_resource() - pci_unmap_resource() Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c| 24 - lib/librte_eal/common/eal_common_pci.c | 43

[dpdk-dev] [PATCH v2 12/15] eal: Consolidate pci_map/unmap_device() of linuxapp and bsdapp

2015-03-12 Thread Tetsuya Mukawa
The patch consolidates below functions, and implemented in common eal code. - pci_map_device() - pci_unmap_device() Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 12 +++ lib/librte_eal/common/eal_common_pci.c | 57 + lib

[dpdk-dev] [PATCH v2 11/15] eal: Consolidate rte_eal_pci_probe/close_one_driver() of linuxapp and bsdapp

2015-03-12 Thread Tetsuya Mukawa
to linuxapp one with later patch. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c| 79 ++--- lib/librte_eal/common/eal_common_pci.c | 138 + lib/librte_eal/common/eal_private.h| 21 ++--- lib/librte_eal/linuxapp/eal/eal_pci.c | 153

[dpdk-dev] [PATCH v2 10/15] eal: Consolidate pci_map and mapped_pci_resource of linuxapp and bsdapp

2015-03-12 Thread Tetsuya Mukawa
This patch consolidates below structures, and defines them in common code. - struct pci_map - strucy mapped_pci_resouces Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c| 24 lib/librte_eal/common/include/rte_pci.h| 28

[dpdk-dev] [PATCH v2 09/15] eal: Add pci_uio_map_uio_resource_by_index()

2015-03-12 Thread Tetsuya Mukawa
This patch adds a new function called pci_uio_map_resource_by_index(). The function hides how to map uio resource in linuxapp and bsdapp. With the function, pci_uio_map_resource() will be more abstracted. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 108

[dpdk-dev] [PATCH v2 08/15] eal: Add pci_uio_alloc_uio_resource()

2015-03-12 Thread Tetsuya Mukawa
This patch adds a new function called pci_uio_alloc_uio_resource(). The function hides how to prepare uio resource in linuxapp and bsdapp. With the function, pci_uio_map_resource() will be more abstracted. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 61

[dpdk-dev] [PATCH v2 07/15] eal: Fix interface of pci_map_resource() of bsdapp

2015-03-12 Thread Tetsuya Mukawa
The function is implemented in both linuxapp and bsdapp, but interface is different. The patch fixes the function of bsdapp to do same as linuxapp. After applying it, file descriptor should be opened and closed out of pci_map_resource(). Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp

[dpdk-dev] [PATCH v2 06/15] eal: Use map_idx in pci_uio_map_resource() of bsdapp to work same as linuxapp

2015-03-12 Thread Tetsuya Mukawa
This patch changes code that maps pci resources in bsdapp. Linuxapp has almost same code. To consolidate both, fix implementation of bsdapp to work same as linuxapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 24 1 file changed, 12

[dpdk-dev] [PATCH v2 05/15] eal/bsdapp: Change names of pci related data structure

2015-03-12 Thread Tetsuya Mukawa
To merge pci code of linuxapp and bsdapp, this patch changes names like below. - uio_map to pci_map - uio_resource to mapped_pci_resource - uio_res_list to mapped_pci_res_list Also, add 'path' variable to pci_map of bsdapp. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal

[dpdk-dev] [PATCH v2 04/15] eal: Fix needless incrementation of pci_map_addr

2015-03-12 Thread Tetsuya Mukawa
When pci_map_resource() is failed, mapaddr will be MAP_FAILED. In this case, pci_map_addr should not be incremented. The patch fixes it. Also, fix below. - To shrink code, move close(). - Remove fail variable. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 10

[dpdk-dev] [PATCH v2 02/15] eal: Close file descriptor of uio configuration

2015-03-12 Thread Tetsuya Mukawa
When pci_uio_unmap_resource() is called, a file descriptor that is used for uio configuration should be closed. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c b/lib

[dpdk-dev] [PATCH v2 01/15] eal: Fix cording style of eal_pci.c and eal_pci_uio.c

2015-03-12 Thread Tetsuya Mukawa
This patch fixes cording style of below files in linuxapp and bsdapp. - eal_pci.c - eal_pci_uio.c Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/bsdapp/eal/eal_pci.c | 67 ++- lib/librte_eal/linuxapp/eal/eal_pci.c | 32 +-- lib/librte_eal

[dpdk-dev] [PATCH v2 00/15] eal: Port Hotplug support for BSD

2015-03-12 Thread Tetsuya Mukawa
is enabled as default with both Linux and BSD. eal: Enable Port Hotplug as default in Linux and BSD PATCH v2 changes - Consolidate pci uio functions of linuxapp and bsdapp. Tetsuya Mukawa (15): eal: Fix cording style of eal_pci.c and eal_pci_uio.c eal: Close file descriptor of uio

[dpdk-dev] [RFC] af_packet: support port hotplug

2015-03-12 Thread Tetsuya Mukawa
Hi John. On 2015/03/11 3:36, John W. Linville wrote: > This patch adds finalization code to free resources allocated by > the PMD. This is based on earlier patches for other PMDs by Tetsuya > Mukawa , with corrections related to data->name. > > Signed-off-by: John W. Linvi

[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:

[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 &

[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

<    1   2   3   4   5   6   7   8   9   10   >