[dpdk-dev] [PATCH v4 17/17] timer: add support to non-EAL thread

2015-02-12 Thread Liang, Cunming
Hi, > -Original Message- > From: Olivier MATZ [mailto:olivier.matz at 6wind.com] > Sent: Thursday, February 12, 2015 1:22 AM > To: Liang, Cunming; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 17/17] timer: add support to non-EAL thread > > Hi, > > On 02/11/2015 07:25 AM, Liang, Cu

[dpdk-dev] [PATCH v2 0/4] Support NVGRE on i40e

2015-02-12 Thread Jijiang Liu
The patch set supports NVGRE on i40e. It includes: - Support RX filters for NVGRE packet. It uses MAC and VLAN to point to a queue. The filter types supported are listed below: 1. Inner MAC and Inner VLAN ID 2. Inner MAC address, inner VLAN ID and tenant ID. 3. Inner MAC and tenant

[dpdk-dev] [PATCH v2 3/4] app/testpmd:test RX tunnel filter for NVGRE packet

2015-02-12 Thread Jijiang Liu
Extend the "tunnel_filter" command in testpmd to test the RX tunnel filter API for NVGRE packet. Signed-off-by: Jijiang Liu --- app/test-pmd/cmdline.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 9de

[dpdk-dev] [PATCH v2 1/4] librte_ether:add an ETHER_TYPE_TEB macro

2015-02-12 Thread Jijiang Liu
Add an Ethernet type definition for Transparent Ethernet Bridging. Signed-off-by: Jijiang Liu --- lib/librte_ether/rte_ether.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/librte_ether/rte_ether.h b/lib/librte_ether/rte_ether.h index 7e7d22c..a8b3e1d 100644 --- a/

[dpdk-dev] [PATCH v2 2/4] i40e:support RX tunnel filter for NVGRE packet

2015-02-12 Thread Jijiang Liu
The filter types supported are listed below for NVGRE packet: 1. Inner MAC and Inner VLAN ID. 2. Inner MAC address, inner VLAN ID and tenant ID. 3. Inner MAC and tenant ID. 4. Inner MAC address. 5. Outer MAC address, tenant ID and inner MAC address. Signed-off-by: Jijiang Liu -

[dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload

2015-02-12 Thread Jijiang Liu
Enhance csum fwd engine based on current TX checksum framework in order to test TX Checksum offload for NVGRE packet. It includes: - IPv4 and IPv6 packet - outer L3, inner L3 and L4 checksum offload for Tx side. Signed-off-by: Jijiang Liu --- app/test-pmd/csumonly.c | 32 ++

[dpdk-dev] [PATCH v4 17/26] virtio: Use port IO to get PCI resource.

2015-02-12 Thread Ouyang, Changchun
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Wednesday, February 11, 2015 10:16 PM > To: Stephen Hemminger > Cc: dev at dpdk.org; Vincent JARDIN; Ouyang, Changchun > Subject: Re: [dpdk-dev] [PATCH v4 17/26] virtio: Use port IO to get PCI > res

[dpdk-dev] [PATCH v7 04/14] eal/pci: Consolidate pci address comparison APIs

2015-02-12 Thread Tetsuya Mukawa
On 2015/02/11 21:13, Qiu, Michael wrote: > On 2/11/2015 4:14 PM, Tetsuya Mukawa wrote: >> On 2015/02/11 15:29, Qiu, Michael wrote: >>> On 2/11/2015 12:57 PM, Tetsuya Mukawa wrote: On 2015/02/11 13:53, Tetsuya Mukawa wrote: > On 2015/02/11 12:27, Qiu, Michael wrote: >> On 2/10/2015 11:1

[dpdk-dev] [PATCH] ixgbe: fix ixgbe PCI access endian issue

2015-02-12 Thread xuelin....@freescale.com
From: Xuelin Shi ixgbe is little endian, but cpu maybe not. add necessary conversions. rte_cpu_to_le_32(...) for PCI write rte_le_to_cpu_32(...) for PCI read. Signed-off-by: Xuelin Shi --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[dpdk-dev] [PATCH] e1000: fix e1000 PCI access endian issue.

2015-02-12 Thread xuelin....@freescale.com
From: Xuelin Shi e1000 is little endian, but cpu maybe not. add necessary conversions. rte_cpu_to_le_32(...) for PCI write rte_le_to_cpu_32(...) for PCI read. Signed-off-by: Xuelin Shi --- lib/librte_pmd_e1000/e1000/e1000_osdep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) dif

[dpdk-dev] [PATCH v7 1/2] librte_pmd_null: Add Null PMD

