[dpdk-dev] [PATCH v2] virtio: fix idx in used ring retrieved only once

2016-06-20 Thread Huawei Xie
ixes: 13ce5e7eb94f ("virtio: mergeable buffers") Signed-off-by: Huawei Xie --- v2: use VIRTQUEUE_NUSED --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_ring.h| 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 3 +-- 3 files changed, 4 insertions(+), 5 d

[dpdk-dev] [PATCH] virtio: fix idx in used ring retrieved only once

2016-06-16 Thread Huawei Xie
ixes: 13ce5e7eb94f ("virtio: mergeable buffers") Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_ring.h| 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/

[dpdk-dev] [PATCH] vhost: fix dereference null return value

2016-06-15 Thread Huawei Xie
vring") Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/virtio-net-user.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c b/lib/librte_vhost/vhost_user/virtio-net-user.c index 5803182..5844a42 100644 --

[dpdk-dev] [PATCH] vhost: fix unchecked return value of fstat

2016-06-15 Thread Huawei Xie
from library (CHECKED_RETURN) >>> check_return: Calling fstat(fd, &stat) without checking return value. >>> This library function may fail and return an error code. Fixes: 8f972312b8f4 ("vhost: support vhost-user") Signed-off-by: Huawei Xie --- lib/librte_vhost/vh

[dpdk-dev] [PATCH v2] virtio: fix crash loading virtio driver when devargs isn't specified

2016-06-13 Thread Huawei Xie
We skip kernel managed virtio devices, if it isn't whitelisted. Before checking if the virtio device is whitelisted, check if devargs is specified. Fixes: ac5e1d838dc1 ("virtio: skip error when probing kernel managed device") Signed-off-by: Huawei Xie Reported-by: Vincent Li

[dpdk-dev] [PATCH] vhost: remove internal lockless enqueue

2016-06-13 Thread Huawei Xie
queue through costly cmpset operation. This patch removes this internal lockless implementation and should improve performance a bit. Luckily DPDK OVS doesn't rely on this behavior. Signed-off-by: Huawei Xie --- doc/guides/rel_notes/release_16_07.rst | 3 + lib/librte_vhost/rte_vi

[dpdk-dev] [PATCH 1/3] vhost: pre update used ring for Tx and Rx

2016-06-03 Thread Xie, Huawei
On 6/1/2016 2:53 PM, Yuanhan Liu wrote: > On Wed, Jun 01, 2016 at 06:40:41AM +, Xie, Huawei wrote: >>> /* Retrieve all of the head indexes first to avoid caching issues. */ >>> for (i = 0; i < count; i++) { >>> - desc_indexes[i] = vq-&g

[dpdk-dev] [PATCH 2/3] vhost: optimize dequeue for small packets

2016-06-03 Thread Xie, Huawei
p, > and do the copy first before the check of "are we done yet?". This > could save one check for small packets, that just have one data desc > buffer and need one mbuf to store it. > > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie

[dpdk-dev] [PATCH 2/3] vhost: optimize dequeue for small packets

2016-06-03 Thread Xie, Huawei
On 6/1/2016 2:41 PM, Yuanhan Liu wrote: > On Wed, Jun 01, 2016 at 06:24:18AM +, Xie, Huawei wrote: >> On 5/3/2016 8:42 AM, Yuanhan Liu wrote: >>> Both current kernel virtio driver and DPDK virtio driver use at least >>> 2 desc buffer for Tx: the first for storing

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-06-02 Thread Xie, Huawei
On 6/2/2016 4:52 PM, Yuanhan Liu wrote: > On Thu, Jun 02, 2016 at 08:39:36AM +, Xie, Huawei wrote: >> On 6/1/2016 2:03 PM, Yuanhan Liu wrote: >>> On Wed, Jun 01, 2016 at 05:40:08AM +, Xie, Huawei wrote: >>>> On 5/30/2016 4:20 PM, Yuanhan Liu wrote: >>&g

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-06-02 Thread Xie, Huawei
On 6/1/2016 2:03 PM, Yuanhan Liu wrote: > On Wed, Jun 01, 2016 at 05:40:08AM +, Xie, Huawei wrote: >> On 5/30/2016 4:20 PM, Yuanhan Liu wrote: >>> On Wed, May 25, 2016 at 12:16:41AM +0800, Huawei Xie wrote: >>>> There is no external function call or any barrier i

[dpdk-dev] [PATCH v3] virtio: split virtio rx/tx queue

2016-06-02 Thread Xie, Huawei
On 6/2/2016 4:07 PM, Xie, Huawei wrote: > We keep a common vq structure, containing only vq related fields, > and then split others into RX, TX and control queue respectively. > > Signed-off-by: Huawei Xie sorry, this is v4.

[dpdk-dev] [PATCH v3] virtio: split virtio rx/tx queue

2016-06-02 Thread Xie, Huawei
On 6/1/2016 3:13 PM, Yuanhan Liu wrote: > On Mon, May 30, 2016 at 05:06:20PM +0800, Huawei Xie wrote: >> We keep a common vq structure, containing only vq related fields, >> and then split others into RX, TX and control queue respectively. >> >> Signed-off-by: Huawei Xi

[dpdk-dev] [PATCH v3] virtio: split virtio rx/tx queue

2016-06-02 Thread Huawei Xie
We keep a common vq structure, containing only vq related fields, and then split others into RX, TX and control queue respectively. Signed-off-by: Huawei Xie --- v2: - don't split virtio_dev_rx/tx_queue_setup v3: - fix some 80 char warnings - fix other newer version checkpatch warnings - r

[dpdk-dev] [PATCH 3/3] vhost: arrange virtio_net fields for better cache sharing

2016-06-01 Thread Xie, Huawei
fore the ifname[] field) to let them share one cache line. > > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie

[dpdk-dev] [PATCH 1/3] vhost: pre update used ring for Tx and Rx

2016-06-01 Thread Xie, Huawei
On 5/3/2016 8:42 AM, Yuanhan Liu wrote: > Pre update and update used ring in batch for Tx and Rx at the stage > while fetching all avail desc idx. This would reduce some cache misses > and hence, increase the performance a bit. > > Pre update would be feasible as guest driver will not start process

[dpdk-dev] [PATCH 2/3] vhost: optimize dequeue for small packets

2016-06-01 Thread Xie, Huawei
On 5/3/2016 8:42 AM, Yuanhan Liu wrote: > Both current kernel virtio driver and DPDK virtio driver use at least > 2 desc buffer for Tx: the first for storing the header, and the others > for storing the data. Tx could prepend some space for virtio net header whenever possible, so that it could use

[dpdk-dev] [PATCH] virtio: check if devargs is NULL before checking its value

2016-06-01 Thread Xie, Huawei
vargs->type != RTE_DEVTYPE_WHITELISTED_PCI)) { >> Should the title be something like "fix crash ..."? >> >> I would also add >> Reported-by: Vincent Li > Huawei, the two are good comments (Thomas, thanks for the review, BTW :). np. > > So, mind to send v2?

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-06-01 Thread Xie, Huawei
On 5/30/2016 4:20 PM, Yuanhan Liu wrote: > On Wed, May 25, 2016 at 12:16:41AM +0800, Huawei Xie wrote: >> There is no external function call or any barrier in the loop, >> the used->idx would only be retrieved once. >> >> Signed-off-by: Huawei Xie >> --- >&g

[dpdk-dev] [PATCH v3] virtio: split virtio rx/tx queue

2016-05-30 Thread Huawei Xie
We keep a common vq structure, containing only vq related fields, and then split others into RX, TX and control queue respectively. Signed-off-by: Huawei Xie --- v2: - don't split virtio_dev_rx/tx_queue_setup v3: - fix some 80 char warnings - fix other newer version checkpatch warnings - r

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-30 Thread Xie, Huawei
On 5/30/2016 11:00 AM, Yuanhan Liu wrote: > On Mon, May 30, 2016 at 02:40:00AM +, Xie, Huawei wrote: >> On 5/27/2016 5:06 PM, Yuanhan Liu wrote: >>> On Tue, May 24, 2016 at 09:38:32PM +0800, Huawei Xie wrote: >>>>vq->vq_ring_mem = mz->phys_addr; >

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-30 Thread Xie, Huawei
On 5/27/2016 5:06 PM, Yuanhan Liu wrote: > On Tue, May 24, 2016 at 09:38:32PM +0800, Huawei Xie wrote: >> vq->vq_ring_mem = mz->phys_addr; >> vq->vq_ring_virt_mem = mz->addr; >> -PMD_INIT_LOG(DEBUG, "vq->vq_ring_mem: 0x%"PRIx64, >

[dpdk-dev] Crashing OVS+DPDK at the host, from inside of a KVM Guest

2016-05-25 Thread Xie, Huawei
On 5/25/2016 2:06 PM, Christian Ehrhardt wrote: > Hi, > ping ... > > Later on I want to look at it again once we upgraded to more recent > releases of the software components involved, but those have to be made > ready to use first :-/ > > But the description is good and I wonder if anybody else co

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-05-25 Thread Xie, Huawei
ed, May 25, 2016 at 08:25:20AM +, Xie, Huawei wrote: >>>>> On 5/25/2016 4:12 PM, Xie, Huawei wrote: >>>>>> There is no external function call or any barrier in the loop, >>>>>> the used->idx would only be retrieved once. >>>&g

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-25 Thread Xie, Huawei
On 5/25/2016 6:08 PM, Thomas Monjalon wrote: > Is it a v2? There is neither changelog nor v2 in the title. Yes, forget to add v2. Mainly rebase against Yuanhan's tree. Besides, to make the patch simple and focused, use the old queue setup.

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-05-25 Thread Xie, Huawei
On 5/25/2016 4:12 PM, Xie, Huawei wrote: > There is no external function call or any barrier in the loop, > the used->idx would only be retrieved once. > > Signed-off-by: Huawei Xie > --- > drivers/net/virtio/virtio_ethdev.c | 3 ++- > 1 file changed, 2 insertions(+)

[dpdk-dev] [PATCH] virtio: use volatile to get used->idx in the loop

2016-05-25 Thread Huawei Xie
There is no external function call or any barrier in the loop, the used->idx would only be retrieved once. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/

[dpdk-dev] [PATCH] virtio: check if devargs is NULL before checking its value

2016-05-24 Thread Huawei Xie
Fixes: ac5e1d838dc1 ("virtio: skip error when probing kernel managed device") Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c ind

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-24 Thread Huawei Xie
We keep a common vq structure, containing only vq related fields, and then split others into RX, TX and control queue respectively. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 352 ++-- drivers/net/virtio/virtio_ethdev.h | 2

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-10 Thread Xie, Huawei
On 5/10/2016 4:42 PM, Michael S. Tsirkin wrote: > On Tue, May 10, 2016 at 08:07:00AM +, Xie, Huawei wrote: >> On 5/10/2016 3:56 PM, Michael S. Tsirkin wrote: >>> On Tue, May 10, 2016 at 07:24:10AM +, Xie, Huawei wrote: >>>> On 5/10/2016 2:08 AM, Yuanhan L

[dpdk-dev] [PATCH 4/6] vhost: workaround stale vring base

2016-05-10 Thread Xie, Huawei
y, making it non-work any more, unless a driver reset > is done. s/DPDK app/DPDK vhost/ DPDK app is confusing > > So, instead of getting the stale vring base from QEMU, Huawei suggested > we could get a proper one from used->idx. > > Cc: "Michael S. Tsirkin" >

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-10 Thread Xie, Huawei
On 5/10/2016 3:56 PM, Michael S. Tsirkin wrote: > On Tue, May 10, 2016 at 07:24:10AM +, Xie, Huawei wrote: >> On 5/10/2016 2:08 AM, Yuanhan Liu wrote: >>> On Mon, May 09, 2016 at 04:47:02PM +, Xie, Huawei wrote: >>>> On 5/7/2016 2:36 PM, Yuanhan

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-10 Thread Xie, Huawei
On 5/10/2016 2:08 AM, Yuanhan Liu wrote: > On Mon, May 09, 2016 at 04:47:02PM +, Xie, Huawei wrote: >> On 5/7/2016 2:36 PM, Yuanhan Liu wrote: >>> +static void * >>> +vhost_user_client_reconnect(void *arg) >>> +{ >>> + struct

[dpdk-dev] [PATCH 3/6] vhost: add reconnect ability

2016-05-09 Thread Xie, Huawei
On 5/7/2016 2:36 PM, Yuanhan Liu wrote: > +static void * > +vhost_user_client_reconnect(void *arg) > +{ > + struct reconnect_info *reconn = arg; > + int ret; > + > + RTE_LOG(ERR, VHOST_CONFIG, "reconnecting...\n"); > + while (1) { > + ret = connect(reconn->fd, (struct so

[dpdk-dev] [PATCH 4/6] vhost: workaround stale vring base

2016-05-09 Thread Xie, Huawei
On 5/7/2016 2:36 PM, Yuanhan Liu wrote: > However, Michael claims some concerns: he made a good point: a crash > is happening means some memory is corrupted, and it could be the virtio > memory being corrupted. In such case, nothing will work without the > reset. I don't get this point. What is th

[dpdk-dev] [PATCH 4/6] vhost: workaround stale vring base

2016-05-09 Thread Xie, Huawei
On 5/9/2016 6:45 PM, Victor Kaplansky wrote: >> diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c >> > index c88aaa3..df103aa 100644 >> > --- a/lib/librte_vhost/virtio-net.c >> > +++ b/lib/librte_vhost/virtio-net.c >> > @@ -560,6 +560,14 @@ vhost_set_vring_addr(int vid, str

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-09 Thread Xie, Huawei
> -Original Message- > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > Sent: Monday, May 09, 2016 1:15 PM > To: Xie, Huawei > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] virtio: split virtio rx/tx queue > > On Thu, May 05, 2016 at 05:29

[dpdk-dev] virtio still blindly take over virtio device managed by kernel

2016-05-06 Thread Xie, Huawei
On 5/5/2016 12:21 AM, Vincent Li wrote: > Hi, > > I am running the dpdk git repo which already had commit ac5e1d838dc > (virtio: skip error when probing kernel managed device), but in my > test, it seems still taking control of the kernel managed virtio > device and segmentation fault, here is the

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-05 Thread Xie, Huawei
On 5/5/2016 11:46 AM, Yuanhan Liu wrote: > On Thu, May 05, 2016 at 03:29:44AM +, Xie, Huawei wrote: >> On 5/5/2016 11:03 AM, Yuanhan Liu wrote: >>> On Thu, May 05, 2016 at 01:54:25AM +, Xie, Huawei wrote: >>>> On 5/5/2016 7:59 AM, Yuanhan Liu wrote: >>&g

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-05 Thread Xie, Huawei
On 5/5/2016 11:03 AM, Yuanhan Liu wrote: > On Thu, May 05, 2016 at 01:54:25AM +, Xie, Huawei wrote: >> On 5/5/2016 7:59 AM, Yuanhan Liu wrote: >>> On Wed, May 04, 2016 at 08:50:27AM +0800, Huawei Xie wrote: >>>> -int virtio_dev_queue_setup(struct rte_eth_dev *de

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-05 Thread Xie, Huawei
On 5/5/2016 7:59 AM, Yuanhan Liu wrote: > On Wed, May 04, 2016 at 08:50:27AM +0800, Huawei Xie wrote: >> -int virtio_dev_queue_setup(struct rte_eth_dev *dev, >> -int queue_type, >> -uint16_t queue_idx, >> +static int >>

[dpdk-dev] virtio still blindly take over virtio device managed by kernel

2016-05-04 Thread Xie, Huawei
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Vincent Li > Sent: Thursday, May 05, 2016 12:21 AM > To: dev at dpdk.org > Subject: [dpdk-dev] virtio still blindly take over virtio device managed > by kernel > > Hi, > > I am running the dpdk git repo which

[dpdk-dev] [PATCH] virtio: split virtio rx/tx queue

2016-05-04 Thread Huawei Xie
have too many common vq operations. Split fields into virtnet_rx and virtnet_tx respectively. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 333 +--- drivers/net/virtio/virtio_pci.c | 4 +- drivers/net/virtio/virtio_pci.h | 3

[dpdk-dev] [PATCH v3 0/3] xen: netfront poll mode driver

2016-05-03 Thread Xie, Huawei
t; >> Jan Blunck (3): >> xen: Add UIO kernel driver >> xen: Add netfront poll mode driver >> xen: Add documentation >> > Hi Jan, > > any update on this series? > > /Bruce > Jan and Bruce: I will find time to review this starting from this week. It takes time. Please stay tuned. /huawei

[dpdk-dev] [PATCH] virtio: avoid avail ring entry index update if equal

2016-04-28 Thread Xie, Huawei
On 4/28/2016 4:14 PM, Thomas Monjalon wrote: > 2016-04-27 23:19, Yuanhan Liu: >> And applied to dpdk-next-virtio, with few tiny changes: >> >> - we normally put suggested/reported-by above the SoB. > Yes we must keep the chronological order in these lines. > Thanks for reminder

[dpdk-dev] [RFC PATCH] avail idx update optimizations

2016-04-28 Thread Xie, Huawei
On 4/24/2016 9:24 PM, Xie, Huawei wrote: > On 4/24/2016 5:15 PM, Michael S. Tsirkin wrote: >> On Sun, Apr 24, 2016 at 02:45:22AM +0000, Xie, Huawei wrote: >>> Forget to cc the mailing list. >>> >>> On 4/22/2016 9:53 PM, Xie, Huawei wrote: >>>> Hi

[dpdk-dev] [PATCH v2] virtio: check if virtio net header could fit in mbuf headroom

2016-04-27 Thread Huawei Xie
check merge-able header as it is supported. previously we don't support merge-able feature, so non merge-able header is checked. v2: add missed signoff Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dr

[dpdk-dev] [PATCH] virtio: avoid avail ring entry index update if equal

2016-04-27 Thread Huawei Xie
performance reason of CACHE), in which descriptors are allocated from the head and freed to the tail, with this patch in most cases avail ring will remain the same, then it would be valid in both caches of frontend and backend. Signed-off-by: Huawei Xie Suggested-by: ms >> Michael S. T

[dpdk-dev] [PATCH] virtio: check if virtio net header could fit in mbuf headroom

2016-04-25 Thread Huawei Xie
check merge-able header as it is supported. previously we don't support merge-able feature, so non merge-able header is checked. --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virti

[dpdk-dev] [PATCH v2] virtio: fix segfault when transmit pkts

2016-04-25 Thread Xie, Huawei
net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -271,8 +271,6 @@ virtqueue_enqueue_xmit(struct virtqueue *txvq, struct > rte_mbuf *cookie, > idx = start_dp[idx].next; > } while ((cookie = cookie->next) != NULL); > > - start_dp[idx].flags &= ~VRING_DESC_F_NEXT; > - > if (use_indirect) > idx = txvq->vq_ring.desc[head_idx].next; > Ack the code. Acked-by: Huawei Xie

[dpdk-dev] [RFC PATCH] avail idx update optimizations

2016-04-24 Thread Xie, Huawei
On 4/24/2016 5:15 PM, Michael S. Tsirkin wrote: > On Sun, Apr 24, 2016 at 02:45:22AM +, Xie, Huawei wrote: >> Forget to cc the mailing list. >> >> On 4/22/2016 9:53 PM, Xie, Huawei wrote: >>> Hi: >>> >>> This is a series of virtio/vhost idx/

[dpdk-dev] [RFC PATCH] avail idx update optimizations

2016-04-24 Thread Xie, Huawei
Forget to cc the mailing list. On 4/22/2016 9:53 PM, Xie, Huawei wrote: > Hi: > > This is a series of virtio/vhost idx/ring update optimizations for cache > to cache transfer. Actually I don't expect many of them as virtio/vhost > has already done quite right. > > For t

[dpdk-dev] [PATCH] virtio: fix segfault when transmit pkts

2016-04-22 Thread Xie, Huawei
On 4/22/2016 6:43 AM, Yuanhan Liu wrote: > On Thu, Apr 21, 2016 at 12:36:10PM +, Jianfeng Tan wrote: >> Issue: when using virtio nic to transmit pkts, it causes segment fault. > Jianfeng, > > It's good to describe the issues, steps to reproduce it and how to fix > it. But you don't have to tell

[dpdk-dev] [RFC PATCH] avail idx update optimizations

2016-04-22 Thread Huawei Xie
eliminate unnecessary cache to cache transfer between virtio and vhost core --- drivers/net/virtio/virtqueue.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h index 4e9239e..8c46a83 100644 --- a/drivers/net/virt

[dpdk-dev] DPDK 2.2 build failing with vhost-kni

2016-04-11 Thread Xie, Huawei
On 4/10/2016 7:26 AM, chintu hetam wrote: > I am compiling DPDK 2.2 on Fedora 23 and i am seeing following build error > /home/vcr/devel/dpdk/dpdk-2.2.0/build/build/lib/librte_eal/linuxapp/kni/kni_vhost.c: > In function ?kni_sock_poll?: > /home/vcr/devel/dpdk/dpdk-2.2.0/build/build/lib/librte_eal/l

[dpdk-dev] [PATCH] vhost: fix mem share between VM and host

2016-04-11 Thread Xie, Huawei
On 4/11/2016 1:29 AM, Zhe Tao wrote: > > +/* Check the share memory in case the QEMU doesn't set the share option > + * as on for the memory-backend-file object in the QEMU command line. > + */ > + > +int > +vhost_check_mem_shared(struct vhost_device_ctx ctx) > +{ > + struct virtio_net *dev;

[dpdk-dev] [RFC] vhost user: add error handling for fd > 1023

2016-04-08 Thread Xie, Huawei
On 4/7/2016 10:52 PM, Christian Ehrhardt wrote: > I totally agree to that there is no deterministic rule what to expect. > The only rule is that #fd certainly always is > #vhost_user devices. > In various setup variants I've crossed fd 1024 anywhere between 475 > and 970 vhost_user ports. > > Once

[dpdk-dev] XEN netfront PMD support

2016-04-07 Thread Xie, Huawei
On 4/7/2016 3:52 PM, Thomas Monjalon wrote: > 2016-04-07 06:20, Xie, Huawei: >> Hi Stephen: >> I recall that you ever send a netfront PMD patch. I think that is one >> missing piece for running PMD in XEN domU. There are still users >> requiring that feature. Could you

[dpdk-dev] XEN netfront PMD support

2016-04-07 Thread Xie, Huawei
Hi Stephen: I recall that you ever send a netfront PMD patch. I think that is one missing piece for running PMD in XEN domU. There are still users requiring that feature. Could you resend that patch? I could help review.

[dpdk-dev] [RFC] vhost user: add error handling for fd > 1023

2016-03-30 Thread Xie, Huawei
On 3/18/2016 5:15 PM, Patrik Andersson wrote: > Protect against DPDK crash when allocation of listen fd >= 1023. > For events on fd:s >1023, the current implementation will trigger > an abort due to access outside of allocated bit mask. > > Corrections would include: > > * Match fdset_add() signa

[dpdk-dev] [PATCH v4] vhost: use SMP barriers instead of compiler ones.

2016-03-23 Thread Xie, Huawei
igned-off-by: Ilya Maximets Acked-by: Huawei Xie It fixes the issue for other archs. Will recheck in future.

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

2016-03-23 Thread Huawei Xie
Acked-by: Huawei Xie

[dpdk-dev] [PATCH v2] ring: check for zero objects mc dequeue / mp enqueue

2016-03-22 Thread Xie, Huawei
On 3/22/2016 6:13 PM, Richardson, Bruce wrote: > On Mon, Mar 21, 2016 at 05:47:44PM +, Xie, Huawei wrote: >> On 3/18/2016 10:17 PM, Bruce Richardson wrote: >>> On Fri, Mar 18, 2016 at 01:47:29PM +0100, Mauricio V?squez wrote: >>>> Hi, >>>> >>

[dpdk-dev] [PATCH v2] ring: check for zero objects mc dequeue / mp enqueue

2016-03-21 Thread Xie, Huawei
On 3/18/2016 10:17 PM, Bruce Richardson wrote: > On Fri, Mar 18, 2016 at 01:47:29PM +0100, Mauricio V?squez wrote: >> Hi, >> >> >> On Fri, Mar 18, 2016 at 11:35 AM, Thomas Monjalon > 6wind.com >>> wrote: >>> 2016-03-18 11:27, Olivier Matz: On 03/18/2016 11:18 AM, Bruce Richardson wrote: >>

[dpdk-dev] [PATCH v4] vhost: use SMP barriers instead of compiler ones.

2016-03-21 Thread Xie, Huawei
On 3/21/2016 10:07 PM, Ananyev, Konstantin wrote: > >> -Original Message- >> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ilya Maximets >> Sent: Monday, March 21, 2016 4:50 AM >> To: Yuanhan Liu >> Cc: dev at dpdk.org; Xie, Huawei; Dyasly Sergey

[dpdk-dev] [PATCH RFC v3 1/3] vhost: use SMP barriers instead of compiler ones.

2016-03-18 Thread Xie, Huawei
On 3/18/2016 6:39 PM, Ilya Maximets wrote: > > On 18.03.2016 13:27, Xie, Huawei wrote: >> On 3/18/2016 6:23 PM, Ilya Maximets wrote: >>> On 18.03.2016 13:08, Xie, Huawei wrote: >>>> On 2/24/2016 7:47 PM, Ilya Maximets wrote: >>>>>

[dpdk-dev] [PATCH RFC v3 1/3] vhost: use SMP barriers instead of compiler ones.

2016-03-18 Thread Xie, Huawei
On 3/18/2016 6:23 PM, Ilya Maximets wrote: > On 18.03.2016 13:08, Xie, Huawei wrote: >> On 2/24/2016 7:47 PM, Ilya Maximets wrote: >>> * Wait until it's our turn to add our buffer >>> @@ -979,7 +979,7 @@ rte_vhost_dequeue_burst(struct virtio_

[dpdk-dev] [PATCH RFC v3 0/3] Thread safe rte_vhost_enqueue_burst().

2016-03-18 Thread Xie, Huawei
On 3/18/2016 5:55 PM, Ilya Maximets wrote: > Hi all. > And what about first patch of this series: > "vhost: use SMP barriers instead of compiler ones." ? > > It's not about thread safety in terms of 'lockless'. It is the standalone > patch that fixes many times discussed issue with barriers on arm.

[dpdk-dev] [PATCH RFC v3 1/3] vhost: use SMP barriers instead of compiler ones.

2016-03-18 Thread Xie, Huawei
On 2/24/2016 7:47 PM, Ilya Maximets wrote: >* Wait until it's our turn to add our buffer > @@ -979,7 +979,7 @@ rte_vhost_dequeue_burst(struct virtio_net *dev, uint16_t > queue_id, > entry_success++; > } > > - rte_compiler_barrier(); > + rte_smp_rmb();

[dpdk-dev] vhost: no protection against malformed queue descriptors in rte_vhost_dequeue_burst()

2016-03-17 Thread Xie, Huawei
On 3/16/2016 8:53 PM, Patrik Andersson R wrote: > Hello, > > When taking a snapshot of a running VM instance, using OpenStack > "nova image-create", I noticed that one OVS pmd-thread eventually > failed in DPDK rte_vhost_dequeue_burst() with repeating log entries: > >compute-0-6 ovs-vswitchd[38

[dpdk-dev] [PATCH] vhost: remove unnecessary memset for virtio net hdr

2016-03-17 Thread Xie, Huawei
t; { > - memset(net_hdr, 0, sizeof(struct virtio_net_hdr)); > - > if (m_buf->ol_flags & PKT_TX_L4_MASK) { > net_hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM; > net_hdr->csum_start = m_buf->l2_len + m_buf->l3_len; Acked-by: Huawei Xie

[dpdk-dev] [PATCH 0/3 v3] virtio: Tx performance improvements

2016-03-16 Thread Xie, Huawei
nd ack if ok. > > /Bruce > Acked in the previous release window. Acked-by: Huawei Xie

[dpdk-dev] [PATCH] vhost: remove lockless enqueue to the virtio ring

2016-03-16 Thread Xie, Huawei
On 3/15/2016 7:14 AM, Thomas Monjalon wrote: > 2016-01-05 07:16, Xie, Huawei: >> On 1/5/2016 2:42 PM, Xie, Huawei wrote: >>> This patch removes the internal lockless enqueue implmentation. >>> DPDK doesn't support receiving/transmitting packets from/to the same

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

2016-03-08 Thread Huawei Xie
. For all other IO port mapping errors, return -1. Note than if VFIO/UIO fails, now we don't fall back to port IO. Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource") Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- drivers/net/virtio/

[dpdk-dev] [PATCH v5 5/6] eal: map IO port when kernel driver isn't managing the device

2016-03-08 Thread Huawei Xie
call rte_eal_pci_ioport_map (on x86) only if the pci device is not bound to a kernel driver. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal

[dpdk-dev] [PATCH v5 4/6] eal: simple code rework

2016-03-08 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index dc0aa37..4ede4cb

[dpdk-dev] [PATCH v5 3/6] eal: use new RTE_ARCH_X86 for x86 arch

2016-03-08 Thread Huawei Xie
Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index b44fa32

[dpdk-dev] [PATCH v5 2/6] eal: RTE_KDRV_NONE means kernel driver isn't managing the device

2016-03-08 Thread Huawei Xie
Use RTE_KDRV_NONE to indicate that kernel driver (other than VFIO/UIO) isn't managing the device. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH v5 1/6] eal: make the comment more accurate

2016-03-08 Thread Huawei Xie
positive return of devinit of pci driver means the driver doesn't support this device. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Acked-by: David Marchand --- lib/librte_eal/common/eal_common_pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librt

[dpdk-dev] [PATCH v5 0/6] fix the issue that DPDK takes over virtio device blindly

2016-03-08 Thread Huawei Xie
's position change LOG level from ERR to INFO Huawei Xie (6): eal: make the comment more accurate eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't managing the device. eal: use new RTE_ARCH_X86 macro for x86 arch eal: simple code rework eal: map IO port only when kernel driv

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

2016-03-08 Thread Xie, Huawei
On 3/1/2016 6:09 PM, Xie, Huawei wrote: > On 3/1/2016 5:57 PM, Thomas Monjalon wrote: >> 2016-03-01 08:39, Xie, Huawei: >>> On 3/1/2016 4:24 PM, Thomas Monjalon wrote: >>>> 2016-03-01 07:53, Xie, Huawei: >>>>> On 3/1/2016 3:18 PM, Thomas Monjal

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2016-03-08 Thread Xie, Huawei
On 3/5/2016 2:17 AM, Stephen Hemminger wrote: > Resending them now. I don't understand the issue with merge-able header. > Virtio negotiation is symmetric, if receiver is using merge-able header > then the transmitter needs to send it also. Yes, both receiver and transmitter use the same format of

[dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx

2016-03-07 Thread Xie, Huawei
On 3/7/2016 4:36 PM, Yuanhan Liu wrote: > On Mon, Mar 07, 2016 at 07:52:22AM +, Xie, Huawei wrote: >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>> Current virtio_dev_merge_rx() implementation just looks like the >>> old rte_vhost_dequeue_burst(), full of twisted

[dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > Current virtio_dev_merge_rx() implementation just looks like the > old rte_vhost_dequeue_burst(), full of twisted logic, that you > can see same code block in quite many different places. > > However, the logic of virtio_dev_merge_rx() is quite similar to

[dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx

2016-03-07 Thread Xie, Huawei
On 3/7/2016 3:04 PM, Xie, Huawei wrote: > On 3/7/2016 2:49 PM, Yuanhan Liu wrote: >> On Mon, Mar 07, 2016 at 06:38:42AM +0000, Xie, Huawei wrote: >>> On 3/7/2016 2:35 PM, Yuanhan Liu wrote: >>>> On Mon, Mar 07, 2016 at 06:22:25AM +, Xie, Huawei wrote: >>&

[dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx

2016-03-07 Thread Xie, Huawei
On 3/7/2016 2:49 PM, Yuanhan Liu wrote: > On Mon, Mar 07, 2016 at 06:38:42AM +, Xie, Huawei wrote: >> On 3/7/2016 2:35 PM, Yuanhan Liu wrote: >>> On Mon, Mar 07, 2016 at 06:22:25AM +, Xie, Huawei wrote: >>>> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>

[dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx

2016-03-07 Thread Xie, Huawei
On 3/7/2016 2:35 PM, Yuanhan Liu wrote: > On Mon, Mar 07, 2016 at 06:22:25AM +, Xie, Huawei wrote: >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>> + uint16_t idx = vq->avail->ring[avail_idx & (vq->size - 1)]; >>> + uint32_t vec_id = *vec_i

[dpdk-dev] [PATCH v2 3/7] vhost: refactor virtio_dev_merge_rx

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > + uint16_t idx = vq->avail->ring[avail_idx & (vq->size - 1)]; > + uint32_t vec_id = *vec_idx; > + uint32_t len= *allocated; > There is bug not using volatile to retrieve the avail idx.

[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-07 Thread Xie, Huawei
On 3/7/2016 12:20 PM, Stephen Hemminger wrote: > On Thu, 18 Feb 2016 21:49:09 +0800 > Yuanhan Liu wrote: > >> +static inline void >> +copy_virtio_net_hdr(struct vhost_virtqueue *vq, uint64_t desc_addr, >> +struct virtio_net_hdr_mrg_rxbuf hdr) >> +{ >> +if (vq->vhost_hlen == siz

[dpdk-dev] [PATCH v2 2/7] vhost: refactor virtio_dev_rx

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > + while (1) { > + /* done with current mbuf, fetch next */ > + if (mbuf_avail == 0) { > + m = m->next; > + if (m == NULL) > + break; > + > +

[dpdk-dev] [PATCH v2 7/7] vhost: do sanity check for desc->next

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > + if (unlikely(desc->next >= vq->size)) > + goto fail; desc chains could be forged into a loop then vhost runs the dead loop until it exhaust all mbuf memory.

[dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > + mbuf_avail = 0; > + mbuf_offset = 0; one cs nit, put it at the definition.

[dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst

2016-03-07 Thread Xie, Huawei
On 3/4/2016 10:30 AM, Yuanhan Liu wrote: > On Thu, Mar 03, 2016 at 05:40:14PM +, Xie, Huawei wrote: >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>> The current rte_vhost_dequeue_burst() implementation is a bit messy >> [...] >>> + >>> uint16_t >

[dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst

2016-03-07 Thread Xie, Huawei
On 3/7/2016 10:47 AM, Yuanhan Liu wrote: > On Mon, Mar 07, 2016 at 02:32:46AM +, Xie, Huawei wrote: >> On 3/4/2016 10:15 AM, Yuanhan Liu wrote: >>> On Thu, Mar 03, 2016 at 04:30:42PM +, Xie, Huawei wrote: >>>> On 2/18/2016 9:48 PM, Yuanhan Liu

[dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst

2016-03-07 Thread Xie, Huawei
On 3/4/2016 10:10 AM, Yuanhan Liu wrote: > On Thu, Mar 03, 2016 at 05:19:42PM +, Xie, Huawei wrote: >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>> [...] >> CCed changchun, the author for the chained handling of desc and mbuf. >> The change makes the code

[dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst

2016-03-07 Thread Xie, Huawei
On 3/4/2016 10:15 AM, Yuanhan Liu wrote: > On Thu, Mar 03, 2016 at 04:30:42PM +, Xie, Huawei wrote: >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>> + mbuf_avail = 0; >>> + mbuf_offset = 0; >>> + while (desc_avail || (desc->flags & VRING_DESC_F

[dpdk-dev] [PATCH v2 1/7] vhost: refactor rte_vhost_dequeue_burst

2016-03-07 Thread Xie, Huawei
On 3/4/2016 10:19 AM, Yuanhan Liu wrote: > On Thu, Mar 03, 2016 at 04:21:19PM +, Xie, Huawei wrote: >> On 2/18/2016 9:48 PM, Yuanhan Liu wrote: >>> The current rte_vhost_dequeue_burst() implementation is a bit messy >>> and logic twisted. And you could see rep

[dpdk-dev] [PATCH v2 4/7] vhost: do not use rte_memcpy for virtio_hdr copy

2016-03-07 Thread Xie, Huawei
On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie

[dpdk-dev] [PATCH v2 0/5] virtio: Tx performance improvements

2016-03-04 Thread Xie, Huawei
On 1/14/2016 9:49 PM, Xie, Huawei wrote: > On 1/6/2016 8:04 PM, Thomas Monjalon wrote: >> 2016-01-05 08:10, Xie, Huawei: >>> On 10/26/2015 10:06 PM, Xie, Huawei wrote: >>>> On 10/19/2015 1:16 PM, Stephen Hemminger wrote: >>>>> This is a tested vers

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

2016-03-04 Thread Xie, Huawei
On 2/23/2016 12:23 AM, Tom Kiely wrote: > Hi, > Sorry I missed the last few messages until now. I'm happy with > just removing the "if". Kyle, when you say you fixed it, do you mean > that you will push the patch or have already done so ? >Thanks, >Tom Could you please send the pat

  1   2   3   4   5   6   7   8   9   >