[dpdk-dev] [PATCH v3] doc: virtio PMD Rx/Tx callbacks

2016-07-04 Thread Yuanhan Liu
On Thu, Jun 30, 2016 at 11:28:01PM -0400, Zhihong Wang wrote: > This patch explains current virtio PMD Rx/Tx callbacks, to help understand > what's the difference, and how to enable the right ones. > > Signed-off-by: Zhihong Wang > Acked-by: John McNamara Applied to dpdk-next-virtio. >

[dpdk-dev] [PATCH] vhost: reset queue state in destroy_device

2016-07-04 Thread Yuanhan Liu
On Fri, Jul 01, 2016 at 09:31:12AM -0700, Rich Lane wrote: > Fixes a bug where rte_eth_vhost_get_queue_event would not return enabled > queues > after a guest application restart. > > Fixes: ee584e9710b9 ("vhost: add driver on top of the library") > Signed-off-by: R

[dpdk-dev] [PATCH] vhost: fix segfault on bad descriptor address.

2016-07-01 Thread Yuanhan Liu
Hi, Sorry for the long delay. On Fri, May 20, 2016 at 03:50:04PM +0300, Ilya Maximets wrote: > In current implementation guest application can reinitialize vrings > by executing start after stop. In the same time host application > can still poll virtqueue while device stopped in guest and it

[dpdk-dev] [PATCH 1/4] net/virtio-user: fix return value not checked