2015-02-12 Thread Tetsuya Mukawa
Null PMD is a driver of the virtual device particularly designed to measure performance of DPDK PMDs. When an application call rx, Null PMD just allocates mbufs and returns those. Also tx, the PMD just frees mbufs. The PMD has following options. - size: specify packe size allocated by RX. Default

[dpdk-dev] [PATCH v7 2/2] librte_pmd_null: Support port hotplug function

2015-02-12 Thread Tetsuya Mukawa
This patch adds port hotplug support to Null PMD. v7: - Add parameter checkings. (Thanks to Iremonger, Bernard) v6: - Fix a parameter of rte_eth_dev_free(). v4: - Fix commit title. Signed-off-by: Tetsuya Mukawa --- lib/librte_pmd_null/rte_eth_null.c | 35 ++

[dpdk-dev] [PATCH v4 10/15] fm10k: add receive and tranmit function

2015-02-12 Thread Chen, Jing D
> -Original Message- > From: Shaw, Jeffrey B > Sent: Thursday, February 12, 2015 1:29 AM > To: Chen, Jing D > Cc: dev at dpdk.org; Zhang, Helin; Qiu, Michael; nhorman at tuxdriver.com; > thomas.monjalon at 6wind.com; david.marchand at 6wind.com > Subject: Re: [PATCH v4 10/15] fm10k: add r

[dpdk-dev] [PATCH v4 12/15] fm10k: Add scatter receive function

2015-02-12 Thread Chen, Jing D
> -Original Message- > From: Shaw, Jeffrey B > Sent: Thursday, February 12, 2015 1:33 AM > To: Chen, Jing D > Cc: dev at dpdk.org; Zhang, Helin; Qiu, Michael; nhorman at tuxdriver.com; > thomas.monjalon at 6wind.com; david.marchand at 6wind.com > Subject: Re: [PATCH v4 12/15] fm10k: Add s

[dpdk-dev] [PATCH v2 00/11] qemu vhost-user support

2015-02-12 Thread Huawei Xie
vhost-user supports passing vring information to a seperate vhost enabled user space process, normally a user space vSwitch, through unix domain socket. In previous DPDK version, we implement a user space character device driver vhost-cuse in user space DPDK process. vring information is passed to

[dpdk-dev] [PATCH v2 03/11] lib/librte_vhost: rename vhost-net-cdev.h to vhost-net.h

2015-02-12 Thread Huawei Xie
This file defines common operations provided by virtio-net(.c). Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.h| 113 --- lib/librte_vhost/vhost-net.h | 113 +++ lib/librte_vhost/vhost_cuse/vhost-net-cdev

[dpdk-dev] [PATCH v2 04/11] lib/librte_vhost: move fd copying(from qemu process into vhost process) to eventfd_copy.c

2015-02-12 Thread Huawei Xie
vhost-user doesn't need eventfd kernel module to copy fds between processes. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile| 2 +- lib/librte_vhost/vhost_cuse/eventfd_copy.c | 88 lib/librte_vhost/vhost_cuse/eventfd_copy.h | 39

[dpdk-dev] [PATCH v2 07/11] lib/librte_vhost: implement cuse_set_memory_table

2015-02-12 Thread Huawei Xie
remove set_memory_table ops vhost-cuse or vhost-user will both implement their own set_memory_region handler. In current vhost-cuse implementation, guest numa memory isn't supported. Assume that guest memory is backed by only one file. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Huawei Xie
In rte_vhost_driver_register(), vhost unix domain socket listener fd is created and added to polled(based on select) fdset. In rte_vhost_driver_session_start(), fds in the fdset are checked for processing. If there is new connection from qemu, connection fd accepted is added to polled fdset. The l

[dpdk-dev] [PATCH v2 05/11] lib/librte_vhost: copy host_memory_map from virtio-net.c to a new file virtio-net-cdev.c

2015-02-12 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 257 ++ 1 file changed, 257 insertions(+) create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c b/lib/librte_vhost/vhost_c

[dpdk-dev] [PATCH v2 11/11] lib/librte_vhost: support dynamically registering vhost server

