[dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue

2018-08-17 Thread Kamil Chalupnik
Omitting inputs and outputs mbuf creation for BaseBand Null Device as inputs and outputs data do not exist for Null Device Fixes: b2a4654f082b ("mempool: check for zero size creation") Cc: pablo.de.lara.gua...@intel.com Signed-off-by: Kamil Chalupnik --- app/test-bbdev/test_bbdev_perf.c | 14 ++

Re: [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue

2018-08-17 Thread Peng, Yuan
Tested-by: Peng, Yuan > NIC Fortville 4*10G > ethtool -i ens785f1 > driver: i40e > version: 2.4.10 > firmware-version: 6.01 0x80003205 1.1691.0 DPDK version: 18.11-rc0 > commit 76b9d9de5c7d747c381027156aac07735cb1bc0c > FlexRAN-1.6.0 > Os: 4.4.0-62-generic > ICC:parallel_studio_xe_2018_update1_p

Re: [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation issue

2018-08-17 Thread Mokhtar, Amr
> -Original Message- > From: Peng, Yuan > Sent: Friday 17 August 2018 10:39 > To: Chalupnik, KamilX ; Mokhtar, Amr > ; De Lara Guarch, Pablo > > Cc: dev@dpdk.org; sta...@dpdk.org; Chalupnik, KamilX > ; Peng, Yuan > Subject: RE: [dpdk-dev] [PATCH] app/testbbdev: fix inputs mbuf creation

[dpdk-dev] [PATCH v10 0/8] hotplug failure handle mechanism

2018-08-17 Thread Jeff Guo
Hotplug is an important feature for use-cases like the datacenter device's fail-safe and for SRIOV Live Migration in SDN/NFV. It could bring higher flexibility and continuality to networking services in multiple use-cases in the industry. So let's see how DPDK can help users implement hotplug solut

[dpdk-dev] [PATCH v10 1/8] bus: add memory failure handler

2018-08-17 Thread Jeff Guo
A memory failure and system crash can be caused if a device is hotplugged out but the application can still access the device by MMIO. This patch introduces bus ops to handle memory failures of illegal access, especially for hotplug. Each bus can implement its own case-dependent logic to handle th

[dpdk-dev] [PATCH v10 5/8] bus: add helper to handle sigbus

2018-08-17 Thread Jeff Guo
This patch aims to add a helper to iterate through all buses to find the relevant bus to handle the sigbus error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v10->v9: refine commit log --- lib/librte_eal/common/eal_common_bus.c | 43 ++ lib/librte_eal/commo

[dpdk-dev] [PATCH v10 2/8] bus/pci: implement memory failure handler ops

2018-08-17 Thread Jeff Guo
This patch implements the ops to handle memory failures on the PCI bus. It avoids MMIO read/write errors by creating a new dummy memory to remap the memory where the failure is. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v10->v9: change pci bus ops name --- drivers/bus/pci/pci_common.c

[dpdk-dev] [PATCH v10 7/8] igb_uio: fix unexpected remove issue for hotplug

2018-08-17 Thread Jeff Guo
When a device is hotplugged out, the PCI resource is released in the kernel, the UIO file descriptor will disappear and the irq will be released. After this, a kernel crash will be caused if the igb uio driver tries to access or release these resources. And more, uio_remove will be called unexpect

[dpdk-dev] [PATCH v10 6/8] eal: add failure handle mechanism for hotplug

2018-08-17 Thread Jeff Guo
The mechanism can initially register the sigbus handler after the device event monitor is enabled. When a sigbus error is captured, the mechanism will check the failure address and accordingly remap the invalid memory for the corresponding device. It could prevent the application from crashing when

[dpdk-dev] [PATCH v10 4/8] bus/pci: implement sigbus handler ops

2018-08-17 Thread Jeff Guo
This patch implements the ops for the PCI bus sigbus handler. It finds the PCI device that is being hotplugged out and calls the relevant ops of the memory failure handler to handle the failure of the device. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v10->v9: refine doc. --- drivers/bus

[dpdk-dev] [PATCH v10 5/8] bus: add helper to handle sigbus

2018-08-17 Thread Jeff Guo
This patch aims to add a helper to iterate through all buses to find the relevant bus to handle the sigbus error. Signed-off-by: Jeff Guo Acked-by: Shaopeng He --- v10->v9: refine commit log --- lib/librte_eal/common/eal_common_bus.c | 43 ++ lib/librte_eal/commo

[dpdk-dev] [PATCH v10 3/8] bus: add sigbus handler

2018-08-17 Thread Jeff Guo
When a device is hotplugged out, a sigbus error will occur of the datapath can still read/write to the device. A handler is required here to capture the sigbus signal and handle it appropriately. This patch introduces bus ops to handle sigbus errors. Each bus can implement its own case-dependent l

[dpdk-dev] [PATCH v10 8/8] testpmd: use hotplug failure handle mechanism

2018-08-17 Thread Jeff Guo
This patch use testpmd for example to show how to use failure handle mechanism for hotplug in app. Signed-off-by: Jeff Guo --- v10->v9: use new APIs to manage hotplug handling. --- app/test-pmd/testpmd.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --g

[dpdk-dev] [PATCH v6 0/4] Install eal event handler in i40e/ixgbe

2018-08-17 Thread Jeff Guo
We currently have eal event and ethdev event for ethdev hotplug. Some ethdev's need to use an eal event to detect hotplug behaviors. Previously, we needed to register an eal event callback in the application, but this potentially causes a race condition between the eal event process to the ethdev e

[dpdk-dev] [PATCH v6 1/4] ethdev: Add eal device event callback

2018-08-17 Thread Jeff Guo
Implement a couple of eal device event handler install/unintall APIs in Ethdev as below: - rte_eth_dev_event_handler_install - rte_eth_dev_event_handler_uninstall Each ethdev could call these APIs to install eal event handler in the PMDs, with each callback corresponding to one port, and process

[dpdk-dev] [PATCH v6 3/4] net/i40e: install hotplug handler in i40e

2018-08-17 Thread Jeff Guo
This patch aims to enable hotplug detection in i40e PMD. First, it sets the “RTE_PCI_DRV_INTR_RMV” flag in drv_flags to announce the ability of hotplug processing. Then, it calls the “rte_eth_dev_event_handler_install” API to install the device event handler for ethdev. When the eal device event b

[dpdk-dev] [PATCH v6 2/4] net/ixgbe: install ethdev hotplug handler in ixgbe

2018-08-17 Thread Jeff Guo
This patch aims to enable hotplug detection in ixgbe PMD. First, it sets the “RTE_PCI_DRV_INTR_RMV” flag in drv_flags to announce the ability of hotplug processing. Then, it calls the “rte_eth_dev_event_handler_install” API to install the device event handler for ethdev. When the eal device event

[dpdk-dev] [PATCH v6 4/4] testpmd: remove the dev event callback register

2018-08-17 Thread Jeff Guo
Since we can now use the PMDs to manage the eal event for hotplug, we no longer need to register the device event callback in the application anymore. This patch removes the redundant code. Signed-off-by: Jeff Guo Acked-by: Wenzhuo Lu --- v6->v5: refine commit log --- app/test-pmd/testpmd.c | 7

[dpdk-dev] [PATCH v1 0/5] Enable hotplug in vfio

2018-08-17 Thread Jeff Guo
As we may know that the process of hotplug is different between igb_uio and vfio. For igb_uio, it could use uevent notification and memory failure handle mechanism for hotplug. But for vfio, when device is be hotplug-out, the uevent can not be detected immediately, because of the vfio kernel module

[dpdk-dev] [PATCH v1 2/5] eal: add a new req event to device event

2018-08-17 Thread Jeff Guo
Add a new req event in eal device event for vfio hotplug. When the req request send from the vfio kernel module be detected, vfio userpace driver could use this event to notify the app to handler it. Signed-off-by: Jeff Guo --- lib/librte_eal/common/include/rte_dev.h | 1 + 1 file changed, 1 ins

[dpdk-dev] [PATCH v1 1/5] eal: add a new req notifier to eal interrupt

2018-08-17 Thread Jeff Guo
Add a new req notifier in eal interrupt for enable vfio hotplug. Signed-off-by: Jeff Guo --- lib/librte_eal/common/include/rte_eal_interrupts.h | 1 + lib/librte_eal/linuxapp/eal/eal_interrupts.c | 71 ++ 2 files changed, 72 insertions(+) diff --git a/lib/librte_eal/c

[dpdk-dev] [PATCH v1 3/5] eal: modify device event callback process func

2018-08-17 Thread Jeff Guo
This patch modify the device event callback process function name to be more explicit, and exposure the API from private to public. The drivers and apps would directly use this API to process device event callback. Signed-off-by: Jeff Guo --- lib/librte_eal/common/eal_common_dev.c | 5 +++-- l

[dpdk-dev] [PATCH v1 4/5] pci: add req handler field to generic pci device

2018-08-17 Thread Jeff Guo
There are some extended interrupt types in vfio pci device except from the existing interrupts, such as err and req notifier, it could be useful for device error monitoring. And these corresponding interrupt handler is different from the other interrupt handler that register in PMDs, so a new inter

[dpdk-dev] [PATCH v1 5/5] vfio: enable vfio hotplug by req notifier handler

2018-08-17 Thread Jeff Guo
This patch will add req notifier processing to enable hotplug for vfio. When device is be hotplug-out, the vfio kernel module will sent req notifier to request user space to release the allocated resources. It could use the bus failure mechanism to trigger the currently hotplug procedure of user sp

[dpdk-dev] [PATCH] vhost: fix crash if set vring num handling failed

2018-08-17 Thread Ilya Maximets
Allocation failures of shadow used ring and batched copy array are not recoverable and leads to the segmentation faults like this on the receiving/transmission path: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f913fecf0 (LWP 43625)] in copy_desc_to_mbuf () at

[dpdk-dev] [PATCH] app/testpmd: add commands for TM to mark pkts

2018-08-17 Thread Krzysztof Kanas
Add following testpmd run-time commands to support test of TM packet marking: set port tm mark ip_ecn set port tm mark ip_dscp set port tm mark vlan_dei Signed-off-by: Krzysztof Kanas --- app/test-pmd/cmdline.c | 3 + app/test-pmd/cmdline_tm.c

Re: [dpdk-dev] [PATCH v2 4/4] eventdev: add auto test for eth Tx adapter

2018-08-17 Thread Pavan Nikhilesh
Hi Nikhil, Few comments inline. Nit: Please use --in-reply-to while sending next versions. (https://core.dpdk.org/contribute/) Thanks, Pavan On Fri, Aug 17, 2018 at 09:50:52AM +0530, Nikhil Rao wrote: > > This patch adds tests for the eth Tx adapter APIs. It also > tests the data path for

[dpdk-dev] [PATCH] vhost: initializing iotlb memory only when IOMMU feature is enabled.

2018-08-17 Thread Nitin Katiyar
DPDK 17.11 introduced the IOMMU feature which caused additional DPDK memory requirement per vhostuser device as part of iotlb_init(). Today this is done unconditionally (from DPDK 17.11 onwards) i.e. irrespective of IOMMU feature being enabled on the vhostuser device, iotlb is initialized. This bre

Re: [dpdk-dev] [PATCH v5 5/8] hash: add read and write concurrency support

2018-08-17 Thread ASM
> I guess the try-locks still does not solve the overhead of multiple readers > contending the counter. It just provides a non-blocking version of the same > algorithm. DPDK project does not use any rwlock for solving any overhead problem of multiple reader (at least I did not find it). For non

Re: [dpdk-dev] vhost: initializing iotlb memory only when IOMMU feature is enabled.

2018-08-17 Thread Ilya Maximets
On 17.08.2018 23:19, Nitin Katiyar wrote: > DPDK 17.11 introduced the IOMMU feature which caused additional > DPDK memory requirement per vhostuser device as part of > iotlb_init(). Today this is done unconditionally (from DPDK > 17.11 onwards) i.e. irrespective of IOMMU feature being > enabled on

[dpdk-dev] [PATCH] net/octeontx: fix packet corruption on Tx

2018-08-17 Thread Jerin Jacob
LMTST does not guarantee packet content get synced with L2C when HW access the packet for transmitting. Adding coherent IO write barrier will make sure HW sees the correct packet if its modified. Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function") Cc: sta...@dpdk.org Reporte

Re: [dpdk-dev] [PATCH] net/octeontx: fix packet corruption on Tx

2018-08-17 Thread santosh
On Friday 17 August 2018 08:00 PM, Jerin Jacob wrote: > LMTST does not guarantee packet content get synced with L2C when > HW access the packet for transmitting. > > Adding coherent IO write barrier will make sure HW sees the correct > packet if its modified. > > Fixes: 9e747589bd4c ("net/octeont

Re: [dpdk-dev] [PATCH v2] hash table: add an iterator over conflicting entries

2018-08-17 Thread Honnappa Nagarahalli
-Original Message- From: Michel Machado Sent: Friday, August 17, 2018 8:35 AM To: Honnappa Nagarahalli ; Fu, Qiaobin ; Richardson, Bruce ; De Lara Guarch, Pablo Cc: dev@dpdk.org; Doucette, Cody, Joseph ; Wang, Yipeng1 ; Wiles, Keith ; Gobriel, Sameh ; Tai, Charlie ; Stephen Hemmin

[dpdk-dev] [Bug 84] Primary process broadcasts vdevs during each secondary's vdev scan

2018-08-17 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=84 Bug ID: 84 Summary: Primary process broadcasts vdevs during each secondary's vdev scan Product: DPDK Version: unspecified Hardware: All OS: All Status: CO

[dpdk-dev] [PATCH] net/bonding: fix buf corruption in merging un-transmitted packets

2018-08-17 Thread Jia Yu
When bond slave devices cannot transmit all packets in bufs array, tx_burst callback shall merge the un-transmitted packets back to bufs array. Recent merge logic introduced a bug which causes invalid mbuf addresses being written to bufs array. When caller frees the un-transmitted packets, due to i