[dpdk-dev] [PATCH v3 19/25] ether: Fix vlan strip/insert issue

2015-02-04 Thread Xie, Huawei
On 1/29/2015 3:24 PM, Ouyang Changchun wrote: > Need swap the data from cpu to BE(big endian) for vlan-type. > > Signed-off-by: Changchun Ouyang > --- > lib/librte_ether/rte_ether.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_ether/rte_ether.h

[dpdk-dev] [PATCH v2 00/11] qemu vhost-user support

2015-02-12 Thread Xie, Huawei
Sorry, forget to add --in-reply-to and add v2 changes. v2 changes: * vhost-cuse and vhost-user have their own set_mem_table message handler. * rework and refine mutex operation in fd management to avoid race condition * increase listen backlog * use memset to fix initialization compiler errors

[dpdk-dev] [PATCH v2 09/11] lib/librte_vhost: vhost user support

2015-02-12 Thread Xie, Huawei
On 2/12/2015 4:28 PM, Linhaifeng wrote: > > On 2015/2/12 13:07, Huawei Xie wrote: >> + >> +/* This is ugly */ >> +mapped_size = memory.regions[idx].memory_size + >> +memory.regions[idx].mmap_offset; >> +mapped_address =

[dpdk-dev] [PATCH v4 00/26] Single virtio implementation

2015-02-17 Thread Xie, Huawei
Acked-by Huawei Xie On 2/9/2015 9:14 AM, Ouyang, Changchun wrote: > This is the patch set for single virtio implementation. > > Why we need single virtio? > > As we know currently there are at least 3 virtio PMD driver implementations: > A)

[dpdk-dev] [PATCH v3 00/11] qemu vhost-user support

2015-02-25 Thread Xie, Huawei
Czesnowicz wrote: > v3 changes: > * move things around to make all patches compile > > > Xie, Huawei (11): > lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is > dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver > in gue

[dpdk-dev] Vhost-user early adopter feedback

2015-02-25 Thread Xie, Huawei
On 2/18/2015 3:59 PM, Beno?t Canet wrote: > Hello Xie, > > As promized I integrated your vhost-user patchset from january in my vswitch. > > I just tried it, it works pretty well. > > I just had a minor bug with rte_vhost_driver_register taking ownership of the > string patch pointer too late. I

[dpdk-dev] [PATCH v3 09/11] lib/librte_vhost: vhost user support

2015-02-27 Thread Xie, Huawei
On 2/24/2015 1:36 AM, Czesnowicz, Przemyslaw wrote: > From: "Xie, Huawei" > > In rte_vhost_driver_register(), vhost unix domain socket listener fd is > created > and added to polled(based on select) fdset. > > In rte_vhost_driver_session_start(), fds in the fds

[dpdk-dev] [PATCH RFC v2 08/12] lib/librte_vhost: vhost-user support

