[dpdk-dev] PING: [PATCH v2] pmd/virtio: fix cannot start virtio dev after stop

2016-02-04 Thread Yuanhan Liu
the issue that virtio device cannot be started after stopped. > > > > The field, hw->started, should be changed by virtio_dev_start/stop instead > > of virtio_dev_close. > > > > Reported-by: Pavel Fedin > > Signed-off-by: Jianfeng Tan > > Acked-by: Yuanh

[dpdk-dev] [PATCH v6 1/8] eal: pci: add api to rd/wr pci bar region

2016-02-03 Thread Yuanhan Liu
On Wed, Feb 03, 2016 at 03:20:09PM +0530, Santosh Shukla wrote: > On Tue, Feb 2, 2016 at 9:48 PM, Santosh Shukla wrote: > > On Tue, Feb 2, 2016 at 9:21 PM, Santosh Shukla > > wrote: > >> On Tue, Feb 2, 2016 at 2:19 PM, Yuanhan Liu >> linux.intel.com> wrote: &g

[dpdk-dev] [PATCH v6 1/8] eal: pci: add api to rd/wr pci bar region

2016-02-03 Thread Yuanhan Liu
On Tue, Feb 02, 2016 at 09:48:44PM +0530, Santosh Shukla wrote: > On Tue, Feb 2, 2016 at 9:21 PM, Santosh Shukla wrote: > > On Tue, Feb 2, 2016 at 2:19 PM, Yuanhan Liu > linux.intel.com> wrote: > >> On Tue, Feb 02, 2016 at 06:50:18AM +0100, David Marchand wrote: > >

[dpdk-dev] [PATCH v7 9/9] virtio: move VIRTIO_READ/WRITE_REG_X into virtio_pci.c

2016-02-02 Thread Yuanhan Liu
virtio_pci.c is the only file references those macros; move them there. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio/virtio_pci.c | 19 +++ drivers/net/virtio/virtio_pci.h | 18

[dpdk-dev] [PATCH v7 8/9] virtio: add 1.0 support

2016-02-02 Thread Yuanhan Liu
works. Besides those changes, 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 Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huaw

[dpdk-dev] [PATCH v7 7/9] eal: pci: export pci_[un]map_device

2016-02-02 Thread Yuanhan Liu
() will fail, which ends up with virtio pmd driver being skipped. Therefore, we can not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver. Therefore, this patch exports pci_map_device, and let virtio pmd call it when necessary. Cc: David Marchand Signed-off-by: Yuanhan Liu Tested

[dpdk-dev] [PATCH v7 6/9] virtio: retrieve hdr_size from hw->vtnet_hdr_size

2016-02-02 Thread Yuanhan Liu
ueue_burst() and virtio_recv_pkts(), leading a packet corruption. Instead, we should retrieve it from hw->vtnet_hdr_size; we will do proper settings at eth_virtio_dev_init() in later patches. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya

[dpdk-dev] [PATCH v7 5/9] viritio: switch to 64 bit features

2016-02-02 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 Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Hua

[dpdk-dev] [PATCH v7 4/9] virtio: move left pci stuff to virtio_pci.c

2016-02-02 Thread Yuanhan Liu
virtio_pci.c is a more proper place for pci stuff; virtio_ethdev is not. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 265 +--- drivers/net

[dpdk-dev] [PATCH v7 3/9] virtio: introduce struct virtio_pci_ops

2016-02-02 Thread Yuanhan Liu
ets hw->vtpci_ops to legacy_ops as we don't support 1.0 yet. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- v5: - define "src" arg of vtpci_write_dev_config() --- drivers/net/virtio/virtio_ethdev.c |

[dpdk-dev] [PATCH v7 2/9] virtio: define offset as size_t type

2016-02-02 Thread Yuanhan Liu
offset arg of vtpci_read/write_dev_config is derived from offsetof(), which is of size_t type, instead of uint64_t. So, define it as size_t type. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio

[dpdk-dev] [PATCH v7 1/9] virtio: don't set vring address again at queue startup

2016-02-02 Thread Yuanhan Liu
As we have already set up it at virtio_dev_queue_setup(), and a vq restart will not reset the settings. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 --- 1 file

[dpdk-dev] [PATCH v7 0/9] virtio 1.0 enabling for virtio pmd driver

2016-02-02 Thread Yuanhan Liu
n: Len=10 ==> Capabilities: [50] Vendor Specific Information: Len=10 ==> Capabilities: [40] Vendor Specific Information: Len=10 Kernel driver in use: virtio-pci Kernel modules: virtio_pci After that, there wasn't anything speical comparing to the old virtio 0.95 pmd driver. --- Y

[dpdk-dev] [PATCH v6 0/9] virtio 1.0 enabling for virtio pmd driver

