[dpdk-dev] [PATCH] vhost: fix off-by-one error on nr_desc check

2016-07-25 Thread Maxime Coquelin
nr_desc is not an index but the number of descriptors, so can be equal to the virtqueue size. Fixes: a436f53ebfeb ("vhost: avoid dead loop chain") Cc: Yuanhan Liu Signed-off-by: Maxime Coquelin --- Hi Yuanhan, I faced the bug while testing my indirect descriptor patch, it happe

[dpdk-dev] [PATCH] vhost: fix off-by-one error on nr_desc check

2016-07-25 Thread Maxime Coquelin
On 07/25/2016 05:24 PM, Yuanhan Liu wrote: > On Mon, Jul 25, 2016 at 04:09:58PM +0200, Maxime Coquelin wrote: >> nr_desc is not an index but the number of descriptors, >> so can be equal to the virtqueue size. >> >> Fixes: a436f53ebfeb ("vhost: avoid dead lo

[dpdk-dev] [PATCH 0/2] examples/l2fwd: Add option to enable/disable MAC addresses tweaking

2016-07-26 Thread Maxime Coquelin
for example. Maxime Coquelin (2): examples/l2fwd: Add new option to enable/disable MAC addresses tweaking doc: l2fwd: document new --[no-]mac-tweaking option doc/guides/sample_app_ug/img/l2_fwd_vm2vm.svg | 311 + .../sample_app_ug/l2_forward_real_virtual.rst

[dpdk-dev] [PATCH 1/2] examples/l2fwd: Add new option to enable/disable MAC addresses tweaking

2016-07-26 Thread Maxime Coquelin
with previous usage. Signed-off-by: Maxime Coquelin --- examples/l2fwd/main.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index 8897921..2693be1 100644 --- a/examples/l2fwd/main.c +++ b

[dpdk-dev] [PATCH 2/2] doc: l2fwd: document new --[no-]mac-tweaking option

2016-07-26 Thread Maxime Coquelin
This patch documents the new l2fwd option, which provides a way to disable the MAC addresses tweaking, enabling the use of l2fwd for basic VM to VM communication. Signed-off-by: Maxime Coquelin --- doc/guides/sample_app_ug/img/l2_fwd_vm2vm.svg | 311 + .../sample_app_ug

[dpdk-dev] doc: announce ivshmem support removal

2016-07-27 Thread Maxime Coquelin
s (ring/mempool) allocated by EAL > > As nobody seems interested, it is time to remove this code which > makes EAL improvements harder. > > Signed-off-by: Thomas Monjalon > Acked-by: David Marchand > > --- > doc/guides/rel_notes/deprecation.rst | 3 +++ > 1 file changed, 3 inse

[dpdk-dev] [PATCH] doc: announce driver name changes

2016-07-28 Thread Maxime Coquelin
eate virtual devices, so a deprecation notice is necessary. Consistency is better. Out of curiosity, will a deprecation message be displayed at least or virtual interfaces if probe is tried with deprecated name? Acked-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition

2016-07-12 Thread Maxime Coquelin
-indentation] if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) ^~ Fixes: 404bd6bfe360 ("net/virtio-user: fix return value not checked") Cc: Jianfeng Tan Signed-off-by: Maxime Coquelin --- drivers/net/virtio/virtio_user_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[dpdk-dev] [PATCH] net/virtio-user: Fix missing brackets in if condition

2016-07-12 Thread Maxime Coquelin
On 07/12/2016 11:35 AM, Thomas Monjalon wrote: > Hi, > > 2016-07-12 11:30, Maxime Coquelin: >> The error is reported using test build script: >> >> $ scripts/test-build.sh x86_64-native-linuxapp-gcc >> ... >> drivers/net/virtio/virtio_user_ethdev.c: I

[dpdk-dev] [RFC] vhost: Add indirect descriptors support to the TX path

2016-07-12 Thread Maxime Coquelin
Indirect descriptors are usually supported by virtio-net devices, allowing to dispatch a large number of large requests. When the virtio device sends a packet using indirect descriptors, only one slot is used in the ring, even for large packets. Signed-off-by: Maxime Coquelin --- I have a two

[dpdk-dev] [PATCH] virtio: fix missing curly braces

2016-07-13 Thread Maxime Coquelin
Hi Jan, On 07/13/2016 11:24 AM, Jan Viktorin wrote: > GCC 6 is complaining and seems to be correct here. > > virtio_user_ethdev.c:345:2: error: > this ?if? clause does not guard... [-Werror=misleading-indentation] >if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PATH) == 1) >^~ > >

[dpdk-dev] [PATCH] virtio: fix missing curly braces

2016-07-13 Thread Maxime Coquelin
On 07/13/2016 07:42 PM, Jan Viktorin wrote: > On Wed, 13 Jul 2016 11:27:18 +0200 > Maxime Coquelin wrote: > >> Hi Jan, >> >> On 07/13/2016 11:24 AM, Jan Viktorin wrote: >>> GCC 6 is complaining and seems to be correct here. >>> >>> virti