2015-02-12 Thread Huawei Xie
* support calling rte_vhost_driver_register after rte_vhost_driver_session_start * add mutext to protect fdset from concurrent access * add busy flag in fdentry. this flag is set before cb and cleared after cb is finished. mutex lock scenario in vhost: * event_dispatch(in rte_vhost_driver_sessio

[dpdk-dev] [PATCH v2 08/11] lib/librte_vhost: add select based event driven processing

2015-02-12 Thread Huawei Xie
for more generic event driven processing, refer to: http://libevent.org/ Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/fd_man.c | 207 +++ lib/librte_vhost/vhost_user/fd_man.h | 64 +++ 2 files changed, 271 insertions(+) create mode

[dpdk-dev] [PATCH v2 02/11] lib/librte_vhost: create vhost_cuse directory and move vhost-net-cdev.c into vhost_cuse

2015-02-12 Thread Huawei Xie
vhost-cuse driver will be divided into two parts: cuse driver specific message handling(in cuse directory) and common message handling(in virtio-net.c). vhost ioctl message is pre-processed in cuse and then sent to virtio-net if is not terminated. virtio-net.c provides common message handling for

[dpdk-dev] [PATCH v2 10/11] lib/librte_vhost: support dev->ifname for vhost-user

2015-02-12 Thread Huawei Xie
for vhost-cuse, ifname is the name of the tap device for vhost-user, ifname is the name of the unix domain socket path Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 3 +- lib/librte_vhost/vhost-net.h | 3 ++ lib/librte_vhost/vhost_cuse/vhost-net

[dpdk-dev] [PATCH v2 01/11] lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver in guest would crash with only CTRL

2015-02-12 Thread Huawei Xie
In virtnet_send_command: /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) || (out + in > VIRTNET_SEND_COMMAND_SG_MAX)); Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 3 ++- 1 file changed, 2 insertions(+),

[dpdk-dev] [PATCH v2 06/11] lib/librte_vhost: make host_memory_map a more generic function.

2015-02-12 Thread Huawei Xie
This functions accepts a virtual address and pid(qemu), and maps it into current process(vhost)'s address space. The memory behind the virtual address should be backed by a file, and virtual address should be the starting address. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio

[dpdk-dev] [PATCH v2 00/11] qemu vhost-user support

2015-02-12 Thread Xie, Huawei
Sorry, forget to add --in-reply-to and add v2 changes. v2 changes: * vhost-cuse and vhost-user have their own set_mem_table message handler. * rework and refine mutex operation in fd management to avoid race condition * increase listen backlog * use memset to fix initialization compiler errors rep

[dpdk-dev] [PATCH v4 0/5] New Reorder Library

2015-02-12 Thread Neil Horman
On Wed, Feb 11, 2015 at 01:07:30PM +, Sergio Gonzalez Monroy wrote: > This series introduces the new reorder library along with unit tests, > sample app and a new entry in the programmers guide describing the library. > > The library provides reordering of mbufs based on their sequence number.

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-12 Thread Neil Horman
On Wed, Feb 11, 2015 at 11:11:13AM +, Gonzalez Monroy, Sergio wrote: > > From: Neil Horman [mailto:nhorman at tuxdriver.com] > > Sent: Friday, January 30, 2015 6:13 PM > > To: Gonzalez Monroy, Sergio > > Cc: Thomas Monjalon; dev at dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 0/8] Improve build

[dpdk-dev] [PATCH v2 0/6] Integrate syn filter in igb/ixgbe driver to new API

2015-02-12 Thread Wu, Jingjing
Because the first version of the patch is sent by Zhida, and he is on a long vacation now, I have no right to change the old patch's status in patch work. Sorry for the inconvenience. Thanks Jingjing > -Original Message- > From: Wu, Jingjing > Sent: Wednesday, February 11, 2015 3:52 PM

[dpdk-dev] [PATCH v2] eal_pci: Fix max_vfs missing for none igb_uio driver

2015-02-12 Thread David Marchand
On Wed, Feb 11, 2015 at 2:25 PM, Michael Qiu wrote: > max_vfs will only be created by igb_uio driver, for other > drivers like vfio or pci_uio_generic, max_vfs will miss. > > But sriov_numvfs is not driver related, just get the vf numbers > from that field. > > Signed-off-by: Michael Qiu > --- >

[dpdk-dev] [PATCH v5 00/19] support multi-pthread per core

2015-02-12 Thread Cunming Liang
v5 changes: reorder some patch and split into addtional two patches rte_thread_get_affinity() return type change to avoid add RTE_RING_PAUSE_REP into config and by default turn off v4 changes: new patch fixing strnlen() invalid return in 32bit icc [03/17] update and add more comments on

[dpdk-dev] [PATCH v5 01/19] eal: add cpuset into per EAL thread lcore_config

2015-02-12 Thread Cunming Liang
The patch adds 'cpuset' into per-lcore configure 'lcore_config[]', as the lcore no longer always 1:1 pinning with physical cpu. The lcore now stands for a EAL thread rather than a logical cpu. It doesn't change the default behavior of 1:1 mapping, but allows to affinity the EAL thread to multiple

[dpdk-dev] [PATCH v5 02/19] eal: fix PAGE_SIZE redefine complaint on freebsd

2015-02-12 Thread Cunming Liang
Signed-off-by: Cunming Liang --- lib/librte_eal/bsdapp/eal/eal_memory.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal_memory.c b/lib/librte_eal/bsdapp/eal/eal_memory.c index 65ee87d..33ebd0f 100644 --- a/lib/librte_eal/bsdapp/eal/eal_m

