[dpdk-dev] [PATCH] net/mlx5: add representor recognition on kernels 5.x

2019-02-21 Thread Viacheslav Ovsiienko
The master device and VF representors were distinguished by presence of port name, master device did not have one. The new Linux kernels starting from 5.0 provide the port name for master device and the implemented representor recognizing method does not work. The new recognizing method is based on

[dpdk-dev] [PATCH] net/mlx5: fix Verbs errors treatment in prio probing

2019-02-21 Thread Viacheslav Ovsiienko
The mlx5 PMD probes the Verbs flow priorities supported with ibv_create_flow() function. If rdma-core or kernel fails for some reason, the returned error causes the drop queue is not destroyed, and pd is locked by not freed resource. Also the mlx5_flow_discover_priorities() returned negative value

Re: [dpdk-dev] [PATCH 5/6] net/mlx5: support PCI device DMA map and unmap

2019-02-21 Thread Shahaf Shuler
Thursday, February 14, 2019 12:22 PM, Gaëtan Rivet: > Subject: Re: [PATCH 5/6] net/mlx5: support PCI device DMA map and unmap > > On Wed, Feb 13, 2019 at 07:11:35PM +, Shahaf Shuler wrote: > > Wednesday, February 13, 2019 1:44 PM, Gaëtan Rivet: > > > Subject: Re: [PATCH 5/6] net/mlx5: support

[dpdk-dev] [PATCH] net/mlx: prefix private structure

2019-02-21 Thread Thomas Monjalon
The private structure stored in rte_eth_dev->data->dev_private was named "struct priv". In order to ease code browsing, the structure is renamed "struct mlx[45]_priv". Signed-off-by: Thomas Monjalon --- drivers/net/mlx4/mlx4.c| 10 ++--- drivers/net/mlx4/mlx4.h| 20 +-

Re: [dpdk-dev] [RFC v4] /net: memory interface (memif)

2019-02-21 Thread Rami Rosen
Hi, +Shared memory packet interface (memif) PMD allows for DPDK and any other client +using memif (DPDK, VPP, libmemif) toc ommunicate using shared memory. Memif is +Linux only.s Minor nit. should be "to communicate" And Also Linux only.s => Linux only. Reviewed-by: Rami Rosen

Re: [dpdk-dev] [PATCH 1/5] net/virtio: fix Tx desc cleanup for packed ring