[dpdk-dev] [PATCH] net: virtio: clear reserved vring properly at setup time

2016-07-18 Thread Maxime Coquelin
After vring reservation, only the first bytes of the vring were cleared. This patch fixes this to clear the real size fo the vring. Signed-off-by: Maxime Coquelin --- Note: I found this bug while doing some code review, it is not a fix for a problem I encountered. --- drivers/net/virtio

[dpdk-dev] [PATCH] net: virtio: clear reserved vring properly at setup time

2016-07-19 Thread Maxime Coquelin
On 07/19/2016 03:39 AM, Yuanhan Liu wrote: > On Mon, Jul 18, 2016 at 07:09:24PM +0200, Maxime Coquelin wrote: >> After vring reservation, only the first bytes of the vring were >> cleared. >> >> This patch fixes this to clear the real size fo the vring. >>

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-02 Thread Maxime Coquelin
On 10/31/2016 11:01 AM, Wang, Zhihong wrote: > > >> -Original Message----- >> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] >> Sent: Friday, October 28, 2016 3:42 PM >> To: Wang, Zhihong ; Yuanhan Liu >> >> Cc: stephen at networkplumb

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-03 Thread Maxime Coquelin
On 11/02/2016 11:51 AM, Maxime Coquelin wrote: > > > On 10/31/2016 11:01 AM, Wang, Zhihong wrote: >> >> >>> -Original Message- >>> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] >>> Sent: Friday, October 28, 2016 3:42 PM

[dpdk-dev] [PATCH 1/8] net/virtio: revert "virtio: fix restart"

2016-11-03 Thread Maxime Coquelin
Hi Yuanhan, On 11/03/2016 05:09 PM, Yuanhan Liu wrote: > This reverts commit 9a0615af7746 ("virtio: fix restart"); conflict is > manually addressed. > > Kyle reported an issue with above commit > > qemu-kvm: Guest moved used index from 5 to 1 > > with following steps, > > 1) Start my

[dpdk-dev] [PATCH 2/8] net/virtio: simplify queue memzone name

2016-11-03 Thread Maxime Coquelin
, sizeof(vq_hdr_name), "port%d_vq%d_hdr", > + dev->data->port_id, vtpci_queue_idx); > hdr_mz = rte_memzone_reserve_aligned(vq_hdr_name, sz_hdr_mz, >socket_id, 0, >RTE_CACHE_LINE_SIZE); > Sounds reasonable: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 3/8] net/virtio: simplify queue allocation

2016-11-03 Thread Maxime Coquelin
--- > drivers/net/virtio/virtio_ethdev.c | 18 +++--- > drivers/net/virtio/virtqueue.h | 7 +++ > 2 files changed, 14 insertions(+), 11 deletions(-) Other than that: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 4/8] net/virtio: allocate queue at init stage

2016-11-03 Thread Maxime Coquelin
On 11/03/2016 05:09 PM, Yuanhan Liu wrote: > Queue allocation should be done once, since the queue related info (such > as vring addreess) will only be informed to the vhost-user backend once > without virtio device reset. > > That means, if you allocate queues again after the vhost-user

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-04 Thread Maxime Coquelin
Hi, On 11/04/2016 07:18 AM, Xu, Qian Q wrote: > > > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Maxime Coquelin > Sent: Thursday, November 3, 2016 4:11 PM > To: Wang, Zhihong ; Yuanhan Liu linux.intel.com> > Cc: mst at red

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-04 Thread Maxime Coquelin
Hi Zhihong, On 11/04/2016 08:20 AM, Wang, Zhihong wrote: > > >> -Original Message----- >> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] >> Sent: Thursday, November 3, 2016 4:11 PM >> To: Wang, Zhihong ; Yuanhan Liu >> >> Cc: ste

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-04 Thread Maxime Coquelin
On 11/04/2016 08:57 AM, Maxime Coquelin wrote: > Hi Zhihong, > > On 11/04/2016 08:20 AM, Wang, Zhihong wrote: >> >> >>> -Original Message- >>> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] >>> Sent: Thursday, November 3,

[dpdk-dev] [PATCH 4/8] net/virtio: allocate queue at init stage

2016-11-04 Thread Maxime Coquelin
On 11/04/2016 02:50 AM, Yuanhan Liu wrote: > On Thu, Nov 03, 2016 at 10:11:43PM +0100, Maxime Coquelin wrote: >> >> >> On 11/03/2016 05:09 PM, Yuanhan Liu wrote: >>> Queue allocation should be done once, since the queue related info (such >>> as vring addre

[dpdk-dev] [PATCH 1/8] net/virtio: revert "virtio: fix restart"

2016-11-04 Thread Maxime Coquelin
On 11/04/2016 03:00 AM, Yuanhan Liu wrote: > On Thu, Nov 03, 2016 at 09:36:52PM +0100, Maxime Coquelin wrote: >> Hi Yuanhan, >> >> On 11/03/2016 05:09 PM, Yuanhan Liu wrote: >>> This reverts commit 9a0615af7746 ("virtio: fix restart"); conflict is >&

[dpdk-dev] [PATCH 1/8] net/virtio: revert "virtio: fix restart"

2016-11-04 Thread Maxime Coquelin
t; unintended side-effect that causes the problem. > > Fixes: 9a0615af7746 ("virtio: fix restart") > > Cc: Jianfeng Tan > Cc: > Reported-by: Kyle Larose > Signed-off-by: Yuanhan Liu Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 4/8] net/virtio: allocate queue at init stage

