[dpdk-dev] [PATCH] virtio: avoid avail ring entry index update if equal

2016-04-27 Thread Yuanhan Liu
On Wed, Apr 27, 2016 at 04:53:58AM -0400, Huawei Xie wrote: > Avail ring is updated by the frontend and consumed by the backend. > There are frequent core to core cache transfers for the avail ring. > > This optmization avoids avail ring entry index update if the entry > already holds the same val

[dpdk-dev] [PATCH 0/7] vhost/example cleanup/fix

2016-04-27 Thread Yuanhan Liu
On Thu, Apr 28, 2016 at 05:45:16AM +, Wang, Zhihong wrote: > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > > Sent: Tuesday, April 26, 2016 12:46 PM > > To: dev at dpdk.org > > Cc: Xie, Huawei ; Yuanhan Liu > > > > Subject: [dpdk-dev]

[dpdk-dev] [PATCH] virtio: fix memory leak of virtqueue memzones

2016-04-27 Thread Yuanhan Liu
On Thu, Apr 28, 2016 at 10:01:06AM +0800, Tan, Jianfeng wrote: > >>+ > >>+ snprintf(vq_name, sizeof(vq_name), "port%d_%s%d", > >>+dev->data->port_id, queue_names[queue_type], queue_idx); > >>+ vq = rte_zmalloc(vq_name, sizeof(struct virtqueue) + > >>+vq_size * si

[dpdk-dev] [PATCH] eal/linux: fix undefined allocation of 0 bytes (CERT MEM04-C; CWE-131)

2016-04-27 Thread Daniel Mrzyglod
Fix issue reported by clang scan-build there is a chance that nr_hugepages will be 0 if conditions for loop for (i = 0; i < (int) internal_config.num_hugepage_sizes; i++) will be unmeet. Fixes: b6a468ad41d5 ("memory: add --socket-mem option") Signed-off-by: Daniel Mrzyglod --- lib/librte_eal/l

[dpdk-dev] [PATCH] eal: remove useless internal function from memcpy headers

2016-04-27 Thread Thomas Monjalon
2016-04-20 11:07, David Marchand: > On Tue, Apr 19, 2016 at 10:47 PM, Thomas Monjalon > wrote: > > The function rte_memcpy_func() is used in ARM and PPC implementations > > of rte_memcpy(). > > There are some useless copies in Tile and some ARM branches. > > It was also declared without doxygen co

[dpdk-dev] [PATCH] examples/performance-thread: fix segfault with in gcc 5.x

2016-04-27 Thread Thomas Monjalon
2016-04-26 17:47, Tomasz Kulasek: > It seems that with gcc >5.x and -O2/-O3 optimization breaks packet grouping > algorithm in l3fwd-thread application causing segfault. > > When last packet pointer "lp" and "pnum->u64" buffer points the same > memory buffer, high optimization can cause unpredicta

[dpdk-dev] [PATCH v2 0/3] improve i40e vpmd

2016-04-27 Thread Bruce Richardson
On Sun, Apr 17, 2016 at 04:32:10PM +0800, Zhe Tao wrote: > On Thu, Apr 14, 2016 at 05:02:34PM +0100, Bruce Richardson wrote: > > This patchset improves the performance of the i40e SSE pmd by removing > > operations that triggered CPU stalls. It also shortens the code and > > cleans it up a little.

[dpdk-dev] [PATCH] examples/performance-thread: fix size of destination port ids in l3fwd-thread

2016-04-27 Thread Thomas Monjalon
2016-04-20 16:45, Tomasz Kulasek: > This patch uses similar approach for fix, like in commit 8353a36a9b4b > ("examples/l3fwd: fix size of destination port ids"), restoring 16 bit size > for destination port ids and doing necessary conversion from 32 to 16 bit > after lpm_lookupx4. > > Also fixes w

[dpdk-dev] [PATCH] i40e: Remove redundant fdir forward declarations.

2016-04-27 Thread Bruce Richardson
On Wed, Apr 27, 2016 at 02:51:55AM +, Zhang, Helin wrote: > > > > -Original Message- > > From: Rosen, Rami > > Sent: Saturday, March 26, 2016 9:32 AM > > To: Zhang, Helin > > Cc: dev at dpdk.org; Rosen, Rami > > Subject: [PATCH] i40e: Remove redundant fdir forward declarations. > > >

[dpdk-dev] [PATCH] lpm6: fix assigned value is garbage or undefined

2016-04-27 Thread Daniel Mrzyglod
Fix issue reported by clang scan-build Value of pointer tbl_next was uninitialized. When function lookup_step() take else branch it may provide garbage into tbl = tbl_next; Fixes: 5c510e13a9cb ("lpm: add IPv6 support") Signed-off-by: Daniel Mrzyglod --- lib/librte_lpm/rte_lpm6.c | 4 ++-- 1 fi

[dpdk-dev] [PATCH v7 0/7] qede: add qede PMD

2016-04-27 Thread Bruce Richardson
On Wed, Apr 27, 2016 at 07:18:35AM -0700, Rasesh Mody wrote: > Hi Bruce, Thomas, > > The v7 series incorporates the following review comments: > - MAINTAINERS and LICENSE.qede_pmd file changes added to base driver > - Reworked flags used for clang compilation > - index.rst, overview.rst and qed

[dpdk-dev] [PATCH] app/testpmd: fix strcat can overrun fixed-size string

2016-04-27 Thread Thomas Monjalon
2016-04-11 18:03, Tomasz Kulasek: > CID 13307 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW) > fixed_size_dest: You might overrun the 128 byte fixed-size string fwd_modes > by copying fwd_eng->fwd_mode_name without checking the length. > > Fixes: 769ce6b17835 ("app/testpmd: list forwardi

[dpdk-dev] [PATCH] examples/vm_power_manager: buffer not null terminated

2016-04-27 Thread Thomas Monjalon
2016-04-12 17:13, Daniel Mrzyglod: > CID30691: > If the buffer is treated as a null terminated string in later operations, > a buffer overflow or over-read may occur. [...] > --- a/examples/vm_power_manager/channel_manager.c > +++ b/examples/vm_power_manager/channel_manager.c > - strncpy(new_do

[dpdk-dev] [PATCH] i40e: Remove redundant fdir forward declarations.

2016-04-27 Thread Richardson, Bruce
> -Original Message- > From: Bruce Richardson [mailto:bruce.richardson at intel.com] > Sent: Wednesday, April 27, 2016 5:20 PM > To: Zhang, Helin > Cc: Rosen, Rami ; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] i40e: Remove redundant fdir forward > declarations. > > On Wed, Apr 27, 2

[dpdk-dev] [PATCH] app/test_acl: fix division by float zero

2016-04-27 Thread Thomas Monjalon
> > Fix issue reported by Coverity. > > Coverity ID 13240 > > > > This could cause an immediate crash or incorrect computation. > > > > In search_ip5tuples: An expression which may be zero is used > > as a divisor in floating-point arithmetic. > > > > divide_by_zero: In expression (long double)t

[dpdk-dev] [RFC] eal: provide option to set vhost_user socket owner/permissions

2016-04-27 Thread Yuanhan Liu
On Tue, Apr 26, 2016 at 09:33:48AM -0400, Aaron Conole wrote: > >> > b) would prefer a change of the API? > >> > >> Adding a new option to the current register API might will not work well, > >> either. It gives you no ability to do a dynamic change later. I mean, > >> taking OVS as an example, OV