2019-02-21 Thread Maxime Coquelin
On 2/19/19 11:59 AM, Tiwei Bie wrote: We should try to cleanup at least the 'need' number of descs. Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 1 - 1 file changed, 1 deletion(

Re: [dpdk-dev] [PATCH 2/5] net/virtio: fix in-order Tx path for split ring

2019-02-21 Thread Maxime Coquelin
On 2/19/19 11:59 AM, Tiwei Bie wrote: When IN_ORDER feature is negotiated, device may just write out a single used ring entry for a batch of buffers: """ Some devices always use descriptors in the same order in which they have been made available. These devices can offer the VIRTIO_F_IN_ORDER

Re: [dpdk-dev] [PATCH 4/5] net/virtio: introduce a helper for clearing net header

2019-02-21 Thread Maxime Coquelin
On 2/19/19 11:59 AM, Tiwei Bie wrote: This patch introduces a helper for clearing the virtio net header to avoid the code duplication. Macro is used as it shows slightly better performance. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 46 +---

Re: [dpdk-dev] [PATCH 3/5] net/virtio: fix in-order Tx path for packed ring

2019-02-21 Thread Maxime Coquelin
On 2/19/19 11:59 AM, Tiwei Bie wrote: When IN_ORDER feature is negotiated, device may just write out a single used descriptor for a batch of buffers: """ Some devices always use descriptors in the same order in which they have been made available. These devices can offer the VIRTIO_F_IN_ORDER

Re: [dpdk-dev] [PATCH 5/5] net/virtio: optimize xmit enqueue for packed ring

2019-02-21 Thread Maxime Coquelin
On 2/19/19 11:59 AM, Tiwei Bie wrote: This patch introduces an optimized enqueue function in packed ring for the case that virtio net header can be prepended to the unchained mbuf. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 63 +++- 1 file

Re: [dpdk-dev] [PATCH 5/5] net/virtio: optimize xmit enqueue for packed ring

2019-02-21 Thread Tiwei Bie
On Thu, Feb 21, 2019 at 12:22:29PM +0100, Maxime Coquelin wrote: > On 2/19/19 11:59 AM, Tiwei Bie wrote: > > This patch introduces an optimized enqueue function in packed > > ring for the case that virtio net header can be prepended to > > the unchained mbuf. > > > > Signed-off-by: Tiwei Bie > >

Re: [dpdk-dev] [PATCH 5/5] net/virtio: optimize xmit enqueue for packed ring

2019-02-21 Thread Maxime Coquelin
On 2/21/19 1:25 PM, Tiwei Bie wrote: On Thu, Feb 21, 2019 at 12:22:29PM +0100, Maxime Coquelin wrote: On 2/19/19 11:59 AM, Tiwei Bie wrote: This patch introduces an optimized enqueue function in packed ring for the case that virtio net header can be prepended to the unchained mbuf. Signed-o

Re: [dpdk-dev] [PATCH] net/mlx: prefix private structure

2019-02-21 Thread Yongseok Koh
> On Feb 21, 2019, at 1:29 AM, Thomas Monjalon wrote: > > The private structure stored in rte_eth_dev->data->dev_private > was named "struct priv". > In order to ease code browsing, the structure is renamed > "struct mlx[45]_priv". > > Signed-off-by: Thomas Monjalon > --- Please add "Cc: sta..

[dpdk-dev] [PATCH v2 6/6] doc: deprecate VFIO DMA map APIs

2019-02-21 Thread Shahaf Shuler
As those have been replaced by rte_bus_dma_map and rte_pci_dma_unmap APIs. Signed-off-by: Shahaf Shuler --- doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- doc/guides/rel_notes/deprecation.rst| 4 lib/librte_eal/common/include/rte_vfio.h| 6 -- 3 files change

[dpdk-dev] [PATCH v2 2/6] vfio: don't fail to DMA map if memory is already mapped

2019-02-21 Thread Shahaf Shuler
Currently vfio DMA map function will fail in case the same memory segment is mapped twice. This is too strict, as this is not an error to map the same memory twice. Instead, use the kernel return value to detect such state and have the DMA function to return as successful. For type1 mapping the

[dpdk-dev] [PATCH v2 3/6] bus: introduce device level DMA memory mapping

2019-02-21 Thread Shahaf Shuler
The DPDK APIs expose 3 different modes to work with memory used for DMA: 1. Use the DPDK owned memory (backed by the DPDK provided hugepages). This memory is allocated by the DPDK libraries, included in the DPDK memory system (memseg lists) and automatically DMA mapped by the DPDK layers. 2. Use

[dpdk-dev] [PATCH v2 5/6] net/mlx5: support PCI device DMA map and unmap

2019-02-21 Thread Shahaf Shuler
The implementation reuses the external memory registration work done by commit[1]. Note about representors: The current representor design will not work with those map and unmap functions. The reason is that for representors we have multiple IB devices share the same PCI function, so mapping will

Re: [dpdk-dev] [PATCH 1/2] net/bonding: do not set promisc on non-existent primary port

2019-02-21 Thread Ferruh Yigit
On 2/9/2019 1:16 PM, Chas Williams wrote: > > > On 1/10/19 5:22 AM, Hyong Youb Kim wrote: >> For active-backup, tlb, and alb mode, >> bond_ethdev_promiscuous_{enable,disable} tries to set promisc mode on >> the primary port, even when there are no slaves. It is harmless, as >> rte_eth_promiscuous

[dpdk-dev] [PATCH v2 1/6] vfio: allow DMA map of memory for the default vfio fd

2019-02-21 Thread Shahaf Shuler
Enable users the option to call rte_vfio_dma_map with request to map to the default vfio fd. Signed-off-by: Shahaf Shuler --- doc/guides/rel_notes/release_19_05.rst | 3 +++ lib/librte_eal/common/include/rte_vfio.h | 8 ++-- lib/librte_eal/linuxapp/eal/eal_vfio.c | 10 -- 3 fil

[dpdk-dev] [PATCH v2 0/6] introduce DMA memory mapping for external memory

2019-02-21 Thread Shahaf Shuler
The DPDK APIs expose 3 different modes to work with memory used for DMA: 1. Use the DPDK owned memory (backed by the DPDK provided hugepages). This memory is allocated by the DPDK libraries, included in the DPDK memory system (memseg lists) and automatically DMA mapped by the DPDK layers. 2. Use

[dpdk-dev] [PATCH v2 4/6] net/mlx5: refactor external memory registration

2019-02-21 Thread Shahaf Shuler
Move the memory region creation to a separate function to prepare the ground for the reuse of it on the PCI driver map and unmap functions. Signed-off-by: Shahaf Shuler --- drivers/net/mlx5/mlx5_mr.c | 86 +++-- 1 file changed, 57 insertions(+), 29 deletions(-

Re: [dpdk-dev] [PATCH v2 6/6] doc: deprecate VFIO DMA map APIs

2019-02-21 Thread David Marchand
On Thu, Feb 21, 2019 at 3:51 PM Shahaf Shuler wrote: > As those have been replaced by rte_bus_dma_map and rte_pci_dma_unmap > APIs. > > Signed-off-by: Shahaf Shuler > --- > doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- > doc/guides/rel_notes/deprecation.rst| 4 > lib/

[dpdk-dev] DPDK Release Status Meeting 21/2/2019

2019-02-21 Thread Ferruh Yigit
Minutes 21 February 2019 Agenda: * Release Dates * Subtrees * OvS * Opens Participants: * Arm * Debian * Intel * Mellanox * NXP * RedHat Release Dates - * v19.05 dates, no change: * Proposal Deadline: Friday, 1 March * RC1: Friday, 29 March * Release

Re: [dpdk-dev] DPDK Release Status Meeting 21/2/2019

2019-02-21 Thread Thomas Monjalon
21/02/2019 17:09, Ferruh Yigit: > * v19.08 proposal, please comment: > * Proposal/V1 Friday 07 June 2019 > * Integration/Merge/RC1 Friday 05 July 2019 > * Release Thurs 01 August 2019 Fixes usually take longer during July, so we may be short of t

Re: [dpdk-dev] [PATCH v3] test/pmd_perf: fix the way to drain the port

2019-02-21 Thread Ferruh Yigit
On 2/20/2019 9:06 PM, Julien Meunier wrote: > If the port has received less than ``pkt_per_port`` packets (for > example, the port has missed some packets), the test is in an infinite > loop. > > Instead of expecting a number of packet to receive, let the port to be > drained by itself. If no more

Re: [dpdk-dev] [PATCH] lib/cryptodev: fix driver name comparison

2019-02-21 Thread Trahe, Fiona
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Anoob Joseph > Sent: Wednesday, February 20, 2019 3:42 PM > To: Akhil Goyal ; Doherty, Declan > ; De Lara Guarch, > Pablo > Cc: Jerin Jacob Kollanukkaran ; Narayana Prasad Raju > Athreya > ; dev@dpdk.org; Anku

Re: [dpdk-dev] DPDK Release Status Meeting 21/2/2019

2019-02-21 Thread Luca Boccassi
On Thu, 2019-02-21 at 16:09 +, Ferruh Yigit wrote: > Minutes 21 February 2019 > cut > * Coverity is partially back, but new analyses aren't running > * Looking for suggestions from the community for a better or more > stable > solutions The clang-based alternativ

Re: [dpdk-dev] [PATCH 0/5] Fixes and enhancements for Tx path in Virtio PMD

2019-02-21 Thread Maxime Coquelin
On 2/19/19 11:59 AM, Tiwei Bie wrote: Below is a quick (unofficial) performance test (macfwd loop, 64B) for the packed ring optimizations in this series on an Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz platform: w/o this series: packed ring normal/in-order: ~10.4 Mpps w/ this series: packed r

Re: [dpdk-dev] [PATCH] vhost: fix deadlock when vhost unregister

2019-02-21 Thread Maxime Coquelin
On 1/28/19 7:55 AM, sunwenjie wrote: When rte_vhost_driver_unregister delete the connection fd, fdset_try_del will always try and donot release the vhostuser.mutex if the fd is busy, but the fdset_event_dispatch will set the fd to busy and call vhost_user_msg_handler to get vhostuser.mutex,

Re: [dpdk-dev] DPDK Release Status Meeting 21/2/2019

2019-02-21 Thread Thomas Monjalon
21/02/2019 18:43, Luca Boccassi: > On Thu, 2019-02-21 at 16:09 +, Ferruh Yigit wrote: > > * Looking for suggestions from the community for a better or more > > stable solutions > > The clang-based alternative I mentioned that can be used from > Travis/Github is sonarcloud.io: > > https://so

Re: [dpdk-dev] [PATCH] vhost: fix sprintf with snprintf

2019-02-21 Thread Maxime Coquelin
On 2/4/19 8:28 AM, Pallantla Poornima wrote: sprintf function is not secure as it doesn't check the length of string. More secure function snprintf is used. Fixes: d7280c9fff ("vhost: support selective datapath") Cc: sta...@dpdk.org Signed-off-by: Pallantla Poornima --- lib/librte_vhost/v

Re: [dpdk-dev] [PATCH v2] eal: fix check when retrieving current cpu affinity

2019-02-21 Thread Rami Rosen
Reviewed-by: Rami Rosen בתאריך יום ג׳, 19 בפבר׳ 2019, 22:38, מאת David Marchand ‏< david.march...@redhat.com>: > pthread_getaffinity_np returns a >0 value when failing. > > This is mainly for the sake of correctness. > The only case where it could fail is when passing an incorrect cpuset > size

[dpdk-dev] [PATCH 1/2] bus/vdev: fix debug message on probing

2019-02-21 Thread Thomas Monjalon
The log was printing the device name two times, first one being supposed to be the driver name. As we don't know yet the driver name, the log is simplified. Fixes: 9bf4901d1a11 ("bus/vdev: remove probe with driver name option") Cc: ferruh.yi...@intel.com Signed-off-by: Thomas Monjalon --- drive

[dpdk-dev] [PATCH 0/2] small fixes for vdev hotplug

2019-02-21 Thread Thomas Monjalon
These are 2 small fixes. A bigger cleanup may be needed in vdev: rte_vdev_init() can be replaced by rte_dev_probe(). Any volunteer? Note: vdev has no maintainer. Raslan Darawsheh (1): bus/vdev: fix hotplug twice Thomas Monjalon (1): bus/vdev: fix debug message on probing drivers/bus/vdev/

[dpdk-dev] [PATCH 2/2] bus/vdev: fix hotplug twice

2019-02-21 Thread Thomas Monjalon
From: Raslan Darawsheh In case vdev was already probed, it shouldn't be probed again, and it should return -EEXIST as error. There are some checks in vdev_probe() and insert_vdev(), but a check was missing in vdev_plug(). The check is moved in vdev_probe_all_drivers() which is called in all code

Re: [dpdk-dev] [PATCH v5 2/2] net/mlx5: fix instruction hotspot on replenishing Rx buffer

2019-02-21 Thread Kevin Traynor
Hi Yongseok, Can you let me know how you want to proceed with the below. I think we could just drop as it's a performance optimization, or maybe you have a different idea. thanks, Kevin. On 06/02/2019 15:54, Kevin Traynor wrote: > On 01/14/2019 09:16 PM, Yongseok Koh wrote: >> On replenishing Rx

[dpdk-dev] [PATCH 1/1] net/bnx2x: fix segfaults due to stale interrupt status

2019-02-21 Thread Shahed Shaikh
Previous ungraceful exit may leave behind un-acked stale interrupts for slowpath and fastpath. Interrupt status polling function is started before FLR is initiated, so we don't have a real way to protect this polling function invoking an interrupt handler caused due to stale interrupt status from

Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: fix reset active slave

2019-02-21 Thread Chas Williams
On 2/20/19 10:16 AM, Hyong Youb Kim wrote: On Wed, Feb 20, 2019 at 02:56:36PM +, Radu Nicolau wrote: On 2/20/2019 12:33 PM, Ferruh Yigit wrote: On 2/18/2019 3:58 PM, Radu Nicolau wrote: On 2/18/2019 11:59 AM, Hari Kumar Vemula wrote: test_alb_reply_from_client test fails due to inco

[dpdk-dev] [PATCH 3/4] vhost: fix potential use-after-free for memory region

2019-02-21 Thread Tiwei Bie
Reclaim outstanding zmbufs first before freeing memory regions, otherwise there could be use-after-free. Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- lib/librte_vhost/vhost.h | 6 + lib/librte_vhost/vhost_user.c | 46 +++

[dpdk-dev] [PATCH 2/4] vhost: fix potential use-after-free for zero copy mbuf

2019-02-21 Thread Tiwei Bie
Don't free the zero copy mbufs before they have been consumed, otherwise there could be use-after-free. Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- lib/librte_vhost/vhost.h | 12 lib/librte_vhost/vhost_user.c | 3 +++

[dpdk-dev] [PATCH 0/4] Some fixes for vhost zero copy

2019-02-21 Thread Tiwei Bie
Tiwei Bie (4): vhost: restore mbuf first when freeing zmbuf vhost: fix potential use-after-free for zero copy mbuf vhost: fix potential use-after-free for memory region doc: improve vhost zero copy guide doc/guides/prog_guide/vhost_lib.rst | 3 +++ lib/librte_vhost/vhost.h| 3

[dpdk-dev] [PATCH 1/4] vhost: restore mbuf first when freeing zmbuf

2019-02-21 Thread Tiwei Bie
The mbufs should also be restored in free_zmbufs(). Fixes: b0a985d1f340 ("vhost: add dequeue zero copy") Fixes: 3ebd930588b7 ("vhost: fix mbuf free") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- lib/librte_vhost/vhost.h | 16 lib/librte_vhost/vhost_user.c | 1 + lib/l

[dpdk-dev] [PATCH 4/4] doc: improve vhost zero copy guide

2019-02-21 Thread Tiwei Bie
Highlight that vhost zero copy mbufs should be consumed as soon as possible. Signed-off-by: Tiwei Bie --- doc/guides/prog_guide/vhost_lib.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index c77df338f..a86c07a

Re: [dpdk-dev] [PATCH] lib/cryptodev: fix driver name comparison

2019-02-21 Thread Anoob Joseph
Hi Fiona, Please see inline. Thanks, Anoob > -Original Message- > From: Trahe, Fiona > Sent: Thursday, February 21, 2019 10:33 PM > To: Anoob Joseph ; Akhil Goyal > ; Doherty, Declan ; De > Lara Guarch, Pablo > Cc: Jerin Jacob Kollanukkaran ; Narayana Prasad Raju > Athreya ; dev@dpdk.o

Re: [dpdk-dev] [PATCH 1/2] bus/vdev: fix debug message on probing

2019-02-21 Thread Rami Rosen
Reviewed-by: Rami Rosen בתאריך יום ה׳, 21 בפבר׳ 2019, 21:01, מאת Thomas Monjalon ‏< tho...@monjalon.net>: > The log was printing the device name two times, > first one being supposed to be the driver name. > As we don't know yet the driver name, the log is simplified. > > Fixes: 9bf4901d1a11 ("b

[dpdk-dev] [PATCH] lib/metrics: add unregister api for metrics

2019-02-21 Thread ??????
Use the bitmap lib to help maintain the metrics. we can dynamically add and remove metrics data. After uninit latency, it can remove itself from the metrics to make the result from rte_metrics_get_names more simple. Signed-off-by: junka --- lib/librte_latencystats/rte_latencystats.c | 4 +-

[dpdk-dev] [RFC v3 0/5] rcu: add RCU library supporting QSBR mechanism

2019-02-21 Thread Honnappa Nagarahalli
Lock-less data structures provide scalability and determinism. They enable use cases where locking may not be allowed (for ex: real-time applications). In the following paras, the term 'memory' refers to memory allocated by typical APIs like malloc or anything that is representative of memory, for

[dpdk-dev] [RFC v3 4/5] test/rcu_qsbr: modify test cases for dynamic memory allocation

2019-02-21 Thread Honnappa Nagarahalli
Modify the test cases to allocate the QSBR variable dynamically. Signed-off-by: Honnappa Nagarahalli --- test/test/test_rcu_qsbr.c | 225 ++--- test/test/test_rcu_qsbr_perf.c | 33 ++--- 2 files changed, 144 insertions(+), 114 deletions(-) diff --git a/test/tes

[dpdk-dev] [RFC v3 5/5] lib/rcu: fix the size of register thread ID array size

2019-02-21 Thread Honnappa Nagarahalli
Keeping the register thread ID size dependent on the max threads is resulting in performance drops due to address calculations at run time. Fixing the size of the thread ID registration array reduces the complexity of address calculation. This change fixes the maximum number of threads supported to

[dpdk-dev] [RFC v3 2/5] test/rcu_qsbr: add API and functional tests

2019-02-21 Thread Honnappa Nagarahalli
From: Dharmik Thakkar Add API positive/negative test cases, functional tests and performance tests. Signed-off-by: Malvika Gupta Signed-off-by: Dharmik Thakkar Signed-off-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu --- test/test/Makefile | 2 + test/test/autotest_data.py

[dpdk-dev] [RFC v3 1/5] rcu: add RCU library supporting QSBR mechanism

2019-02-21 Thread Honnappa Nagarahalli
Add RCU library supporting quiescent state based memory reclamation method. This library helps identify the quiescent state of the reader threads so that the writers can free the memory associated with the lock less data structures. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Steve Capper R

[dpdk-dev] [RFC v3 3/5] lib/rcu: add dynamic memory allocation capability

2019-02-21 Thread Honnappa Nagarahalli
rte_rcu_qsbr_get_memsize API is introduced. This will allow the user to controll the amount of memory used based on the maximum number of threads present in the application. Signed-off-by: Honnappa Nagarahalli --- lib/librte_rcu/rte_rcu_qsbr.c | 51 --- lib/librte_rcu/rte_rcu_qsbr.h

Re: [dpdk-dev] [RFC v2 1/2] rcu: add RCU library supporting QSBR mechanism

2019-02-21 Thread Honnappa Nagarahalli
> > > > > > > > > > > > +/** > > > > > > > > + * RTE thread Quiescent State structure. > > > > > > > > + */ > > > > > > > > +struct rte_rcu_qsbr { > > > > > > > > + uint64_t reg_thread_id[RTE_QSBR_BIT_MAP_ELEMS] > > > > > > > __rte_cache_aligned; > > > > > > > > + /**< Registered reade

[dpdk-dev] [PATCH 2/2] doc: rename avf to iavf

2019-02-21 Thread Leyi Rong
This patch renames avf to iavf only for the doc files. Signed-off-by: Leyi Rong --- MAINTAINERS| 6 +++--- doc/guides/nics/features/{avf.ini => iavf.ini} | 2 +- .../nics/features/{avf_vec.ini => iavf_vec.ini}| 2 +- doc/guides/nics/intel_vf.rst

[dpdk-dev] Segfault when eal thread executing mlx5 nic‘s lsc event

2019-02-21 Thread wangyunjian
I think the flow list may be accessed in the same time by two different threads and may cause some errors. Do it need a lock to protect the flow list? Thanks Yunjian (gdb) bt #0 0x7f54c9641237 in raise () from /usr/lib64/libc.so.6 #1 0x7f54c9642928 in abort () from /usr/lib64/li