2015-01-04 Thread Xie, Huawei
> -Original Message- > From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] > Sent: Wednesday, December 24, 2014 12:21 AM > To: Xie, Huawei; dev at dpdk.org > Cc: haifeng.lin at intel.com > Subject: Re: [PATCH RFC v2 08/12] lib/librte_vhost: vhost-user support > > (

[dpdk-dev] [PATCH RFC v2 08/12] lib/librte_vhost: vhost-user support

2015-01-05 Thread Xie, Huawei
> -Original Message- > From: Linhaifeng [mailto:haifeng.lin at huawei.com] > Sent: Wednesday, December 10, 2014 10:36 PM > To: Xie, Huawei; dev at dpdk.org > Cc: haifeng.lin at intel.com > Subject: Re: [dpdk-dev] [PATCH RFC v2 08/12] lib/librte_vhost: vh

[dpdk-dev] [PATCH RFC v2 03/12] lib/librte_vhost: move event_copy logic from virtio-net.c to vhost-net-cdev.c

2015-01-07 Thread Xie, Huawei
> + file = *(const struct vhost_vring_file *)in_buf; > + LOG_DEBUG(VHOST_CONFIG, > + "idx:%d fd:%d\n", file.index, file.fd); > + fd = eventfd_copy(file.fd, ctx.pid); > + if (fd < 0) { > +

[dpdk-dev] [PATCH v2 3/5] vhost: enable promisc mode and config VMDQ offload register for multicast feature

2015-01-08 Thread Xie, Huawei
> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c > index 27ba175..744156c 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -68,7 +68,9 @@ static struct virtio_net_device_ops const *notify_ops; > static struct virtio_net_config_ll

[dpdk-dev] [PATCH] virtio: fix the vq size issue

2015-07-10 Thread Xie, Huawei
Thomas: Could we roll back that commit or apply Changchun's patch? /Huawei On 7/1/2015 11:53 PM, Xie, Huawei wrote: > On 7/1/2015 3:49 PM, Ouyang Changchun wrote: >> This commit breaks virtio basic packets rx functionality: >> d78deadae4dca240e85054bf2d604a801676becc >>

[dpdk-dev] [PATCH v2 0/3] Fix vhost startup issue

2015-07-10 Thread Xie, Huawei
Acked-by: Huawei Xie On 7/6/2015 10:27 AM, Ouyang, Changchun wrote: > The patch set fix vhost sample fails to start up in second time: > > It should call api to unregister vhost driver when sample exit/quit, then > the socket file will be removed(by calling unlink), and thus make vhost sample

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
On 6/17/2015 11:24 PM, Thomas Monjalon wrote: > 2015-05-07 06:54, Xie, Huawei: >> On 4/16/2015 7:48 PM, Pavel Boldin wrote: >>> + /* Closing the source_fd */ >>> + ret = sys_close(eventfd_copy.source_fd); >> Pavel: >> Here we close the fd and

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
is allocate a new fd, and install the file on the newly allocated fd. new_fd = get_unused_fd_flags(...) fd_install(new_fd, get_file(fp[i])); /huawei [1] https://github.com/torvalds/linux/blob/master/net/core/scm.c#L248 Pavel On Fri, Jul 10, 2015 at 5:27 PM, Xie, Huawei mailto:huawei.xie

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
#L248 Pavel On Fri, Jul 10, 2015 at 5:27 PM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 6/17/2015 11:24 PM, Thomas Monjalon wrote: > 2015-05-07 06:54, Xie, Huawei: >> On 4/16/2015 7:48 PM, Pavel Boldin wrote: >>> + /* Closing the source_fd */

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-10 Thread Xie, Huawei
On 7/10/2015 11:50 PM, Thomas Monjalon wrote: > 2015-07-10 15:42, Xie, Huawei: >> Don't know why previous mail get messed. > Same problem with this one. > It's maybe because you send HTML mail which is wrongly translated in plain > text. Have something to to with Pavel? :). I r

[dpdk-dev] [PATCH v5 4/5] vhost: eventfd_link: replace copy-pasted sys_close

2015-07-13 Thread Xie, Huawei
On 7/11/2015 11:08 PM, Pavel Boldin wrote: > Xie, All, > > Please find my comments intermixed below. > > On Fri, Jul 10, 2015 at 6:42 PM, Xie, Huawei <mailto:huawei.xie at intel.com>> wrote: > > Don't know why previous mail get messed. > > On 7/

[dpdk-dev] abi change announce

2015-07-30 Thread Xie, Huawei
Hi Thomas: I am doing virtio/vhost performance optimization, so there is possibly some change, for example to virtio or vhost virtqueue data structure. Do i need to announce the ABI change even if the change hasn't been determined? /huawei

[dpdk-dev] [PATCH 3/6] lib_vhost: Set memory layout for multiple queues mode

2015-06-02 Thread Xie, Huawei
Is there any possibility that different queue has different memory translation? How about we use the memory region of the first queue discovered? On 5/21/2015 3:50 PM, Ouyang Changchun wrote: > QEMU sends separate commands orderly to set the memory layout for each queue > in one virtio device,

[dpdk-dev] [PATCH v3 1/4] lib_vhost: Fix enqueue/dequeue can't handle chained vring descriptors

2015-06-02 Thread Xie, Huawei
On 6/1/2015 4:26 PM, Ouyang, Changchun wrote: > Vring enqueue need consider the 2 cases: > 1. use separate descriptors to contain virtio header and actual data, e.g. > the first descriptor > is for virtio header, and then followed by descriptors for actual data. > 2. virtio header and some

[dpdk-dev] [PATCH 2/6] lib_vhost: Support multiple queues in virtio dev

2015-06-03 Thread Xie, Huawei
On 5/21/2015 3:51 PM, Ouyang Changchun wrote: > Each virtio device could have multiple queues, say 2 or 4, at most 8. > Enabling this feature allows virtio device/port on guest has the ability to > use different vCPU to receive/transmit packets from/to each queue. > > In multiple queues mode,

[dpdk-dev] [PATCH] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-03 Thread Xie, Huawei
On 6/3/2015 8:55 PM, Ouyang, Changchun wrote: > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Huawei Xie >> Sent: Tuesday, June 2, 2015 9:50 AM >> To: dev at dpdk.org >> Cc: Sun, Peng A >> Subject: [dpdk-dev] [PATCH] vhost: provide vhost API to unregister

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-05 Thread Xie, Huawei
On 6/5/2015 10:49 AM, Xie, Huawei wrote: > rte_vhost_driver_unregister will remove the listenfd from event list, and > then close it. > > Signed-off-by: Huawei Xie > Signed-off-by: Peng Sun > --- The v2 patch just fixes two lines of code style issue.

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-05 Thread Xie, Huawei
Sorry, forget the --in-reply-to, please ignore this thread. On 6/5/2015 10:49 AM, Xie, Huawei wrote: > rte_vhost_driver_unregister will remove the listenfd from event list, and > then close it. > > Signed-off-by: Huawei Xie > Signed-off-by: Peng Sun > --- >

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-08 Thread Xie, Huawei
On 6/5/2015 5:04 PM, Loftus, Ciara wrote: > >> -Original Message- >> From: Xie, Huawei >> Sent: Friday, June 05, 2015 4:26 AM >> To: dev at dpdk.org >> Cc: Loftus, Ciara; Xie, Huawei; Sun, Peng A >> Subject: [PATCH v2] vhost: provide vhost API to

[dpdk-dev] [PATCH] vhost: flush used->idx update before reading avail->flags

2015-06-09 Thread Xie, Huawei
On 6/9/2015 4:47 PM, Michael S. Tsirkin wrote: > On Tue, Jun 09, 2015 at 03:04:02PM +0800, Linhaifeng wrote: >> >> On 2015/4/24 15:27, Luke Gorrie wrote: >>> On 24 April 2015 at 03:01, Linhaifeng wrote: >>> If not add memory fence what would happen? Packets loss or interrupt loss?How to

[dpdk-dev] [PATCH v7 0/4] Fix vhost enqueue/dequeue issue

2015-06-10 Thread Xie, Huawei
Acked-by: Huawei Xie On 6/9/2015 9:03 AM, Ouyang, Changchun wrote: > Fix enqueue/dequeue can't handle chained vring descriptors; > Remove unnecessary vring descriptor length updating; > Add support copying scattered mbuf to vring; > > Changchun Ouyang (4): > lib_vhost: Fix enqueue/dequeue

[dpdk-dev] [PATCH v7 0/4] Fix vhost enqueue/dequeue issue

2015-06-10 Thread Xie, Huawei
Acked-by: Huawei Xie On 6/9/2015 9:03 AM, Ouyang, Changchun wrote: > Fix enqueue/dequeue can't handle chained vring descriptors; > Remove unnecessary vring descriptor length updating; > Add support copying scattered mbuf to vring; > > Changchun Ouyang (4): > lib_vhost: Fix enqueue/dequeue

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-17 Thread Xie, Huawei
On 6/5/2015 5:04 PM, Loftus, Ciara wrote: > >> -Original Message- >> From: Xie, Huawei >> Sent: Friday, June 05, 2015 4:26 AM >> To: dev at dpdk.org >> Cc: Loftus, Ciara; Xie, Huawei; Sun, Peng A >> Subject: [PATCH v2] vhost: provide vhost API to

[dpdk-dev] [PATCH] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-17 Thread Xie, Huawei
On 6/17/2015 12:17 PM, Tetsuya Mukawa wrote: > On 2015/06/02 10:50, Huawei Xie wrote: >> rte_vhost_driver_unregister will remove the listenfd from event list, and >> then close it. >> >> Signed-off-by: Huawei Xie >> Signed-off-by: Peng Sun >> --- >> >> +/** >> + * Unregister the specified

[dpdk-dev] [PATCH v2] vhost: provide vhost API to unregister vhost unix domain socket

2015-06-18 Thread Xie, Huawei
On 6/18/2015 5:02 AM, Thomas Monjalon wrote: > 2015-06-05 11:26, Huawei Xie: >> rte_vhost_driver_unregister will remove the listenfd from event list, and >> then close it. >> >> Signed-off-by: Huawei Xie >> Signed-off-by: Peng Sun >> --- >> lib/librte_vhost/rte_virtio_net.h| 3 ++

[dpdk-dev] [PATCH v4 1/5] vhost: eventfd_link: moving ioctl to a function

2015-06-18 Thread Xie, Huawei
Two opens here, the trivial one is i think it is not good practice to explicitly inline non performance critical functions in c file, even if it will be done by compiler anyway. The critical one i have concern is whether it will introduce inconsistency if we call fd_install on a fd that is just

[dpdk-dev] [PATCH] vhost: flush used->idx update before reading avail->flags

2015-04-24 Thread Xie, Huawei
> -Original Message- > From: Linhaifeng [mailto:haifeng.lin at huawei.com] > Sent: Friday, April 24, 2015 9:01 AM > To: Xie, Huawei; dev at dpdk.org > Cc: luke at snabb.co; mst at redhat.com > Subject: Re: [PATCH] vhost: flush used->idx update before re

[dpdk-dev] data copy in vhost-user

2015-04-28 Thread Xie, Huawei
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zoltan Kiss > Sent: Tuesday, April 28, 2015 12:27 AM > To: Nikita Kalyazin; dev at dpdk.org > Subject: Re: [dpdk-dev] data copy in vhost-user > > > > On 27/04/15 12:54, Nikita Kalyazin wrote: > > Hi, > > >

[dpdk-dev] [PATCH] vchost: Notify application of ownership change

2015-08-12 Thread Xie, Huawei
On 8/8/2015 1:21 AM, Jan Kiszka wrote: > On VHOST_*_RESET_OWNER, we reinitialize the device but without telling > the application. That will cause crashes when it continues to invoke > vhost services on the device. Fix it by calling the destruction hook if > the device is still in use. > >

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-08 Thread Xie, Huawei
On 12/2/2015 11:40 AM, Yuanhan Liu wrote: [...] > + > + addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); > + if (addr == MAP_FAILED) { > + RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n"); > + return -1; > + } Yuanhan: mmap could fail with

[dpdk-dev] [PATCH 0/6] Add virtio support in arm/arm64

2015-12-08 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 07, 2015 10:12 AM > To: Santosh Shukla > Cc: dev at dpdk.org; thomas.monjalon at 6wind.com; Xie, Huawei > Subject: Re: [PATCH 0/6] Add virtio support in arm/arm64 &

[dpdk-dev] [PATCH 3/4] vhost: log vring changes

2015-12-09 Thread Xie, Huawei
On 12/2/2015 10:09 PM, Victor Kaplansky wrote: > On Wed, Dec 02, 2015 at 11:43:12AM +0800, Yuanhan Liu wrote: >> Invoking vhost_log_write() to mark corresponding page as dirty while >> updating used vring. > Looks good, thanks! > > I didn't find where you log the dirty pages in result of data >

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-09 Thread Xie, Huawei
On 12/2/2015 9:53 PM, Victor Kaplansky wrote: > On Wed, Dec 02, 2015 at 11:43:11AM +0800, Yuanhan Liu wrote: >> Introduce vhost_log_write() helper function to log the dirty pages we >> touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each >> log is presented by 1 bit. >> >>

[dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support

2015-12-09 Thread Xie, Huawei
On 12/2/2015 11:40 AM, Yuanhan Liu wrote: > This patch set adds the initial vhost-user live migration support. > > The major task behind that is to log pages we touched during > live migration. So, this patch is basically about adding vhost > log support, and using it. > > Patchset > > -

[dpdk-dev] [PATCH] examples/vhost: fix strict aliasing error on gcc 4.4.7

2015-12-09 Thread Xie, Huawei
On 12/8/2015 7:24 PM, De Lara Guarch, Pablo wrote: > Fixes following error on gcc 4.4.7: > > make: Entering directory `/tmp/dpdk-tmp/examples/vhost' > CC main.o > cc1: warnings being treated as errors > /tmp/dpdk-tmp/examples/vhost/main.c: In function ?new_device?: >

[dpdk-dev] [PATCH v2] examples/vhost: fix strict aliasing error on gcc 4.4.7

2015-12-09 Thread Xie, Huawei
On 12/9/2015 5:40 PM, De Lara Guarch, Pablo wrote: > From: "De Lara Guarch, Pablo" > > Fixes following error on gcc 4.4.7: > > make: Entering directory `/tmp/dpdk-tmp/examples/vhost' > CC main.o > cc1: warnings being treated as errors > /tmp/dpdk-tmp/examples/vhost/main.c: In function

[dpdk-dev] [PATCH v4] Fixes following error on gcc 4.4.7:

2015-12-09 Thread Xie, Huawei
On 12/9/2015 8:20 PM, De Lara Guarch, Pablo wrote: > make: Entering directory `/tmp/dpdk-tmp/examples/vhost' > CC main.o [...] > - rte_ring_sc_dequeue(vpool->ring, (void **)); > + rte_ring_sc_dequeue(vpool->ring, (void *)mbuf); Here we are expecting the address of , not mbuf, which is

[dpdk-dev] [PATCH 1/1] doc: correct Vhost Sample Application guide

2015-12-09 Thread Xie, Huawei
On 12/9/2015 8:36 PM, Iremonger, Bernard wrote: > correct sample console commands > > Fixes: d0dff9ba445e ("doc: sample application user guide" > Fixes: 9bc23cb8209c ("doc: add vhost-user to sample guide") > Fixes: 43866bf71d58 ("doc: fix vhost sample parameter") > Signed-off-by: Bernard Iremonger

[dpdk-dev] [PATCH v4] Fixes following error on gcc 4.4.7:

2015-12-09 Thread Xie, Huawei
On 12/9/2015 10:01 PM, De Lara Guarch, Pablo wrote: > >> -Original Message- >> From: Xie, Huawei >> Sent: Wednesday, December 09, 2015 1:29 PM >> To: De Lara Guarch, Pablo; dev at dpdk.org >> Cc: yuanhan.liu at linux.intel.com >> Subject: Re: [PATCH

[dpdk-dev] [PATCH v5] examples/vhost: fix strict aliasing error on gcc 4.4.7

2015-12-09 Thread Xie, Huawei
On 12/9/2015 10:27 PM, De Lara Guarch, Pablo wrote: > From: "De Lara Guarch, Pablo" > > Fixes following error on gcc 4.4.7: > > make: Entering directory `/tmp/dpdk-tmp/examples/vhost' > CC main.o > cc1: warnings being treated as errors > /tmp/dpdk-tmp/examples/vhost/main.c: In function

[dpdk-dev] building LIBRTE_PMD_XENVIRT in 32bit triggers some errors

2015-12-10 Thread Xie, Huawei
On 12/10/2015 6:49 AM, Martinx - ? wrote: > On 9 December 2015 at 18:05, Thomas Monjalon > wrote: >> 2015-12-09 15:54, Martinx - ?: >>> Sorry to insist on this subject but, the time for releasing DPDK 2.2 >>> is near and DPDK build with Xen 32-bit is broken. >>> >>> If DPDK doesn't fix

[dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample Application guide

2015-12-10 Thread Xie, Huawei
> -Original Message- > From: Iremonger, Bernard > Sent: Thursday, December 10, 2015 9:20 PM > To: Xie, Huawei; Yuanhan Liu > Cc: dev at dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2 1/1] doc: correct Vhost Sample > Application guide > > Hi Huawei, > >

[dpdk-dev] [PATCH 1/4] vhost: Fix Coverity issue with possible array out-of-bounds read

2015-12-11 Thread Xie, Huawei
On 12/11/2015 10:49 PM, Mcnamara, John wrote: >> -Original Message- >> From: Huawei Xie >> Sent: Thursday, December 10, 2015 5:57 PM >> To: dev at dpdk.org >> Cc: Mcnamara, John; Xie, Huawei >> Subject: [PATCH 1/4] vhost: Fix Coverity issue with p

[dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer

2015-12-14 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 14, 2015 9:10 PM > To: Thomas Monjalon > Cc: Xie, Huawei; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to > the sa

[dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer

2015-12-14 Thread Xie, Huawei
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, December 14, 2015 9:45 PM > To: Xie, Huawei > Cc: Yuanhan Liu; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc > pointing to the sam

[dpdk-dev] [PATCH] virtio: fix rx ring descriptor starvation

2015-12-17 Thread Xie, Huawei
On 11/26/2015 1:33 AM, Xie, Huawei wrote: > On 11/13/2015 5:33 PM, Tom Kiely wrote: >> If all rx descriptors are processed while transient >> mbuf exhaustion is present, the rx ring ends up with >> no available descriptors. Thus no packets are received >> on that ri

[dpdk-dev] [PATCH v6 0/8] virtio ring layout optimization and simple rx/tx processing

2015-12-17 Thread Xie, Huawei
On 11/27/2015 2:03 PM, Xu, Qian Q wrote: > Some virtio-pmd optimization performance data sharing: > 1. Use simplified vhost-sample, only doing the dequeuer and free, so virtio > only tx, then test the virtio tx performance improvement. Then in the VM, > using one virtio to do the txonly, and

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-18 Thread Xie, Huawei
On 12/18/2015 1:03 PM, Stephen Hemminger wrote: > On Mon, 14 Dec 2015 09:14:41 +0800 > Huawei Xie wrote: > >> v2 changes: >> unroll the loop a bit to help the performance >> >> rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs. >> >> There is related thread about this bulk API. >>

[dpdk-dev] [ [PATCH v2] 01/13] virtio: Introduce config RTE_VIRTIO_INC_VECTOR

2015-12-18 Thread Xie, Huawei
On 12/18/2015 7:25 AM, Stephen Hemminger wrote: > On Thu, 17 Dec 2015 17:32:38 +0530 > Santosh Shukla wrote: > >> On Mon, Dec 14, 2015 at 6:30 PM, Santosh Shukla >> wrote: >>> virtio_recv_pkts_vec and other virtio vector friend apis are written for >>> sse/avx >>> instructions. For arm64 in

[dpdk-dev] [PATCH v5 1/3] vhost: Add callback and private data for vhost PMD

2015-12-18 Thread Xie, Huawei
On 12/18/2015 12:15 PM, Yuanhan Liu wrote: > On Fri, Dec 18, 2015 at 12:15:42PM +0900, Tetsuya Mukawa wrote: >> On 2015/12/17 20:42, Yuanhan Liu wrote: >>> On Tue, Nov 24, 2015 at 06:00:01PM +0900, Tetsuya Mukawa wrote: The vhost PMD will be a wrapper of vhost library, but some of vhost

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-21 Thread Xie, Huawei
On 12/19/2015 1:32 AM, Stephen Hemminger wrote: > On Fri, 18 Dec 2015 10:44:02 + > "Ananyev, Konstantin" wrote: > >> >>> -Original Message- >>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Stephen Hemminger >>> Sent: F

[dpdk-dev] [PATCH v2 2/6] vhost: introduce vhost_log_write

2015-12-21 Thread Xie, Huawei
On 12/17/2015 11:11 AM, Yuanhan Liu wrote: > Introduce vhost_log_write() helper function to log the dirty pages we > touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each > log is presented by 1 bit. > > Therefore, vhost_log_write() simply finds the right bit for related > page we

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-21 Thread Xie, Huawei
;>> >>>> -Original Message- >>>> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Stephen Hemminger >>>> Sent: Friday, December 18, 2015 5:01 AM >>>> To: Xie, Huawei >>>> Cc: dev at dpdk.org >>>> Subject: Re: [

[dpdk-dev] [PATCH v2 1/6] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-21 Thread Xie, Huawei
On 12/17/2015 11:11 AM, Yuanhan Liu wrote: > VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk > vhost-user) where we should log dirty pages, and how big the log > buffer is. > > This request introduces a new payload: > > typedef struct VhostUserLog { > uint64_t

[dpdk-dev] [PATCH v2 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-22 Thread Xie, Huawei
On 12/22/2015 5:32 AM, Thomas Monjalon wrote: > 2015-12-21 17:20, Wiles, Keith: >> On 12/21/15, 9:21 AM, "Xie, Huawei" wrote: >>> On 12/19/2015 3:27 AM, Wiles, Keith wrote: >>>> On 12/18/15, 11:32 AM, "dev on behalf of Stephen Hemminger" >>

[dpdk-dev] [PATCH v2 1/6] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-22 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Tuesday, December 22, 2015 10:26 AM > To: Xie, Huawei > Cc: dev at dpdk.org; Michael S. Tsirkin; Victor Kaplansky; Iremonger, > Bernard; Pavel Fedin; Peter Xu > Subject: Re:

[dpdk-dev] [PATCH v2 2/6] vhost: introduce vhost_log_write

2015-12-22 Thread Xie, Huawei
On 12/22/2015 10:40 AM, Yuanhan Liu wrote: > On Mon, Dec 21, 2015 at 03:06:43PM +0000, Xie, Huawei wrote: >> On 12/17/2015 11:11 AM, Yuanhan Liu wrote: >>> Introduce vhost_log_write() helper function to log the dirty pages we >>> touched. Page size is harded code to 4096

[dpdk-dev] building LIBRTE_PMD_XENVIRT in 32bit triggers some errors

2015-12-22 Thread Xie, Huawei
On 12/22/2015 2:04 AM, Martinx - ? wrote: > On 10 December 2015 at 02:45, Xie, Huawei wrote: >> On 12/10/2015 6:49 AM, Martinx - ? wrote: >>> On 9 December 2015 at 18:05, Thomas Monjalon >>> wrote: >>>> 2015-12-09 15:54, Martinx - ?:

[dpdk-dev] [PATCH 1/3] vhost: get rid of linked list dev

2015-12-22 Thread Xie, Huawei
On 12/18/2015 3:03 PM, Yuanhan Liu wrote: > While we use a single linked list to maintain all devices, we could > use a static array to achieve the same goal, just like what we did > to maintain the eth devices with rte_eth_devices array. This could > simplifies the code a bit. > > Signed-off-by:

[dpdk-dev] [PATCH 1/3] vhost: get rid of linked list dev

2015-12-22 Thread Xie, Huawei
On 12/18/2015 3:03 PM, Yuanhan Liu wrote: > While we use a single linked list to maintain all devices, we could > use a static array to achieve the same goal, just like what we did > to maintain the eth devices with rte_eth_devices array. This could > simplifies the code a bit. > > Signed-off-by:

[dpdk-dev] [PATCH 2/3] vhost: simplify numa_realloc

2015-12-22 Thread Xie, Huawei
On 12/18/2015 3:03 PM, Yuanhan Liu wrote: > We could first check if we need realloc vq or not, if so, > reallocate it. We then do similar to vhost dev realloc. > > This could get rid of the tons of repeated "if (realloc_dev)" > and "if (realloc_vq)" statements, therefore, makes code > a bit more

[dpdk-dev] [PATCH 3/3] vhost: fix vq realloc at numa_realloc

2015-12-22 Thread Xie, Huawei
On 12/18/2015 3:03 PM, Yuanhan Liu wrote: > vq is allocated on pairs, hence we should do pair reallocation > at numa_realloc() as well, otherwise an error like following > occurs while do numa reallocation: > > VHOST_CONFIG: reallocate vq from 0 to 1 node > PANIC in rte_free(): > Fatal

[dpdk-dev] [PATCH v2 2/6] vhost: introduce vhost_log_write

2015-12-22 Thread Xie, Huawei
On 12/22/2015 11:03 AM, Yuanhan Liu wrote: > On Tue, Dec 22, 2015 at 02:45:52AM +0000, Xie, Huawei wrote: >>>>> +static inline void __attribute__((always_inline)) >>>>> +vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len) >>>>> +{ &

[dpdk-dev] [PATCH v2 3/6] vhost: log used vring changes

2015-12-22 Thread Xie, Huawei
On 12/22/2015 2:56 PM, Peter Xu wrote: > On Thu, Dec 17, 2015 at 11:11:58AM +0800, Yuanhan Liu wrote: >> +static inline void __attribute__((always_inline)) >> +vhost_log_used_vring(struct virtio_net *dev, struct vhost_virtqueue *vq, >> + uint64_t offset, uint64_t len) >> +{ [...] >

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Xie, Huawei
On 12/22/2015 5:57 PM, Peter Xu wrote: > On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: >> Actually, you are right. I mentioned in the last email that this is >> for configuration part. To answer your question in this email, you >> will not be able to go that further (say initiating

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Xie, Huawei
On 12/22/2015 6:48 PM, Xie, Huawei wrote: > On 12/22/2015 5:57 PM, Peter Xu wrote: >> On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: >>> Actually, you are right. I mentioned in the last email that this is >>> for configuration part. To answer your

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Xie, Huawei
On 12/22/2015 7:39 PM, Peter Xu wrote: > On Tue, Dec 22, 2015 at 10:47:21AM +0000, Xie, Huawei wrote: >> On 12/22/2015 5:57 PM, Peter Xu wrote: >>> On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: >>>> Actually, you are right.

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-22 Thread Xie, Huawei
On 12/22/2015 7:39 PM, Peter Xu wrote: > On Tue, Dec 22, 2015 at 10:47:21AM +0000, Xie, Huawei wrote: >> On 12/22/2015 5:57 PM, Peter Xu wrote: >>> On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote: >>>> Actually, you are right.

[dpdk-dev] [Question] How pmd virtio works without UIO?

2015-12-23 Thread Xie, Huawei
On 12/23/2015 10:57 AM, Yuanhan Liu wrote: > On Wed, Dec 23, 2015 at 10:41:57AM +0800, Peter Xu wrote: >> On Wed, Dec 23, 2015 at 10:01:35AM +0800, Yuanhan Liu wrote: >>> On Tue, Dec 22, 2015 at 05:56:41PM +0800, Peter Xu wrote: On Tue, Dec 22, 2015 at 04:32:46PM +0800, Yuanhan Liu wrote:

[dpdk-dev] [PATCH v3 2/2] vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue

2015-12-23 Thread Xie, Huawei
On 12/23/2015 7:25 PM, linhaifeng wrote: > >> >> +if (unlikely(alloc_err)) { >> +uint16_t i = entry_success; >> + >> +m->nb_segs = seg_num; >> +for (; i < free_entries; i++) >> +rte_pktmbuf_free(pkts[entry_success]); -> >>

[dpdk-dev] [PATCH v3 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-24 Thread Xie, Huawei
On 12/24/2015 2:49 AM, Ananyev, Konstantin wrote: > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Stephen Hemminger >> Sent: Wednesday, December 23, 2015 6:38 PM >> To: Xie, Huawei >> Cc: dev at dpdk.org; dprovan at bi

[dpdk-dev] [PATCH 4/4] virtio: check if any kernel driver is manipulating the device

2015-12-28 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 28, 2015 1:27 PM > To: Xie, Huawei > Cc: dev at dpdk.org; Jayakumar, Muthurajan; Troitsky, Nikita; > peterx at redhat.com; stephen at networkplumber.org;

[dpdk-dev] [PATCH 3/4] virtio: return 1 to tell the upper layer we don't take over this device

2015-12-28 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, December 28, 2015 1:25 PM > To: Xie, Huawei > Cc: dev at dpdk.org; Jayakumar, Muthurajan; Troitsky, Nikita; > peterx at redhat.com; stephen at networkplumber.org;

[dpdk-dev] [PATCH v3 1/2] vhost: vhost unix domain socket cleanup

2015-06-29 Thread Xie, Huawei
On 6/19/2015 1:40 AM, Huawei Xie wrote: rte_vhost_driver_unregister API will remove the listenfd for the specified path from event processing list, and then close it. v2 changes: -minor code style fix: remove unnecessary new line Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v3 1/2] vhost: vhost unix domain socket cleanup

2015-06-30 Thread Xie, Huawei
On 6/30/2015 5:04 AM, Thomas Monjalon wrote: > Huawei, > I don't understand this reply. You forgot quoting, you didn't remove useless > lines, > and you seem to reply to yourself. > Should this patch be applied? > Thomas: Oh, here i remove useless lines. I am sending a new patch to fix a

[dpdk-dev] [PATCH] vhost: Add a hint on how to add or remove the device to a data core

2015-03-17 Thread Xie, Huawei
Acked-by Huawei Xie On 2/27/2015 6:22 PM, Beno?t Canet wrote: > Let's make sure people will not forget to set and unset VIRTIO_DEV_RUNNING. > > Signed-off-by: Beno?t Canet > --- > doc/guides/prog_guide/vhost_lib.rst | 3 ++- > lib/librte_vhost/rte_virtio_net.h | 4 > 2 files changed, 6

[dpdk-dev] [PATCH] lib/librte_pmd_virtio fix can't receive packets after rx_q is empty

2015-03-20 Thread Xie, Huawei
On 3/20/2015 6:47 PM, linhaifeng wrote: > From: Linhaifeng > > If failed to alloc mbuf ring_size times the rx_q may be empty and can't > receive any packets forever because nb_used is 0 forever. Agreed. In current implementation, once VQ becomes empty, we have no chance to refill it again. The

[dpdk-dev] [PATCH] vhost library doc update

2015-03-23 Thread Xie, Huawei
On 3/22/2015 10:00 PM, Butler, Siobhan A wrote: -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Huawei Xie Sent: Wednesday, March 11, 2015 4:22 PM To: dev at dpdk.org Subject: [dpdk-dev] [PATCH] vhost library doc update add vhost user

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-23 Thread Xie, Huawei
On 3/23/2015 8:54 PM, Pavel Boldin wrote: > Due to increased `struct file's reference counter subsequent call > to `filp_close' does not free the `struct file'. Prepend `fput' call > to decrease the reference counter. > > Signed-off-by: Pavel Boldin > --- >

[dpdk-dev] [PATCH] virtio: Fix crash issue for secondary process

2015-03-23 Thread Xie, Huawei
On 3/21/2015 5:59 AM, Thomas Monjalon wrote: 2015-03-19 09:45, Ouyang Changchun: It definitely needs Rx function even in the case of secondary process, so put the assignment a bit earlier to make sure of it. Signed-off-by: Changchun Ouyang ---

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-23 Thread Xie, Huawei
On 3/23/2015 10:37 PM, Pavel Boldin wrote: On Mon, Mar 23, 2015 at 4:21 PM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 3/23/2015 8:54 PM, Pavel Boldin wrote: > Due to increased `struct file's reference counter subsequent call > to `filp_close' does not free the `struct fi

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-23 Thread Xie, Huawei
On 3/23/2015 10:52 PM, Pavel Boldin wrote: On Mon, Mar 23, 2015 at 4:41 PM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 3/23/2015 10:37 PM, Pavel Boldin wrote: On Mon, Mar 23, 2015 at 4:21 PM, Xie, Huawei mailto:huawei.xie at intel.com><mailto:huawei.xie a

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-23 Thread Xie, Huawei
On 3/23/2015 11:27 PM, Pavel Boldin wrote: On Mon, Mar 23, 2015 at 5:16 PM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 3/23/2015 10:52 PM, Pavel Boldin wrote: On Mon, Mar 23, 2015 at 4:41 PM, Xie, Huawei mailto:huawei.xie at intel.com><mailto:huawei.xie a

[dpdk-dev] [PATCH] cast used->idx to volatile

2015-03-24 Thread Xie, Huawei
On 3/24/2015 9:00 AM, Linhaifeng wrote: > > On 2015/3/23 20:54, Xie, Huawei wrote: >> >>> -Original Message- >>> From: Linhaifeng [mailto:haifeng.lin at huawei.com] >>> Sent: Monday, March 23, 2015 8:24 PM >>> To: dev at dpdk.org >&g

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-24 Thread Xie, Huawei
On 3/23/2015 8:54 PM, Pavel Boldin wrote: > Due to increased `struct file's reference counter subsequent call > to `filp_close' does not free the `struct file'. Prepend `fput' call > to decrease the reference counter. > > Signed-off-by: Pavel Boldin > --- >

[dpdk-dev] [PATCH v3] lib/librte_vhost: update used->idx when allocation of mbuf fails

2015-03-24 Thread Xie, Huawei
On 3/22/2015 8:08 PM, Ouyang, Changchun wrote: > >> -Original Message- >> From: linhaifeng [mailto:haifeng.lin at huawei.com] >> Sent: Saturday, March 21, 2015 9:47 AM >> To: dev at dpdk.org >> Cc: Ouyang, Changchun; Xie, Huawei >> Subject: [PATCH

[dpdk-dev] [PATCH] cast used->idx to volatile

2015-03-24 Thread Xie, Huawei
On 3/24/2015 3:44 PM, Linhaifeng wrote: > > On 2015/3/24 9:53, Xie, Huawei wrote: >> On 3/24/2015 9:00 AM, Linhaifeng wrote: >>> On 2015/3/23 20:54, Xie, Huawei wrote: >>>>> -Original Message- >>>>> From: Linhaifeng [mailto:haifeng.lin at

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-24 Thread Xie, Huawei
On 3/24/2015 7:10 PM, Pavel Boldin wrote: On Tue, Mar 24, 2015 at 8:28 AM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 3/23/2015 8:54 PM, Pavel Boldin wrote: > Due to increased `struct file's reference counter subsequent call > to `filp_close' does not free the `struct fi

[dpdk-dev] [PATCH] virtio: Fix crash issue for secondary process

2015-03-26 Thread Xie, Huawei
On 3/23/2015 10:33 PM, Xie, Huawei wrote: > On 3/21/2015 5:59 AM, Thomas Monjalon wrote: > > 2015-03-19 09:45, Ouyang Changchun: > > > It definitely needs Rx function even in the case of secondary process, so put > the assignment a bit earlier to make sure of it. > &g

[dpdk-dev] [PATCH] vhost: Fix Segmentation fault of NULL address

2015-03-26 Thread Xie, Huawei
On 3/26/2015 3:05 PM, Qiu, Michael wrote: > Function gpa_to_vva() could return zero, while this will lead > a Segmentation fault. > > This patch is to fix this issue. > > Signed-off-by: Michael Qiu > --- > lib/librte_vhost/vhost_rxtx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-26 Thread Xie, Huawei
On 3/25/2015 4:08 AM, Pavel Boldin wrote: On Tue, Mar 24, 2015 at 6:20 PM, Xie, Huawei mailto:huawei.xie at intel.com>> wrote: On 3/24/2015 7:10 PM, Pavel Boldin wrote: On Tue, Mar 24, 2015 at 8:28 AM, Xie, Huawei mailto:huawei.xie at intel.com><mailto:huawei.xie a

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-26 Thread Xie, Huawei
On 3/23/2015 8:54 PM, Pavel Boldin wrote: > Due to increased `struct file's reference counter subsequent call > to `filp_close' does not free the `struct file'. Prepend `fput' call > to decrease the reference counter. > > Signed-off-by: Pavel Boldin > --- >

[dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link'

2015-03-26 Thread Xie, Huawei
On 3/23/2015 8:54 PM, Pavel Boldin wrote: > Due to increased `struct file's reference counter subsequent call > to `filp_close' does not free the `struct file'. Prepend `fput' call > to decrease the reference counter. > > Signed-off-by: Pavel Boldin > --- >

  1   2   3   4   5   >