[dpdk-dev] [PATCH v2] eal: fix unchecked return value from library

2016-04-27 Thread Thomas Monjalon
2016-04-22 15:17, Daniel Mrzyglod: > Fix issue reported by Coverity. > Coverity ID 13194 > > The function returns a value that indicates an error condition. If this > is not checked, the error condition may not be handled correctly. > > In pci_vfio_mp_sync_thread: Value returned from a library f

[dpdk-dev] [PATCH] virtio: fix memory leak of virtqueue memzones

2016-04-27 Thread Yuanhan Liu
On Tue, Apr 26, 2016 at 12:32:12PM +, Jianfeng Tan wrote: > Issue: When virtio was proposed in DPDK, there is no API to free memzones. > But this has changed since rte_memzone_free() has been implemented by > commit ff909fe21f. The more proper way to reference a commit is commit_id ("

[dpdk-dev] [PATCH v2] examples/netmap_compat: fix infinite loop

2016-04-27 Thread Michal Kobylinski
Fix issue reported by Coverity. Coverity ID 30701: Infinite loop: The loop does not have a normal termination condition, so will continue until an abnormal condition arises. In rte_netmap_poll: Infinite loop with unsatisfiable exit condition. Fixes: 06371afe394d ("examples/netmap_compat: import n

[dpdk-dev] [PATCH v2] vhost: Fix linkage of vhost PMD

2016-04-27 Thread Yuanhan Liu
On Tue, Apr 26, 2016 at 02:39:29PM +0900, Tetsuya Mukawa wrote: > Currently, vhost PMD doesn't have linkage for librte_vhost, even though > it depends on librte_vhost APIs. This causes a linkage error if below > conditions are fulfilled. > > - DPDK libraries are compiled as shared libraries. > -

[dpdk-dev] [PATCH v2] virtio: check if virtio net header could fit in mbuf headroom

2016-04-27 Thread Yuanhan Liu
On Wed, Apr 27, 2016 at 07:27:55AM +0800, Huawei Xie wrote: > check merge-able header as it is supported. > previously we don't support merge-able feature, so non merge-able > header is checked. > > v2: > add missed signoff Applied to dpdk-next-virtio with above version log removed: DPDK prefers

[dpdk-dev] [PATCH] i40e: configure MTU

2016-04-27 Thread Xing, Beilei
> -Original Message- > From: Julien Meunier [mailto:julien.meunier at 6wind.com] > Sent: Wednesday, April 27, 2016 7:44 PM > To: Xing, Beilei ; Wu, Jingjing intel.com> > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] i40e: configure MTU > > Hello, > > On 04/23/2016 01:26 PM, Beile

[dpdk-dev] [PATCH] lpm: unchecked return value

2016-04-27 Thread Slawomir Mrozowicz
Fix issue reported by Coverity. Coverity ID 13205: Unchecked return value Unchecked return value check_return: Calling rte_lpm6_add without checking return value Fixes: 5c510e13a9cb ("lpm: add IPv6 support") Signed-off-by: Slawomir Mrozowicz --- lib/librte_lpm/rte_lpm6.c | 10 ++ 1 file

[dpdk-dev] How to bind VM's NIC to OVS

2016-04-27 Thread Vivek Gupta
Hi All I am testing a scenario where I will receive the traffic on DPDK binded port on host machine and will forward that traffic to DPDK binded port of VM machine. For this I have done the followings- 1. Binded eth0 and eth1 of host machine to DPDK 2. Created the OVS bridge in host ma

[dpdk-dev] [PATCH] mk: add build-time library directory to linker path

2016-04-27 Thread Panu Matilainen
This is a pre-requisite for adding DT_NEEDED dependencies between internal libraries. Signed-off-by: Panu Matilainen --- mk/rte.lib.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 8f7e021..b420280 100644 --- a/mk/rte.lib.mk +++ b/mk/

[dpdk-dev] [PATCH] i40e: configure MTU

2016-04-27 Thread Julien Meunier
Hello, On 04/23/2016 01:26 PM, Beilei Xing wrote: [...] > + /* mtu setting is forbidden if port is start */ > + if (dev_data->dev_started) { > + PMD_DRV_LOG(ERR, > + "port %d must be stopped before configuration\n", > + dev_data->

[dpdk-dev] [PATCH v2] eal: out-of-bounds write

2016-04-27 Thread Slawomir Mrozowicz
Fix issue reported by Coverity. Coverity ID 13282: Out-of-bounds write overrun-local: Overrunning array mcfg->memseg of 256 44-byte elements at element index 257 using index j. Fixes: af75078fece3 ("first public release") Signed-off-by: Slawomir Mrozowicz --- lib/librte_eal/linuxapp/eal/eal_me

[dpdk-dev] [PATCH] virtio: fix modify drv_flags for specific device

2016-04-27 Thread Tan, Jianfeng
Hi, On 4/26/2016 7:53 PM, David Marchand wrote: > On Tue, Apr 26, 2016 at 4:24 AM, Jianfeng Tan > wrote: >> Issue: virtio's drv_flags are decided by devices types (modern vs legacy), >> and which kernel driver is used, and the negotiated features (especially >> VIRTIO_NET_STATUS) with backend, w

[dpdk-dev] [dpdk-users] Link Status and Interrupts in 2.2.0

2016-04-27 Thread Thomas Monjalon
2016-04-25 11:49, martin_curran-gray at keysight.com: > But if the link was "active" when dpdk and my app starts up, > then no interrupt is generated, which then means that global > structure is not filled in You are describing the case of interrupts enabled but never called. It has been fixed in

[dpdk-dev] [PATCH v2] vhost: Fix linkage of vhost PMD

2016-04-27 Thread Tetsuya Mukawa
On 2016/04/26 18:35, Panu Matilainen wrote: > On 04/26/2016 08:39 AM, Tetsuya Mukawa wrote: >> Currently, vhost PMD doesn't have linkage for librte_vhost, even though >> it depends on librte_vhost APIs. This causes a linkage error if below >> conditions are fulfilled. >> >> - DPDK libraries are co

[dpdk-dev] [PATCH v2] virtio: check if virtio net header could fit in mbuf headroom

2016-04-27 Thread Huawei Xie
check merge-able header as it is supported. previously we don't support merge-able feature, so non merge-able header is checked. v2: add missed signoff Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/n

[dpdk-dev] [PATCH] examples/exception_path: bad shift operation in setup_port_lcore_affinities

2016-04-27 Thread Thomas Monjalon
2016-04-15 17:29, Daniel Mrzyglod: > CID: #30688 > The operaton may have an undefined behavior or yield to an unexpected result. > > In setup_port_lcore_affinities: A bit shift operation has a shift amount which > is too large or has a negative value. > > Fixes: af75078fece3 ("first public releas

[dpdk-dev] [PATCH] virtio: fix modify drv_flags for specific device

2016-04-27 Thread David Marchand
Hello, On Wed, Apr 27, 2016 at 7:10 AM, Tan, Jianfeng wrote: > Besides, I see bnx2x pmd could have similar issue, and the QLogic bnx2x > maintainers are CCed to confirm. Well, a way to detect those kind of issues would be to constify drv_flags. -- David Marchand

[dpdk-dev] [PATCH v7 7/7] qede: add DCBX support

2016-04-27 Thread Rasesh Mody
This patch adds LLDP and DCBX capabilities to the qede PMD. Signed-off-by: Harish Patil Signed-off-by: Rasesh Mody Signed-off-by: Sony Chacko --- drivers/net/qede/Makefile |1 + drivers/net/qede/base/bcm_osal.h |1 + drivers/net/qede/base/ecore.h |

[dpdk-dev] [PATCH v7 6/7] qede: add interrupt handling support

2016-04-27 Thread Rasesh Mody
Physical link is handled by the management Firmware. This patch lays the infrastructure for interrupt/attention handling in the driver, as link change notifications arrive via async interrupts, as well as the handling of such notifications. It adds async event notification handler interfaces to the

[dpdk-dev] [PATCH v7 5/7] qede: add SRIOV support

2016-04-27 Thread Rasesh Mody
This patch adds following SRIOV features to qede PMD: - VF configuration - VF intialization/de-initialization - VF PF communications channel - statistics capture and query Signed-off-by: Harish Patil Signed-off-by: Rasesh Mody Signed-off-by: Sony Chacko --- drivers/net/qede/Makefile

[dpdk-dev] [PATCH v7 4/7] qede: add L2 support

2016-04-27 Thread Rasesh Mody
This patch adds the features to supports configuration of various Layer 2 elements, such as channels and filtering options. Signed-off-by: Harish Patil Signed-off-by: Rasesh Mody Signed-off-by: Sony Chacko --- drivers/net/qede/Makefile|2 + drivers/net/qede/base/ecore_chain.h

[dpdk-dev] [PATCH v7 3/7] qede: enable PMD build

2016-04-27 Thread Rasesh Mody
This patch enables the QEDE PMD build. Signed-off-by: Harish Patil Signed-off-by: Rasesh Mody Signed-off-by: Sony Chacko --- config/common_base | 12 drivers/net/Makefile |1 + mk/rte.app.mk|2 ++ 3 files changed, 15 insertions(+) diff --git a/config/common_ba

[dpdk-dev] [PATCH v7 2/7] qede: add core driver

2016-04-27 Thread Rasesh Mody
The Qlogic Everest Driver for Ethernet(QEDE) Poll Mode Driver(PMD) is the DPDK specific module for QLogic FastLinQ QL4 25G/40G CNA family of adapters as well as their virtual functions (VF) in SR-IOV context. This patch adds QEDE PMD, which interacts with base driver and initialises the HW. T

[dpdk-dev] [PATCH v7 1/7] qede: add base driver

2016-04-27 Thread Rasesh Mody
The base driver is the backend module for the QLogic FastLinQ QL4 25G/40G CNA family of adapters as well as their virtual functions (VF) in SR-IOV context. The purpose of the base module is to: - provide all the common code that will be shared between the various drivers that would be used

[dpdk-dev] [PATCH v7 0/7] qede: add qede PMD

2016-04-27 Thread Rasesh Mody
Hi Bruce, Thomas, The v7 series incorporates the following review comments: - MAINTAINERS and LICENSE.qede_pmd file changes added to base driver - Reworked flags used for clang compilation - index.rst, overview.rst and qede.rst changes added to core driver - Addressed documentation comments on

[dpdk-dev] [PATCH v2] i40e: dereference before null check

2016-04-27 Thread Wu, Jingjing
> -Original Message- > From: Mrzyglod, DanielX T > Sent: Tuesday, April 19, 2016 1:13 AM > To: Chen, Jing D; Wu, Jingjing; Zhang, Helin > Cc: dev at dpdk.org; Mrzyglod, DanielX T > Subject: [PATCH v2] i40e: dereference before null check > > Fix issue reported by Coverity. > Coverity ID 1

[dpdk-dev] [PATCH v2] i40e: dereference before null check

2016-04-27 Thread Zhang, Helin
> -Original Message- > From: Mrzyglod, DanielX T > Sent: Tuesday, April 19, 2016 1:13 AM > To: Chen, Jing D; Wu, Jingjing; Zhang, Helin > Cc: dev at dpdk.org; Mrzyglod, DanielX T > Subject: [PATCH v2] i40e: dereference before null check > > Fix issue reported by Coverity. > Coverity ID 1

[dpdk-dev] [PATCH] virtio: avoid avail ring entry index update if equal

2016-04-27 Thread Huawei Xie
Avail ring is updated by the frontend and consumed by the backend. There are frequent core to core cache transfers for the avail ring. This optmization avoids avail ring entry index update if the entry already holds the same value. As DPDK virtio PMD implements FIFO free descriptor list (also for

[dpdk-dev] [PATCH] i40e: Remove redundant fdir forward declarations.

2016-04-27 Thread Zhang, Helin
> -Original Message- > From: Rosen, Rami > Sent: Saturday, March 26, 2016 9:32 AM > To: Zhang, Helin > Cc: dev at dpdk.org; Rosen, Rami > Subject: [PATCH] i40e: Remove redundant fdir forward declarations. > > This patch removes several redundant forward declarations in i40e_fdir.c. > >

[dpdk-dev] [PATCH v2] kni: add chained mbufs support

2016-04-27 Thread Zhang, Helin
> -Original Message- > From: Yigit, Ferruh > Sent: Tuesday, April 26, 2016 8:38 PM > To: dev at dpdk.org > Cc: Zhang, Helin ; Yigit, Ferruh intel.com> > Subject: [PATCH v2] kni: add chained mbufs support > > rx_q fifo may have chained mbufs, merge them into single skb before handing to

[dpdk-dev] [PATCH v6 2/8] qede: Add base driver

2016-04-27 Thread Rasesh Mody
> From: Bruce Richardson [mailto:bruce.richardson at intel.com] > Sent: Tuesday, April 26, 2016 6:02 AM > > On Mon, Apr 25, 2016 at 10:13:00PM -0700, Rasesh Mody wrote: > > The base driver is the backend module for the QLogic FastLinQ QL4 > > 25G/40G CNA family of adapters as well as their vir

[dpdk-dev] [PATCH v6 1/8] qede: Add maintainers, documentation and license

2016-04-27 Thread Rasesh Mody
> From: Mcnamara, John [mailto:john.mcnamara at intel.com] > Sent: Tuesday, April 26, 2016 8:50 AM > > Hi, > > Thanks for the documentation. > > In general you should generate and view the Html output to make sure > everything is okay: > > make doc-guides-html > firefox build/doc/html/g