Re: [dpdk-dev] [PATCH v12 0/6] add Tx preparation

2016-12-07 Thread Yuanhan Liu
On Wed, Dec 07, 2016 at 10:13:14AM +, Ananyev, Konstantin wrote: > > Hi Yliu, > > > > > On Tue, Dec 06, 2016 at 03:53:42PM +, Ferruh Yigit wrote: > > > > Please, we need a comment for each driver saying > > > > "it is OK, we do not need any checksum preparation for TSO" > > > > or > > >

Re: [dpdk-dev] [PATCH v2] eal: optimize aligned rte_memcpy

2016-12-07 Thread Yuanhan Liu
y setting loopback > traffic between Virtio and Vhost. For example, modify the macro > TXONLY_DEF_PACKET_LEN to the requested packet size in testpmd.h, > rebuild and start testpmd in both host and guest, then "start" on > one side and "start tx_first 32" on the other. > > > Signed-off-by: Zhihong Wang Reviewed-by: Yuanhan Liu --yliu

Re: [dpdk-dev] [PATCH] vhost: allow for many vhost user ports

2016-12-07 Thread Yuanhan Liu
On Wed, Dec 07, 2016 at 01:23:48PM +, Jan Wickbom wrote: > > On Thu, Dec 01, 2016 at 04:26:50PM +0100, Jan Wickbom wrote: > > > static int > > > -fdset_fill(fd_set *rfset, fd_set *wfset, struct fdset *pfdset) > > > +fdset_fill(struct pollfd *rwfds, struct fdset *pfdset) ... > > > + rwf

Re: [dpdk-dev] [PATCH 5/5] examples/l3fwd: add parse-ptype option

2016-12-07 Thread Yuanhan Liu
On Sun, Dec 04, 2016 at 12:18:22AM +, Jianfeng Tan wrote: > To support those devices that do not provide packet type info when > receiving packets, add a new option, --parse-ptype, to analyze > packet type in the Rx callback. A quick question: does this patch have anything to do with the virti

Re: [dpdk-dev] [PATCH 1/3] net/virtio_user: add vhost layer

2016-12-07 Thread Yuanhan Liu
On Fri, Dec 02, 2016 at 02:31:13PM +, Jianfeng Tan wrote: > To support vhost kernel as the backend of net_virtio_user in comming > patches, we abstract a vhost layer to hide all vhost_user functions. > - Move vhost_user specific structs and macros into vhost_user.c, > and only keep common

Re: [dpdk-dev] [PATCH 3/3] net/virtio_user: fix wrongly set features

2016-12-08 Thread Yuanhan Liu
On Fri, Dec 02, 2016 at 02:31:15PM +, Jianfeng Tan wrote: > Before the commit 86d59b21468a ("net/virtio: support LRO"), features > in virtio PMD, is decided and properly set at device initialization > and will not be changed. But afterward, features could be changed in > virtio_dev_configure(),

Re: [dpdk-dev] [PATCH v3] vhost: allow for many vhost user ports

2016-12-13 Thread Yuanhan Liu
On Mon, Dec 12, 2016 at 05:50:34PM +0100, Jan Wickbom wrote: > Currently select() is used to monitor file descriptors for vhostuser > ports. This limits the number of ports possible to create since the > fd number is used as index in the fd_set and we have seen fds > 1023. > This patch changes sele

Re: [dpdk-dev] [PATCH] vhost: Introduce vhost-user's REPLY_ACK feature

2016-12-13 Thread Yuanhan Liu
On Mon, Dec 12, 2016 at 06:54:00PM +0100, Maxime Coquelin wrote: > REPLY_ACK features provide a generic way for QEMU to ensure both > completion and success of a request. > > As described in vhost-user spec in QEMU repository, QEMU sets > VHOST_USER_NEED_REPLY flag (bit 3) when expecting a reply_a

Re: [dpdk-dev] [PATCH] vhost: Introduce vhost-user's REPLY_ACK feature

2016-12-13 Thread Yuanhan Liu
On Tue, Dec 13, 2016 at 10:57:10AM +0100, Maxime Coquelin wrote: > > > On 12/13/2016 10:56 AM, Yuanhan Liu wrote: > >On Mon, Dec 12, 2016 at 06:54:00PM +0100, Maxime Coquelin wrote: > >>REPLY_ACK features provide a generic way for QEMU to ensure both > >>co

Re: [dpdk-dev] [PATCH 26/28] net/virtio: use eal I/O device memory read/write API

2016-12-13 Thread Yuanhan Liu
e APIs are good: Acked-by: Yuanhan Liu > Signed-off-by: Santosh Shukla > Signed-off-by: Jerin Jacob > CC: Huawei Xie > CC: Yuanhan Liu Not a big deal, but I think we normally put the 'Cc' above the SoB. --yliu

Re: [dpdk-dev] [PATCH 00/28] introduce I/O device memory read/write operations

2016-12-13 Thread Yuanhan Liu
On Wed, Dec 14, 2016 at 07:25:30AM +0530, Jerin Jacob wrote: > patchset 14-28: Replace the raw readl/writel in the drivers with > new rte_read[b/w/l/q], rte_write[b/w/l/q] eal abstraction Instead of rte_read[b/w/l/q], there is another typical naming style: rte_read[8/16/32/64]. Any preferences? If

Re: [dpdk-dev] [PATCH 27/28] net/vmxnet3: use eal I/O device memory read/write API