2016-07-01 Thread Yuanhan Liu
On Wed, Jun 29, 2016 at 09:05:33AM +, Jianfeng Tan wrote: > - if (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_CQ_NUM) == 1) > - rte_kvargs_process(kvlist, VIRTIO_USER_ARG_CQ_NUM, > -_integer_arg, ); > + if (rte_kvargs_count(kvlist,

[dpdk-dev] [PATCH v2] net/virtio-user: fix build error in SUSE 11

2016-07-01 Thread Yuanhan Liu
On Wed, Jun 29, 2016 at 03:23:03AM +, Jianfeng Tan wrote: > On some older systems, such as SUSE 11, the compiling error shows > as: >.../dpdk/drivers/net/virtio/virtio_user/virtio_user_dev.c:67:22: > error: ?O_CLOEXEC? undeclared (first use in this function) > > The fix is to use

[dpdk-dev] [PATCH] net/virtio-user: fix missing default macro

2016-07-01 Thread Yuanhan Liu
On Wed, Jun 29, 2016 at 03:20:06AM +, Jianfeng Tan wrote: > With current config structure, all configuration parameters put into > common_base with a default value, and overwritten in environment file > if required, CONFIG_RTE_VIRTIO_USER is missing in common_base. > > This fix is simple, by

[dpdk-dev] [PATCH 0/3] vhost coverity issue fixes

2016-07-01 Thread Yuanhan Liu
On Tue, Jun 28, 2016 at 11:58:28AM +0800, Yuanhan Liu wrote: > This is a small series fixes 3 coverity issues. Series applied to dpdk-next-virtio. --yliu > > John, I'm wondering maybe maybe we could add the next-net and > next-virtio tree into the coverity test as well? So t

[dpdk-dev] [PATCH 0/3] vhost coverity issue fixes

2016-07-01 Thread Yuanhan Liu
On Thu, Jun 30, 2016 at 03:58:31PM +, Mcnamara, John wrote: > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Tuesday, June 28, 2016 4:58 AM > > To: dev at dpdk.org > > Cc: Xie, Huawei ; Mcnamara, John > >

[dpdk-dev] [PATCH v1] doc: autogenerate nic overview table from ini files

2016-07-01 Thread Yuanhan Liu
On Thu, Jun 30, 2016 at 08:25:14PM +0200, Thomas Monjalon wrote: > 2016-06-30 19:03, John McNamara: > > This patch converts the NIC feature table in the overview doc into a set of > > ini files and adds some functions into the Sphinx conf.py file to convert > > them > > back into an RST table. >

[dpdk-dev] [PATCH v3 00/20] vhost ABI/API refactoring

2016-06-30 Thread Yuanhan Liu
On Thu, Jun 30, 2016 at 10:39:45AM +0300, Panu Matilainen wrote: > On 06/07/2016 06:51 AM, Yuanhan Liu wrote: > >v3: - adapted the new vhost ABI/API changes to tep_term example, to make > > sure not break build at least. > >- bumped the ABI version to 3 > >

[dpdk-dev] [PATCH 2/4] virtio: introduce RTE_LIBRTE_VIRTIO_INC_VECTOR

2016-06-30 Thread Yuanhan Liu
On Wed, Jun 29, 2016 at 05:10:31PM +0530, Jerin Jacob wrote: > On Wed, Jun 29, 2016 at 01:25:35PM +0200, Thomas Monjalon wrote: > > 2016-06-29 16:48, Jerin Jacob: > > > On Mon, Jun 27, 2016 at 04:59:42PM +0200, Thomas Monjalon wrote: > > > > 2016-06-27 20:18, Jerin Jacob: > > > > > On Mon, Jun 27,

[dpdk-dev] [PATCH 3/4] virtio: move SSE based Rx implementation to separate file

2016-06-30 Thread Yuanhan Liu
On Wed, Jun 29, 2016 at 04:57:46PM +0530, Jerin Jacob wrote: > On Tue, Jun 28, 2016 at 02:17:41PM +0800, Jianbo Liu wrote: > > On 27 June 2016 at 19:54, Jerin Jacob > > wrote: > > > split out SSE instruction based virtio simple rx > > > implementation to a separate file > > > > > >

[dpdk-dev] [PATCH] vhost: fix missing flag reset on stop

2016-06-30 Thread Yuanhan Liu
t; > Fixes: 550c9d27d143 ("vhost: set/reset device flags internally") > > > > Reported-by: Loftus Ciara > > Signed-off-by: Yuanhan Liu > > --- > > lib/librte_vhost/vhost_user/virtio-net-user.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-

[dpdk-dev] [PATCH v2] doc: update vhost guide

2016-06-30 Thread Yuanhan Liu
On Mon, Jun 27, 2016 at 09:26:12AM +, Mcnamara, John wrote: > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, June 27, 2016 6:20 AM > > To: dev at dpdk.org > > Cc: Xie, Huawei ; Mcnamara, John >

[dpdk-dev] [PATCH v2] net/virtio-user: fix implicit int to enum conversion

2016-06-30 Thread Yuanhan Liu
On Sun, Jun 26, 2016 at 01:48:13PM +, Jianfeng Tan wrote: > Implicit int to enum conversion is not allowed when icc is used as > the compiler. It raises the compiling error like, > /.../dpdk/drivers/net/virtio/virtio_user/vhost_user.c(257): > error #188: enumerated type mixed with

[dpdk-dev] [PATCH] vhost: fix Tx error counting of vhost PMD

2016-06-30 Thread Yuanhan Liu
On Fri, Jun 24, 2016 at 10:17:20AM +0800, Yuanhan Liu wrote: > On Fri, Jun 24, 2016 at 11:04:20AM +0900, Tetsuya Mukawa wrote: > > According to 'rte_eth_stats' structure comments, 'imissed' > > should represent RX error counting, but currently 'imissed' is > > used to count TX

[dpdk-dev] [PATCH v2] doc: virtio pmd versions

2016-06-29 Thread Yuanhan Liu
On Tue, Jun 14, 2016 at 07:53:17PM -0400, Zhihong Wang wrote: > This patch explains all the versions of current virtio pmd implementation, > what's the difference, and how to choose the right version. > > -- > Changes in v2: > >1. Changes on format and few descriptions. Change

[dpdk-dev] [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error

2016-06-29 Thread Yuanhan Liu
On Tue, Jun 28, 2016 at 10:41:24AM +0100, Ferruh Yigit wrote: > On 6/26/2016 2:49 PM, Jianfeng Tan wrote: > > On some older systems, such as SUSE 11, the compiling error shows > > as: > >.../dpdk/drivers/net/virtio/virtio_user/virtio_user_dev.c:67:22: > > error: ?O_CLOEXEC? undeclared

[dpdk-dev] [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error

2016-06-28 Thread Yuanhan Liu
On Sun, Jun 26, 2016 at 01:49:46PM +, Jianfeng Tan wrote: > On some older systems, such as SUSE 11, the compiling error shows > as: >.../dpdk/drivers/net/virtio/virtio_user/virtio_user_dev.c:67:22: > error: ?O_CLOEXEC? undeclared (first use in this function) > > The fix is to

[dpdk-dev] [PATCH 3/3] vhost: fix potential NULL pointer dereference

2016-06-28 Thread Yuanhan Liu
nn->un = un; Coverity issue: 127481 Fixes: e623e0c6d8a5 ("vhost: add reconnect ability") Reported-by: John McNamara Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/vhost-net-user.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_vhost/vhost_user/vhost-

[dpdk-dev] [PATCH 2/3] vhost: fix not null terminated string

2016-06-28 Thread Yuanhan Liu
leave >>> the destination string unterminated. 441 strncpy(un->sun_path, path, sizeof(un->sun_path)); 442 443 return fd; 444 } Coverity issue: 127475 Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode") Reported-by:

[dpdk-dev] [PATCH 1/3] vhost: fix memory leak

2016-06-28 Thread Yuanhan Liu
Fix potential memory leak raised by Coverity. >>> Variable "vsocket" going out of scope leaks the storage it >>> points to. Coverity issue: 127483 Fixes: e623e0c6d8a5 ("vhost: add reconnect ability") Reported-by: John McNamara Signed-off-

[dpdk-dev] [PATCH 0/3] vhost coverity issue fixes

2016-06-28 Thread Yuanhan Liu
This is a small series fixes 3 coverity issues. John, I'm wondering maybe maybe we could add the next-net and next-virtio tree into the coverity test as well? So that we could catch those errors as earlier as possible, say, at least before they got merged into mainline. --- Yuanhan Liu (3

[dpdk-dev] [RFC] librte_vhost: Add unix domain socket fd registration

2016-06-27 Thread Yuanhan Liu
On Fri, Jun 24, 2016 at 08:23:52AM -0400, Aaron Conole wrote: > Is there still merit to this patch, given above? If so, I'd finish my > integration and testing work and submit it formally. Sorry, I don't see the strong need of this patch (at least so far), judging that vhost-user as the client

[dpdk-dev] [PATCH] vhost: fix missing flag reset on stop

2016-06-27 Thread Yuanhan Liu
Commit 550c9d27d143 ("vhost: set/reset device flags internally") moves the VIRTIO_DEV_RUNNING set/reset to vhost lib. But I missed one reset on stop; here fixes it. Fixes: 550c9d27d143 ("vhost: set/reset device flags internally") Reported-by: Loftus Ciara Signed-off-by: Y

[dpdk-dev] [PATCH v2] doc: update vhost guide

2016-06-27 Thread Yuanhan Liu
there are any people still using vhost-cuse) [John McNamara: rewords, better formats] Signed-off-by: Yuanhan Liu --- doc/guides/prog_guide/vhost_lib.rst | 223 +--- 1 file changed, 156 insertions(+), 67 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc

[dpdk-dev] [PATCH] doc: update vhost guide

2016-06-27 Thread Yuanhan Liu
On Sun, Jun 26, 2016 at 08:28:12PM +, Mcnamara, John wrote: > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Friday, June 24, 2016 8:53 AM > > To: dev at dpdk.org > > Cc: Xie, Huawei ; Mcnamara, John >

[dpdk-dev] [PATCH] doc: update vhost guide

2016-06-24 Thread Yuanhan Liu
there are any people still using vhost-cuse) Signed-off-by: Yuanhan Liu --- doc/guides/prog_guide/vhost_lib.rst | 161 ++-- 1 file changed, 116 insertions(+), 45 deletions(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index

[dpdk-dev] [RFC] librte_vhost: Add unix domain socket fd registration

2016-06-24 Thread Yuanhan Liu
On Fri, Jun 24, 2016 at 07:43:29AM +, Loftus, Ciara wrote: > > > > On Tue, Jun 21, 2016 at 09:15:03AM -0400, Aaron Conole wrote: > > > Yuanhan Liu writes: > > > > > > > On Fri, Jun 17, 2016 at 11:32:36AM -0400, Aaron Conole wrote: > > > &

[dpdk-dev] [RFC] librte_vhost: Add unix domain socket fd registration

2016-06-24 Thread Yuanhan Liu
On Tue, Jun 21, 2016 at 09:15:03AM -0400, Aaron Conole wrote: > Yuanhan Liu writes: > > > On Fri, Jun 17, 2016 at 11:32:36AM -0400, Aaron Conole wrote: > >> Prior to this commit, the only way to add a vhost-user socket to the > >> system is by relying on librte

[dpdk-dev] [PATCH] vhost: fix Tx error counting of vhost PMD

2016-06-24 Thread Yuanhan Liu
710b9 ("vhost: add driver on top of the library") > Signed-off-by: Tetsuya Mukawa Acked-by: Yuanhan Liu (And sorry for the delay: I planned to look at the report from you at the earlier of this week; but somehow I forgot :( --yliu

[dpdk-dev] [PATCH v3 00/25] Refactor mlx5 to improve performance

2016-06-21 Thread Yuanhan Liu
Hi, Here is an off-topic comment: would you please add following line to the sendemail section of your git config file? chainreplyto = false That would let me to break the long threads in my client much easier. Otherwise, it's hard for me to do it, leading that your thread occupies several

[dpdk-dev] [RFC] librte_vhost: Add unix domain socket fd registration

2016-06-21 Thread Yuanhan Liu
On Fri, Jun 17, 2016 at 11:32:36AM -0400, Aaron Conole wrote: > Prior to this commit, the only way to add a vhost-user socket to the > system is by relying on librte_vhost to open the unix domain socket and > add it to the unix socket list. This is problematic for applications > which would like

[dpdk-dev] [PATCH] virtio: fix crash on querying xstats

2016-06-20 Thread Yuanhan Liu
On Mon, Jun 20, 2016 at 12:02:16PM +0100, Remy Horton wrote: > > On 20/06/2016 11:50, Yuanhan Liu wrote: > >Trying to access xstats_names after "if (stats_names == NULL)" is > >obviously wrong, which would result to a crash while running "show > >po

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

2016-06-20 Thread Yuanhan Liu
On Mon, Jun 20, 2016 at 01:48:52AM +0800, Huawei Xie wrote: > In the following loop: > while (vq->vq_used_cons_idx != vq->vq_ring.used->idx) { > ... > } > There is no external function call or any explict memory barrier > in the loop, the re-read of used->idx would be optimized

[dpdk-dev] [PATCH] virtio: fix crash on querying xstats

2016-06-20 Thread Yuanhan Liu
fetch extended statistics with integer ids") Cc: Remy Horton Signed-off-by: Yuanhan Liu --- 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/virtio_ethdev.c index 19d5d8a..12fa640 1

[dpdk-dev] [PATCH v5 6/7] drivers/net/virtio: change xstats to use integer ids

2016-06-20 Thread Yuanhan Liu
On Wed, Jun 15, 2016 at 04:25:32PM +0100, Remy Horton wrote: > > +static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev, > +struct rte_eth_xstat_name *xstats_names, > +__rte_unused unsigned limit) > +{ > +

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

2016-06-20 Thread Yuanhan Liu
r code. > > Fixes: 8f972312b8f4 ("vhost: support vhost-user") > > Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu Applied to dpdk-next-virtio. Thanks. --yliu

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

2016-06-20 Thread Yuanhan Liu
On Thu, Jun 16, 2016 at 02:30:37AM +0800, Huawei Xie wrote: > - while (vq->vq_used_cons_idx != vq->vq_ring.used->idx) { > + while (VIRTQUEUE_NUSED(vq)) { > uint32_t idx, desc_idx, used_idx; > struct vring_used_elem *uep; > > diff --git

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

2016-06-20 Thread Yuanhan Liu
On Wed, Jun 15, 2016 at 08:32:45AM +0800, Huawei Xie wrote: > fixes the following coverity issues: > CID 107118 (#1 of 1): Dereference null return value (NULL_RETURNS) > CID 119262 (#1 of 1): Dereference null return value (NULL_RETURNS) > > Fixes: 8f972312b8f4 ("vhost: support vhost-user") >

[dpdk-dev] [PATCH v2 0/2] vhost: Fix leaks on migration.

2016-06-20 Thread Yuanhan Liu
Applied to dpdk-next-virtio. Thanks! --yliu On Thu, Jun 16, 2016 at 12:16:35PM +0300, Ilya Maximets wrote: > v2: > * rebased on top of dpdk-next-virtio/master > > Ilya Maximets (2): > vhost: fix leak of file descriptors. > vhost: unmap log memory on cleanup. > >

[dpdk-dev] [PATCH 0/2] vhost: Fix leaks on migration.

2016-06-16 Thread Yuanhan Liu
Thanks for fixing them! Would you please resend them, with a rebase based on master branch of following tree: http://dpdk.org/browse/next/dpdk-next-virtio/ --yliu On Thu, Jun 16, 2016 at 11:32:03AM +0300, Ilya Maximets wrote: > Ilya Maximets (2): > vhost: fix leak of file

[dpdk-dev] [PATCH v9 0/6] virtio support for container

2016-06-15 Thread Yuanhan Liu
Applied to dpdk-next-virtio. Thanks. --yliu

[dpdk-dev] [PATCH v3 0/3] add multi queue support for virtio-user

2016-06-15 Thread Yuanhan Liu
Applied to dpdk-next-virtio, with following small changes, for addressing a build error and some checkpatch warnings. Thanks. --yliu --- diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 026b8a1..ea7a48e 100644 ---

[dpdk-dev] [PATCH 1/1] vhost: fix null pointer dereference

2016-06-15 Thread Yuanhan Liu
On Wed, Jun 15, 2016 at 11:47:22AM +0200, Marcin Kerlin wrote: > Return value of function get_device() is not checking before > dereference. Fix this problem by adding checking condition. > > Coverity issue: 119262 > Fixes: 77d20126b4c2 ("vhost-user: handle message to enable vring") > >

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

2016-06-14 Thread Yuanhan Liu
Firstly, it's V2. So, don't forget to add version number and link it to the previous version next time. On Mon, Jun 13, 2016 at 07:52:12PM +0800, Huawei Xie wrote: > All other DPDK PMDs doesn't support concurrent receiving or sending > packets to the same queue. The upper application should deal

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

2016-06-14 Thread Yuanhan Liu
On Mon, Jun 13, 2016 at 10:53:08PM +0800, Huawei Xie wrote: > 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") >

[dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned

2016-06-14 Thread Yuanhan Liu
On Sun, Jun 12, 2016 at 02:29:42PM +, Jianfeng Tan wrote: > Compile DPDK with clang, below line in virtio_rxtx.c could be > optimized with four "VMOVAPS ymm, m256". > memset(>fake_mbuf, 0, sizeof(rxvq->fake_mbuf)); > > This instruction requires memory address is 32-byte aligned. > Or, it

[dpdk-dev] [PATCH 0/3] [RFC] vhost: micro vhost optimization

2016-06-14 Thread Yuanhan Liu
Applied to dpdk-next-virtio. --yliu On Mon, May 02, 2016 at 05:46:15PM -0700, Yuanhan Liu wrote: > Here is a small patch set does the micro optimization, which brings about > 10% performance boost in my 64B packet testing, with the following topo: > > pkt generato

[dpdk-dev] [PATCH v3 0/6] vhost: add vhost-user client mode and reconnect ability

2016-06-14 Thread Yuanhan Liu
Applied to dpdk-next-virtio. --yliu On Tue, Jun 07, 2016 at 12:05:02PM +0800, Yuanhan Liu wrote: > v3: - make the "reconnect" feature be default for client mode, as it's > good to handle guest OS restart with less effort. > - fix var not-initilized error

[dpdk-dev] [PATCH v3 00/20] vhost ABI/API refactoring

2016-06-14 Thread Yuanhan Liu
Applied to dpdk-next-virtio. --yliu On Tue, Jun 07, 2016 at 11:51:50AM +0800, Yuanhan Liu wrote: > v3: - adapted the new vhost ABI/API changes to tep_term example, to make > sure not break build at least. > - bumped the ABI version to 3 > > NOTE: I created a bra

[dpdk-dev] [PATCH v8 0/6] virtio support for container

2016-06-14 Thread Yuanhan Liu
Series Acked-by: Yuanhan Liu --yliu On Mon, Jun 13, 2016 at 06:38:57AM +, Jianfeng Tan wrote: > v8: > - Change to use max_queue_pairs instead of queue_pairs to initialize >and deinitialize queues. > - Remove vhost-kernel support. > > v7: > - C

[dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned

2016-06-13 Thread Yuanhan Liu
On Mon, Jun 13, 2016 at 10:06:22AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, June 13, 2016 5:52 PM > > To: Tan, Jianfeng > > Cc: dev at dpdk.org; Xie, Huawe

[dpdk-dev] [PATCH v2 1/4] virtio-user: use virtual address in cq

2016-06-13 Thread Yuanhan Liu
On Mon, Jun 13, 2016 at 06:43:40AM +, Jianfeng Tan wrote: > Change to use virtio_net_hdr_mem instead of physical addr of memzone > when sending contrl queue commands. The virtio_net_hdr_mem has been > initialized to use virtual address under the case of virtio-user. I'd suggest to squash this

[dpdk-dev] [PATCH v2 4/4] virtio-user: handle ctrl-q in driver

2016-06-13 Thread Yuanhan Liu
On Mon, Jun 13, 2016 at 06:43:43AM +, Jianfeng Tan wrote: > In virtio-user driver, when notify ctrl-queue, invoke API of > virtio-user device emulation to handle ctrl-q command. > > Besides, multi-queue requires ctrl-queue and ctrl-queue will be > enabled automatically when multi-queue is

[dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export numa node

2016-06-13 Thread Yuanhan Liu
On Thu, Jun 09, 2016 at 12:45:00PM +0800, Yuanhan Liu wrote: > On Wed, Jun 08, 2016 at 02:51:33PM -0700, Rich Lane wrote: > > On Mon, Jun 6, 2016 at 8:51 PM, Yuanhan Liu > > wrote: > > > > @@ -248,14 +248,9 @@ new_device(struct virtio_net *dev) > >

[dpdk-dev] [PATCH] examples/vhost: fix corrupted vdev tailq list

2016-06-13 Thread Yuanhan Liu
On Tue, Jun 07, 2016 at 11:32:56AM +0800, Yuanhan Liu wrote: > There are two tailq lists, one for logging all vhost devices, another > one for logging vhost devices distributed on a specific core. However, > there is just one tailq entry, named "next", to chain the two lis

[dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned

2016-06-13 Thread Yuanhan Liu
On Mon, Jun 13, 2016 at 05:21:01PM +0800, Yuanhan Liu wrote: > On Sun, Jun 12, 2016 at 02:29:42PM +, Jianfeng Tan wrote: > > Compile DPDK with clang, below line in virtio_rxtx.c could be > > optimized with four "VMOVAPS ymm, m256". > > memset(>fa

[dpdk-dev] [PATCH] virito: fix reuse index in nested loop

2016-06-13 Thread Yuanhan Liu
On Mon, Jun 13, 2016 at 09:11:57AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, June 13, 2016 4:58 PM > > To: Tan, Jianfeng > > Cc: dev at dpdk.org; Xie, Huawei

[dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned

2016-06-13 Thread Yuanhan Liu
On Sun, Jun 12, 2016 at 02:29:42PM +, Jianfeng Tan wrote: > Compile DPDK with clang, below line in virtio_rxtx.c could be > optimized with four "VMOVAPS ymm, m256". > memset(>fake_mbuf, 0, sizeof(rxvq->fake_mbuf)); > > This instruction requires memory address is 32-byte aligned. > Or, it

[dpdk-dev] [PATCH] virito: fix reuse index in nested loop

2016-06-13 Thread Yuanhan Liu
On Sun, Jun 12, 2016 at 10:05:45AM +, Jianfeng Tan wrote: > This patches fixes problem of reusing index of outmost loop in nested > loops. This bug will lead to failure when starting a multi queue > virtio device: rx queues (except from the first one) cannot be started, > expecially their

[dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export numa node

2016-06-09 Thread Yuanhan Liu
On Wed, Jun 08, 2016 at 02:51:33PM -0700, Rich Lane wrote: > On Mon, Jun 6, 2016 at 8:51 PM, Yuanhan Liu > wrote: > > @@ -248,14 +248,9 @@ new_device(struct virtio_net *dev) > ? ? ? ? internal = eth_dev->data->dev_private; > > ?#ifdef RTE_LIBRTE_V

[dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export numa node

2016-06-07 Thread Yuanhan Liu
On Tue, Jun 07, 2016 at 02:42:58PM +0300, Panu Matilainen wrote: > On 06/07/2016 06:51 AM, Yuanhan Liu wrote: > >Introduce a new API rte_vhost_get_numa_node() to get the numa node > >from which the virtio_net struct is allocated. > > > >Signed-off-by: Yuanhan Liu > &

[dpdk-dev] [PATCH v5 0/6] Virtio-net PMD: QEMU QTest extension for container

2016-06-07 Thread Yuanhan Liu
On Tue, Jun 07, 2016 at 04:12:28PM +0900, Tetsuya Mukawa wrote: > On 2016/06/06 19:50, Tan, Jianfeng wrote: > >> Please let me make sure how we can invoke many DPDK applications in > >> hundreds containers. > >> (Do we have a way to do? Or, will we have it in the future?) > > > > Just to add some

[dpdk-dev] [PATCH v3 6/6] vhost: add pmd client option

2016-06-07 Thread Yuanhan Liu
Add client option to vhost pmd, to let it act as the vhost-user client. Signed-off-by: Yuanhan Liu --- v3: - remove the reconect option, as it's enabled by default now. - fixed non-initilized var reported by Rich --- drivers/net/vhost/rte_eth_vhost.c | 38

[dpdk-dev] [PATCH v3 5/6] examples/vhost: add client option

2016-06-07 Thread Yuanhan Liu
Add --client option to let vhost-switch acts as the client. Signed-off-by: Yuanhan Liu --- v3: remove the --reconnect opt, as it's enabled by default. --- examples/vhost/main.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b/examples

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

2016-06-07 Thread Yuanhan Liu
driver will not process those stale used entries, for used-idx is not updated yet. - DPDK process vring in order, that means a crash may just lead some packet retransmission for Tx and drop for Rx. Cc: "Michael S. Tsirkin" Suggested-by: Huawei Xie Signed-off-by: Yuanhan Liu Acke

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

2016-06-07 Thread Yuanhan Liu
the connection without restarting DPDK app. This patch make it work well for both above cases. It simply creates a new thread, and keep trying calling "connect()", until it succeeds. The reconnect could be disabled when RTE_VHOST_USER_NO_RECONNECT flag is set. Signed-off-by: Yuanhan Liu --- v2

[dpdk-dev] [PATCH v3 2/6] vhost: add vhost-user client mode

2016-06-07 Thread Yuanhan Liu
, connect for client. This extension is for vhost-user only, therefore we simply quit and report error when any flags are given for vhost-cuse. Signed-off-by: Yuanhan Liu --- v2: - add relase doc - do not remove socket file for client mode --- doc/guides/rel_notes/release_16_07.rst

[dpdk-dev] [PATCH v3 1/6] vhost: rename structs for enabling client mode

2016-06-07 Thread Yuanhan Liu
t's obviously better to rename it to "vhost_user_connection", as it does represent a connection, a connection between the backend (DPDK) and the frontend (QEMU). Similarly, few more renames are taken, such as "vserver_new_vq_conn" to "vhost_user_new_connection". Signed-off

[dpdk-dev] [PATCH v3 0/6] vhost: add vhost-user client mode and reconnect ability

2016-06-07 Thread Yuanhan Liu
doc - do not remove socket file for the client mode - create one thread ony to handle all reconnects Thanks. --yliu --- Yuanhan Liu (6): vhost: rename structs for enabling client mode vhost: add vhost-user client mode vhost: add reconnect ability vhost: workaround stale vr

[dpdk-dev] [PATCH v3 20/20] vhost: make buf vector for scatter Rx local

2016-06-07 Thread Yuanhan Liu
inside virtio_dev_merge_rx(). Signed-off-by: Ilya Maximets Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/vhost-net.h | 1 - lib/librte_vhost/vhost_rxtx.c | 41 ++--- 2 files changed, 22 insertions(+), 20 deletions(-)

[dpdk-dev] [PATCH v3 19/20] vhost: per device virtio net header len

2016-06-07 Thread Yuanhan Liu
Virtio net header length is set per device, but not per queue. So, there is no reason to store it in vhost_virtqueue struct, instead, we should store it in virtio_net struct, to make one copy only. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/vhost

[dpdk-dev] [PATCH v3 18/20] examples/tep_term: adapt to new vhost ABI/API changes

2016-06-07 Thread Yuanhan Liu
Adapt to the new vhost ABI/API refactoring changes, to not break the build. It's a straightforward change: replace "struct virtio_net *dev" with "int fd". Simple build test only so far. Signed-off-by: Yuanhan Liu --- tep_term is built on top of vhost switch example; they

[dpdk-dev] [PATCH v3 17/20] vhost: reserve few more space for future extension

2016-06-07 Thread Yuanhan Liu
for a long while. Another reason to choose 5 is for cache alignment: 5 makes the struct 64 bytes for 64 bit machine. With this, it's confidence to say that we might be able to be free from the ABI violation forever. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/li

[dpdk-dev] [PATCH v3 16/20] vhost: remove virtio-net.h

2016-06-07 Thread Yuanhan Liu
It barely has anything useful there, just 2 functions prototype. Here move them to vhost-net.h, and delete it. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/vhost-net.h | 3 ++ lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 1

[dpdk-dev] [PATCH v3 15/20] vhost: remove unnecessary fields

2016-06-07 Thread Yuanhan Liu
way that we could still access it is to expose it by a function, but I doubt that's needed or worthwhile. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/vhost-net.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/librte_vhost/vhost-net.h b/lib/librte_v

[dpdk-dev] [PATCH v3 14/20] vhost: hide internal structs/macros/functions

2016-06-07 Thread Yuanhan Liu
We are now safe to move all those internal structs/macros/functions to vhost-net.h, to hide them from external access. This patch also breaks long lines and removes some redundant comments. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost

[dpdk-dev] [PATCH v3 13/20] vhost: export vid as the only interface to applications

2016-06-07 Thread Yuanhan Liu
With all the previous prepare works, we are just one step away from the final ABI refactoring. That is, to change current API to let them stick to vid instead of the old virtio_net dev. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- v2: update release note v3: - bump

[dpdk-dev] [PATCH v3 12/20] vhost: remove dependency on priv field

2016-06-07 Thread Yuanhan Liu
This change could let us avoid the dependency of "virtio_net" struct, to prepare for the ABI refactoring. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- drivers/net/vhost/rte_eth_vhost.c | 13 +++-- examples/vhost/main.c | 10 +++--

[dpdk-dev] [PATCH v3 11/20] vhost: introduce new API to export queue free entries

2016-06-07 Thread Yuanhan Liu
repare for the ABI refactoring. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- doc/guides/rel_notes/release_16_07.rst | 2 ++ examples/vhost/main.c | 4 ++-- lib/librte_vhost/rte_vhost_version.map | 1 + lib/librte_vhost/rte_virtio_net.h | 24

[dpdk-dev] [PATCH v3 10/20] vhost: introduce new API to export ifname

2016-06-07 Thread Yuanhan Liu
Introduce a new API rte_vhost_get_ifname() to export the ifname to application. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- drivers/net/vhost/rte_eth_vhost.c | 12 lib/librte_vhost/rte_vhost_version.map | 1 + lib/librte_vhost/rte_virtio_net.h

[dpdk-dev] [PATCH v3 09/20] vhost: introduce new API to export number of queues

2016-06-07 Thread Yuanhan Liu
Introduce a new API rte_vhost_get_queue_num() to export the number of queues. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- drivers/net/vhost/rte_eth_vhost.c | 2 +- lib/librte_vhost/rte_vhost_version.map | 1 + lib/librte_vhost/rte_virtio_net.h | 11

[dpdk-dev] [PATCH v3 08/20] vhost: introduce new API to export numa node

2016-06-07 Thread Yuanhan Liu
Introduce a new API rte_vhost_get_numa_node() to get the numa node from which the virtio_net struct is allocated. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- drivers/net/vhost/rte_eth_vhost.c | 13 - lib/librte_vhost/rte_vhost_version.map | 7

[dpdk-dev] [PATCH v3 07/20] vhost: move vhost device ctx to cuse

2016-06-07 Thread Yuanhan Liu
vhost cuse is now the last reference of the vhost_device_ctx struct; move it there, and do a rename to "vhost_cuse_device_ctx", to make it clear that it's "cuse only". Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/vhost-net.h

[dpdk-dev] [PATCH v3 06/20] vhost: get device by vid only

2016-06-07 Thread Yuanhan Liu
get_device() just needs vid, so pass vid as the parameter only. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/vhost-net.h | 30 ++-- lib/librte_vhost/vhost_cuse/vhost-net-cdev.c | 64 - lib

[dpdk-dev] [PATCH v3 05/20] vhost: rename device fh to vid

2016-06-07 Thread Yuanhan Liu
name: it's our interface, make it more understandable. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- examples/vhost/main.c | 44 +-- examples/vhost/main.h | 2 +- lib/librte_vhost/rte_virtio_

[dpdk-dev] [PATCH v3 04/20] examples/vhost: make a copy of virtio device id

2016-06-07 Thread Yuanhan Liu
Make a copy of virtio device id (device_fh) from the virtio_net struct, so that we could have less dependency on the virtio_net struct. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- examples/vhost/main.c | 59

[dpdk-dev] [PATCH v3 03/20] vhost: declare device fh as int

2016-06-07 Thread Yuanhan Liu
Firstly, "int" would be big enough: we don't need 64 bit to represent a virtio-net device id. Secondly, this could let us avoid the ugly "%" PRIu64 ".." stuff. And since ctx.fh is derived from device_fh, declare it as int, too. Signed-off-by: Yuanhan Liu Tested

[dpdk-dev] [PATCH v3 02/20] vhost: set/reset dev flags internally

2016-06-07 Thread Yuanhan Liu
it. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- drivers/net/vhost/rte_eth_vhost.c | 2 -- examples/vhost/main.c | 3 --- lib/librte_vhost/vhost_user/virtio-net-user.c | 11 +++ lib/librte_vhost/virtio-net.c | 21

[dpdk-dev] [PATCH v3 01/20] vhost: declare backend with int type

2016-06-07 Thread Yuanhan Liu
It's an fd; so define it as "int", which could also save the unncessary (int) case. Signed-off-by: Yuanhan Liu Tested-by: Rich Lane Acked-by: Rich Lane --- lib/librte_vhost/rte_virtio_net.h | 2 +- lib/librte_vhost/virtio-net.c | 4 ++-- 2 files changed, 3 insertions(+), 3

[dpdk-dev] [PATCH v3 00/20] vhost ABI/API refactoring

2016-06-07 Thread Yuanhan Liu
at introduces several new APIs into some small patches. - updated release note - updated version.map Thanks. --yliu --- Ilya Maximets (1): vhost: make buf vector for scatter Rx local Yuanhan Liu (19): vhost: declare backend with int type vhost: set/reset dev flags interna

[dpdk-dev] [PATCH] examples/vhost: fix corrupted vdev tailq list

2016-06-07 Thread Yuanhan Liu
list might always be non-empty: the entry is still there even after you have invoked TAILQ_REMOVE several times. Fix it by introducing two tailq entries, one for each list. Fixes: 45657a5c6861 ("examples/vhost: use tailq to link vhost devices") Signed-off-by: Yuanhan Liu --- exampl

[dpdk-dev] RFC: DPDK Long Term Support

2016-06-06 Thread Yuanhan Liu
On Mon, Jun 06, 2016 at 03:44:47PM +0200, Nirmoy Das wrote: > > > LTS Version > > > > > > The proposed initial LTS version will be DPDK 16.07. The next versions, > > based > > on a 2 year cycle, will be DPDK 18.08, 20.08, etc. > > Hi, > > I can see 16.07's release due date is

[dpdk-dev] RFC: DPDK Long Term Support

2016-06-06 Thread Yuanhan Liu
On Mon, Jun 06, 2016 at 03:31:09PM +0200, Thomas Monjalon wrote: > 2016-06-06 19:49, Yuanhan Liu: > > On Fri, Jun 03, 2016 at 06:05:15PM +0200, Thomas Monjalon wrote: > > > 2016-06-03 15:07, Mcnamara, John: > > > > Developers submitting fixes to the mainline should a

[dpdk-dev] RFC: DPDK Long Term Support

2016-06-06 Thread Yuanhan Liu
t; > > The purpose of the DPDK LTS will be to maintain a stable release of DPDK > > with > > backported bug fixes over an extended period of time. This will provide > > downstream consumers of DPDK with a stable target on which to base > > applications or packages. &

[dpdk-dev] [PATCH v5 0/6] Virtio-net PMD: QEMU QTest extension for container

2016-06-06 Thread Yuanhan Liu
On Mon, Jun 06, 2016 at 05:33:31PM +0900, Tetsuya Mukawa wrote: > >> [My solution] > >> - Pros > >> Basic principle of my implementation is not to reinvent the wheel. > > > > Yes, that's a good point. However, it's not that hard as we would have > > thought in the first time: the tough part that

[dpdk-dev] [PATCH v6 6/7] virtio-user: add new virtual pci driver for virtio

2016-06-06 Thread Yuanhan Liu
On Thu, Jun 02, 2016 at 09:54:36AM +, Jianfeng Tan wrote: > + > + desc_addr = (uint64_t)vq->mz->addr; > + avail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc); > + used_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail, > +

[dpdk-dev] [PATCH v5 0/6] Virtio-net PMD: QEMU QTest extension for container

2016-06-06 Thread Yuanhan Liu
On Mon, Jun 06, 2016 at 02:10:46PM +0900, Tetsuya Mukawa wrote: > Hi Yuanhan, > > Sorry for late replying. Never mind. > > On 2016/06/03 13:17, Yuanhan Liu wrote: > > On Thu, Jun 02, 2016 at 06:30:18PM +0900, Tetsuya Mukawa wrote: > >> Hi Yuanhan, > >>

[dpdk-dev] [PATCH v5 0/6] Virtio-net PMD: QEMU QTest extension for container

2016-06-03 Thread Yuanhan Liu
On Thu, Jun 02, 2016 at 06:30:18PM +0900, Tetsuya Mukawa wrote: > Hi Yuanhan, > > On 2016/06/02 16:31, Yuanhan Liu wrote: > > But still, I'd ask do we really need 2 virtio for container solutions? > > I appreciate your comments. No, I appreciate your effort for contributi

<    1   2   3   4   5   6   7   8   9   10   >