[dpdk-dev] [PATCH v5 03/19] eal: new eal option '--lcores' for cpu assignment

2015-02-12 Thread Cunming Liang
It supports one new eal long option '--lcores' for EAL thread cpuset assignment. The format pattern: --lcores='lcores[@cpus]<,lcores[@cpus]>' lcores, cpus could be a single digit/range or a group. '(' and ')' are necessary if it's a group. If not supply '@cpus', the value of cpus uses the

[dpdk-dev] [PATCH v5 04/19] eal: fix wrong strnlen() return value in 32bit icc

2015-02-12 Thread Cunming Liang
The problem is that strnlen() here may return invalid value with 32bit icc. (actually it returns it?s second parameter,e.g: sysconf(_SC_ARG_MAX)). It starts to manifest hwen max_len parameter is > 2M and using icc ?m32 ?O2 (or above). Suggested-by: Konstantin Ananyev Signed-off-by: Cunming Liang

[dpdk-dev] [PATCH v5 05/19] eal: add support parsing socket_id from cpuset

2015-02-12 Thread Cunming Liang
It returns the socket_id if all cpus in the cpuset belongs to the same NUMA node, otherwise it will return SOCKET_ID_ANY. Signed-off-by: Cunming Liang --- v5 changes: expose cpu_socket_id as eal_cpu_socket_id for linuxapp eal_cpuset_socket_id() remove static inline and move to c file lib

[dpdk-dev] [PATCH v5 06/19] eal: new TLS definition and API declaration

2015-02-12 Thread Cunming Liang
1. add two TLS *_socket_id* and *_cpuset* 2. add two external API rte_thread_set/get_affinity 3. add one internal API eal_thread_dump_affinity Signed-off-by: Cunming Liang --- v5 changes: add comments for RTE_CPU_AFFINITY_STR_LEN update comments for eal_thread_dump_affinity() return voi

[dpdk-dev] [PATCH v5 07/19] eal: add eal_common_thread.c for common thread API

2015-02-12 Thread Cunming Liang
The API works for both EAL thread and none EAL thread. When calling rte_thread_set_affinity, the *_socket_id* and *_cpuset* of calling thread will be updated if the thread successful set the cpu affinity. Signed-off-by: Cunming Liang --- v5 changes: refine code of rte_thread_set_affinity()

[dpdk-dev] [PATCH v5 08/19] eal: standardize init sequence between linux and bsd

2015-02-12 Thread Cunming Liang
Signed-off-by: Cunming Liang --- lib/librte_eal/bsdapp/eal/eal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 69f3c03..cb11b5c 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsda

[dpdk-dev] [PATCH v5 09/19] eal: add rte_gettid() to acquire unique system tid

2015-02-12 Thread Cunming Liang
The rte_gettid() wraps the linux and freebsd syscall gettid(). It provides a persistent unique thread id for the calling thread. It will save the unique id in TLS on the first time. Signed-off-by: Cunming Liang --- lib/librte_eal/bsdapp/eal/eal_thread.c | 9 + lib/librte_eal/common/in

[dpdk-dev] [PATCH v5 10/19] eal: apply affinity of EAL thread by assigned cpuset

2015-02-12 Thread Cunming Liang
EAL threads use assigned cpuset to set core affinity during startup. It keeps 1:1 mapping, if no '--lcores' option is used. Signed-off-by: Cunming Liang --- v5 changes: add return check for dump_affinity call rte_thread_set_affinity() directly during EAL thread set lib/librte_eal/bsdapp/

[dpdk-dev] [PATCH v5 11/19] enic: fix re-define freebsd compile complain

2015-02-12 Thread Cunming Liang
Some macro already been defined by freebsd 'sys/param.h'. Signed-off-by: Cunming Liang --- v5 changes: rename the redefined MACRO instead of undefine them lib/librte_pmd_enic/enic.h | 4 ++-- lib/librte_pmd_enic/enic_compat.h | 2 +- lib/librte_pmd_enic/vnic/vnic_dev.c | 6 +++---

[dpdk-dev] [PATCH v5 13/19] log: fix the gap to support non-EAL thread

2015-02-12 Thread Cunming Liang
For those non-EAL thread, *_lcore_id* is invalid and probably larger than RTE_MAX_LCORE. The patch adds the check and allows only EAL thread using EAL per thread log level and log type. Others shares the global log level. Signed-off-by: Cunming Liang --- lib/librte_eal/common/eal_common_log.c

[dpdk-dev] [PATCH v5 12/19] malloc: fix the issue of SOCKET_ID_ANY