2016-12-13 Thread Yuanhan Liu
On Wed, Dec 14, 2016 at 07:25:57AM +0530, Jerin Jacob wrote: > From: Santosh Shukla > > Replace the raw I/O device memory read/write access with eal > abstraction for I/O device memory read/write access to fix > portability issues across different architectures. > > Signed-off-by: Santosh Shukla

Re: [dpdk-dev] [PATCH 26/28] net/virtio: use eal I/O device memory read/write API

2016-12-13 Thread Yuanhan Liu
On Wed, Dec 14, 2016 at 07:25:56AM +0530, Jerin Jacob wrote: > * Following macros are derived from linux/pci_regs.h, however, > * we can't simply include that header here, as there is no such > @@ -320,37 +322,37 @@ static const struct virtio_pci_ops legacy_ops = { > static inline uint8_t > i

Re: [dpdk-dev] [PATCH v4] vhost: allow for many vhost user ports

2016-12-13 Thread Yuanhan Liu
On Tue, Dec 13, 2016 at 02:19:47PM +0100, Jan Wickbom wrote: > + > + poll(pfdset->rwfds, numfds, 1000 /* millisecs */); > + > + for (i = 0; i < numfds; ) { > pthread_mutex_lock(&pfdset->fd_mutex); > + > pfdentry = &pfdset->fd[i]; >

Re: [dpdk-dev] [PATCH v3] net/ixgbe:fix max packet length in ixgbevf

2016-12-13 Thread Yuanhan Liu
On Thu, Dec 15, 2016 at 02:50:19AM +0800, Yi Zhang wrote: > Current ixgbevf driver get max_rx_pktlen = 15872, but in fact PF > supports 15872-byte jumbo frame and VF only supports 9728-byte jumbo > frame. If VF is running DPDK driver and set frame_size > 9728 ,PF > running kernel ixgbe driver will

Re: [dpdk-dev] [PATCH 5/5] net/virtio: fix Tso when mbuf is shared

2016-12-13 Thread Yuanhan Liu
Hi Olivier, Firstly sorry for late response! On Thu, Nov 24, 2016 at 09:56:38AM +0100, Olivier Matz wrote: > With virtio, doing tso requires to modify the network > packet data: I thought more about it this time, and I'm wondering why it's needed. > - the dpdk API requires to set the l4 checksu

Re: [dpdk-dev] [PATCH 26/28] net/virtio: use eal I/O device memory read/write API

2016-12-15 Thread Yuanhan Liu
On Wed, Dec 14, 2016 at 09:45:34PM -0800, Santosh Shukla wrote: > On Wed, Dec 14, 2016 at 11:02:23AM +0800, Yuanhan Liu wrote: > > On Wed, Dec 14, 2016 at 07:25:56AM +0530, Jerin Jacob wrote: > > > * Following macros are derived from linux/pci_regs.h, however, > > >

Re: [dpdk-dev] [PATCH 1/4] eal/common: introduce rte_memset on IA platform

2016-12-18 Thread Yuanhan Liu
On Fri, Dec 16, 2016 at 10:19:43AM +, Yang, Zhiyong wrote: > > > I run the same virtio/vhost loopback tests without NIC. > > > I can see the throughput drop when running choosing functions at run > > > time compared to original code as following on the same platform(my > > machine is haswell)

Re: [dpdk-dev] [PATCH v3] app/testpmd: supported offload capabilities query

2016-12-20 Thread Yuanhan Liu
On Wed, Dec 21, 2016 at 10:20:26AM +0800, Qiming Yang wrote: > Add two new commands "show port capa " and "show I think 'cap' is a more well-known shortening for capability than "capa"? --yliu

[dpdk-dev] [PATCH v6] vhost: allow for many vhost user ports

2016-12-21 Thread Yuanhan Liu
ked (pollfd) array for the fds, e.g. as many fds as the size of the array. Also see: http://dpdk.org/ml/archives/dev/2016-April/037024.html Reported-by: Patrik Andersson Signed-off-by: Jan Wickbom Signed-off-by: Yuanhan Liu --- For some reason, Jan won't be able to make v6, so I mad

Re: [dpdk-dev] [PATCH v6] vhost: allow for many vhost user ports

2016-12-21 Thread Yuanhan Liu
On Wed, Dec 21, 2016 at 10:06:36AM -0800, Stephen Hemminger wrote: > On Wed, 21 Dec 2016 17:45:13 +0800 > Yuanhan Liu wrote: > > > From: Jan Wickbom > > > > Currently select() is used to monitor file descriptors for vhostuser > > ports. This limits the number

[dpdk-dev] [PATCH 1/3] net/virtio: fix crash for secondary process

2016-12-21 Thread Yuanhan Liu
ply return 1 to let EAL skip this device. Thus, the crashed could be fixed. Fixes: c1f86306a026 ("virtio: add new driver") Cc: sta...@dpdk.org Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/net/

[dpdk-dev] [PATCH 0/3] net/virtio: a temp to fix few multiple process issues

2016-12-21 Thread Yuanhan Liu
Here is a temp to fix few multiple process issues: only did some basic test, not positive sure (though it's likely) it will fix the issue reported by Yaron. Yaron, please help testing. Thanks! --- Yuanhan Liu (3): net/virtio: fix crash for secondary process net/virtio: fix multiple pr

[dpdk-dev] [PATCH 3/3] net/virtio: fix wrong Rx/Tx method for secondary process

2016-12-21 Thread Yuanhan Liu
: virtqueue_enqueue error: -14 Fix it by choosing the correct Rx/Tx callbacks for the secondary process. That is, use vector path if it's given. Fixes: 8d8393fb1861 ("virtio: pick simple Rx/Tx") Cc: sta...@dpdk.org Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 6 +-

[dpdk-dev] [PATCH 2/3] net/virtio: fix multiple process support

2016-12-21 Thread Yuanhan Liu
ss on init stage. Fixes: d5bbeefca826 ("virtio: introduce PCI implementation structure") Cc: sta...@dpdk.org Reported-by: Yaron Illouz Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 12 drivers/net/virtio/virtio_pci.c | 4 ++-- dri

Re: [dpdk-dev] [PATCH 0/3] net/virtio: a temp to fix few multiple process issues

2016-12-21 Thread Yuanhan Liu
On Thu, Dec 22, 2016 at 03:18:40PM +0800, Yuanhan Liu wrote: > Here is a temp to fix few multiple process issues: only did some basic Sign.., I meant "attempt" :-/ --yliu

Re: [dpdk-dev] Bug in virtqueue_dequeue_burst_rx()

2016-12-21 Thread Yuanhan Liu
On Mon, Dec 19, 2016 at 09:59:33PM -0800, Gopakumar Choorakkot Edakkunni wrote: > While I was testing virtio with ubuntu 14.04 kvm as host and dpdk16.07 > linux as guest, quite often I have seen that I get into a situation where > virtio_recv_mergeable_pkts() gets into a forever loop, after sending

Re: [dpdk-dev] [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK notification

2016-12-25 Thread Yuanhan Liu
On Fri, Dec 23, 2016 at 07:14:21AM +, Jianfeng Tan wrote: > In driver probe phase, we obtain device information; and then virtio > driver will initialize device and stores info, like negotiated > features, in vhost_user layer; finally, vhost_user gets DRIVER_OK > notification from virtio driver

Re: [dpdk-dev] [PATCH v2 3/7] net/virtio_user: move vhost user specific code

2016-12-25 Thread Yuanhan Liu
On Fri, Dec 23, 2016 at 07:14:22AM +, Jianfeng Tan wrote: > To support vhost kernel as the backend of net_virtio_user in coming > patches, we move vhost_user specific structs and macros into > vhost_user.c, and only keep common definitions in vhost.h. Good. > Besides, remove VHOST_USER_MQ fea

Re: [dpdk-dev] [PATCH v2 4/7] net/virtio_user: abstract virtio user backend ops

2016-12-25 Thread Yuanhan Liu
On Fri, Dec 23, 2016 at 07:14:23AM +, Jianfeng Tan wrote: > +typedef int (*vhost_setup_t)(struct virtio_user_dev *dev); > +typedef int (*vhost_send_request_t)(struct virtio_user_dev *dev, > + enum vhost_user_request req, > + void *

Re: [dpdk-dev] [PATCH v2 5/7] net/virtio_user: add vhost kernel support

2016-12-25 Thread Yuanhan Liu
On Fri, Dec 23, 2016 at 07:14:24AM +, Jianfeng Tan wrote: > + * Copyright(c) 2010-2016 Intel Corporation. All rights reserved. ^ I think it should be 2016. > +/* By default, vhost kernel module allows 64 regions, but DPDK allows > + * 256 segments. As a relief,

Re: [dpdk-dev] [PATCH v2 6/7] net/virtio_user: enable offloading

2016-12-25 Thread Yuanhan Liu
On Fri, Dec 23, 2016 at 07:14:25AM +, Jianfeng Tan wrote: > When used with vhost kernel backend, we can offload at both directions. > - From vhost kernel to virtio_user, the offload is enabled so that > DPDK app can trust the flow is checksum-correct; and if DPDK app > sends it throug

Re: [dpdk-dev] [PATCH v2 3/7] net/virtio_user: move vhost user specific code

2016-12-25 Thread Yuanhan Liu
On Mon, Dec 26, 2016 at 06:58:58AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan@linux.intel.com] > > Sent: Monday, December 26, 2016 2:28 PM > > To: Tan, Jianfeng > > Cc: dev@dpdk.org; Yigit, Fe

Re: [dpdk-dev] [PATCH v2 2/7] net/virtio_user: postpone DRIVER OK notification

2016-12-26 Thread Yuanhan Liu
On Mon, Dec 26, 2016 at 06:55:16AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan@linux.intel.com] > > Sent: Monday, December 26, 2016 2:27 PM > > To: Tan, Jianfeng > > Cc: dev@dpdk.org; Yigit, Fe

Re: [dpdk-dev] examples/vhost: how to use vhost-switch between VMs? Anybody who can help?

2016-12-26 Thread Yuanhan Liu
On Tue, Dec 27, 2016 at 01:33:14PM +0800, wang.yon...@zte.com.cn wrote: > There are some descriptions in > dpdk-16.11\doc\guides\sample_app_ug\vhost.rst, > "The sample application performs simple packet switching between virtual > machines based on Media Access Control (MAC) address or Virtual

[dpdk-dev] [PATCH v2 0/6] net/virtio: fix several multiple process issues

2016-12-28 Thread Yuanhan Liu
r (from its own process space). Thus, everything would work as expected. --- Yuanhan Liu (6): ethdev: fix port data mismatched in multiple process model net/virtio: fix wrong Rx/Tx method for secondary process net/virtio: store PCI operators pointer locally net/virtio: store IO port info local

[dpdk-dev] [PATCH v2 2/6] net/virtio: fix wrong Rx/Tx method for secondary process

2016-12-28 Thread Yuanhan Liu
: virtqueue_enqueue error: -14 Fix it by choosing the correct Rx/Tx callbacks for the secondary process. That is, use vector path if it's given. Fixes: 8d8393fb1861 ("virtio: pick simple Rx/Tx") Cc: sta...@dpdk.org Signed-off-by: Yuanhan Liu --- v2: fix a checkpatch warning: use {} consistent

[dpdk-dev] [PATCH v2 1/6] ethdev: fix port data mismatched in multiple process model

2016-12-28 Thread Yuanhan Liu
PCI device, keeping the chance of referencing to wrong data minimal. Fixes: af75078fece3 ("first public release") Cc: sta...@dpdk.org Cc: Thomas Monjalon Cc: Bruce Richardson Cc: Ferruh Yigit Signed-off-by: Yuanhan Liu --- lib/librte_ether/rte_ethdev.c | 58 +++

[dpdk-dev] [PATCH v2 3/6] net/virtio: store PCI operators pointer locally

2016-12-28 Thread Yuanhan Liu
be done in coming patches. Later patches would also set them correctly for secondary process, so that the multiple process model could work. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_ethdev.c | 9 ++--- drivers/net/virtio/virtio_pci.c | 26

[dpdk-dev] [PATCH v2 4/6] net/virtio: store IO port info locally

2016-12-28 Thread Yuanhan Liu
Like vtpci_ops, the rte_pci_ioport has to store in local memory. This is basically for the rte_pci_device field is allocated from process local memory, but not from shared memory. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_pci.c | 49

[dpdk-dev] [PATCH v2 6/6] net/virtio: remove dead structure field

2016-12-28 Thread Yuanhan Liu
Actually, virtio_hw->dev is not used since the beginning when it's introduced. Remove it. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_pci.c | 2 -- drivers/net/virtio/virtio_pci.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.c b/dri

[dpdk-dev] [PATCH v2 5/6] net/virtio: fix multiple process support

2016-12-28 Thread Yuanhan Liu
0ad71 ("virtio: use PCI ioport API") Fixes: d5bbeefca826 ("virtio: introduce PCI implementation structure") Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") Cc: sta...@kernel.org Cc: Juho Snellman Cc: Yaron Illouz Reported-by: Juho Snellman Reported-by: Yaron

Re: [dpdk-dev] [PATCH v2 5/6] net/virtio: fix multiple process support

2016-12-28 Thread Yuanhan Liu
On Wed, Dec 28, 2016 at 07:02:41PM +0800, Yuanhan Liu wrote: ... > Cc: sta...@kernel.org I knew I would make a mistake like this some day :/ Not my first time typing wrong, but it's the first time sending it out. Sorry for that. Fixed in this reply. --yliu

Re: [dpdk-dev] [PATCH 1/2] vhost: reference count fix for nb_started_ports

2016-12-29 Thread Yuanhan Liu
On Wed, Dec 28, 2016 at 04:10:51PM -0500, Charles (Chas) Williams wrote: > From: Wen Chiu > > Only increment and decrement nb_started_ports on the first and last > device start and stop. Otherwise, nb_started_ports can become negative > if a device is stopped multiple times. How could you be ab

Re: [dpdk-dev] [PATCH 2/2] vhost: start vhost servers once

2016-12-29 Thread Yuanhan Liu
On Wed, Dec 28, 2016 at 04:10:52PM -0500, Charles (Chas) Williams wrote: > Start a vhost server once during devinit instead of during device start > and stop. Some vhost clients, QEMU, don't re-attaching to sockets when > the vhost server is stopped and later started. Preserve existing behavior >

Re: [dpdk-dev] [PATCH 2/2] vhost: start vhost servers once

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 10:58:11AM -0500, Charles (Chas) Williams wrote: > On 12/29/2016 03:52 AM, Yuanhan Liu wrote: > >On Wed, Dec 28, 2016 at 04:10:52PM -0500, Charles (Chas) Williams wrote: > >>Start a vhost server once during devinit instead of during device start > &g

Re: [dpdk-dev] [PATCH v2 0/9] rxq interrupt mode for virtio PMD

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:42:51AM +, Tan, Jianfeng wrote: > Forget to mention a key part, when we bind virtio to vfio-pci driver in the > VM, we need to insert vfio kernel module like this: > > $ modprobe vfio enable_unsafe_noiommu_mode=1 > $ modprobe vfio-pci Such info should be documated

Re: [dpdk-dev] [PATCH v2 3/9] net/virtio: add PCI ops for queue/irq binding

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:37AM +, Jianfeng Tan wrote: > Add handler in virtio_pci_ops to set queue/irq bind. > > Signed-off-by: Jianfeng Tan > --- > drivers/net/virtio/virtio_pci.c | 29 + > drivers/net/virtio/virtio_pci.h | 5 + > 2 files changed, 34 ins

Re: [dpdk-dev] [PATCH v2 4/9] net/virtio: add Rx queue intr enable/disable functions

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:38AM +, Jianfeng Tan wrote: > /* > * Two types of mbuf to be cleaned: > * 1) mbuf that has been consumed by backend but not used by virtio. > diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h > index f0bb089..62be136 100644 > --- a/d

Re: [dpdk-dev] [PATCH v2 5/9] net/virtio: setup rxq interrupts

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:39AM +, Jianfeng Tan wrote: > This patch mainly allocates structure to store queue/irq mapping, > and configure queue/irq mapping down through PCI ops. It also creates > eventfds for each Rx queue and tell the kernel about the eventfd/intr > binding. > > Mostly im

Re: [dpdk-dev] [PATCH v2 7/9] net/virtio: unmapping queue/irq when close device

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:41AM +, Jianfeng Tan wrote: > When closing virtio devices, close eventfds, free the struct to > store queue/irq mapping. > > Signed-off-by: Jianfeng Tan > --- > drivers/net/virtio/virtio_ethdev.c | 27 ++- > 1 file changed, 26 insertions(

Re: [dpdk-dev] [PATCH v2 8/9] examples/l3fwd: add parse-ptype option

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:42AM +, Jianfeng Tan wrote: > To support those devices that do not provide packet type info when > receiving packets, add a new option, --parse-ptype, to analyze > packet type in the Rx callback. I think this would be needed for all PMD drivers don't have the PTYP

Re: [dpdk-dev] [PATCH v2 9/9] examples/l3fwd-power: fix not stop and close device

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:43AM +, Jianfeng Tan wrote: > As it gets killed, in SIGINT signal handler, device is not stopped > and closed. In virtio's case, vector assignment in the KVM is not > deassigned. What wrong could happen then? > This patch will invoke dev_stop() and dev_close() in

Re: [dpdk-dev] [PATCH v2 0/9] rxq interrupt mode for virtio PMD

2016-12-29 Thread Yuanhan Liu
On Thu, Dec 29, 2016 at 07:30:34AM +, Jianfeng Tan wrote: > v2: > - Add PCI queue/irq config ops. > - Move rxq interrupt settings before sending DRIVER OK. > > Historically, virtio PMD can only be binded to igb_uio or > uio_pci_generic, and not for vfio-pci. Besides, quote from > http://dp

Re: [dpdk-dev] [PATCH v2 8/9] examples/l3fwd: add parse-ptype option

2017-01-02 Thread Yuanhan Liu
On Fri, Dec 30, 2016 at 07:30:19AM +, Tan, Jianfeng wrote: > Hi, > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan@linux.intel.com] > > Sent: Friday, December 30, 2016 2:40 PM > > To: Tan, Jianfeng > > Cc: dev@dpdk.org; step..

Re: [dpdk-dev] [PATCH 2/2] vhost: start vhost servers once

2017-01-03 Thread Yuanhan Liu
On Fri, Dec 30, 2016 at 04:26:27PM -0500, Charles (Chas) Williams wrote: > > > On 12/29/2016 10:15 PM, Yuanhan Liu wrote: > >On Thu, Dec 29, 2016 at 10:58:11AM -0500, Charles (Chas) Williams wrote: > >>On 12/29/2016 03:52 AM, Yuanhan Liu wrote: > >>>On W

Re: [dpdk-dev] [PATCH v3 1/2] net/vhost: create datagram sockets immediately

2017-01-03 Thread Yuanhan Liu
On Sun, Jan 01, 2017 at 02:01:56PM -0500, Charles (Chas) Williams wrote: > If you create a vhost server device, it doesn't create the actual datagram > socket until you call .dev_start(). If you call .dev_stop() is also > deletes those sockets. For QEMU clients, this is a problem since QEMU > doe

Re: [dpdk-dev] [PATCH v3 2/2] net/vhost: emulate device start/stop behavior

2017-01-03 Thread Yuanhan Liu
On Sun, Jan 01, 2017 at 02:01:57PM -0500, Charles (Chas) Williams wrote: > .dev_start()/.dev_stop() roughly corresponds to the local device's > port being up or down. This is different from the remote client being > connected which is roughtly link up or down. Emulate the behavior by > separately

Re: [dpdk-dev] [PATCH] lib/librte_vhost: fix memory leak

2017-01-03 Thread Yuanhan Liu
On Tue, Jan 03, 2017 at 10:57:55PM -0500, Yong Wang wrote: > In function vhost_new_device(), current code dose not free 'dev' > in "i == MAX_VHOST_DEVICE" condition statements. It will lead to a > memory leak. Nice catch! Here are few minor stuff you might need pay attention to for future contrib

Re: [dpdk-dev] [PATCH v3 2/7] net/virtio_user: fix not properly reset device

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 03:59:21AM +, Jianfeng Tan wrote: > virtio_user is not properly reset when users call vtpci_reset(), > as it ignores VIRTIO_CONFIG_STATUS_RESET status in > virtio_user_set_status(). > > This might lead to initialization failure as it starts to re-init > the device befor

Re: [dpdk-dev] [PATCH v3 3/7] net/virtio_user: move vhost user specific code

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 03:59:22AM +, Jianfeng Tan wrote: > To support vhost kernel as the backend of net_virtio_user in coming > patches, we move vhost_user specific structs and macros into > vhost_user.c, and only keep common definitions in vhost.h. > > Besides, remove VHOST_USER_MQ feature

Re: [dpdk-dev] [PATCH v3 4/7] net/virtio_user: abstract virtio user backend ops

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 03:59:23AM +, Jianfeng Tan wrote: > +struct virtio_user_backend_ops ops_user; Better to qualify it with "extern const" ... --yliu

Re: [dpdk-dev] [PATCH v3 5/7] net/virtio_user: add vhost kernel support

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 03:59:24AM +, Jianfeng Tan wrote: > +static int > +vhost_kernel_ioctl(struct virtio_user_dev *dev, > +enum vhost_user_request req, > +void *arg) > +{ > + int i, ret = -1; > + uint64_t req_kernel; > + struct vhost_memory_kernel

Re: [dpdk-dev] [PATCH v3 3/7] net/virtio_user: move vhost user specific code

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 06:46:34AM +, Tan, Jianfeng wrote: > Hi Yuanhan, > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan@linux.intel.com] > > Sent: Wednesday, January 4, 2017 2:03 PM > > To: Tan, Jianfeng > > Cc: dev@dpd

Re: [dpdk-dev] [PATCH v2 5/9] net/virtio: setup rxq interrupts

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 02:56:50PM +0800, Tan, Jianfeng wrote: > > > On 12/30/2016 2:27 PM, Yuanhan Liu wrote: > >On Thu, Dec 29, 2016 at 07:30:39AM +, Jianfeng Tan wrote: > >>This patch mainly allocates structure to store queue/irq mapping, > >>and configu

Re: [dpdk-dev] [PATCH v2 5/7] net/virtio_user: add vhost kernel support

2017-01-03 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 03:22:08PM +0800, Tan, Jianfeng wrote: > > Sorry, I forget to reply this comment. > > On 12/26/2016 3:44 PM, Yuanhan Liu wrote: > >[...] > >>+ > >>+ /* Does not work when VIRTIO_F_IOMMU_PLATFORM now, why? */ > >Because this fea

Re: [dpdk-dev] [PATCH v4 1/2] net/vhost: create datagram sockets immediately

2017-01-04 Thread Yuanhan Liu
On Tue, Jan 03, 2017 at 11:22:42AM -0500, Charles (Chas) Williams wrote: > If you create a vhost server device, it doesn't create the actual datagram > socket until you call .dev_start(). If you call .dev_stop() is also > deletes those sockets. For QEMU clients, this is a problem since QEMU > doe

Re: [dpdk-dev] [PATCH v2 1/6] ethdev: fix port data mismatched in multiple process model

2017-01-04 Thread Yuanhan Liu
On Wed, Jan 04, 2017 at 06:34:40PM +0100, Thomas Monjalon wrote: > +Cc Sergio (maintainer of the secondary process thing) > > 2016-12-28 19:02, Yuanhan Liu: > > --- a/lib/librte_ether/rte_ethdev.c > > +++ b/lib/librte_ether/rte_ethdev.c > > @@ -201,9 +201,6 @@ rte_

[dpdk-dev] [dpdk-announce] DPDK 17.05.1 released

2017-06-30 Thread Yuanhan Liu
Tx buffer Yuanhan Liu (2): vhost: fix crash on NUMA version: 17.05.1

Re: [dpdk-dev] [PATCH] vhost: clean up per-socket mutex

2017-07-01 Thread Yuanhan Liu
On Wed, Jun 14, 2017 at 10:19:53AM +0200, Jens Freimann wrote: > On Mon, Jun 12, 2017 at 02:29:04PM -0700, Daniel Verkamp wrote: > > vsocket->conn_mutex was allocated with pthread_mutex_init() but never > > freed with pthread_mutex_destroy(). This is a potential memory leak, > > depending on how p

Re: [dpdk-dev] [PATCH 1/2] vhost: fix TCP csum not set

2017-07-01 Thread Yuanhan Liu
P csum. > > > >Fixes: 859b480d5afd ("vhost: add guest offload setting") > >Cc: sta...@dpdk.org > > > >Cc: Yuanhan Liu > >Cc: Maxime Coquelin > >Cc: Jiayu Hu > >Signed-off-by: Jianfeng Tan > > Reviewed-by: Maxime Coquelin Series applied to dpdk-next-virtio. Thanks! --yliu

Re: [dpdk-dev] [PATCH v2] doc: update virtio vring size and virtio_header size

2017-07-01 Thread Yuanhan Liu
On Fri, Jun 30, 2017 at 02:43:47PM +, Mcnamara, John wrote: > > > > -Original Message- > > From: Yang, Zhiyong > > Sent: Thursday, May 11, 2017 3:17 AM > > To: dev@dpdk.org > > Cc: Mcnamara, John ; yuanhan@linux.intel.com; > > maxime.coque...@redhat.com; Yang, Zhiyong > > Subject

Re: [dpdk-dev] [PATCH] vhost: fix MTU device feature check

2017-07-01 Thread Yuanhan Liu
On Thu, Jun 29, 2017 at 08:01:45AM +, Tan, Jianfeng wrote: > > > > -Original Message- > > From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] > > Sent: Thursday, June 29, 2017 3:58 PM > > To: dev@dpdk.org; y...@fridaylinux.org > > Cc: i.dyu...@samsung.com; Tan, Jianfeng; sta...@

Re: [dpdk-dev] [PATCH] vhost: fix checking of device features

2017-07-01 Thread Yuanhan Liu
On Wed, Jun 28, 2017 at 03:40:31PM +0300, Ivan Dyukov wrote: > To compare enabled features in current device we must use bit > mask instead of bit position. > > CC: sta...@dpdk.org > Fixes: c843af3aa13e ("vhost: access header only") > > Signed-off-by: Ivan Dyukov Applied to dpdk-next-virtio. T

[dpdk-dev] next techboard meeting (5th, July)

2017-07-03 Thread Yuanhan Liu
Hi all, The next meeting of the techboard will happen on IRC #dpdk-board, at 3pm UTC, this Wednesday 5th of July. The agenda is updated here: https://annuel.framapad.org/p/r.0c3cc4d1e011214183872a98f6b5c7db For your convenience, I copied it here. 0. Release blocking issues?

Re: [dpdk-dev] [PATCH v10 1/3] lib: add Generic Receive Offload API framework

2017-07-04 Thread Yuanhan Liu
On Mon, Jul 03, 2017 at 05:56:20AM +, Hu, Jiayu wrote: > > > +/** > > > + * GRO table, which is used to merge packets. It keeps many reassembly > > > + * tables of desired GRO types. Applications need to create GRO tables > > > + * before using rte_gro_reassemble to perform GRO. > > > + */ > >

Re: [dpdk-dev] [PATCH v10 1/3] lib: add Generic Receive Offload API framework

2017-07-04 Thread Yuanhan Liu
Haven't looked at the details yet, and below are some quick comments after a glimpse. On Sat, Jul 01, 2017 at 07:08:41PM +0800, Jiayu Hu wrote: ... > +void *rte_gro_tbl_create(const > + const struct rte_gro_param *param) The DPDK style is: void * rte_gro_tbl_destroy(...) Also you sh

Re: [dpdk-dev] [PATCH v10 2/3] lib/gro: add TCP/IPv4 GRO support

2017-07-04 Thread Yuanhan Liu
Again, just some quick comments after a glimpse. On Sat, Jul 01, 2017 at 07:08:42PM +0800, Jiayu Hu wrote: > + for (i = 0; i < nb_pkts; i++) { > + if (RTE_ETH_IS_IPV4_HDR(pkts[i]->packet_type) && > + (pkts[i]->packet_type & RTE_PTYPE_L4_TCP)) { > +

Re: [dpdk-dev] [PATCH 0/3] vhost: small cleanups

2017-07-04 Thread Yuanhan Liu
On Tue, Jul 04, 2017 at 10:50:40AM +0200, Jens Freimann wrote: > This series is a bunch of small cleanups regarding checking return values etc. Series applied to dpdk-next-virtio. You probably need update your script (if you are using one) about my email address. Thanks. --yliu

Re: [dpdk-dev] [PATCH 2/3] vhost: check return values of pthread_* calls

2017-07-04 Thread Yuanhan Liu
On Tue, Jul 04, 2017 at 10:50:42AM +0200, Jens Freimann wrote: > +out_mutex: > + if (pthread_mutex_destroy(&vsocket->conn_mutex)) > + RTE_LOG(ERR, VHOST_CONFIG, > + "error: failed to destroy connection mutex\n"); One minor comment though: {} should be used for o

Re: [dpdk-dev] [PATCH] net/virtio-user: fix crash when detaching device

2017-07-04 Thread Yuanhan Liu
On Fri, Jun 23, 2017 at 08:41:37AM -0400, Allain Legacy wrote: > The rte_eth_dev.data pointer is set to a reference to a static table. > Attempting to rte_free() it leads to a panic. For example, the > following commands result in a panic if run in testpmd > > testpmd> port attach virtio_user0,

Re: [dpdk-dev] [PATCH] net/virtio: fix the wrong comment

2017-07-04 Thread Yuanhan Liu
On Fri, Jun 23, 2017 at 12:14:45AM -0400, Yong Wang wrote: > Since "rte_eal_dev_init()" has been removed, the comment referred to > it should be modified simultaneously. > > Signed-off-by: Yong Wang Applied to dpdk-next-virtio. Thanks. --yliu

Re: [dpdk-dev] [PATCH] vhost: print the reason on numa node obtaining failure

2017-07-06 Thread Yuanhan Liu
On Thu, Jul 06, 2017 at 04:30:43PM +0300, Ilya Maximets wrote: > syscall always returns '-1' on failure and there is no point > in printing that value. 'errno' is much more informative. > > Fixes: 586e39001317 ("vhost: export numa node") > > Signed-off-by: Ilya Maximets Applied to dpdk-next-vir

Re: [dpdk-dev] [PATCH] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-06 Thread Yuanhan Liu
On Thu, Jun 29, 2017 at 05:28:32PM +0800, Changpeng Liu wrote: > +.. note:: > +You must check whether you Qemu can support "vhost-user-scsi" or not, > +the latest Qemu code is recommended. You should specify the least QEMU version that supports vhost-user scsi here. > + > +Common Issues >

Re: [dpdk-dev] [PATCH] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-06 Thread Yuanhan Liu
On Fri, Jul 07, 2017 at 02:00:38AM +, Liu, Changpeng wrote: > > > > -Original Message- > > From: Yuanhan Liu [mailto:y...@fridaylinux.org] > > Sent: Friday, July 7, 2017 8:51 AM > > To: Liu, Changpeng > > Cc: dev@dpdk.org > > Subject: R

Re: [dpdk-dev] [PATCH v2] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-06 Thread Yuanhan Liu
On Sat, Jul 08, 2017 at 12:14:51PM +0800, Changpeng Liu wrote: > +.. note:: > +You must check whether your Qemu can support "vhost-user-scsi" or not, > +Qemu v2.9.50 or newer version is required. QEMU v2.9.50 looks like a stable version, and I don't think they will backport new features on

Re: [dpdk-dev] [PATCH v3] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-06 Thread Yuanhan Liu
On Sat, Jul 08, 2017 at 01:21:37PM +0800, Changpeng Liu wrote: > vhost-user protocol is common to many virtio devices, such as > virtio_net/virtio_scsi/virtio_blk. Since DPDK vhost library > removed the NET specific data structures, the vhost library > is common to other virtio devices, such as vir

[dpdk-dev] [PATCH 1/2] testpmd: allow to query any RETA size

2017-07-06 Thread Yuanhan Liu
Currently, testpmd just allows to query the RETA info only when the required size equals to configured RETA size. This patch allows to query any RETA size <= the configured size. This helps when the RETA size is big (say 512) and when I just want to peak few RETA entries. Signed-off-by: Yuan

[dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size

2017-07-06 Thread Yuanhan Liu
Print the valid RTE size range so that user knows what goes wrong. Signed-off-by: Yuanhan Liu --- app/test-pmd/cmdline.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index c8faef9..d32a1df 100644 --- a/app/test-pmd

Re: [dpdk-dev] [PATCH v3] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-07 Thread Yuanhan Liu
On Fri, Jul 07, 2017 at 02:10:57PM +0530, Hemant Agrawal wrote: > On 7/7/2017 10:37 AM, Yuanhan Liu wrote: > >On Sat, Jul 08, 2017 at 01:21:37PM +0800, Changpeng Liu wrote: > >>vhost-user protocol is common to many virtio devices, such as > >>virtio_net/virtio_scsi/v

Re: [dpdk-dev] [PATCH v3] examples/vhost: introduce a new vhost-user-scsi sample application

2017-07-07 Thread Yuanhan Liu
On Fri, Jul 07, 2017 at 02:21:28PM +0200, Thomas Monjalon wrote: > 08/07/2017 07:21, Changpeng Liu: > > MAINTAINERS | 2 + > > doc/guides/sample_app_ug/vhost_scsi.rst | 110 +++ > > examples/Makefile | 2 +- > > examples/vhost_scsi/Makefile

Re: [dpdk-dev] [PATCH 0/2] virtio fix false offload claims

2017-07-07 Thread Yuanhan Liu
On Fri, Jul 07, 2017 at 12:52:48PM -0700, Stephen Hemminger wrote: > While doing code for Hyper-V, noticed that the virtio driver was > confused about receive versus transmit offloads. The virtio > checksum offload is L4 (TCP/UDP) only, not IPv4. Also, TSO > and LRO are not the same. > > This may

Re: [dpdk-dev] [PATCH v10 20/20] ethdev: add control interface support

2017-07-07 Thread Yuanhan Liu
On Tue, Jul 04, 2017 at 05:13:37PM +0100, Ferruh Yigit wrote: > @@ -157,8 +164,12 @@ rte_eth_dev_pci_generic_probe(struct rte_pci_device > *pci_dev, > > RTE_FUNC_PTR_OR_ERR_RET(*dev_init, -EINVAL); > ret = dev_init(eth_dev); > - if (ret) > + if (ret) { > rte_eth

Re: [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size

2017-07-09 Thread Yuanhan Liu
On Mon, Jul 10, 2017 at 01:19:06AM +, Wu, Jingjing wrote: > > -Original Message- > > From: Yuanhan Liu [mailto:y...@fridaylinux.org] > > Subject: [PATCH 2/2] testpmd: give more hint on invalid RETA size > > > > Print the valid RTE size range so t

[dpdk-dev] DPDK techboard minutes of July 05

2017-07-09 Thread Yuanhan Liu
Hi all, Here is the meeting notes for the last DPDK technical board meeting held on 2017-07-05. Member attendees: - Hemant Agrawal - Jan Blunck - Jerin Jacob - Olivier Matz - Stephen Hemminger - Thomas Monjalon - Yuanhan Liu 0. Release blocking issues No major issues, but as always, we lack

Re: [dpdk-dev] [PATCH] vhost: fix vhost-user init failed

2017-07-13 Thread Yuanhan Liu
On Mon, Jul 10, 2017 at 11:48:27AM +0200, Jens Freimann wrote: > >@@ -668,7 +668,7 @@ rte_vhost_driver_register(const char *path, uint64_t > >flags) > > } > > > > vhost_user.vsockets[vhost_user.vsocket_cnt++] = vsocket; > >- > >+goto out; > >out_mutex: > > if (pthread_mutex_destroy

Re: [dpdk-dev] [PATCH] net/virtio: fix coding style

2017-07-18 Thread Yuanhan Liu
On Tue, Jul 18, 2017 at 01:29:48PM +0100, Ferruh Yigit wrote: > On 7/18/2017 12:04 PM, Ferruh Yigit wrote: > > On 7/17/2017 7:35 AM, Tiwei Bie wrote: > >> Make the code more readable. No functional change. > >> > >> Signed-off-by: Tiwei Bie > > > > Applied to dpdk-next-net/master, thanks. > > An

Re: [dpdk-dev] Occasional instability in RSS Hashes/Queues from X540 NIC

2017-07-18 Thread Yuanhan Liu
On Tue, Jul 18, 2017 at 08:43:42AM -0500, Matt Laswell wrote: > Hi Qiming, > > That's fantastic news. Thank you very much for taking the time to figure > the issue out. > > Would it be possible to backport the fix to the 16.11 LTS release? This > kind of problem seems tailor-made for LTS. Agr

Re: [dpdk-dev] [PATCH v2] crypto/dpaa2_sec: fix the return of supported API

2017-07-18 Thread Yuanhan Liu
On Tue, Jul 18, 2017 at 10:26:39AM +, De Lara Guarch, Pablo wrote: > Hi Akhil, > > > -Original Message- > > From: Akhil Goyal [mailto:akhil.go...@nxp.com] > > Sent: Tuesday, July 18, 2017 8:34 AM > > To: dev@dpdk.org; sta...@dpdk.org > > Cc: hemant.agra...@nxp.com; De Lara Guarch, Pabl

Re: [dpdk-dev] Occasional instability in RSS Hashes/Queues from X540 NIC

2017-07-19 Thread Yuanhan Liu
eproduce the problem on 16.11 LTS release? I think maybe it has > been fixed already. > > > Best Regards, > Xiaoyun Li > > > > -----Original Message- > From: Yuanhan Liu [mailto:y...@fridaylinux.org] > Sent: Tuesday, July 18, 2017 22:01 > To: Matt Laswell

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