2016-11-04 Thread Maxime Coquelin
virtio_ethdev.h | 8 --- > drivers/net/virtio/virtio_pci.h | 2 + > drivers/net/virtio/virtio_rxtx.c | 38 +++--- > 4 files changed, 85 insertions(+), 68 deletions(-) > Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 5/8] net/virtio: initiate vring at init stage

2016-11-04 Thread Maxime Coquelin
rtio_init_vring(). > > Signed-off-by: Yuanhan Liu > --- > drivers/net/virtio/virtio_ethdev.c | 32 +++- > drivers/net/virtio/virtio_rxtx.c | 32 > 2 files changed, 31 insertions(+), 33 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 6/8] net/virtio: move queue configure code to proper place

2016-11-04 Thread Maxime Coquelin
it's being removed. > > Signed-off-by: Yuanhan Liu > --- > drivers/net/virtio/virtio_ethdev.c | 2 - > drivers/net/virtio/virtio_ethdev.h | 2 - > drivers/net/virtio/virtio_rxtx.c | 187 > - > 3 files changed, 79 insertions(+), 112

[dpdk-dev] [PATCH 7/8] net/virtio: complete init stage at the right place

2016-11-04 Thread Maxime Coquelin
hdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Makes sense: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 8/8] net/virtio: remove started field

2016-11-04 Thread Maxime Coquelin
rs/net/virtio/virtio_ethdev.c | 15 ++- > drivers/net/virtio/virtio_pci.h| 1 - > 2 files changed, 2 insertions(+), 14 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-04 Thread Maxime Coquelin
Hi Maxime, I did a little more macswap test and found out more stuff here: >>> Thanks for doing more tests. >>> 1. I did loopback test on another HSW machine with the same H/W, and indirect_desc on and off seems have close perf 2. So I checked the

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-04 Thread Maxime Coquelin
On 11/04/2016 12:36 PM, Yuanhan Liu wrote: > On Fri, Nov 04, 2016 at 12:22:47PM +0100, Maxime Coquelin wrote: >> >> >>>>>> Hi Maxime, >>>>>> >>>>>> I did a little more macswap test and found out more stuff here: >>

[dpdk-dev] [PATCH v4] vhost: Add indirect descriptors support to the TX path

2016-11-04 Thread Maxime Coquelin
On 11/04/2016 01:30 PM, Wang, Zhihong wrote: > > >> -Original Message----- >> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] >> Sent: Friday, November 4, 2016 7:23 PM >> To: Wang, Zhihong ; Yuanhan Liu >> >> Cc: stephen at networkplumb

[dpdk-dev] [PATCH] virtio: tx with can_push when VERSION_1 is set

