[dpdk-dev] [PATCH 2/6] virtio: introduce struct virtio_pci_ops

2015-12-10 Thread Yuanhan Liu
ust sets hw->vtpci_ops to legacy_ops as we don't support 1.0 yet. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 22 ++--- drivers/net/virtio/virtio_pci.c| 162 ++--- drivers/net/virtio/virtio_pci.h| 27 +++ drivers/net

[dpdk-dev] [PATCH 3/6] virtio: move left pci stuff to virtio_pci.c

2015-12-10 Thread Yuanhan Liu
virtio_pci.c is a more proper place for pci stuff; virtio_ethdev is not. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 265 +--- drivers/net/virtio/virtio_pci.c| 270 - 2 files changed, 270 insertions

[dpdk-dev] [PATCH 4/6] viritio: switch to 64 bit features

2015-12-10 Thread Yuanhan Liu
Switch to 64 bit features, which virtio 1.0 supports. While legacy virtio only supports 32 bit features, it complains aloud and quit when trying to setting > 32 bit features. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 8 drivers/net/virtio/virtio_pc

[dpdk-dev] [PATCH 5/6] virtio: set RTE_PCI_DRV_NEED_MAPPING flag

2015-12-10 Thread Yuanhan Liu
We need to to map pci bar space for enabling modern virtio pci device, as all modern configs are stored at pci bar space. Setting RTE_PCI_DRV_NEED_MAPPING flag will let eal do that for us. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion

[dpdk-dev] [PATCH 6/6] virtio: add virtio v1.0 support

2015-12-10 Thread Yuanhan Liu
nges, virtio 1.0 introduces a new status field: FEATURES_OK, which is set after features negotiation is done. Last, set the VIRTIO_F_VERSION_1 feature flag. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 16 +- drivers/net/virtio/virtio_ethdev.h | 3 +- drivers/net/vir

[dpdk-dev] [PATCH 0/6 for 2.3] initial virtio 1.0 enabling