2015-02-12 Thread Cunming Liang
Add check for rte_socket_id(), avoid get unexpected return like (-1). Signed-off-by: Cunming Liang --- lib/librte_malloc/malloc_heap.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/librte_malloc/malloc_heap.h b/lib/librte_malloc/malloc_heap.h index b4aec45..a47136

[dpdk-dev] [PATCH v5 14/19] eal: set _lcore_id and _socket_id to (-1) by default

2015-02-12 Thread Cunming Liang
For those none EAL thread, *_lcore_id* shall always be LCORE_ID_ANY. The libraries using *_lcore_id* as index need to take care. *_socket_id* always be SOCKET_ID_ANY unitl the thread changes the affinity by rte_thread_set_affinity() Signed-off-by: Cunming Liang --- v5 changes: define LCORE_I

[dpdk-dev] [PATCH v5 16/19] mempool: add support to non-EAL thread

2015-02-12 Thread Cunming Liang
For non-EAL thread, bypass per lcore cache, directly use ring pool. It allows using rte_mempool in either EAL thread or any user pthread. As in non-EAL thread, it directly rely on rte_ring and it's none preemptive. It doesn't suggest to run multi-pthread/cpu which compete the rte_mempool. It will g

[dpdk-dev] [PATCH v5 15/19] eal: fix recursive spinlock in non-EAL thraed

2015-02-12 Thread Cunming Liang
In non-EAL thread, lcore_id alrways be LCORE_ID_ANY. It cann't be used as unique id for recursive spinlock. Then use rte_gettid() to replace it. Signed-off-by: Cunming Liang --- lib/librte_eal/common/include/generic/rte_spinlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

[dpdk-dev] [PATCH v5 17/19] ring: add support to non-EAL thread

2015-02-12 Thread Cunming Liang
ring debug stat won't take care non-EAL thread. Signed-off-by: Cunming Liang --- v5 changes: check __lcore_id with LCORE_ID_ANY instead of RTE_MAX_LCORE lib/librte_ring/rte_ring.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib

[dpdk-dev] [PATCH v5 18/19] ring: add sched_yield to avoid spin forever

2015-02-12 Thread Cunming Liang
Add a sched_yield() syscall if the thread spins for too long, waiting other thread to finish its operations on the ring. That gives pre-empted thread a chance to proceed and finish with ring enqnue/dequeue operation. The purpose is to reduce contention on the ring. By ring_perf_test, it doesn't

[dpdk-dev] [PATCH v5 19/19] timer: add support to non-EAL thread

