[dpdk-dev] [PATCH] net/af_packet: fix build failure because of unused parameter

2017-09-24 Thread Andrew Rybchenko
Failure happens on build using: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4) Fixes: 0d16c17ae7a4 ("net/af_packet: make qdisc bypass configurable") Signed-off-by: Andrew Rybchenko --- May be the right solution in fact remove PACKET_QDISC_BYPASS conditional completely. If below solution is accepted,

Re: [dpdk-dev] [PATCH] vhost: Expose virtio interrupt requirement on rte_vhos API

2017-09-24 Thread Yang, Zhiyong
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Stephen Hemminger > Sent: Sunday, September 24, 2017 10:02 PM > To: Jan Scheurich > Cc: dev@dpdk.org; d...@openvswitch.org > Subject: Re: [dpdk-dev] [PATCH] vhost: Expose virtio interrupt requirement on > rte_vhos

[dpdk-dev] [PATCH v6] net/i40e: fix mirror rule reset when port is closed

2017-09-24 Thread Wei Dai
When an i40e PF port is stopped, all mirror rules should be reserved. But when an i40e PF port is closed, all mirror rules should be removed. When a mirror rule is removed, its associated hardware and software resource should also be removed. Fixes: a4def5edf0fc ("i40e: enable port mirroring") Cc:

Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush

2017-09-24 Thread Zhao1, Wei
Hi, jingjing > -Original Message- > From: Wu, Jingjing > Sent: Monday, September 25, 2017 12:02 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: Zhao1, Wei > Subject: RE: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush > > > > > -Original Message- > > From: dev [mailto:d

Re: [dpdk-dev] [PATCH] vhost: fix vhost_user_set_mem_table error

2017-09-24 Thread Tiwei Bie
Hi Yi, On Wed, Sep 20, 2017 at 04:32:03PM +0800, Yi Yang wrote: > Usually vhost_user message VHOST_USER_SET_MEM_TABLE > is only sent out during initialization and only sent > once, but it isn't so for memory hotplug and hotunplug > , for that case, vhost_user message VHOST_USER_SET_MEM_TABLE > wil

Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush

2017-09-24 Thread Zhao1, Wei
Hi, jingjing > -Original Message- > From: Wu, Jingjing > Sent: Monday, September 25, 2017 12:02 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: Zhao1, Wei > Subject: RE: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush > > > > > -Original Message- > > From: dev [mailto:d

[dpdk-dev] [PATCH v5 4/5] test: increase port_id range

2017-09-24 Thread Zhiyong Yang
Increase port_id range from 8 bit to 16 bits in test code, and remove some unnecessary cast operations. Signed-off-by: Zhiyong Yang --- test/test/test_kni.c| 12 +-- test/test/test_link_bonding.c | 40 ++--- test/test/test_link_bondin

[dpdk-dev] [PATCH v5 5/5] librte_mbuf: modify port initialization value

2017-09-24 Thread Zhiyong Yang
In order to support more than 256 virtual ports, the field "port" in rte_mbuf has been increased to 16 bits. The initialization/reset value of the field "port" should be changed from 0xff to 0x accordingly. Signed-off-by: Zhiyong Yang --- lib/librte_mbuf/rte_mbuf.c | 2 +- lib/librte_mbuf/rt

[dpdk-dev] [PATCH v5 3/5] examples: increase port_id range

2017-09-24 Thread Zhiyong Yang
Modify port_id related code in examples accordingly since port_id definition in lib and pmd changes. Fix some original checkpatch issues and remove some unnecessary cast at the same time. Signed-off-by: Zhiyong Yang --- examples/bond/main.c | 16 +-- examples/dist

[dpdk-dev] [PATCH v5 1/5] net/bonding: remove bonding APIs using ABI versioning

2017-09-24 Thread Zhiyong Yang
There are two bonding APIs using ABI versioning, and both have port_id as parameter. Since we are already breaking ABI, no need to keep older versions of APIs. Signed-off-by: Zhiyong Yang --- drivers/net/bonding/rte_eth_bond_8023ad.c| 149 +-- drivers/net/bonding/rte_

[dpdk-dev] [PATCH v5 0/5] increase port_id range

2017-09-24 Thread Zhiyong Yang
port_id is currently defined as uint8_t, which is limited to the range 0 to 255. A larger range is required for vdev scalability. It is necessary for a redefinition of port_id to extend it from 1 bytes to 2 bytes. All ethdev APIs and usages related to port_id will be changed at the same time. Dis

Re: [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter

2017-09-24 Thread Rao, Nikhil
On 9/24/2017 11:46 PM, Rao, Nikhil wrote: On 9/22/2017 2:40 PM, Jerin Jacob wrote: When we worked on a prototype, we figured out that we need a separate event type for RX adapter. Probably RTE_EVENT_TYPE_ETHDEV_RX_ADAPTER? The Reason is: - In the HW based Rx adapter case, the packet are coming

Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush

2017-09-24 Thread Zhao1, Wei
Hi, Andrey > -Original Message- > From: Chilikin, Andrey > Sent: Saturday, September 23, 2017 4:14 AM > To: Zhao1, Wei ; dev@dpdk.org > Cc: Yigit, Ferruh ; Xing, Beilei > ; Wu, Jingjing > Subject: RE: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush > > Hi Wei > > > -O

Re: [dpdk-dev] [PATCH v1 10/10] net/i40e: set register for no drop

2017-09-24 Thread Wu, Jingjing
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of David Hunt > Sent: Saturday, August 26, 2017 12:02 AM > To: dev@dpdk.org > Cc: Hunt, David ; Marjanovic, Nemanja > ; Sexton, Rory > Subject: [dpdk-dev] [PATCH v1 10/10] net/i40e: set register for no drop > > See

Re: [dpdk-dev] [PATCH v1 02/10] net/i40e: add API to get received packet count

2017-09-24 Thread Wu, Jingjing
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of David Hunt > Sent: Saturday, August 26, 2017 12:02 AM > To: dev@dpdk.org > Cc: Hunt, David ; Marjanovic, Nemanja > ; Sexton, Rory > Subject: [dpdk-dev] [PATCH v1 02/10] net/i40e: add API to get received packet >

Re: [dpdk-dev] [PATCH v1 01/10] net/i40e: add API to convert VF Id to PF Id

2017-09-24 Thread Wu, Jingjing
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of David Hunt > Sent: Saturday, August 26, 2017 12:02 AM > To: dev@dpdk.org > Cc: Hunt, David ; Marjanovic, Nemanja > ; Sexton, Rory > Subject: [dpdk-dev] [PATCH v1 01/10] net/i40e: add API to convert VF Id to PF >

Re: [dpdk-dev] [PATCH v4 3/4] net/softnic: add TM capabilities ops

2017-09-24 Thread Lu, Wenzhuo
Hi Jasvinder, > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jasvinder Singh > Sent: Monday, September 18, 2017 5:10 PM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Yigit, Ferruh > ; tho...@monjalon.net > Subject: [dpdk-dev] [PATCH v4 3/4] net/softnic: add T

Re: [dpdk-dev] [PATCH] vhost: fix vhost_user_set_mem_table error

2017-09-24 Thread Yang, Yi
On Fri, Sep 22, 2017 at 01:28:48PM +0800, Tan, Jianfeng wrote: > > > > + } > > + reg->guest_user_addr = 0; > > + j++; > > + } else { > > + i++; > > +

Re: [dpdk-dev] [PATCH] doc: fix a typo in testpmd guide

2017-09-24 Thread Xing, Beilei
> -Original Message- > From: Rosen, Rami > Sent: Sunday, September 24, 2017 12:55 AM > To: dev@dpdk.org > Cc: Xing, Beilei ; Rosen, Rami > Subject: [PATCH] doc: fix a typo in testpmd guide > > This patch fixes a trivial typo in testpmd guide. > > Signed-off-by: Rami Rosen Acked-by: B

Re: [dpdk-dev] [PATCH v4 2/4] net/softnic: add traffic management support

2017-09-24 Thread Lu, Wenzhuo
Hi Jasvinder, > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jasvinder Singh > Sent: Monday, September 18, 2017 5:10 PM > To: dev@dpdk.org > Cc: Dumitrescu, Cristian ; Yigit, Ferruh > ; tho...@monjalon.net > Subject: [dpdk-dev] [PATCH v4 2/4] net/softnic: add t

Re: [dpdk-dev] [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs

2017-09-24 Thread Rao, Nikhil
On 9/22/2017 5:42 PM, Jerin Jacob wrote: -Original Message- Date: Fri, 22 Sep 2017 02:47:14 +0530 From: Nikhil Rao To: jerin.ja...@caviumnetworks.com, bruce.richard...@intel.com CC: gage.e...@intel.com, dev@dpdk.org, tho...@monjalon.net, harry.van.haa...@intel.com, hemant.agra...@nxp.

Re: [dpdk-dev] [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter

2017-09-24 Thread Rao, Nikhil
On 9/22/2017 2:40 PM, Jerin Jacob wrote: -Original Message- Date: Fri, 22 Sep 2017 02:47:13 +0530 From: Nikhil Rao To: jerin.ja...@caviumnetworks.com, bruce.richard...@intel.com CC: gage.e...@intel.com, dev@dpdk.org, tho...@monjalon.net, harry.van.haa...@intel.com, hemant.agra...@nxp.

[dpdk-dev] [PATCH v2 19/19] vhost: enable IOMMU support

2017-09-24 Thread Maxime Coquelin
Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index fb48f3012..598c65b56 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -211,7 +211,8 @@

[dpdk-dev] [PATCH v2 17/19] vhost-user: iommu: postpone device creation until ring are mapped

2017-09-24 Thread Maxime Coquelin
Translating the start addresses of the rings is not enough, we need to be sure all the ring is made available by the guest. It depends on the size of the rings, which is not known on SET_VRING_ADDR reception. Furthermore, we need to be be safe against vring pages invalidates. This patch introduce

[dpdk-dev] [PATCH v2 14/19] vhost: don't dereference invalid dev pointer after its reallocation

2017-09-24 Thread Maxime Coquelin
numa_realloc() reallocates the virtio_net device structure and updates the vhost_devices[] table with the new pointer if the rings are allocated different NUMA node. Problem is that vhost_user_msg_handler() still dereferences old pointer afterward. This patch prevents this by fetching again the d

[dpdk-dev] [PATCH v2 18/19] vhost: iommu: Invalidate vring in case of matching IOTLB invalidate

2017-09-24 Thread Maxime Coquelin
As soon as a page used by a ring is invalidated, the access_ok flag is cleared, so that processing threads try to map them again. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost.c | 14 ++ lib/librte_vhost/vhost.h | 1 + lib/librte_vhost/vhost_user.c | 38 +++

[dpdk-dev] [PATCH v2 16/19] vhost-user: translate ring addresses when IOMMU enabled

2017-09-24 Thread Maxime Coquelin
When IOMMU is enabled, the ring addresses set by the VHOST_USER_SET_VRING_ADDR requests are guest's IO virtual addresses, whereas Qemu virtual addresses when IOMMU is disabled. When enabled and the required translation is not in the IOTLB cache, an IOTLB miss request is sent, but being called by t

[dpdk-dev] [PATCH v2 15/19] vhost: postpone rings addresses translation

2017-09-24 Thread Maxime Coquelin
This patch postpones rings addresses translations and checks, as addresses sent by the master shuld not be interpreted as long as ring is not started and enabled[0]. When protocol features aren't negotiated, the ring is started in enabled state, so the addresses translations are postponed to vhost

[dpdk-dev] [PATCH v2 13/19] vhost: enable rings at the right time

2017-09-24 Thread Maxime Coquelin
When VHOST_USER_F_PROTOCOL_FEATURES is negotiated, the ring is not enabled when started, but enabled through dedicated VHOST_USER_SET_VRING_ENABLE request. When not negotiated, the ring is started in enabled state, at VHOST_USER_SET_VRING_KICK request time. Signed-off-by: Maxime Coquelin --- li

[dpdk-dev] [PATCH v2 12/19] vhost: use the guest IOVA to host VA helper

2017-09-24 Thread Maxime Coquelin
Replace rte_vhost_gpa_to_vva() calls with vhost_iova_to_vva(), which requires to also pass the mapped len and the access permissions needed. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 71 +++ 1 file changed, 58 insertions(+), 13 del

[dpdk-dev] [PATCH v2 11/19] vhost: introduce guest IOVA to backend VA helper

2017-09-24 Thread Maxime Coquelin
This patch introduces vhost_iova_to_vva() function to translate guest's IO virtual addresses to backend's virtual addresses. When IOMMU is enabled, the IOTLB cache is queried to get the translation. If missing from the IOTLB cache, an IOTLB_MISS request is sent to Qemu, and IOTLB cache is queried

[dpdk-dev] [PATCH v2 10/19] vhost-user: handle IOTLB update and invalidate requests

2017-09-24 Thread Maxime Coquelin
Vhost-user device IOTLB protocol extension introduces VHOST_USER_IOTLB message type. The associated payload is the vhost_iotlb_msg struct defined in Kernel, which in this was can be either an IOTLB update or invalidate message. On IOTLB update, the virtqueues get notified of a new entry. Signed-o

[dpdk-dev] [PATCH v2 08/19] vhost-user: add support to IOTLB miss slave requests

2017-09-24 Thread Maxime Coquelin
Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 25 + lib/librte_vhost/vhost_user.h | 3 +++ 2 files changed, 28 insertions(+) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index 0ba66e193..3df5c5755 100644 --- a/lib/librte

[dpdk-dev] [PATCH v2 09/19] vhost: initialize vrings IOTLB caches

2017-09-24 Thread Maxime Coquelin
The per-virtqueue IOTLB cache init is done at virtqueue init time. init_vring_queue() now takes vring id as parameter, so that the IOTLB cache mempool name can be generated. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost.c | 32 +++- 1 file changed, 27 inse

[dpdk-dev] [PATCH v2 07/19] vhost: iotlb: add pending miss request list and helpers

2017-09-24 Thread Maxime Coquelin
In order to be able to handle other ports or queues while waiting for an IOTLB miss reply, a pending list is created so that waiter can return and restart later on with sending again a miss request. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/iotlb.c | 97

[dpdk-dev] [PATCH v2 06/19] vhost: add iotlb helper functions

2017-09-24 Thread Maxime Coquelin
Signed-off-by: Maxime Coquelin --- lib/librte_vhost/Makefile | 4 +- lib/librte_vhost/iotlb.c | 259 ++ lib/librte_vhost/iotlb.h | 70 + lib/librte_vhost/vhost.c | 1 + lib/librte_vhost/vhost.h | 6 ++ 5 files changed, 338 inserti

[dpdk-dev] [PATCH v2 04/19] vhost: add support to slave requests channel

2017-09-24 Thread Maxime Coquelin
Currently, only QEMU sends requests, the backend sends replies. In some cases, the backend may need to send requests to QEMU, like IOTLB miss events when IOMMU is supported. This patch introduces a new channel for such requests. QEMU sends a file descriptor of a new socket using VHOST_USER_SET_SLA

[dpdk-dev] [PATCH v2 05/19] vhost: declare missing IOMMU-related definitions for old kernels

2017-09-24 Thread Maxime Coquelin
These defines and enums have been introduced in upstream kernel v4.8, and backported to RHEL 7.4. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vhost.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h i

[dpdk-dev] [PATCH v2 03/19] vhost: prepare send_vhost_message() to slave requests

2017-09-24 Thread Maxime Coquelin
send_vhost_message() is currently only used to send replies, so it modifies message flags to perpare the reply. With upcoming channel for backend initiated request, this function can be used to send requests. This patch introduces a new send_vhost_reply() that does the message flags modifications

[dpdk-dev] [PATCH v2 02/19] vhost: make error handling consistent in rx path

2017-09-24 Thread Maxime Coquelin
In the non-mergeable receive case, when copy_mbuf_to_desc() call fails the packet is skipped, the corresponding used element len field is set to vnet header size, and it continues with next packet/desc. It could be a problem because it does not know why it failed, and assume the desc buffer is larg

[dpdk-dev] [PATCH v2 01/19] Revert "vhost: workaround MQ fails to startup"

2017-09-24 Thread Maxime Coquelin
This reverts commit 04d81227960b5c1cf2f11f492100979ead20c526. As agreed when this workaround was introduced, it can be reverted as Qemu v2.10 that fixes the issue is now out. The reply-ack feature is required for vhost-user IOMMU support. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/vho

[dpdk-dev] [PATCH v2 00/19] Vhost-user: Implement device IOTLB support

2017-09-24 Thread Maxime Coquelin
This new revision adresses v1 comments. Main changes are the removal of the virtio-net struct protection lock, and random cache entry eviction when cache is full. Removing the lock fixes the performance degradation reported by Tiwei. For complete change log, please check below. The purpose of this

Re: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush

2017-09-24 Thread Wu, Jingjing
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Wei Zhao > Sent: Friday, September 15, 2017 11:13 AM > To: dev@dpdk.org > Cc: Zhao1, Wei > Subject: [dpdk-dev] [PATCH v3 1/2] net/i40e: queue region set and flush > > This feature enable queue regions configurat

Re: [dpdk-dev] [PATCH] vhost: Expose virtio interrupt requirement on rte_vhos API

2017-09-24 Thread Stephen Hemminger
I heard Fd.io has a faster vhost driver. Has anyone investigated? On Sep 23, 2017 8:16 PM, "Jan Scheurich" wrote: > Performance tests with the OVS DPDK datapath have shown that the tx > throughput over a vhostuser port into a VM with an interrupt-based virtio > driver is limited by the overhead

Re: [dpdk-dev] [PATCH v4 1/4] eventdev: Add caps API and PMD callbacks for rte_event_eth_rx_adapter

2017-09-24 Thread Rao, Nikhil
On 9/21/2017 9:16 PM, Jerin Jacob wrote: -Original Message- Date: Fri, 22 Sep 2017 02:47:11 +0530 From: Nikhil Rao To: jerin.ja...@caviumnetworks.com, bruce.richard...@intel.com CC: gage.e...@intel.com, dev@dpdk.org, tho...@monjalon.net, harry.van.haa...@intel.com, hemant.agra...@nxp.

Re: [dpdk-dev] [PATCH 01/21] Revert "vhost: workaround MQ fails to startup"

2017-09-24 Thread Maxime Coquelin
On 09/07/2017 02:59 PM, Maxime Coquelin wrote: Hi Yuanhan, On 09/07/2017 01:54 PM, Yuanhan Liu wrote: On Thu, Aug 31, 2017 at 11:50:03AM +0200, Maxime Coquelin wrote: This reverts commit 04d81227960b5c1cf2f11f492100979ead20c526. As agreed when this workaround was introduced, it can be rever