2016-11-09 Thread Maxime Coquelin
Hi Pierre, On 11/09/2016 01:42 PM, Pierre Pfister (ppfister) wrote: > Hello Maxime, > > Sorry for the late reply. > > >> Le 8 nov. 2016 ? 10:44, Maxime Coquelin a >> ?crit : >> >> Hi Pierre, >> >> On 11/08/2016 10:31 AM, Pierre Pfister (pp

[dpdk-dev] [PATCH] virtio: tx with can_push when VERSION_1 is set

2016-11-09 Thread Maxime Coquelin
Hi Pierre, On 11/09/2016 01:42 PM, Pierre Pfister (ppfister) wrote: > Hello Maxime, > > Sorry for the late reply. > > >> Le 8 nov. 2016 ? 10:44, Maxime Coquelin a >> ?crit : >> >> Hi Pierre, >> >> On 11/08/2016 10:31 AM, Pierre Pfister (pp

[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-16 Thread Maxime Coquelin
Hi Michael, On 10/13/2016 07:50 PM, Michael S. Tsirkin wrote: > Hi! > So it looks like we face a problem with cross-version > migration when using vhost. It's not new but became more > acute with the advent of vhost user. > > For users to be able to migrate between different versions > of the

[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-17 Thread Maxime Coquelin
On 11/17/2016 09:29 AM, Yuanhan Liu wrote: > As usaual, sorry for late response :/ > > On Thu, Oct 13, 2016 at 08:50:52PM +0300, Michael S. Tsirkin wrote: >> Hi! >> So it looks like we face a problem with cross-version >> migration when using vhost. It's not new but became more >> acute with the

[dpdk-dev] [PATCH] virtio: tx with can_push when VERSION_1 is set

2016-11-22 Thread Maxime Coquelin
Hi Pierre, On 11/22/2016 10:54 AM, Pierre Pfister (ppfister) wrote: > Hello Maxime, > >> Le 9 nov. 2016 ? 15:51, Maxime Coquelin a >> ?crit : >> >> Hi Pierre, >> >> On 11/09/2016 01:42 PM, Pierre Pfister (ppfister) wrote: >>> Hello Maxime, >

[dpdk-dev] [PATCH] doc: introduce PVP reference benchmark

2016-11-24 Thread Maxime Coquelin
On 11/24/2016 06:07 AM, Yuanhan Liu wrote: > First of all, thanks for the doc! It's a great one. Thanks. I would be interested to know if you have other tuning I don't mention in this doc. > > On Wed, Nov 23, 2016 at 10:00:06PM +0100, Maxime Coquelin wrote: >&

[dpdk-dev] [PATCH] doc: introduce PVP reference benchmark

2016-11-24 Thread Maxime Coquelin
On 11/24/2016 12:58 PM, Kevin Traynor wrote: > On 11/23/2016 09:00 PM, Maxime Coquelin wrote: >> Having reference benchmarks is important in order to obtain >> reproducible performance figures. >> >> This patch describes required steps to configure a PVP setup &g

[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-24 Thread Maxime Coquelin
On 11/24/2016 01:33 PM, Yuanhan Liu wrote: > On Thu, Nov 24, 2016 at 09:30:49AM +, Kevin Traynor wrote: >> > On 11/24/2016 06:31 AM, Yuanhan Liu wrote: >>> > > On Tue, Nov 22, 2016 at 04:53:05PM +0200, Michael S. Tsirkin wrote: >> > You keep assuming that you have the VM started

[dpdk-dev] [PATCH] doc: introduce PVP reference benchmark

2016-11-25 Thread Maxime Coquelin
Hi John, On 11/24/2016 06:38 PM, Mcnamara, John wrote: >> -Original Message- >> From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] >> Sent: Wednesday, November 23, 2016 9:00 PM >> To: yuanhan.liu at linux.intel.com; thomas.monjalon at 6wind.com; Mcna

[dpdk-dev] [PATCH] doc: introduce PVP reference benchmark

2016-11-28 Thread Maxime Coquelin
On 11/28/2016 12:22 PM, Thomas Monjalon wrote: > 2016-11-23 22:00, Maxime Coquelin: >> +You can use this qmp-vcpu-pin script to pin vCPUs: >> + >> + .. code-block:: python >> + >> +#!/usr/bin/python >> +# QEMU vCPU pinning tool >> +

[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-28 Thread Maxime Coquelin
On 11/24/2016 04:24 PM, Kavanagh, Mark B wrote: >> >> On 11/24/2016 12:47 PM, Maxime Coquelin wrote: >>> >>> >>> On 11/24/2016 01:33 PM, Yuanhan Liu wrote: >>>> On Thu, Nov 24, 2016 at 09:30:49AM +, Kevin Traynor wrote: >>>>>

[dpdk-dev] dpdk/vpp and cross-version migration for vhost

2016-11-29 Thread Maxime Coquelin
On 11/28/2016 11:18 PM, Thomas Monjalon wrote: > 2016-11-28 16:28, Maxime Coquelin: >> On 11/24/2016 04:24 PM, Kavanagh, Mark B wrote: >>> DPDK v16.04 added support for vHost User TSO; as such, by default, >>> TSO is advertised to guest devices as an available

[dpdk-dev] [PATCH] doc: introduce PVP reference benchmark

2016-11-29 Thread Maxime Coquelin
Hi Yuanhan, On 11/29/2016 11:16 AM, Yuanhan Liu wrote: > On Thu, Nov 24, 2016 at 08:35:51AM +0100, Maxime Coquelin wrote: >> >> >> On 11/24/2016 06:07 AM, Yuanhan Liu wrote: >>> First of all, thanks for the doc! It's a great one. >> Thanks. >> I wou

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-03 Thread Maxime Coquelin
Hi Olivier, On 10/03/2016 11:00 AM, Olivier Matz wrote: > Signed-off-by: Olivier Matz > --- > drivers/net/virtio/virtio_ethdev.c | 14 > drivers/net/virtio/virtio_ethdev.h | 2 +- > drivers/net/virtio/virtio_rxtx.c | 69 > ++ >

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-03 Thread Maxime Coquelin
On 09/29/2016 10:21 PM, Michael S. Tsirkin wrote: > On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: >> > >> > >> > On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: >>> > > On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin

[dpdk-dev] [PATCH 1/2] mbuf: add rte_pktmbuff_reset_headroom function

2016-10-04 Thread Maxime Coquelin
On 10/03/2016 06:11 PM, Olivier Matz wrote: > Hi Maxime, > > On 09/29/2016 02:20 PM, Maxime Coquelin wrote: >> Some application use rte_mbuf_raw_alloc() function to improve >> performance by not resetting mbuf's fields to their default state. >> >> This ca

[dpdk-dev] [PATCH v2 1/2] mbuf: add rte_pktmbuff_reset_headroom function

2016-10-04 Thread Maxime Coquelin
affectations in the mbuf lib with a call to this function. Signed-off-by: Maxime Coquelin --- Changes since v2: = - Specify headroom may be reset only if segment is empty. lib/librte_mbuf/rte_mbuf.h | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git

[dpdk-dev] [PATCH v2 2/2] app/testpmd/txonly: Reset headroom after raw packet allocation

2016-10-04 Thread Maxime Coquelin
-off-by: Maxime Coquelin --- app/test-pmd/txonly.c | 8 1 file changed, 8 insertions(+) diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c index d2736b7..8513a06 100644 --- a/app/test-pmd/txonly.c +++ b/app/test-pmd/txonly.c @@ -222,6 +222,14 @@ pkt_burst_transmit(struct fwd_stream

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-05 Thread Maxime Coquelin
Hi Olivier, On 10/05/2016 01:56 PM, Olivier Matz wrote: > Hi Maxime, > > On 10/03/2016 02:51 PM, Maxime Coquelin wrote: >>> --- a/drivers/net/virtio/virtio_rxtx.c >>> +++ b/drivers/net/virtio/virtio_rxtx.c >>> @@ -50,6 +50,7 @@ >>> #include

[dpdk-dev] [PATCH] vhost: Only access header if offloading is supported in dequeue path

2016-10-06 Thread Maxime Coquelin
If offloading features are not negotiated, parsing the virtio header is not needed. Micro-benchmark with testpmd shows that the gain is +4% with indirect descriptors, +1% when using direct descriptors. Signed-off-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 47

[dpdk-dev] [PATCH] vhost: Only access header if offloading is supported in dequeue path

2016-10-06 Thread Maxime Coquelin
On 10/06/2016 07:00 PM, Maxime Coquelin wrote: > If offloading features are not negotiated, parsing the virtio header > is not needed. > > Micro-benchmark with testpmd shows that the gain is +4% with indirect > descriptors, +1% when using direct descriptors. > > Signed-of

[dpdk-dev] [PATCH v2 10/12] virtio: add Tx checksum offload support

2016-10-07 Thread Maxime Coquelin
Hi Olivier, On 10/03/2016 11:00 AM, Olivier Matz wrote: > Signed-off-by: Olivier Matz > --- > drivers/net/virtio/virtio_ethdev.c | 7 + > drivers/net/virtio/virtio_ethdev.h | 1 + > drivers/net/virtio/virtio_rxtx.c | 57 > +- > 3 files changed, 45

[dpdk-dev] [PATCH v2 4/7] vhost: add dequeue zero copy

2016-10-10 Thread Maxime Coquelin
Hi Xu, On 10/10/2016 12:12 PM, Xu, Qian Q wrote: > Good to know. I will try v3. BTW, on the master branch, seems vhost PMD is > broken. When we run --vdev 'eth_vhost0,', then it will report the error > that the driver is not supported. V16.07 is OK, but I haven't got time to do > git

[dpdk-dev] [PATCH v2 4/7] vhost: add dequeue zero copy

2016-10-10 Thread Maxime Coquelin
pdated. Maxime > > -Original Message----- > From: Maxime Coquelin [mailto:maxime.coquelin at redhat.com] > Sent: Monday, October 10, 2016 11:14 AM > To: Xu, Qian Q ; Yuanhan Liu linux.intel.com> > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 4/7] vhost: a

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Maxime Coquelin
On 10/10/2016 06:22 AM, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 07:17:06AM +0300, Michael S. Tsirkin wrote: >> On Mon, Oct 10, 2016 at 12:05:31PM +0800, Yuanhan Liu wrote: >>> On Fri, Sep 30, 2016 at 10:16:43PM +0300, Michael S. Tsirkin wrote: >> And the same is done is done in DPDK:

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-10 Thread Maxime Coquelin
On 10/10/2016 04:42 PM, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: >>>>> At that time, a packet always use 2 descs. Since indirect desc is >>>>> enabled (by default) now, the assumption is not true then. What's >&

[dpdk-dev] [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-10-11 Thread Maxime Coquelin
On 10/11/2016 08:04 AM, Yuanhan Liu wrote: > On Mon, Oct 10, 2016 at 04:54:39PM +0200, Maxime Coquelin wrote: >> >> >> On 10/10/2016 04:42 PM, Yuanhan Liu wrote: >>> On Mon, Oct 10, 2016 at 02:40:44PM +0200, Maxime Coquelin wrote: >>>>>>> At tha

[dpdk-dev] [PATCH v2] vhost: Only access header if offloading is supported in dequeue path

2016-10-11 Thread Maxime Coquelin
If offloading features are not negotiated, parsing the virtio header is not needed. Micro-benchmark with testpmd shows that the gain is +4% with indirect descriptors, +1% when using direct descriptors. Signed-off-by: Maxime Coquelin --- Changes since v1: = - Rebased - Fix

[dpdk-dev] [PATCH v2 01/12] virtio: move device initialization in a function

2016-10-11 Thread Maxime Coquelin
Makes sense, feel free to add my: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 02/12] virtio: setup and start cq in configure callback

2016-10-11 Thread Maxime Coquelin
gt; drivers/net/virtio/virtio_ethdev.h | 4 ++-- > drivers/net/virtio/virtio_pci.h| 3 +-- > 3 files changed, 24 insertions(+), 26 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 03/12] virtio: reinitialize the device in configure callback

2016-10-11 Thread Maxime Coquelin
y: Olivier Matz > --- > drivers/net/virtio/virtio_ethdev.c | 26 +++--- > drivers/net/virtio/virtio_pci.h| 1 + > 2 files changed, 20 insertions(+), 7 deletions(-) Looks good to me. Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 04/12] net: add function to calculate a checksum in a mbuf

2016-10-11 Thread Maxime Coquelin
On 10/03/2016 11:00 AM, Olivier Matz wrote: > This function can be used to calculate the checksum of data embedded in > mbuf, that can be composed of several segments. > > This function will be used by the virtio pmd in next commits to calculate > the checksum in software in case the protocol is

[dpdk-dev] [PATCH v2 05/12] mbuf: add new Rx checksum mbuf flags

2016-10-11 Thread Maxime Coquelin
release_16_11.rst > +++ b/doc/guides/rel_notes/release_16_11.rst > @@ -60,6 +60,12 @@ New Features >Added a new function ``rte_raw_cksum_mbuf()`` to process the checksum of >data embedded in an mbuf chain. > > +* **Added new Rx checksum mbuf flags.** > + > + Added new Rx checksum flags in mbufs to described more states: unknown, s/described/describe/ With this typo fixed, it looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 06/12] app/testpmd: fix checksum stats in csum engine

2016-10-11 Thread Maxime Coquelin
M_MASK) == PKT_RX_L4_CKSUM_BAD) > + rx_bad_l4_csum += 1; > > /* step 1: dissect packet, parsing optional vlan, ip4/ip6, vxlan >* and inner headers */ > Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 07/12] mbuf: new flag for LRO