2015-02-12 Thread Cunming Liang
Allow to setup timers only for EAL (lcore) threads (__lcore_id < MAX_LCORE_ID). E.g. ? dynamically created thread will be able to reset/stop timer for lcore thread, but it will be not allowed to setup timer for itself or another non-lcore thread. rte_timer_manage() for non-lcore thread would simp

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Linhaifeng
On 2015/2/12 13:07, Huawei Xie wrote: > + > + /* This is ugly */ > + mapped_size = memory.regions[idx].memory_size + > + memory.regions[idx].mmap_offset; > + mapped_address = (uint64_t)(uintptr_t)mmap(NULL, > + mapped_siz

[dpdk-dev] Previous DPDK version API documentation for app developers

2015-02-12 Thread Panu Matilainen
On 02/12/2015 09:06 AM, Matthew Hall wrote: > Hi all, > > I ran into a funny situation today with the API documentation. > > For stability until I can get my app mostly working, I was using DPDK 1.7.X, > so I could concentrate on making the app reliable. But the DPDK website only > has the API docs

[dpdk-dev] [PATCH v1] afpacket: fix critical issue reported by klocwork

2015-02-12 Thread Cunming Liang
Klocwork report 'req' might be used uninitialized. In some cases it can 'goto error' when '*internals' not been set. The result is unexpected checking the value of '*internals'. Signed-off-by: Cunming Liang --- lib/librte_pmd_af_packet/rte_eth_af_packet.c | 4 +++- 1 file changed, 3 insertions(+

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-12 Thread Gonzalez Monroy, Sergio
On 12/02/2015 05:41, Neil Horman wrote: > On Wed, Feb 11, 2015 at 11:11:13AM +, Gonzalez Monroy, Sergio wrote: >>> From: Neil Horman [mailto:nhorman at tuxdriver.com] >>> Sent: Friday, January 30, 2015 6:13 PM >>> To: Gonzalez Monroy, Sergio >>> Cc: Thomas Monjalon; dev at dpdk.org >>> Subject:

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-12 Thread Panu Matilainen
On 02/11/2015 01:11 PM, Gonzalez Monroy, Sergio wrote: >> From: Neil Horman [mailto:nhorman at tuxdriver.com] >> Sent: Friday, January 30, 2015 6:13 PM >> To: Gonzalez Monroy, Sergio >> Cc: Thomas Monjalon; dev at dpdk.org >> Subject: Re: [dpdk-dev] [PATCH 0/8] Improve build process >> >> On Fri, J

[dpdk-dev] [PATCH] Adding RTE_KNI_PREEMPT configuration option

2015-02-12 Thread Marc Sune
On 11/02/15 15:27, Bruce Richardson wrote: > On Wed, Feb 11, 2015 at 01:26:41PM +0100, Marc Sune wrote: >> On 11/02/15 02:54, Zhang, Helin wrote: -Original Message- From: Richardson, Bruce Sent: Tuesday, February 10, 2015 9:24 PM To: Marc Sune Cc: dev at dpdk.org;

[dpdk-dev] Previous DPDK version API documentation for app developers

2015-02-12 Thread Thomas Monjalon
Hi Matthew, 2015-02-11 23:06, Matthew Hall: > Hi all, > > I ran into a funny situation today with the API documentation. > > For stability until I can get my app mostly working, I was using DPDK 1.7.X, > so I could concentrate on making the app reliable. But the DPDK website only > has the API

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Xie, Huawei
On 2/12/2015 4:28 PM, Linhaifeng wrote: > > On 2015/2/12 13:07, Huawei Xie wrote: >> + >> +/* This is ugly */ >> +mapped_size = memory.regions[idx].memory_size + >> +memory.regions[idx].mmap_offset; >> +mapped_address = (uint64_t)(uintptr_t)mm

[dpdk-dev] Previous DPDK version API documentation for app developers

2015-02-12 Thread Thomas Monjalon
2015-02-12 11:03, Panu Matilainen: > On 02/12/2015 09:06 AM, Matthew Hall wrote: > > Hi all, > > > > I ran into a funny situation today with the API documentation. > > > > For stability until I can get my app mostly working, I was using DPDK 1.7.X, > > so I could concentrate on making the app relia

[dpdk-dev] Previous DPDK version API documentation for app developers

2015-02-12 Thread Panu Matilainen
On 02/12/2015 11:39 AM, Thomas Monjalon wrote: > 2015-02-12 11:03, Panu Matilainen: >> On 02/12/2015 09:06 AM, Matthew Hall wrote: >>> Hi all, >>> >>> I ran into a funny situation today with the API documentation. >>> >>> For stability until I can get my app mostly working, I was using DPDK 1.7.X,

[dpdk-dev] [PATCH v2 3/5] igb: enable rx queue interrupts for PF

2015-02-12 Thread Liang, Cunming
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zhou Danny > Sent: Tuesday, February 03, 2015 4:18 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH v2 3/5] igb: enable rx queue interrupts for PF > > v2 changes > - Consolidate review comments related to

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-12 Thread Gonzalez Monroy, Sergio
On 12/02/2015 09:22, Panu Matilainen wrote: > On 02/11/2015 01:11 PM, Gonzalez Monroy, Sergio wrote: >>> From: Neil Horman [mailto:nhorman at tuxdriver.com] >>> Sent: Friday, January 30, 2015 6:13 PM >>> To: Gonzalez Monroy, Sergio >>> Cc: Thomas Monjalon; dev at dpdk.org >>> Subject: Re: [dpdk-dev

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Linhaifeng
On 2015/2/12 17:28, Xie, Huawei wrote: > On 2/12/2015 4:28 PM, Linhaifeng wrote: >> >> On 2015/2/12 13:07, Huawei Xie wrote: >>> + >>> + /* This is ugly */ >>> + mapped_size = memory.regions[idx].memory_size + >>> + memory.regions[idx].mmap_offset; >>> +

[dpdk-dev] [PATCH v2 3/5] igb: enable rx queue interrupts for PF

2015-02-12 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Liang, Cunming > Sent: Thursday, February 12, 2015 10:01 AM > To: Zhou, Danny; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 3/5] igb: enable rx queue interrupts for PF > > > > > -Original Message-

[dpdk-dev] CPU utilization without the time spent for polling the Ethernet

2015-02-12 Thread Ilan Borenshtein
Hello, I would like to measure the CPU utilization without the time spent for polling the Ethernet. Doe's DPDK supports this in any way ? Thanks, Ilan B

[dpdk-dev] CPU utilization without the time spent for polling the Ethernet

2015-02-12 Thread De Lara Guarch, Pablo
Hi Ilan, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ilan Borenshtein > Sent: Thursday, February 12, 2015 10:34 AM > To: dev at dpdk.org > Subject: [dpdk-dev] CPU utilization without the time spent for polling the > Ethernet > > Hello, > > I would like

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Panu Matilainen
This adds new CONFIG_RTE_ERROR_ON_WARNING config option to enable fail-on-warning compile behavior, defaulting to off. Failing build on warnings is a useful developer tool but its bad for release tarballs which can and do get built with newer compilers than what was used/available during developme

[dpdk-dev] [PATCH v5 18/19] ring: add sched_yield to avoid spin forever

2015-02-12 Thread Olivier MATZ
Hi, On 02/12/2015 09:16 AM, Cunming Liang wrote: > Add a sched_yield() syscall if the thread spins for too long, waiting other > thread to finish its operations on the ring. > That gives pre-empted thread a chance to proceed and finish with ring > enqnue/dequeue operation. > The purpose is to re

[dpdk-dev] [PATCH] librte_lpm: use field access instead of type conversion.

2015-02-12 Thread Bruce Richardson
On Wed, Feb 11, 2015 at 02:12:59PM +0800, xuelin.shi at freescale.com wrote: > From: Xuelin Shi > > struct tbl_entry{ > uint8_t next_hop; > uint8_t valid :1; > uint8_t valid_group :1; > uint8_t depth :6 > } > uint16_t tbl = (uint16_t)tbl_entry; > next_hop = (uint8_

[dpdk-dev] [PATCH] i40e: fix the issue reported by klocwork

2015-02-12 Thread Jingjing Wu
Klocwork reports array 'src_offset' may use index 16. In function i40e_srcoff_to_flx_pit, index j + 1 can reach I40E_FDIR_MAX_FLEX_LEN. This patch fixes this issue to avoid array bound. Signed-off-by: Jingjing Wu --- lib/librte_pmd_i40e/i40e_fdir.c | 35 +-- 1 fi

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-12 Thread Bruce Richardson
On Thu, Feb 12, 2015 at 01:13:22PM +0200, Panu Matilainen wrote: > This adds new CONFIG_RTE_ERROR_ON_WARNING config option to enable > fail-on-warning compile behavior, defaulting to off. > > Failing build on warnings is a useful developer tool but its bad > for release tarballs which can and do g

[dpdk-dev] [PATCH v3 2/3] test: Unit tests for mode 4

2015-02-12 Thread Declan Doherty
On 29/01/15 08:51, Tomasz Kulasek wrote: > This patch adds unit tests for mode 4. It is split into separate > file to avoid problems with other modes that does not need to > look into packets payload. > This patch includes also a modification of maximum number of ports > used in their tests for bon

[dpdk-dev] [PATCH v3] mk: Link test app against librte_pmd_ring when needed

2015-02-12 Thread Declan Doherty
On 29/01/15 08:51, Tomasz Kulasek wrote: > This patch links test application against librte_pmd_ring.so for shared > libraries. It's required as long as librte_pmd_ring provides some aditional > routines used for configuration and testing purposes and must be > "hard-linked". > > Signed-off-by: Tom

[dpdk-dev] [PATCH v4 0/5] New Reorder Library

2015-02-12 Thread Declan Doherty
On 11/02/15 13:07, Sergio Gonzalez Monroy wrote: > This series introduces the new reorder library along with unit tests, > sample app and a new entry in the programmers guide describing the library. > > The library provides reordering of mbufs based on their sequence number. > > As mention in the p

[dpdk-dev] [PATCH 00/36] Update IXGBE base codes

2015-02-12 Thread Ouyang Changchun
This patch set update IXGBE base codes to the version of cid-10g-shared-code.2015.02.03. and this patch set add 2 new device id as following: #define IXGBE_DEV_ID_X550EM_X_10G_T0x15AD #define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE Changchun Ouyang (36): ixgbe base codes: Code

[dpdk-dev] [PATCH 02/36] ixgbe base codes: Debug output macro

2015-02-12 Thread Ouyang Changchun
Use DEBUGOUT to replace ERROR_REPORT1. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c index 1f536e1..

[dpdk-dev] [PATCH 01/36] ixgbe base codes: Code cleanup and minor changes

2015-02-12 Thread Ouyang Changchun
Remove '&' before function name; Adjust the spaces etc. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 55 +++--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 105 +-- lib

[dpdk-dev] [PATCH 03/36] ixgbe base codes: Fix bus type issue

2015-02-12 Thread Ouyang Changchun
It needs check if the bus type is the unknown type or not. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c in

[dpdk-dev] [PATCH 04/36] ixgbe base codes: Fix link speed issue

2015-02-12 Thread Ouyang Changchun
Remove unnecessary '|' for the link speed. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index 540b477..76e

[dpdk-dev] [PATCH 06/36] ixgbe base codes: Update the CS address

2015-02-12 Thread Ouyang Changchun
Update the adress of IXGBE_CS4227. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h b/lib/librte_pmd_ixgbe/ixg

[dpdk-dev] [PATCH 05/36] ixgbe base codes: Fix early return

2015-02-12 Thread Ouyang Changchun
It could early return according to read status. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c index 76e9a32..84ab8b7 100644 --- a

[dpdk-dev] [PATCH 10/36] ixgbe base codes: Get host interface command status

2015-02-12 Thread Ouyang Changchun
Add new function ixgbe_get_hi_status to get host interface command status. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 30 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 + 2 files changed, 31 insertions(+) diff --git a/lib/libr

[dpdk-dev] [PATCH 08/36] ixgbe base codes: Set phy power

2015-02-12 Thread Ouyang Changchun
Define the function of setting phy power; Set copper phy power for x540. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 30 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd

[dpdk-dev] [PATCH 12/36] ixgbe base codes: Refine struct for physical information

2015-02-12 Thread Ouyang Changchun
Remove lan_id from struct ixgbe_phy_info. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 4 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 66 ---

[dpdk-dev] [PATCH 14/36] ixgbe base codes: Use IOMEM

2015-02-12 Thread Ouyang Changchun
Use IOMEM for hw addr. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 2 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_

[dpdk-dev] [PATCH 07/36] ixgbe base codes: Extract function for management capability

2015-02-12 Thread Ouyang Changchun
Define function ixgbe_mng_present to check if management capability is present or not. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 16 lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 + 2 files changed, 17 insertions(+) diff --git a/lib/librt

[dpdk-dev] [PATCH 09/36] ixgbe base codes: Use mng present function

2015-02-12 Thread Ouyang Changchun
82599 use mng present to check if MNG FW could be enabled. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c b/lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c

[dpdk-dev] [PATCH 11/36] ixgbe base codes: Refine function for host interface command

2015-02-12 Thread Ouyang Changchun
Add timeout as new argument in host interface command. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 13 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 5 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.

[dpdk-dev] [PATCH 13/36] ixgbe base codes: Clear Tx pending

2015-02-12 Thread Ouyang Changchun
Wait for a last completion before clearing buffers, and before proceeding, it needs make sure that the PCIe block does not have transactions pending. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 22 +- 1 file changed, 21 insertions(+), 1 del

[dpdk-dev] [PATCH 15/36] ixgbe base codes: Update macros

2015-02-12 Thread Ouyang Changchun
Update macros in ixgbe_type header files. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 59 + 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h b/lib/librte_pmd_ixgbe/ixgbe/ixgbe

[dpdk-dev] [PATCH 16/36] ixgbe base codes: New phy ID

2015-02-12 Thread Ouyang Changchun
Add new phy ID: X557_PHY_ID, and implement its internal setup function and external init function. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 3 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 10 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 204 +++

[dpdk-dev] [PATCH 20/36] ixgbe base codes: API for setup internal phy

2015-02-12 Thread Ouyang Changchun
New API for setup internal phy. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 14 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 15 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c b/lib/librte_pmd_ixgbe/ixgbe/ixgb

[dpdk-dev] [PATCH 24/36] ixgbe base codes: Support 5G link speed

2015-02-12 Thread Ouyang Changchun
Support 5G link speed for X550. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 4 lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c| 15 +++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --gi

[dpdk-dev] [PATCH 25/36] ixgbe base codes: Refine branch statement

2015-02-12 Thread Ouyang Changchun
Use switch-case statement to replace if-else statement. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd_ixgbe/ixgbe/ixgb

[dpdk-dev] [PATCH 26/36] ixgbe base codes: SFP probe

2015-02-12 Thread Ouyang Changchun
Check if SFP is detected or not. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 18 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 4 2 files changed, 22 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c b/lib/librte_pmd_ixgbe/ix

[dpdk-dev] [PATCH 17/36] ixgbe base codes: Get bus info

2015-02-12 Thread Ouyang Changchun
New function to get bus information for x550em; Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 23 +-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 1 + 3 files changed, 23 insertions(+), 2 deletions

[dpdk-dev] [PATCH 18/36] ixgbe base codes: Restructure host interface command

2015-02-12 Thread Ouyang Changchun
Request and response command have different struct. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 22 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 34 - 2 files changed, 34 insertions(+), 22 deletions(-) diff --g

[dpdk-dev] [PATCH 19/36] ixgbe base codes: Fix mac type issue

2015-02-12 Thread Ouyang Changchun
It needs '>=' rather than '=='. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c| 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c b/lib/librte_pmd

[dpdk-dev] [PATCH 21/36] ixgbe base codes: API for set phy power

2015-02-12 Thread Ouyang Changchun
New API to control the phy power state. Signed-off-by: Changchun Ouyang --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 11 +++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 12 insertions(+) diff --git a/lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c b/lib/librte_pmd_ixgbe/ixgbe

  1   2   >