2016-02-02 Thread Yuanhan Liu
On Tue, Feb 02, 2016 at 11:46:54AM +0100, Thomas Monjalon wrote: > Hi Yuanhan, > > I wanted to apply these patches but I see few checkpatch warnings, > inluding a typo. > Sometimes I fix them myself but I guess you would prefer checking it. Okay; I will fix them all. --yliu

[dpdk-dev] [PATCH v6 1/8] eal: pci: add api to rd/wr pci bar region

2016-02-02 Thread Yuanhan Liu
On Tue, Feb 02, 2016 at 06:50:18AM +0100, David Marchand wrote: > On Tue, Feb 2, 2016 at 6:43 AM, Yuanhan Liu > wrote: > > On Tue, Feb 02, 2016 at 09:44:14AM +0530, Santosh Shukla wrote: > >> Current use-case is virtio: It is used as io_bar which is first > >&

[dpdk-dev] [PATCH v6 1/8] eal: pci: add api to rd/wr pci bar region

2016-02-02 Thread Yuanhan Liu
On Tue, Feb 02, 2016 at 09:44:14AM +0530, Santosh Shukla wrote: > >> +int rte_eal_pci_read_bar(const struct rte_pci_device *device, > >> + void *buf, size_t len, off_t offset, > >> + int bar_idx) > >> + > >> +{ > >> + const struct rte_intr_handle

[dpdk-dev] [PATCH v6 6/8] virtio: add vfio api to rd/wr ioport space

2016-02-02 Thread Yuanhan Liu
On Tue, Feb 02, 2016 at 10:00:36AM +0530, Santosh Shukla wrote: > > > > BTW, I didn't follow the noIOMMU discussion; how did it end? Do we still > > need that? Is this patch a full story to enable virtio on ARM? > > > Ok, We agreed that explicit __noiommu suffix not required, atleast for >

[dpdk-dev] [PATCH v3 0/8] vhost-user live migration support

2016-02-02 Thread Yuanhan Liu
On Mon, Feb 01, 2016 at 03:54:05PM +, Iremonger, Bernard wrote: > Hi Yuanhan, > > > > > A simple test guide (on same host) > > == > > > > The following test is based on OVS + DPDK (check [0] for how to setup OVS + > > DPDK): ... > > The above test guide

[dpdk-dev] [PATCH v2 3/3] virtio: Add a new layer to abstract pci access method

2016-02-01 Thread Yuanhan Liu
On Mon, Feb 01, 2016 at 10:50:00AM +0900, Tetsuya Mukawa wrote: > On 2016/01/29 18:17, Yuanhan Liu wrote: > > On Thu, Jan 28, 2016 at 06:33:32PM +0900, Tetsuya Mukawa wrote: > >> This patch addss function pointers to abstract pci access method. > >> This abstraction lay

[dpdk-dev] [PATCH v6 6/8] virtio: add vfio api to rd/wr ioport space

2016-02-01 Thread Yuanhan Liu
On Fri, Jan 29, 2016 at 11:51:55PM +0530, Santosh Shukla wrote: > For vfio case - Use pread/pwrite api to access virtio > ioport space. > > Signed-off-by: Santosh Shukla > Signed-off-by: Rizwan Ansari > Signed-off-by: Rakesh Krishnamurthy > --- > v5-->v6: > - renamed inport_in/out to

[dpdk-dev] [PATCH 0/8] support E-tag offloading and forwarding on Intel X550 NIC

2016-02-01 Thread Yuanhan Liu
On Mon, Feb 01, 2016 at 01:56:32AM +, Lu, Wenzhuo wrote: > Hi Yuanhan, > > > -Original Message- > > From: Yuanhan Liu [mailto:yuanhan.liu at linux.intel.com] > > Sent: Monday, February 1, 2016 9:40 AM > > To: Lu, Wenzhuo > > Cc: Qiu, Michael; dev at

[dpdk-dev] [PATCH 0/8] support E-tag offloading and forwarding on Intel X550 NIC

2016-02-01 Thread Yuanhan Liu
On Mon, Feb 01, 2016 at 01:04:52AM +, Lu, Wenzhuo wrote: > Hi, > > > -Original Message- > > From: Qiu, Michael > > Sent: Friday, January 29, 2016 3:16 PM > > To: Lu, Wenzhuo; dev at dpdk.org > > Subject: Re: [dpdk-dev] [PATCH 0/8] support E-tag offloading and forwarding > > on > >

[dpdk-dev] [PATCH v2 3/3] virtio: Add a new layer to abstract pci access method

2016-01-29 Thread Yuanhan Liu
On Thu, Jan 28, 2016 at 06:33:32PM +0900, Tetsuya Mukawa wrote: > This patch addss function pointers to abstract pci access method. > This abstraction layer will be used when virtio-net PMD supports > container extension. > > The below functions abstract how to access to pci configuration space.

[dpdk-dev] [PATCH v5 09/11] virtio_pci: do not parse if interface is vfio-noiommu

2016-01-29 Thread Yuanhan Liu
On Fri, Jan 29, 2016 at 10:02:26AM +0100, Thomas Monjalon wrote: > 2016-01-29 15:34, Yuanhan Liu: > > There is another option for that: the git scissors option; you could > > check the git format-patch man page for more detailed info (by searching > > "scissors" ke

[dpdk-dev] [RFC PATCH 5/5] virtio: Extend virtio-net PMD to support container environment

2016-01-29 Thread Yuanhan Liu
On Fri, Jan 29, 2016 at 04:57:23PM +0800, Yuanhan Liu wrote: > On Thu, Jan 21, 2016 at 08:07:58PM +0900, Tetsuya Mukawa wrote: > > +static int > > +virt_read_pci_cfg(struct virtio_hw *hw, void *buf, size_t len, off_t > > offset) > > +{ > > + qtest_read_pci_cfg(h

[dpdk-dev] [RFC PATCH 5/5] virtio: Extend virtio-net PMD to support container environment

2016-01-29 Thread Yuanhan Liu
On Thu, Jan 21, 2016 at 08:07:58PM +0900, Tetsuya Mukawa wrote: > +static int > +virt_read_pci_cfg(struct virtio_hw *hw, void *buf, size_t len, off_t offset) > +{ > + qtest_read_pci_cfg(hw, "virtio-net", buf, len, offset); > + return 0; > +} > + > +static void * >

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

2016-01-29 Thread Yuanhan Liu
manipulating the > virtio device before virtio PMD uses port IO to configure the device. Series acked: Acked-by: Yuanhan Liu --yliu

[dpdk-dev] [PATCH v5 10/11] virtio: pci: add dummy func definition for in/outb for non-x86 arch

2016-01-29 Thread Yuanhan Liu
On Fri, Jan 29, 2016 at 01:01:02PM +0530, Santosh Shukla wrote: > > Another generic comment about this patchset is that it VERY okay to > > include several components change in one set, but putting them in > > order helps review a lot. > > > > Say, this patch set has dependence on VFIO stuff,

[dpdk-dev] [PATCH v5 09/11] virtio_pci: do not parse if interface is vfio-noiommu

2016-01-29 Thread Yuanhan Liu
On Fri, Jan 29, 2016 at 12:52:53PM +0530, Santosh Shukla wrote: > On Fri, Jan 29, 2016 at 12:47 PM, Yuanhan Liu > wrote: > > Two minor nits. > > > > Firstly about your title, you should be consistent: sometimes you > > use virtio_pci, and sometimes you use virtio

[dpdk-dev] [PATCH v7 1/2] tools: Add support for handling built-in kernel modules

2016-01-29 Thread Yuanhan Liu
cript. > > Add support for checking built-in modules with parsing the sysfs files. > > This commit obsoletes the /proc/modules parsing approach. > > Signed-off-by: Kamil Rytarowski Acked-by: Yuanhan Liu --yliu

[dpdk-dev] [PATCH v5 09/11] virtio_pci: do not parse if interface is vfio-noiommu

2016-01-29 Thread Yuanhan Liu
Two minor nits. Firstly about your title, you should be consistent: sometimes you use virtio_pci, and sometimes you use virtio_pic.h. And for virtio pmd driver, "virtio: " prefix is pretty enough, no need another extra "vfio: " or "pci: " prefix. And the same to your EAL changes. EAL is a

[dpdk-dev] [PATCH v5 06/11] virtio: vfio: add api support to rd/wr ioport bar

2016-01-29 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 05:16:07PM +0530, Santosh Shukla wrote: > For vfio case - Use pread/pwrite api to access virtio > ioport space. > > Applicable for virtio 0.95 spec. > > Signed-off-by: Santosh Shukla > Signed-off-by: Rizwan Ansari > Signed-off-by: Rakesh Krishnamurthy > --- > v4 -->

[dpdk-dev] [PATCH v5 10/11] virtio: pci: add dummy func definition for in/outb for non-x86 arch

2016-01-29 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 05:16:11PM +0530, Santosh Shukla wrote: > For non-x86 arch, Compiler will throw build error for in/out apis. Including > dummy api function so to pass build. > > Note that: For virtio to work for non-x86 arch - RTE_EAL_VFIO is the only > supported method. RTE_EAL_IGB_UIO

[dpdk-dev] [PATCH v3 8/8] vhost: remove duplicate header include

2016-01-29 Thread Yuanhan Liu
unistd.h has been included twice; remove one. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost_user/virtio-net-user.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c b/lib/librte_vhost/vhost_user/virtio-net-user.c index cda330d..4270c98

[dpdk-dev] [PATCH v3 7/8] vhost: enable log_shmfd protocol feature

2016-01-29 Thread Yuanhan Liu
. Signed-off-by: Yuanhan Liu Tested-by: Pavel Fedin --- doc/guides/rel_notes/release_2_3.rst | 2 ++ lib/librte_vhost/vhost_user/virtio-net-user.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/doc/guides/rel_notes/release_2_3.rst b/doc/guides/rel_notes/release_2_3.rst index

[dpdk-dev] [PATCH v3 6/8] vhost: handle VHOST_USER_SEND_RARP request

2016-01-29 Thread Yuanhan Liu
message and broadcast it Cc: Thibaut Collet Signed-off-by: Yuanhan Liu --- Note that this patch did take effect in my test: - it indeed updated target vswitch's mac learning table. (with the "ovs fdb/show bridge" command) - the ping request packets after migration were indee

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

2016-01-29 Thread Yuanhan Liu
-by: Yuanhan Liu Tested-by: Pavel Fedin --- lib/librte_vhost/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 03044f6..0ba5045 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -74,6

[dpdk-dev] [PATCH v3 4/8] vhost: log vring desc buffer changes

2016-01-29 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 Tested-by: Pavel Fedin --- lib/librte_vhost/vhost_rxtx.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib

[dpdk-dev] [PATCH v3 3/8] vhost: log used vring changes

2016-01-29 Thread Yuanhan Liu
Every time we update virtio used ring, we need to log it. And it's been done by a new vhost_log_write() wrapper, vhost_log_used_vring(). Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky Tested-by: Pavel Fedin --- v3: remove the unnecessary var "addr" iat vhost_log_

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

2016-01-29 Thread Yuanhan Liu
ase denotes the start of the dirty page bitmap. Signed-off-by: Yuanhan Liu Signed-off-by: Victor Kaplansky Tested-by: Pavel Fedin --- v3: - move the two functions inside vhost_rxtx.c - add a memory barrier before logging, to make sure guest memory updates are committed before logg

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

2016-01-29 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 Tested-by: Pavel Fedin --- lib/librte_vhost/rte_virtio_ne

[dpdk-dev] [PATCH v3 0/8] vhost-user live migration support

2016-01-29 Thread Yuanhan Liu
VM1 monitor, and start migration: > migrate tcp:0: 7. After a while, you will find that VM1 has been migrated to VM2, and the "ping" command continues running, perfectly. --- Yuanhan Liu (8): vhost: handle VHOST_USER_SET_LOG_BASE request vhost: introduce vhost_log

[dpdk-dev] [PATCH v5 01/11] virtio: Introduce config RTE_VIRTIO_INC_VECTOR

2016-01-29 Thread Yuanhan Liu
On Fri, Jan 29, 2016 at 10:02:26AM +0530, Santosh Shukla wrote: > Hi Yuan, It's Yuanhan, but not Yuan :) > On Wed, Jan 27, 2016 at 8:03 AM, Yuanhan Liu > wrote: > > On Wed, Jan 27, 2016 at 07:53:21AM +0530, Santosh Shukla wrote: > >> Ping? > > > > I w

[dpdk-dev] [PATCH v6 9/9] virtio: move VIRTIO_READ/WRITE_REG_X into virtio_pci.c

2016-01-28 Thread Yuanhan Liu
virtio_pci.c is the only file references those macros; move them there. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio/virtio_pci.c | 19 +++ drivers/net/virtio/virtio_pci.h | 18

[dpdk-dev] [PATCH v6 8/9] virtio: add 1.0 support

2016-01-28 Thread Yuanhan Liu
works. Besides those changes, 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 Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huaw

[dpdk-dev] [PATCH v6 6/9] virtio: retrieve hdr_size from hw->vtnet_hdr_size

2016-01-28 Thread Yuanhan Liu
ueue_burst() and virtio_recv_pkts(), leading a packet corruption. Instead, we should retrieve it from hw->vtnet_hdr_size; we will do proper settings at eth_virtio_dev_init() in later patches. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya

[dpdk-dev] [PATCH v6 5/9] viritio: switch to 64 bit features

2016-01-28 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 Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Hua

[dpdk-dev] [PATCH v6 4/9] virtio: move left pci stuff to virtio_pci.c

2016-01-28 Thread Yuanhan Liu
virtio_pci.c is a more proper place for pci stuff; virtio_ethdev is not. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 265 +--- drivers/net

[dpdk-dev] [PATCH v6 3/9] virtio: introduce struct virtio_pci_ops

2016-01-28 Thread Yuanhan Liu
ets hw->vtpci_ops to legacy_ops as we don't support 1.0 yet. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- v5: - define "src" arg of vtpci_write_dev_config() --- drivers/net/virtio/virtio_ethdev.c |

[dpdk-dev] [PATCH v6 2/9] virtio: define offset as size_t type

2016-01-28 Thread Yuanhan Liu
offset arg of vtpci_read/write_dev_config is derived from offsetof(), which is of size_t type, instead of uint64_t. So, define it as size_t type. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio

[dpdk-dev] [PATCH v6 1/9] virtio: don't set vring address again at queue startup

2016-01-28 Thread Yuanhan Liu
As we have already set up it at virtio_dev_queue_setup(), and a vq restart will not reset the settings. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 --- 1 file

[dpdk-dev] [PATCH v6 0/9] virtio 1.0 enabling for virtio pmd driver

2016-01-28 Thread Yuanhan Liu
formation: Len=10 Kernel driver in use: virtio-pci Kernel modules: virtio_pci After that, there wasn't anything speical comparing to the old virtio 0.95 pmd driver. --- Yuanhan Liu (9): virtio: don't set vring address again at queue startup virtio: define offset as size_t type virt

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

2016-01-27 Thread Yuanhan Liu
On Wed, Jan 27, 2016 at 06:16:37AM +, Xie, Huawei wrote: > On 1/27/2016 2:02 PM, Yuanhan Liu wrote: > > On Wed, Jan 27, 2016 at 05:56:56AM +, Xie, Huawei wrote: > >> On 1/27/2016 11:22 AM, Yuanhan Liu wrote: > >>> On Wed, Jan 27, 2016 at 02:46:39AM +, Xie

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

2016-01-27 Thread Yuanhan Liu
On Wed, Jan 27, 2016 at 06:12:22AM +, Xie, Huawei wrote: > On 1/27/2016 11:26 AM, Yuanhan Liu wrote: > > On Tue, Jan 26, 2016 at 10:30:12AM +, Xie, Huawei wrote: > >> On 12/3/2015 2:03 PM, Yuanhan Liu wrote: > >>> Signed-off-by: Yuanhan Liu > >>>

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

2016-01-27 Thread Yuanhan Liu
On Wed, Jan 27, 2016 at 05:56:56AM +, Xie, Huawei wrote: > On 1/27/2016 11:22 AM, Yuanhan Liu wrote: > > On Wed, Jan 27, 2016 at 02:46:39AM +, Xie, Huawei wrote: > >> On 12/3/2015 2:03 PM, Yuanhan Liu wrote: > >>> + if (vq->vhost_hlen == sizeo

[dpdk-dev] [PATCH v5 8/9] virtio: add 1.0 support

2016-01-27 Thread Yuanhan Liu
On Thu, Jan 21, 2016 at 12:37:42PM +0100, Thomas Monjalon wrote: > 2016-01-19 16:12, Yuanhan Liu: > > +#define IO_READ_DEF(nr_bits, type) \ > > +static inline type \ > > +io_rea

[dpdk-dev] [PATCH v5 8/9] virtio: add 1.0 support

2016-01-27 Thread Yuanhan Liu
On Thu, Jan 21, 2016 at 12:49:10PM +0100, Thomas Monjalon wrote: > 2016-01-19 16:12, Yuanhan Liu: > > int > > vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw) > > { > > - hw->vtpci_ops = _ops; > > + hw->dev = dev; > > + > &

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

2016-01-27 Thread Yuanhan Liu
On Thu, Jan 21, 2016 at 02:50:01PM +0100, J?r?me Jutteau wrote: > Hi Yuanhan, > > 2015-12-14 2:47 GMT+01:00 Yuanhan Liu : > > Right, I should move it in the beginning of this function. > > Any news about this refactoring ? Hi J?r?me, Thanks for showing interests

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

2016-01-27 Thread Yuanhan Liu
On Tue, Jan 26, 2016 at 10:30:12AM +, Xie, Huawei wrote: > On 12/3/2015 2:03 PM, Yuanhan Liu wrote: > > Signed-off-by: Yuanhan Liu > > --- > > lib/librte_vhost/vhost_rxtx.c | 287 > > +- > > 1 file changed,

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

2016-01-27 Thread Yuanhan Liu
On Wed, Jan 27, 2016 at 02:46:39AM +, Xie, Huawei wrote: > On 12/3/2015 2:03 PM, Yuanhan Liu wrote: > > + if (vq->vhost_hlen == sizeof(struct virtio_net_hdr_mrg_rxbuf)) { > > + *(struct virtio_net_hdr_mrg_rxbuf *)(uintptr_t)desc_addr = hdr; > > + } else {

[dpdk-dev] [PATCH v5 01/11] virtio: Introduce config RTE_VIRTIO_INC_VECTOR

2016-01-27 Thread Yuanhan Liu
On Wed, Jan 27, 2016 at 07:53:21AM +0530, Santosh Shukla wrote: > Ping? I was on vacation late last week. And I was quite busy till now after the vacation. So, sorry that I still don't have time to do more detailed reviews in 1 or 2 days. Hopefully I can make it by this Friday. BTW, I had a very

[dpdk-dev] [PATCH] examples/vhost: fix out of sequence packets

2016-01-20 Thread Yuanhan Liu
d-off-by: Jianfeng Tan Acked-by: Yuanhan Liu --yliu

[dpdk-dev] [PATCH v5 9/9] virtio: move VIRTIO_READ/WRITE_REG_X into virtio_pci.c

2016-01-19 Thread Yuanhan Liu
virtio_pci.c is the only file references those macros; move them there. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- drivers/net/virtio/virtio_pci.c | 19 +++ drivers/net/virtio/virtio_pci.h | 18 -- 2

[dpdk-dev] [PATCH v5 8/9] virtio: add 1.0 support

2016-01-19 Thread Yuanhan Liu
works. Besides those changes, 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 Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- v5: -

[dpdk-dev] [PATCH v5 7/9] eal: pci: export pci_[un]map_device

2016-01-19 Thread Yuanhan Liu
() will fail, which ends up with virtio pmd driver being skipped. Therefore, we can not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver. Therefore, this patch exports pci_map_device, and let virtio pmd call it when necessary. Cc: David Marchand Signed-off-by: Yuanhan Liu Tested

[dpdk-dev] [PATCH v5 6/9] virtio: retrieve hdr_size from hw->vtnet_hdr_size

2016-01-19 Thread Yuanhan Liu
ueue_burst() and virtio_recv_pkts(), leading a packet corruption. Instead, we should retrieve it from hw->vtnet_hdr_size; we will do proper settings at eth_virtio_dev_init() in later patches. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: T

[dpdk-dev] [PATCH v5 5/9] viritio: switch to 64 bit features

2016-01-19 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 Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- drivers/

[dpdk-dev] [PATCH v5 4/9] virtio: move left pci stuff to virtio_pci.c

2016-01-19 Thread Yuanhan Liu
virtio_pci.c is a more proper place for pci stuff; virtio_ethdev is not. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- drivers/net/virtio/virtio_ethdev.c | 265 +--- drivers/net/virtio/virtio_pci.c

[dpdk-dev] [PATCH v5 3/9] virtio: introduce struct virtio_pci_ops

2016-01-19 Thread Yuanhan Liu
ets hw->vtpci_ops to legacy_ops as we don't support 1.0 yet. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- v5: - define "src" arg of vtpci_write_dev_config() --- drivers/net/virtio/virtio_ethdev.c | 22 ++--- drivers/net/

[dpdk-dev] [PATCH v5 2/9] virtio: define offset as size_t type

2016-01-19 Thread Yuanhan Liu
offset arg of vtpci_read/write_dev_config is derived from offsetof(), which is of size_t type, instead of uint64_t. So, define it as size_t type. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- drivers/net/virtio/virtio_pci.c | 4

[dpdk-dev] [PATCH v5 1/9] virtio: don't set vring address again at queue startup

2016-01-19 Thread Yuanhan Liu
As we have already set up it at virtio_dev_queue_setup(), and a vq restart will not reset the settings. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa --- drivers/net/virtio/virtio_rxtx.c | 15 --- 1 file changed, 15 deletions

[dpdk-dev] [PATCH v5 0/9] virtio 1.0 enabling for virtio pmd driver

2016-01-19 Thread Yuanhan Liu
n use: virtio-pci Kernel modules: virtio_pci After that, there wasn't anything speical comparing to the old virtio 0.95 pmd driver. --- Yuanhan Liu (9): virtio: don't set vring address again at queue startup virtio: define offset as size_t type virtio: introduce struct virtio_pci_ops

[dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support

2016-01-19 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 07:44:04AM +, Xie, Huawei wrote: > On 1/19/2016 1:53 PM, Yuanhan Liu wrote: > > On Mon, Jan 18, 2016 at 04:50:16PM +, Xie, Huawei wrote: > >> On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > >>> -static void > >>> +static i

[dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support

2016-01-19 Thread Yuanhan Liu
On Mon, Jan 18, 2016 at 04:50:16PM +, Xie, Huawei wrote: > On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > > -static void > > +static int > > virtio_negotiate_features(struct virtio_hw *hw) > > { > > uint64_t host_features; > > @@ -949,6 +949,22 @@ vir

[dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support

2016-01-19 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 02:48:39AM +, Xie, Huawei wrote: > On 1/19/2016 10:44 AM, Yuanhan Liu wrote: > > On Tue, Jan 19, 2016 at 01:51:30AM +, Xie, Huawei wrote: > >> On 1/19/2016 9:34 AM, Yuanhan Liu wrote: > >>> On Mon, Jan 18, 2016 at 05:07:51PM +, Xie,

[dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support

2016-01-19 Thread Yuanhan Liu
On Tue, Jan 19, 2016 at 01:51:30AM +, Xie, Huawei wrote: > On 1/19/2016 9:34 AM, Yuanhan Liu wrote: > > On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: > >> .On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > >>> Modern (v1.0) virtio pci device de

[dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support

2016-01-19 Thread Yuanhan Liu
On Mon, Jan 18, 2016 at 05:07:51PM +, Xie, Huawei wrote: > .On 1/15/2016 12:34 PM, Yuanhan Liu wrote: > > Modern (v1.0) virtio pci device defines several pci capabilities. > > Each cap has a configure structure corresponding to it, and the > > cap.bar and cap.offset

[dpdk-dev] [PATCH v5 2/2] eal/linux: Add support for handling built-in kernel modules

2016-01-18 Thread Yuanhan Liu
uilt-in modules with parsing the sysfs files > > This commit obsoletes the /proc/modules parsing approach. > > Signed-off-by: Kamil Rytarowski > Signed-off-by: David Marchand Acked-by: Yuanhan Liu Thanks. --yliu

[dpdk-dev] [PATCH v5 1/2] tools: Add support for handling built-in kernel modules

2016-01-18 Thread Yuanhan Liu
Hi Kamil, First of all, sorry for no one has reviewed your patches for over one month! You may want to ping more often (say, per week) next time if it still happenes :) Another thing is that there is no maintainer for tools code. On Wed, Dec 09, 2015 at 02:19:57PM +0100, Kamil Rytarowski wrote:

[dpdk-dev] [PATCH 3/3] virtio: Add a new layer to abstract pci access method

2016-01-18 Thread Yuanhan Liu
On Mon, Jan 18, 2016 at 06:13:09PM +0900, Tetsuya Mukawa wrote: > +struct virtio_pci_access_ops { > + uint8_t (*legacy_read8)(struct virtio_hw *hw, uint8_t *addr); > + uint16_t (*legacy_read16)(struct virtio_hw *hw, uint16_t *addr); > + uint32_t (*legacy_read32)(struct virtio_hw *hw,

[dpdk-dev] [PATCH v2 1/1] vhost: fix leak of fds and mmaps

2016-01-18 Thread Yuanhan Liu
On Sun, Jan 17, 2016 at 11:57:18AM -0800, Rich Lane wrote: > The common vhost code only supported a single mmap per device. vhost-user > worked around this by saving the address/length/fd of each mmap after the end > of the rte_virtio_memory struct. This only works if the vhost-user code frees >

[dpdk-dev] [PATCH v4 08/14] virtio: pci: extend virtio pci rw api for vfio interface

2016-01-18 Thread Yuanhan Liu
On Mon, Jan 18, 2016 at 12:15:40PM +0530, Santosh Shukla wrote: > I am testing for virtio 1.0 and 0.95 for arm including your patch, > soon we;ll post the patch series that is rebased on / dependent on > below patchset: > - virtio 1.0 > - vfio-noiommu > - KDRV check by huawei > > IMO, we should

[dpdk-dev] [PATCH v4 08/14] virtio: pci: extend virtio pci rw api for vfio interface

2016-01-18 Thread Yuanhan Liu
On Fri, Jan 15, 2016 at 07:12:04PM +0530, Santosh Shukla wrote: > On Fri, Jan 15, 2016 at 6:13 PM, Santosh Shukla wrote: > > On Fri, Jan 15, 2016 at 11:57 AM, Yuanhan Liu > > wrote: > >> On Thu, Jan 14, 2016 at 06:58:31PM +0530, Santosh Shukla wrote: > >>> So

[dpdk-dev] [PATCH v4 01/14] virtio: Introduce config RTE_VIRTIO_INC_VECTOR

2016-01-15 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 06:58:24PM +0530, Santosh Shukla wrote: > virtio_recv_pkts_vec and other virtio vector friend apis are written for > sse/avx > instructions. For arm64 in particular, virtio vector implementation does not > exist(todo). > > So virtio pmd driver wont build for targets like

[dpdk-dev] [PATCH v4 11/14] config: armv7/v8: Enable RTE_LIBRTE_VIRTIO_PMD

2016-01-15 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 06:58:34PM +0530, Santosh Shukla wrote: > Enable RTE_LIBRTE_VIRTIO_PMD for armv7/v8 and setting RTE_VIRTIO_INC_VEC=n. > Builds successfully for armv7/v8. I guess you could squash this patch to 2nd patch. --yliu

[dpdk-dev] [PATCH v4 09/14] virtio: ethdev: check for vfio interface

2016-01-15 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 06:58:32PM +0530, Santosh Shukla wrote: > Introducing api to check interface type is vfio or not, if interface is vfio > then update struct virtio_vfio_dev {}. > > Those two apis are: > - virtio_chk_for_vfio > - virtio_hw_init_by_vfio > > Signed-off-by: Santosh Shukla ..

[dpdk-dev] [PATCH v4 08/14] virtio: pci: extend virtio pci rw api for vfio interface

2016-01-15 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 06:58:31PM +0530, Santosh Shukla wrote: > So far virtio handle rw access for uio / ioport interface, This patch to > extend > the support for vfio interface. For that introducing private struct > virtio_vfio_dev{ > - is_vfio > - pci_dev > }; >

[dpdk-dev] [PATCH v4 07/14] virtio: vfio: add api support to rd/wr ioport bar

2016-01-15 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 06:58:30PM +0530, Santosh Shukla wrote: > For vfio case - Use pread/pwrite api to access virtio > ioport space. > > Signed-off-by: Santosh Shukla > Signed-off-by: Rizwan Ansari > Signed-off-by: Rakesh Krishnamurthy > --- ... > +/* vfio rd/rw virtio apis */ > +static

[dpdk-dev] [PATCH v4 06/14] eal: pci: vfio: add rd/wr func for pci bar space

2016-01-15 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 06:58:29PM +0530, Santosh Shukla wrote: ... > +int rte_eal_pci_read_bar(const struct rte_pci_device *device, > + void *buf, size_t len, off_t offset, > + int bar_idx) > + > +{ > +#ifdef VFIO_PRESENT > + const struct

[dpdk-dev] [PATCH v4 8/8] virtio: move VIRTIO_READ/WRITE_REG_X into virtio_pci.c

2016-01-15 Thread Yuanhan Liu
virtio_pci.c is the only file references those macros; move them there. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_pci.c | 19 +++ drivers/net/virtio/virtio_pci.h | 18 -- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/net

[dpdk-dev] [PATCH v4 7/8] virtio: add 1.0 support

2016-01-15 Thread Yuanhan Liu
works. Besides those changes, 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 --- v2: - re-read status after setting FEATURES_OK to make sure status is set cor

[dpdk-dev] [PATCH v4 6/8] eal: pci: export pci_[un]map_device

2016-01-15 Thread Yuanhan Liu
() will fail, which ends up with virtio pmd driver being skipped. Therefore, we can not set RTE_PCI_DRV_NEED_MAPPING blindly at virtio pmd driver. Therefore, this patch exports pci_map_device, and let virtio pmd call it when necessary. Cc: David Marchand Signed-off-by: Yuanhan Liu Tested

[dpdk-dev] [PATCH v4 5/8] virtio: retrieve hdr_size from hw->vtnet_hdr_size

2016-01-15 Thread Yuanhan Liu
ueue_burst() and virtio_recv_pkts(), leading a packet corruption. Instead, we should retrieve it from hw->vtnet_hdr_size; we will do proper settings at eth_virtio_dev_init() in later patches. Signed-off-by: Yuanhan Liu --- v3: retrieve hdr_size from hw->vtnet_hdr_size for simple rxtx c

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

2016-01-15 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 v4 3/8] virtio: move left pci stuff to virtio_pci.c

2016-01-15 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 v4 2/8] virtio: introduce struct virtio_pci_ops

2016-01-15 Thread Yuanhan Liu
ets hw->vtpci_ops to legacy_ops as we don't support 1.0 yet. Signed-off-by: Yuanhan Liu --- v2: extra whitespace line removing, and comment on "reading status after reset". rename the badly taken op name "set_irq" to "set_config_irq". v4: define "

[dpdk-dev] [PATCH v4 1/8] virtio: don't set vring address again at queue startup

2016-01-15 Thread Yuanhan Liu
As we have already set up it at virtio_dev_queue_setup(), and a vq restart will not reset the settings. Signed-off-by: Yuanhan Liu --- drivers/net/virtio/virtio_rxtx.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio

[dpdk-dev] [PATCH v4 0/8] virtio 1.0 enabling for virtio pmd driver

2016-01-15 Thread Yuanhan Liu
ies: [40] Vendor Specific Information: Len=10 Kernel driver in use: virtio-pci Kernel modules: virtio_pci After that, there wasn't anything speical comparing to the old virtio 0.95 pmd driver. --- Yuanhan Liu (8): virtio: don't set vring address again at queue startup virtio: introduce

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Yuanhan Liu
Sigh... I have just send out v3 ... On Thu, Jan 14, 2016 at 07:50:00AM +, Xie, Huawei wrote: > On 1/12/2016 2:58 PM, Yuanhan Liu wrote: > > +static inline void > > +modern_write64_twopart(uint64_t val, uint32_t *lo, uint32_t *hi) > > +{ > > + moder

[dpdk-dev] [PATCH v2 7/7] virtio: add 1.0 support

2016-01-14 Thread Yuanhan Liu
On Thu, Jan 14, 2016 at 08:08:28AM +, Xie, Huawei wrote: > On 1/14/2016 3:58 PM, Yuanhan Liu wrote: > > On Thu, Jan 14, 2016 at 07:51:08AM +, Xie, Huawei wrote: > >> On 1/14/2016 3:49 PM, Yuanhan Liu wrote: > >>> On Thu, Jan 14, 2016 at 07:47:17AM +, Xie

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