2016-10-11 Thread Maxime Coquelin
ase_16_11.rst | 5 + > lib/librte_mbuf/rte_mbuf.c | 2 ++ > lib/librte_mbuf/rte_mbuf.h | 7 +++ > 3 files changed, 14 insertions(+) Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 08/12] app/testpmd: display lro segment size

2016-10-11 Thread Maxime Coquelin
On 10/03/2016 11:00 AM, Olivier Matz wrote: > In csumonly engine, display the value of LRO segment if the > LRO flag is set. > > Signed-off-by: Olivier Matz > --- > app/test-pmd/csumonly.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-11 Thread Maxime Coquelin
On 10/03/2016 11:00 AM, Olivier Matz wrote: > Signed-off-by: Olivier Matz > --- > drivers/net/virtio/virtio_ethdev.c | 14 > drivers/net/virtio/virtio_ethdev.h | 2 +- > drivers/net/virtio/virtio_rxtx.c | 69 > ++ >

[dpdk-dev] [PATCH v2 11/12] virtio: add Lro support

2016-10-11 Thread Maxime Coquelin
insertions(+), 10 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH v2 09/12] virtio: add Rx checksum offload support

2016-10-11 Thread Maxime Coquelin
On 10/11/2016 04:29 PM, Olivier MATZ wrote: > > > On 10/11/2016 04:04 PM, Maxime Coquelin wrote: >>> +/* Optionally fill offload information in structure */ >>> +static int >>> +virtio_rx_offload(struct rte_mbuf *m, struct virtio_net_hdr *hdr) >>>

[dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue

2016-10-13 Thread Maxime Coquelin
On 10/13/2016 08:02 AM, Wang, Zhihong wrote: >> > Yes, that's great effort! With your hardwork, we know what the bottleneck >> > is and how it could be improved. >> > >> > However, you don't have to do code refactor (merge two code path to one) >> > to apply those improvements. From what I know,

[dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue

2016-10-13 Thread Maxime Coquelin
On 10/13/2016 09:54 AM, Maxime Coquelin wrote: > > > On 10/13/2016 08:02 AM, Wang, Zhihong wrote: >>> > Yes, that's great effort! With your hardwork, we know what the >>> bottleneck >>> > is and how it could be improved. >>> > >>>

[dpdk-dev] [PATCH v2] vhost: Only access header if offloading is supported in dequeue path

2016-10-14 Thread Maxime Coquelin
On 10/11/2016 11:01 AM, Yuanhan Liu wrote: > On Tue, Oct 11, 2016 at 09:45:27AM +0200, Maxime Coquelin wrote: >> @@ -684,12 +699,12 @@ copy_desc_to_mbuf(struct virtio_net *dev, struct >> vring_desc *descs, >>struct rte_mempool *mbuf_pool) >> { >

[dpdk-dev] [RFC] vhost: Add indirect descriptors support to the TX path

2016-08-05 Thread Maxime Coquelin
On 08/03/2016 04:03 PM, Yuanhan Liu wrote: > On Tue, Jul 12, 2016 at 04:32:12PM +0200, Maxime Coquelin wrote: >> Indirect descriptors are usually supported by virtio-net devices, >> allowing to dispatch a large number of large requests. >> >> When the virtio device se

[dpdk-dev] [PATCH] optimize vhost enqueue

2016-08-16 Thread Maxime Coquelin
Hi Zhihong, On 08/16/2016 05:50 AM, Zhihong Wang wrote: > This patch optimizes the vhost enqueue function: rte_vhost_enqueue_burst. > > Currently there're 2 callbacks for vhost enqueue: > * virtio_dev_merge_rx for mrg_rxbuf turned on cases. > * virtio_dev_rx for mrg_rxbuf turned off cases. >

[dpdk-dev] [PATCH] optimize vhost enqueue

2016-08-17 Thread Maxime Coquelin
On 08/17/2016 08:41 AM, Wang, Zhihong wrote: > > >> -Original Message- >> From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] >> Sent: Wednesday, August 17, 2016 10:38 AM >> To: Wang, Zhihong >> Cc: Maxime Coquelin ; dev at dpdk.org >>

[dpdk-dev] vhost [query] : support for multiple ports and non VMDQ devices in vhost switch

2016-08-17 Thread Maxime Coquelin
Hi Jianfeng, On 08/17/2016 04:33 AM, Tan, Jianfeng wrote: > Hi, > > Please review below proposal of Pankaj and myself after an offline > discussion. (Pankaj, please correct me if I'm going somewhere wrong). > > a. Remove HW dependent option, --strip-vlan, because different kinds of > NICs behave

[dpdk-dev] vhost [query] : support for multiple ports and non VMDQ devices in vhost switch

2016-08-18 Thread Maxime Coquelin
Hi, On 08/18/2016 04:35 AM, Tan, Jianfeng wrote: > Hi Maxime, > > On 8/17/2016 7:18 PM, Maxime Coquelin wrote: >> Hi Jianfeng, >> >> On 08/17/2016 04:33 AM, Tan, Jianfeng wrote: >>> Hi, >>> >>> Please review below proposal of Pankaj and m

[dpdk-dev] [PATCH] examples/vhost: remove VLAN strip option

2016-08-18 Thread Maxime Coquelin
2 files changed, 5 insertions(+), 32 deletions(-) Minor comment below. Other than that: Reviewed-by: Maxime Coquelin > diff --git a/doc/guides/sample_app_ug/vhost.rst > b/doc/guides/sample_app_ug/vhost.rst > index 2b7defc..a204f78 100644 > --- a/doc/guides/sample_app_ug/vhost.rst > ++

[dpdk-dev] [PATCH 1/2] examples/vhost: rename dev-basename

2016-08-18 Thread Maxime Coquelin
_MAX] = "vhost-net"; Not very important, but now that we only support vhost-user, maybe we could default the name to "vhost-user"? There is no real convention I think, but this is what OVS is used to use in its examples. Other than that: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 2/2] examples/vhost: support multiple socket files

2016-08-18 Thread Maxime Coquelin
On 08/16/2016 06:14 PM, Jiayu Hu wrote: > When examples/vhost runs in client mode, only one QEMU can be connected. > This is because that examples/vhost just supports one socket file. This > patch is to add multiple sockets support for examples/vhost. > > Signed-off-by: Jiayu Hu > --- >

[dpdk-dev] [PATCH 1/2] examples/vhost: rename dev-basename

2016-08-18 Thread Maxime Coquelin
On 08/18/2016 10:35 AM, Yuanhan Liu wrote: > On Thu, Aug 18, 2016 at 10:22:38AM +0200, Maxime Coquelin wrote: >> Hi Jiayu, >> >> On 08/16/2016 06:14 PM, Jiayu Hu wrote: >>> In examples/vhost, "dev-basename" is a program option, which is to set >

[dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue

2016-08-22 Thread Maxime Coquelin
Hi Zhihong, On 08/19/2016 07:43 AM, Zhihong Wang wrote: > This patch set optimizes the vhost enqueue function. > > It implements the vhost logic from scratch into a single function designed > for high performance and good maintainability, and improves CPU efficiency > significantly by optimizing

[dpdk-dev] [PATCH v3 1/5] vhost: rewrite enqueue

2016-08-22 Thread Maxime Coquelin
On 08/19/2016 07:43 AM, Zhihong Wang wrote: > This patch implements the vhost logic from scratch into a single function > designed for high performance and better maintainability. > > --- > Changes in v3: > > 1. Rewrite enqueue and delete the obsolete in the same patch. > > Signed-off-by:

[dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue

2016-08-22 Thread Maxime Coquelin
On 08/22/2016 10:11 AM, Maxime Coquelin wrote: > Hi Zhihong, > > On 08/19/2016 07:43 AM, Zhihong Wang wrote: > > This patch set optimizes the vhost enqueue function. > > > > It implements the vhost logic from scratch into a single function > > designed

[dpdk-dev] [PATCH 1/6] vhost: simplify memory regions handling

2016-08-23 Thread Maxime Coquelin
by: Yuanhan Liu > --- > lib/librte_vhost/vhost.h | 49 ++-- > lib/librte_vhost/vhost_user.c | 172 > +- > 2 files changed, 90 insertions(+), 131 deletions(-) > Thanks for explaining the history behind this. FWIW, the change looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 2/6] vhost: get guest/host physical address mappings

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > So that we can convert a guest physical address to host physical > address, which will be used in later Tx zero copy implementation. > > Signed-off-by: Yuanhan Liu > --- > lib/librte_vhost/vhost.h | 30 +++ >

[dpdk-dev] [PATCH v3 0/5] vhost: optimize enqueue

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 12:43 PM, Wang, Zhihong wrote: > > >> -Original Message- >> From: Wang, Zhihong >> Sent: Tuesday, August 23, 2016 10:31 AM >> To: Maxime Coquelin ; dev at dpdk.org >> Cc: yuanhan.liu at linux.intel.com >> Subject:

[dpdk-dev] [PATCH 3/6] vhost: introduce last avail idx for Tx

2016-08-23 Thread Maxime Coquelin
- > lib/librte_vhost/virtio_net.c | 19 +++ > 2 files changed, 12 insertions(+), 9 deletions(-) Looks good to me: Reviewed-by: Maxime Coquelin Thanks, Maxime

[dpdk-dev] [PATCH 2/6] vhost: get guest/host physical address mappings

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 02:32 PM, Yuanhan Liu wrote: >>> + >>> > >+/* FIXME */ >>> > >+RTE_LOG(INFO, VHOST_CONFIG, ":: %u ::\n", pre_read); >> > For my information, what is the purpose of pre_read? > Again, I put a FIXME here, but I forgot to add some explanation. > > Here is the thing:

[dpdk-dev] [PATCH 4/6] vhost: add Tx zero copy

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > The basic idea of Tx zero copy is, instead of copying data from the > desc buf, here we let the mbuf reference the desc buf addr directly. > > Doing so, however, has one major issue: we can't update the used ring > at the end of

[dpdk-dev] [PATCH 2/6] vhost: get guest/host physical address mappings

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 03:49 PM, Yuanhan Liu wrote: > On Tue, Aug 23, 2016 at 03:25:33PM +0200, Maxime Coquelin wrote: >> >> >> On 08/23/2016 02:32 PM, Yuanhan Liu wrote: >>>>> + >>>>>>> + /* FIXME */ >>>>>>> +

[dpdk-dev] [PATCH 6/6] examples/vhost: add an option to enable Tx zero copy

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > Add an option, --tx-zero-copy, to enable Tx zero copy. > > One thing worth noting while using Tx zero copy is the nb_tx_desc has > to be small enough so that the eth driver will hit the mbuf free > threshold easily and thus free mbuf more frequently.

[dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 10:10 AM, Yuanhan Liu wrote: > This patch set enables vhost Tx zero copy. The majority work goes to > patch 4: vhost: add Tx zero copy. > > The basic idea of Tx zero copy is, instead of copying data from the > desc buf, here we let the mbuf reference the desc buf addr directly. > >

[dpdk-dev] [PATCH 4/6] vhost: add Tx zero copy

2016-08-23 Thread Maxime Coquelin
On 08/23/2016 04:31 PM, Yuanhan Liu wrote: > On Tue, Aug 23, 2016 at 04:04:30PM +0200, Maxime Coquelin wrote: >> >> >> On 08/23/2016 10:10 AM, Yuanhan Liu wrote: >>> The basic idea of Tx zero copy is, instead of copying data from the >>> desc buf, here we l

[dpdk-dev] [PATCH 0/6] vhost: add Tx zero copy support

2016-08-23 Thread Maxime Coquelin
iu wrote: >> On Tue, Aug 23, 2016 at 04:18:40PM +0200, Maxime Coquelin wrote: >>> >>> >>> On 08/23/2016 10:10 AM, Yuanhan Liu wrote: >>>> This patch set enables vhost Tx zero copy. The majority work goes to >>>> patch 4: vhost: add Tx zero c

[dpdk-dev] vhost [query] : support for multiple ports and non VMDQ devices in vhost switch

2016-08-24 Thread Maxime Coquelin
On 08/18/2016 04:35 AM, Tan, Jianfeng wrote: > Hi Maxime, > > On 8/17/2016 7:18 PM, Maxime Coquelin wrote: >> Hi Jianfeng, >> >> On 08/17/2016 04:33 AM, Tan, Jianfeng wrote: >>> Hi, >>> >>> Please review below proposal of Pankaj and myself af

  1   2   >