2015-12-10 Thread Yuanhan Liu
Michael, Sorry that I forgot to CC you. (In fact, I intended to, but there is a tiny bug at my send-email script :( It'd be great if you could take some time to review it. Thanks. --yliu On Thu, Dec 10, 2015 at 11:54:04AM +0800, Yuanhan Liu wrote: > Hi, > > Here is an

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

2015-12-10 Thread Yuanhan Liu
On Thu, Dec 10, 2015 at 11:46:50AM +0530, Santosh Shukla wrote: > On Tue, Dec 8, 2015 at 6:29 PM, Xie, Huawei wrote: > > > > > >> -Original Message----- > >> From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > >> Sent: Monday, December 07, 201

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

2015-12-10 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 04:14:01PM +, Iremonger, Bernard wrote: > Hi John, > > > > 2015-12-09 14:50, Mcnamara, John: > > > Also, as a general note, not just to this document/patch. > > > > > > I don't think the "user at target:~$" prefixes used in some DPDK Doc > > > commandlines is useful. >

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

2015-12-10 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 05:18:38PM +, Bernard Iremonger wrote: > correct sample console commands You'd state what exactly this patch corrects here, and why is that needed. > > changes in v2: > remove "user at target:~$" prefixes in command lines. > use continuation character to stay within 8

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

2015-12-10 Thread Yuanhan Liu
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 Acked-by: Yuanhan Liu Thanks. --yliu

[dpdk-dev] [PATCH] examples/vhost: reduce number of hugepages needed

2015-12-10 Thread Yuanhan Liu
-#define MAX_QUEUES 512 > +/* decrease MAX_QUEUES from 512 to reduce number of hugepages needed */ Minor nit: I would suggest to simply remove this comment, which might be a bit confusing without the content (that 512 would let vhost-switch fail to start if given memory is small). Otherwise

[dpdk-dev] [PATCH] examples/vhost: reduce number of hugepages needed

2015-12-10 Thread Yuanhan Liu
quot; > > > > > > -#define MAX_QUEUES 512 > > > +/* decrease MAX_QUEUES from 512 to reduce number of hugepages > > needed > > > +*/ > > > > Minor nit: I would suggest to simply remove this comment, which might be a > > bit confusing without the conten

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

2015-12-11 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 11:26:55AM +0300, Pavel Fedin wrote: > Hello! > > I am currently testing this patchset with qemu and have problems. Hi, Thanks for testing! > > The guest migrates correctly, but after the migration it cries in the log: > > Vhost user backend fails to broadcast fake R

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

2015-12-14 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 12:42:33PM -0800, Rich Lane wrote: > On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu > wrote: > > +static inline int __attribute__((always_inline)) > +copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq, > +? ? ? ? ? ? ? ? ?

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

2015-12-14 Thread Yuanhan Liu
On Fri, Dec 11, 2015 at 10:55:48PM -0800, Rich Lane wrote: > On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu > wrote: > > +static inline struct rte_mbuf * > +copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq, > +? ? ? ? ? ? ? ? ?uint16_t desc_idx,

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

2015-12-14 Thread Yuanhan Liu
Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu BTW, I found your email address is abnormal: From: Huawei at dpdk.org, Xie at dpdk.org Something wrong with your git send email config? --yliu

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

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 10:32:24AM +0100, Thomas Monjalon wrote: > 2015-12-14 11:01, Yuanhan Liu: > > On Fri, Dec 11, 2015 at 12:07:32AM +0800, Huawei at dpdk.org wrote: > > > The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause > > > issue

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

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 12:46:57PM +0300, Pavel Fedin wrote: > Hello! > > > > Host<--->openVSwitch<--->guest > > > LOCAL vhostuser > > > > > > So, in order to migrate the guest, i simply replicated this setup on > > > both hosts, with the > > same IPs on host sid

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

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 01:44:54PM +0100, Thomas Monjalon wrote: > 2015-12-14 19:47, Yuanhan Liu: > > On Mon, Dec 14, 2015 at 10:32:24AM +0100, Thomas Monjalon wrote: > > > 2015-12-14 11:01, Yuanhan Liu: > > > > On Fri, Dec 11, 2015 at 12:07:32AM +0800, Huawei at

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

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:00:22PM +0800, Peter Xu wrote: > On Mon, Dec 14, 2015 at 08:09:37PM +0800, Yuanhan Liu wrote: > > It seems that we have exactly the same test environment set up: I have > > one server (where I normally do vhost test there) and one desktop (my > > d

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

2015-12-14 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:28:08PM +0800, Peter Xu wrote: > On Mon, Dec 14, 2015 at 09:21:15PM +0800, Yuanhan Liu wrote: > > Peter, > > > > Thanks for your input, and that sounds reasonable. You just reminded > > me that the host1's NIC is indeed different with hos

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

2015-12-15 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 11:58:42AM +0800, Peter Xu wrote: > On Fri, Dec 11, 2015 at 01:22:23PM +0300, Pavel Fedin wrote: > > BTW, it works, and it was my bad. openvswitch was configured incorrectly > > on the other side, vhost port number was different for > > some reason, while ruleset was the s

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

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 11:45:56AM +0300, Pavel Fedin wrote: > Hello! > > > I mean I do find that qemu_annouce_self composes an ARP > > broadcoast request, but it seems that I didn't catch it on > > the target host. > > > > Something wrong, or someting I missed? > > To tell the truth, i don't

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

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 12:47:47PM +0100, Thibaut Collet wrote: > On Tue, Dec 15, 2015 at 12:43 PM, Thibaut Collet > wrote: > > > > > > > On Tue, Dec 15, 2015 at 11:05 AM, Peter Xu wrote: > > > >> On Tue, Dec 15, 2015 at 11:45:56AM +0300, Pavel Fedin wrote: > >> > To tell the truth, i don't kno

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

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 03:24:48PM +0300, Pavel Fedin wrote: > Hello! > > > After a migration, to avoid network outage, the guest must announce its new > > location to the L2 layer, typically with a GARP. Otherwise requests sent to > > the guest arrive to the old host until a ARP request is sent

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

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 04:48:12PM +0300, Pavel Fedin wrote: > Hello! > > > > Wrong. I tried to unconditionally enforce it in qemu (my guest does > > > support it), and the > > link stopped working at all. I don't understand why. > > > > I'm wondering how did you do that? Why do you need enfor

[dpdk-dev] problem vhost-user sockets

2015-12-15 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 03:41:23PM +0300, Pavel Fedin wrote: > Hello! > > I have a question regarding vhostuser. If we cannot bind to a socket, why do > we simply fail with error instead of just unlink()ing > the path before binding? I'm thinking you can't simply unlink a file given by a user

[dpdk-dev] problem vhost-user sockets

2015-12-16 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 05:21:25PM +0300, Pavel Fedin wrote: > Hello! > > > I'm thinking you can't simply unlink a file given by a user inside > > a libraray unconditionaly. Say, what if a user gives a wrong socket > > path? > > Well... We can improve the security by checking that: > > a) The

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

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 10:38:03AM +0800, Peter Xu wrote: > On Tue, Dec 15, 2015 at 04:07:57PM +0100, Thibaut Collet wrote: > > After a migration, to avoid netwotk outage, all interfaces of the guest > > must send a packet to update switches mapping (ideally a GARP). > > As some interfaces do not d

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

2015-12-16 Thread Yuanhan Liu
On Tue, Dec 15, 2015 at 05:58:28PM +0300, Pavel Fedin wrote: > Hello! > > > No idea. Maybe you have changed some other configures (such as of ovs) > > without notice? Or, the ovs bridge interface resets? > > I don't touch the ovs at all. Just shut down the guest, rebuild the qemu, > reinstall

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

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 02:57:15PM +0300, Pavel Fedin wrote: > Hello! > > > I can reproduce your issue on my side with above patch (and only when > > F_GUEST_ANNOUNCE is not set at DPDK vhost lib). TBH, I don't know > > why that happened, the cause could be subtle, and I don't think it's > > wort

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > x86 requires a special set of instructions to access ioports, but other > architectures let you remap io resources. > So let eal remap io resources by accepting IORESOURCE_IO flag for > architectures other than x86. One question: th

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

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 03:43:06PM +0300, Pavel Fedin wrote: > rYR8N8f/ookveMRL7BfPnj5lw+EJZd+uG+v/lZnBuWidyQ4r > g586/P1rPsQw8p6wT+M7LnqvMLZM9eWq2ht53Bd5liqxFGckGmoxFxUnAgC5sFKthAIAAA== > Status: O > Content-Length: 4853 > Lines: 66 > > Hello! > > > However, I'm more curious about the pin

[dpdk-dev] [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region

2015-12-16 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 06:30:30PM +0530, Santosh Shukla wrote: > Introducing module to mmap iopci bar region. Applicable for linuxapp for > non-x86 > archs, Tested for arm64/ThunderX platform for linux. For that adding two > global > api. > - virtio_ioport_init > - virtio_ioport_unmap > > Signe

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 02:34:35PM +0100, David Marchand wrote: > Yuanhan, > > On Wed, Dec 16, 2015 at 1:48 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > > x86 requires a special set of instructions to a

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-16 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 06:30:24PM +0530, Santosh Shukla wrote: > In x86 case io_base to store ioport address not more than 65535 ioports. > i.e..0 > to but in non-x86 case in particular arm64 it need to store more than 32 > bit address so changing io_base datatype from 32 to 64. > > Signed-

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 07:31:57PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 7:18 PM, Yuanhan Liu > wrote: > > On Mon, Dec 14, 2015 at 06:30:24PM +0530, Santosh Shukla wrote: > >> In x86 case io_base to store ioport address not more than 65535 ioports. > &g

[dpdk-dev] [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 07:50:51PM +0530, Santosh Shukla wrote: ... > >> + *resource_addr = (void *)((char *)ioport_map + > >> (ioport_map_cnt)*offset); > > > > Redundant (), and the void * cast seems to be unnecessary. > > > > (void *) is unnecessary, but couldn't get the redundant() part?

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-16 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 08:09:40PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 7:53 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 07:31:57PM +0530, Santosh Shukla wrote: > >> On Wed, Dec 16, 2015 at 7:18 PM, Yuanhan Liu > >> wrote: > >&g

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

2015-12-17 Thread Yuanhan Liu
; } VhostUserLog; Also, a fd is delivered from QEMU by ancillary data. With those info given, an area of memory is mmaped, assigned to dev->log_base, for logging dirty pages. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky protocol_features = protocol_features; } + +int +user_set_log_base(str

[dpdk-dev] [PATCH v2 0/6] vhost-user live migration support

2015-12-17 Thread Yuanhan Liu
migrated to VM2, and the "ping" command continues running, perfectly. Cc: Chen Zhihui Cc: Yang Maggie --- Yuanhan Liu (6): vhost: handle VHOST_USER_SET_LOG_BASE request vhost: introduce vhost_log_write vhost: log used vring changes vhost: log vring desc buffer changes

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

2015-12-17 Thread Yuanhan Liu
ase denotes the start of the dirty page bitmap. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky +#include #include #include #include @@ -59,6 +60,8 @@ struct rte_mbuf; /* Backend value set by guest. */ #define VIRTIO_DEV_STOPPED -1 +#define VHOST_LOG_PAGE 4096 + /* Enum for virtqu

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

2015-12-17 Thread Yuanhan Liu
Introducing a vhost_log_write() wrapper, vhost_log_used_vring, to log used vring changes. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky log_guest_addr + offset; + vhost_log_write(dev, addr, len); +} + /** * This function adds buffers to the virtio devices RX virtqueue

[dpdk-dev] [PATCH v2 5/6] vhost: claim that we support GUEST_ANNOUNCE feature

2015-12-17 Thread Yuanhan Liu
It's actually a feature already enabled in Linux kernel. What we need to do is simply to claim that we support such feature, and nothing else. With that, the guest will send GARP messages after live migration. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/virtio-net.c | 1 + 1 file ch

[dpdk-dev] [PATCH v2 4/6] vhost: log vring desc buffer changes

2015-12-17 Thread Yuanhan Liu
Every time we copy a buf to vring desc, we need to log it. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky addr + vb_offset, len_to_cpy); PRINT_PACKET(dev, (uintptr_t)(buff_addr + vb_offset), len_to_cpy, 0); @@ -232,6 +234,7

[dpdk-dev] [PATCH v2 6/6] vhost: enable log_shmfd protocol feature

2015-12-17 Thread Yuanhan Liu
. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/virtio-net-user.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.h b/lib/librte_vhost/vhost_user/virtio-net-user.h index 013cf38..a3a889d 100644 --- a/lib/librte_vhost

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

2015-12-17 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:14:41AM +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. > http://dpdk.org/dev/patchwork/patch/4718/ > Thanks to Konstant

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

2015-12-17 Thread Yuanhan Liu
On Mon, Dec 14, 2015 at 09:14:42AM +0800, Huawei Xie wrote: > pre-allocate a bulk of mbufs instead of allocating one mbuf a time on demand > > Signed-off-by: Gerald Rogers > Signed-off-by: Huawei Xie > Acked-by: Konstantin Ananyev Acked-by: Yuanhan Liu Tested-by: Yuanh

[dpdk-dev] [ [PATCH v2] 05/13] virtio: change io_base datatype from uint32_t to uint64_type

2015-12-17 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 08:35:58PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 8:28 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 08:09:40PM +0530, Santosh Shukla wrote: > >> On Wed, Dec 16, 2015 at 7:53 PM, Yuanhan Liu > >> wrote: > >&g

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-17 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 07:21:55PM +0530, Santosh Shukla wrote: > On Wed, Dec 16, 2015 at 6:18 PM, Yuanhan Liu > wrote: > > On Wed, Dec 16, 2015 at 01:31:04PM +0100, David Marchand wrote: > >> x86 requires a special set of instructions to access ioports, but other > >&g

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

2015-12-17 Thread Yuanhan Liu
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 > library APIs cannot be mapped to ethdev library APIs. > Becasue of this, in some cases, we still need to use vhost library APIs > for a port created by the vhost P

[dpdk-dev] [PATCH v5 3/3] vhost: Add helper function to convert port id to virtio device pointer

2015-12-17 Thread Yuanhan Liu
On Tue, Nov 24, 2015 at 06:00:03PM +0900, Tetsuya Mukawa wrote: > This helper function is used to convert port id to virtio device > pointer. To use this function, a port should be managed by vhost PMD. > After getting virtio device pointer, it can be used for calling vhost > library APIs. I'm thi

[dpdk-dev] [PATCH] Unlink existing unused sockets at start up

2015-12-17 Thread Yuanhan Liu
On Wed, Dec 16, 2015 at 11:21:02PM -0500, Zhihong Wang wrote: > This patch unlinks existing unused sockets (which cause new bindings to fail, > e.g. vHost PMD) to ensure smooth startup. > In a lot of cases DPDK applications are terminated abnormally without proper > resource release. Therefore, D

[dpdk-dev] [PATCH v2 0/6] vhost-user live migration support

2015-12-17 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 12:08:13PM +, Iremonger, Bernard wrote: > Hi Yuanhan, > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Thursday, December 17, 2015 3:12 AM > > To: dev at dpdk.org > >

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

2015-12-18 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 03:24:35PM -0800, 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 > > > in

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

2015-12-18 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 03:42:19PM +, Ananyev, Konstantin wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > > Sent: Thursday, December 17, 2015 6:41 AM > > To: Xie, Huawei > > Cc: dev at

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

2015-12-18 Thread Yuanhan Liu
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 > >> library APIs

[dpdk-dev] [PATCH v5 3/3] vhost: Add helper function to convert port id to virtio device pointer

2015-12-18 Thread Yuanhan Liu
On Fri, Dec 18, 2015 at 12:15:49PM +0900, Tetsuya Mukawa wrote: > On 2015/12/17 20:47, Yuanhan Liu wrote: > > On Tue, Nov 24, 2015 at 06:00:03PM +0900, Tetsuya Mukawa wrote: > >> This helper function is used to convert port id to virtio device > >> pointer. To use this

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

2015-12-18 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 09:01:14PM -0800, Stephen Hemminger wrote: ... > > + > > + switch (count % 4) { > > + while (idx != count) { > > + case 0: > > + RTE_MBUF_ASSERT(rte_mbuf_refcnt_read(mbufs[idx]) == 0); > > + rte_mbuf_refcnt_set(mbufs[idx], 1)

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-18 Thread Yuanhan Liu
On Thu, Dec 17, 2015 at 04:52:00PM +0530, Santosh Shukla wrote: > >> >> IMO, it is worth keeping one special device file who could work across > >> >> archs like arm/arm64/powerpc and others, who could map iopci bar to > >> >> dpdk user-space. also this approach has no kernel version dependency > >

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

2015-12-18 Thread Yuanhan Liu
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: Yuanhan Liu --- Note that there is a slight

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

2015-12-18 Thread Yuanhan Liu
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 readable. Signed-off-by: Y

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

2015-12-18 Thread Yuanhan Liu
it is because numa_realloc() will not take effect when RTE_LIBRTE_VHOST_NUMA is not enabled, which is the default case. Fixes: e049ca6d10e0 ("vhost-user: prepare multiple queue setup") Signed-off-by: Yuanhan Liu --- lib/librte_vhost/virtio-net.c | 13 +++-- 1 file changed, 11 i

[dpdk-dev] [PATCH v5 2/3] vhost: Add VHOST PMD

2015-12-18 Thread Yuanhan Liu
On Tue, Nov 24, 2015 at 06:00:02PM +0900, Tetsuya Mukawa wrote: > +static uint16_t > +eth_vhost_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs) > +{ > + struct vhost_queue *r = q; > + uint16_t i, nb_rx = 0; > + > + if (unlikely(rte_atomic32_read(&r->allow_queuing) == 0)) > +

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-18 Thread Yuanhan Liu
I double checked with my sent box, the mail header sent out looks normal: Date: Fri, 18 Dec 2015 13:30:53 +0800 From: Yua

[dpdk-dev] [PATCH] eal: map io resources for non x86 architectures

2015-12-18 Thread Yuanhan Liu
On Fri, Dec 18, 2015 at 01:24:41PM +0530, Santosh Shukla wrote: > >> I guess we have done enough evaluation / investigation that suggest - > >> so to map iopci region to userspace in arch agnostic-way - > >> > >> # either we need to modify kernel > >>- Make sure all the non-x86 arch

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

2015-12-22 Thread Yuanhan Liu
On Mon, Dec 21, 2015 at 03:32:53PM +, Xie, Huawei wrote: > > + > > + /* > > +* mmap from 0 to workaround a hugepage mmap bug: mmap will be > > +* failed when offset is not page size aligned. > > +*/ > s /will be failed/will fail/ > mmap will fail when offset is not zero. > Also we

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

2015-12-22 Thread Yuanhan Liu
On Mon, Dec 21, 2015 at 03:06:43PM +, 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 (VHOST_LOG_PAGE), and each > > log

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 02:41:43AM +, Xie, Huawei wrote: > > > > -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.

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 02:45:52AM +, Xie, Huawei wrote: > >>> +static inline void __attribute__((always_inline)) > >>> +vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len) > >>> +{ > >>> + uint64_t page; > >>> + > >> Before we log, we need memory barrier to make sure updates a

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

2015-12-22 Thread Yuanhan Liu
t.c for reference. --yliu > > On Thu, Dec 17, 2015 at 8:28 PM, Tetsuya Mukawa wrote: > > On 2015/12/18 13:15, 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: >

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

2015-12-22 Thread Yuanhan Liu
On Mon, Dec 21, 2015 at 11:10:10AM +0900, Tetsuya Mukawa wrote: > nes: 168 > > On 2015/12/19 3:01, Rich Lane wrote: > > I'm using the vhost callbacks and struct virtio_net with the vhost PMD in a > > few ways: > > > > 1. new_device/destroy_device: Link state change (will be covered by the > > link

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

2015-12-22 Thread Yuanhan Liu
On Mon, Dec 21, 2015 at 08:47:28PM -0800, Rich Lane wrote: > On Mon, Dec 21, 2015 at 7:41 PM, Yuanhan Liu > wrote: > > On Fri, Dec 18, 2015 at 10:01:25AM -0800, Rich Lane wrote: > > I'm using the vhost callbacks and struct virtio_net with the vhost PMD > i

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 01:11:02PM +0800, Peter Xu wrote: > On Thu, Dec 17, 2015 at 11:11:57AM +0800, Yuanhan Liu wrote: > > +static inline void __attribute__((always_inline)) > > +vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len) > > +{ > > + uint

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

2015-12-22 Thread Yuanhan Liu
On Fri, Dec 18, 2015 at 06:16:36PM +0530, Santosh Shukla wrote: > On Fri, Dec 18, 2015 at 4:54 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 oth

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 06:46:32AM +, Xie, Huawei wrote: > 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 o

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 11:50:41AM +0800, Peter Xu wrote: > Hi, > > I got a question related to how virtio pmd driver work without > UIO layer. > > I see that in virtio PMD driver, DPDK will first try to init the > device using UIO interfaces. If it fails, it will try to init by > manipulating IO

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 02:55:52PM +0800, 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, > > +

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

2015-12-22 Thread Yuanhan Liu
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: Yuanhan Liu Acked-by: Huawei Xie --- Note that

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

2015-12-22 Thread Yuanhan Liu
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 readable. Signed-off-by: Yuanh

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

2015-12-22 Thread Yuanhan Liu
it is because numa_realloc() will not take effect when RTE_LIBRTE_VHOST_NUMA is not enabled, which is the default case. Fixes: e049ca6d10e0 ("vhost-user: prepare multiple queue setup") Signed-off-by: Yuanhan Liu Acked-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 13 ++

[dpdk-dev] [PATCH v2 5/6] vhost: claim that we support GUEST_ANNOUNCE feature

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 04:11:08PM +0800, Peter Xu wrote: > On Thu, Dec 17, 2015 at 11:12:00AM +0800, Yuanhan Liu wrote: > > It's actually a feature already enabled in Linux kernel. What we need to > > do is simply to claim that we support such feature, and nothing else. >

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

2015-12-22 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 04:23:38PM +0800, Peter Xu wrote: > On Tue, Dec 22, 2015 at 03:00:29PM +0800, Yuanhan Liu wrote: > > On Tue, Dec 22, 2015 at 11:50:41AM +0800, Peter Xu wrote: > > > Hi, > > > > > > I got a question related to how virtio pmd

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

2015-12-23 Thread Yuanhan Liu
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: > > 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 n

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

2015-12-23 Thread Yuanhan Liu
On Wed, Dec 23, 2015 at 09:55:54AM +0800, Peter Xu wrote: > On Tue, Dec 22, 2015 at 04:38:30PM +, Xie, Huawei wrote: > > On 12/22/2015 7:39 PM, Peter Xu wrote: > > > I tried to unbind one of the virtio net device, I see the PCI entry > > > still there. > > > > > > Before unbind: > > > > > > [ro

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

2015-12-23 Thread Yuanhan Liu
On Tue, Dec 22, 2015 at 01:38:29AM -0800, Rich Lane wrote: > On Mon, Dec 21, 2015 at 9:47 PM, Yuanhan Liu > wrote: > > On Mon, Dec 21, 2015 at 08:47:28PM -0800, Rich Lane wrote: > > The queue state change callback is the one new API that needs to be > > adde

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

2015-12-23 Thread Yuanhan Liu
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: > > > > Actually,

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

2015-12-24 Thread Yuanhan Liu
On Wed, Dec 23, 2015 at 11:26:17PM +0100, Thomas Monjalon wrote: > 2015-12-23 10:09, Yuanhan Liu: > > On Wed, Dec 23, 2015 at 09:55:54AM +0800, Peter Xu wrote: > > > On Tue, Dec 22, 2015 at 04:38:30PM +, Xie, Huawei wrote: > > > > On 12/22/2015 7:39 PM, Peter

[dpdk-dev] [PATCH] virtio: fix crashes in virtio stats functions

2015-12-24 Thread Yuanhan Liu
cause > rx_queues and tx_queues were NULL: > > rte_eth_stats_get > rte_eth_stats_reset > rte_eth_xstats_get > rte_eth_xstats_reset > > Fixes: 823ad647950a ("virtio: support multiple queues") > Signed-off-by: Bernard Iremonger Acked-by: Yuanhan Liu Thanks. --yliu

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

2015-12-24 Thread Yuanhan Liu
On Wed, Dec 23, 2015 at 11:00:15PM +0100, Thomas Monjalon wrote: > 2015-12-23 10:44, Yuanhan Liu: > > On Tue, Dec 22, 2015 at 01:38:29AM -0800, Rich Lane wrote: > > > On Mon, Dec 21, 2015 at 9:47 PM, Yuanhan Liu > > linux.intel.com> > > > wrote: > > >

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

2015-12-24 Thread Yuanhan Liu
On Thu, Dec 24, 2015 at 12:09:10PM +0900, Tetsuya Mukawa wrote: > On 2015/12/22 13:47, Rich Lane wrote: > > On Mon, Dec 21, 2015 at 7:41 PM, Yuanhan Liu > linux.intel.com> > > wrote: > > > >> On Fri, Dec 18, 2015 at 10:01:25AM -0800, Rich Lane wrote: > >&

[dpdk-dev] [PATCH] mk: fix examples build failure

2015-12-28 Thread Yuanhan Liu
On Thu, Dec 24, 2015 at 08:38:07PM +0800, steeven lee wrote: > 1. Fix examples build failure Paste the build error here, so that we know you are acutally fixing a build error. And if it's a build error specific to some GCC, or Linux distribution, please also note it in the commit log. > 2. make b

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

2015-12-28 Thread Yuanhan Liu
On Fri, Dec 25, 2015 at 02:38:11AM +0800, Huawei Xie wrote: > if virtio_resource_init fails, cleanup the resource and return 1 to > tell the upper layer we don't take over this device. > return -1 means error and DPDK will exit. > > Signed-off-by: Huawei Xie > --- > drivers/net/virtio/virtio_eth

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

2015-12-28 Thread Yuanhan Liu
On Fri, Dec 25, 2015 at 02:38:12AM +0800, Huawei Xie wrote: > virtio PMD could use IO port to configure the virtio device without > using uio driver. > > There are two issues with previous implementation: > 1) virtio PMD will take over each virtio device blindly even if some > are not intended for

[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-29 Thread Yuanhan Liu
Acked-by: Yuanhan Liu --yliu

[dpdk-dev] [PATCH 6/6] virtio: add virtio v1.0 support

2015-12-30 Thread Yuanhan Liu
On Tue, Dec 29, 2015 at 11:39:47AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > > Sent: Thursday, December 10, 2015 11:54 AM > > To: dev at dpdk.org > > Subject: [dpdk

[dpdk-dev] [PATCH 2/6] virtio: introduce struct virtio_pci_ops

2015-12-30 Thread Yuanhan Liu
On Tue, Dec 29, 2015 at 11:31:35AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > > Sent: Thursday, December 10, 2015 11:54 AM > > To: dev at dpdk.org > > Subject: [dpd

[dpdk-dev] [PATCH 0/6 for 2.3] initial virtio 1.0 enabling

2015-12-30 Thread Yuanhan Liu
On Tue, Dec 29, 2015 at 11:19:20AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Yuanhan Liu > > Sent: Thursday, December 10, 2015 11:54 AM > > To: dev at dpdk.org > > Subject: [d

[dpdk-dev] [dpdk-announce] DPDK 17.11.3 (LTS) released

2018-06-15 Thread Yuanhan Liu
net/mlx5: fix disabling Tx packet inlining net/mlx5: remove excessive data prefetch net/mlx5: fix calculation of Tx TSO inline room size net/mlx5: change device reference for secondary process Yuanhan Liu (1): version: 17.11.3 Yunjian Wang (2): net/i40e: fix intr

Re: [dpdk-dev] [PATCH v8 04/19] ethdev: introduce device lock

2018-07-03 Thread Yuanhan Liu
On Mon, Jul 2, 2018, at 1:44 PM, Qi Zhang wrote: > Introduce API rte_eth_dev_lock and rte_eth_dev_unlock to let > application lock or unlock on specific ethdev, a locked device > can't be detached, this help applicaiton to prevent unexpected > device detaching, especially in multi-process envrio

<    3   4   5   6   7   8   9   10   11   12   >