[dpdk-dev] [PATCH 4/8] virtio: rx/tx ring layout optimization

2015-09-29 Thread Huawei Xie
+-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index dcc4524..b4d268d 100644

[dpdk-dev] [PATCH 6/8] virtio: virtio vec rx

2015-09-29 Thread Huawei Xie
With fixed avail ring, we don't need to get desc idx from avail ring. virtio driver only has to deal with desc ring. This patch uses vector instruction to accelerate processing desc ring. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 2 + drivers/net/virtio

[dpdk-dev] [PATCH 7/8] virtio: simple tx routine

2015-09-29 Thread Huawei Xie
bulk free of mbufs when clean used ring. shift operation of idx could be further saved if vq_free_cnt means free slots rather than free descriptors. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx.c| 9 drivers/net

[dpdk-dev] [PATCH 5/8] virtio: fill RX avail ring with blank mbufs

2015-09-29 Thread Huawei Xie
fill avail ring with blank mbufs in virtio_dev_vring_start Signed-off-by: Huawei Xie --- drivers/net/virtio/Makefile | 2 +- drivers/net/virtio/virtio_rxtx.c| 14 +- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH 8/8] virtio: rxtx_func_get

2015-09-29 Thread Huawei Xie
Select simplified rx/tx when mergable isn't enabled and there is no offload flags specified. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net

[dpdk-dev] [PATCH] vhost: enable live migration

2015-05-27 Thread Huawei Xie
When we migrate VM, without this feature, qemu will report error: "migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature". Signed-off-by: Krishna Murthy --- lib/librte_vhost/virtio-net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[dpdk-dev] [PATCH RFC 0/2] vhost: numa aware allocation of virtio_net device and vhost virt queue

2015-05-28 Thread Huawei Xie
of vring descriptors, so we will try to reallocate virtio_net and vhost virt queue to the same numa node. Huawei Xie (2): use rte_malloc/free for virtio_net and virt_queue memory data allocation/free When we get the address of vring descriptor table, will try to reallocate virtio_net device

[dpdk-dev] [PATCH RFC 1/2] vhost: malloc -> rte_malloc for virtio_net and virt queue allocation

2015-05-28 Thread Huawei Xie
use rte_malloc/free for virtio_net and virt queue allocation/free Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 4672e67

[dpdk-dev] [PATCH RFC 2/2] vhost: realloc virtio_net and virtqueue to the same node of vring desc table

2015-05-28 Thread Huawei Xie
When we get the address of vring descriptor table in VHOST_SET_VRING_ADDR message, will try to reallocate virtio_net device and virtqueue to the same numa node. Signed-off-by: Huawei Xie --- config/common_linuxapp| 1 + lib/librte_vhost/Makefile | 4 ++ lib/librte_vhost/virtio

[dpdk-dev] [PATCH v4 1/4] eal: make the comment more accurate

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

[dpdk-dev] [PATCH v4 2/4] eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't managing the device

2016-02-26 Thread Huawei Xie
v4 changes: reword the commit message. When we mention kernel driver, emphasizes that it includes UIO/VFIO. Use RTE_KDRV_NONE to indicate that kernel driver(including UIO/VFIO) isn't manipulating the device. Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- lib/librte_eal/linuxapp/eal

[dpdk-dev] [PATCH v7] mbuf: provide rte_pktmbuf_alloc_bulk API

2016-02-28 Thread Huawei Xie
In this implementation, while() loop is used because we could not assume count is strictly positive. Using while() loop saves one line of check. Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev Acked-by: Olivier Matz --- doc/guides/rel_notes/release_16_04.rst

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

2016-01-04 Thread Huawei Xie
io PMD uses port IO to configure the device. Huawei Xie (4): eal: make the comment more accurate eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device. virtio: return 1 to tell the kernel we don't take over this device virtio: check if any kernel driver is manipu

[dpdk-dev] [PATCH v2 1/4] eal: make the comment more accurate

2016-01-04 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_eal/common/eal_common_pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index dcfe947..bbcdb2b 100644 --- a/lib/librte_eal/common

[dpdk-dev] [PATCH v2 2/4] eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device.

2016-01-04 Thread Huawei Xie
Use RTE_KDRV_NONE to indicate that kernel driver isn't manipulating the device. Signed-off-by: Huawei Xie Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib

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

2016-01-04 Thread Huawei Xie
conflict between virtio PMD and virtio-net kernel driver. This patch checks if there is any kernel driver manipulating the virtio device before virtio PMD uses IO port to configure the device. Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource") Signed-off-by: Huawei Xie --- d

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

2016-01-04 Thread Huawei Xie
v2 changes: Remove unnecessary assignment of NULL to dev->data->mac_addrs Ajust one comment's position 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: Huaw

[dpdk-dev] [PATCH] fix checkpatch errors

2016-01-04 Thread Huawei Xie
Signed-off-by: Huawei Xie --- app/test-pmd/cmdline.c | 12 ++-- app/test-pmd/config.c | 2 +- app/test-pmd/flowgen.c | 2 +- app/test-pmd/mempool_anon.c| 12 ++-- app/test-pmd/testpmd.h

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

2016-01-04 Thread Huawei Xie
of a port. The atomic cmpset is a costly operation. This patch should help performance a bit. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 86 +-- 1 file changed, 25 insertions(+), 61 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib

[dpdk-dev] [PATCH v6 0/2] provide rte_pktmbuf_alloc_bulk API and call it in vhost dequeue

2016-01-27 Thread Huawei Xie
. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk API vhost: call rte_pktmbuf_alloc_bulk in vhost dequeue doc/guides/rel_notes/release_2_3.rst | 3 ++ lib/librte_mbuf/rte_mbuf.h | 55

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

2016-01-27 Thread Huawei Xie
count is strictly positive. Using while() loop saves one line of check if count is zero. Signed-off-by: Gerald Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- doc/guides/rel_notes/release_2_3.rst | 3 ++ lib/librte_mbuf/rte_mbuf.h | 55

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

2016-01-27 Thread Huawei Xie
v4 changes: fix a silly typo in error handling when rte_pktmbuf_alloc fails reported by haifeng 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

[dpdk-dev] [PATCH v2] fix checkpatch errors

2016-01-27 Thread Huawei Xie
v2 changes: add missed commit message in v1 fix the error reported by checkpatch: "ERROR: return is not a function, parentheses are not required" also removed other extra parentheses like: "return val == 0" "return (rte_mempool_lookup(...))" Signed-off-by:

[dpdk-dev] [PATCH v3] remove extra parentheses in return statement

2016-01-27 Thread Huawei Xie
enthesis after return") Signed-off-by: Huawei Xie --- app/test-pmd/cmdline.c | 12 ++-- app/test-pmd/config.c | 2 +- app/test-pmd/flowgen.c | 2 +- app/test-pmd/mempool_anon.c

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

2016-01-27 Thread Huawei Xie
roblem is kernel driver is still manipulating the device, which causes driver conflict. This patch checks if there is any kernel driver manipulating the virtio device before virtio PMD uses port IO to configure the device. Huawei Xie (4): eal: make the comment more accurate eal: se

[dpdk-dev] [PATCH v3 1/4] eal: make the comment more accurate

2016-01-27 Thread Huawei Xie
positive return of rte_eal_pci_probe_one_driver means the driver doesn't support the device. Signed-off-by: Huawei Xie --- lib/librte_eal/common/eal_common_pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal

[dpdk-dev] [PATCH v3 2/4] eal: set kdrv to RTE_KDRV_NONE if kernel driver isn't manipulating the device.

2016-01-27 Thread Huawei Xie
Use RTE_KDRV_NONE to indicate that kernel driver isn't manipulating the device. Signed-off-by: Huawei Xie Acked-by: David Marchand --- lib/librte_eal/linuxapp/eal/eal_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib

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

2016-01-27 Thread Huawei Xie
v2 changes: Remove unnecessary assignment of NULL to dev->data->mac_addrs Ajust one comment's position if virtio_resource_init fails, cleanup the resource and return 1 to tell the upper layer we don't take over this device. -1 means error which will cause DPDK to exit. Signed-off-by:

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

2016-01-27 Thread Huawei Xie
if there is any kernel driver manipulating the virtio device before virtio PMD uses IO port to configure the device. Fixes: da978dfdc43b ("virtio: use port IO to get PCI resource") Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 5 + 1 file changed, 5 insertions(+) diff --git

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dpdk-dev] [PATCH] lib/librte_vhost: code style fixes

2014-11-05 Thread Huawei Xie
This patch fixes code style issues and refines some comments in vhost library. --- lib/librte_vhost/eventfd_link/eventfd_link.c | 244 ++--- lib/librte_vhost/eventfd_link/eventfd_link.h | 127 ++- lib/librte_vhost/rte_virtio_net.h| 3 +-

[dpdk-dev] [PATCH] lib/librte_vhost: code style fixes

2014-11-05 Thread Huawei Xie
This patch fixes code style issues and refines some comments in vhost library. --- lib/librte_vhost/eventfd_link/eventfd_link.c | 244 ++--- lib/librte_vhost/eventfd_link/eventfd_link.h | 127 ++- lib/librte_vhost/rte_virtio_net.h| 3 +-

[dpdk-dev] [PATCH] lib/librte_vhost: code style fixes

2014-11-06 Thread Huawei Xie
This patch fixes code style issues and refines some comments in vhost library. Signed-off-by: Huawei Xie --- lib/librte_vhost/eventfd_link/eventfd_link.c | 244 ++--- lib/librte_vhost/eventfd_link/eventfd_link.h | 127 ++- lib/librte_vhost/rte_virtio_net.h

[dpdk-dev] [PATCH 1/2] lib/librte_vhost: code style fixes

2014-11-06 Thread Huawei Xie
fixes alignment issues, lengthy lines, misordered type and other coding style issues. Signed-off-by: Huawei Xie --- lib/librte_vhost/eventfd_link/eventfd_link.c | 244 ++--- lib/librte_vhost/eventfd_link/eventfd_link.h | 127 ++- lib/librte_vhost/rte_virtio_net.h

[dpdk-dev] [PATCH 2/2] lib/librte_vhost: printk->pr_debug

2014-11-06 Thread Huawei Xie
printk -> pr_debug Signed-off-by: Huawei Xie --- lib/librte_vhost/eventfd_link/eventfd_link.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_vhost/eventfd_link/eventfd_link.c b/lib/librte_vhost/eventfd_link/eventfd_link.c index 542ec2c..7755dd6 100

[dpdk-dev] [PATCH 0/2] lib/librte_vhost: coding style fixes

2014-11-06 Thread Huawei Xie
This patchset fixes serious coding style issues in vhost library. Huawei Xie (2): fix alignment, lengthy lines, misordered type and other style issues printk -> pr_debug lib/librte_vhost/eventfd_link/eventfd_link.c | 244 ++--- lib/librte_vhost/eventfd_link/eventfd_lin

[dpdk-dev] [PATCH v2 0/2] examples/vmdq: support new VMDQ API

2014-11-10 Thread Huawei Xie
This patch supports new VMDQ API in vmdq example. v2 changes: * code rebase * allow app to specify num_pools different with max_nb_pools * fix serious cs issues Huawei Xie (2): support new VMDQ API in vmdq example fix cs issues in vmdq example examples/vmdq/main.c | 233

[dpdk-dev] [PATCH v2 1/2] examples/vmdq: support new VMDQ API

2014-11-10 Thread Huawei Xie
for each pool explicitly. Signed-off-by: Huawei Xie --- examples/vmdq/main.c | 169 +++ 1 file changed, 103 insertions(+), 66 deletions(-) diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index c51e2fb..5a2305f 100644 --- a/examples/vmdq

[dpdk-dev] [PATCH v2 2/2] examples/vmdq: fix cs issues in vmdq example

2014-11-10 Thread Huawei Xie
Signed-off-by: Huawei Xie --- examples/vmdq/main.c | 64 +--- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c index 5a2305f..e60b671 100644 --- a/examples/vmdq/main.c +++ b/examples/vmdq

[dpdk-dev] [PATCH v2 1/2] lib/librte_pmd_i40e: set vlan filter fix

2014-11-10 Thread Huawei Xie
">> 5" rather than ">> 4" Signed-off-by: Huawei Xie --- lib/librte_pmd_i40e/i40e_ethdev.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 5074262..c0cf3cf

[dpdk-dev] [PATCH v2 2/2] lib/librte_pmd_i40e: add I40E_VFTA_IDX and I40E_VFTA_BIT macros for VFTA related operation

2014-11-10 Thread Huawei Xie
Add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for VFTA manipulation. Add vlan_id check in vlan filter search and set function. Signed-off-by: Huawei Xie --- lib/librte_pmd_i40e/i40e_ethdev.c | 17 ++--- lib/librte_pmd_i40e/i40e_ethdev.h | 9 + 2 files changed, 19

[dpdk-dev] [PATCH v2 0/2] lib/librte_pmd_i40e: set vlan filter fix

2014-11-10 Thread Huawei Xie
This patchset fixes "set vlan filter" issue. v2 changes: * add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for VFTA array operation. Huawei Xie (2): vlan id set fix add I40E_VFTA_IDX and I40E_VFTA_BIT macros for VFTA related operation lib/librte_pmd_i40e/i40e_eth

[dpdk-dev] [PATCH 0/2] examples/vhost: support new VMDQ api and new nic i40e in vhost example

2014-11-13 Thread Huawei Xie
to properly set up VMDQ, i.e, add mac/vlan filter. This patchset enables the vhost example to use this information to set up VMDQ. Huawei Xie (2): support new VMDQ API and new nic i40e use factorized default Rx/Tx configuration examples/vhost/main.c | 103

[dpdk-dev] [PATCH 2/2] examples/vhost: use factorized default Rx/Tx configuration

2014-11-13 Thread Huawei Xie
move zero copy's deferred start set up ahead. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 78 +++ 1 file changed, 22 insertions(+), 56 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 2b1bf02..fa36

[dpdk-dev] [PATCH 1/2] examples/vhost: support new VMDQ API and new nic i40e

2014-11-13 Thread Huawei Xie
API in vhost example. FIXME in PMD: * added mac address will be flushed at rte_eth_dev_start. * we don't support selectively setting up queues well. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git

[dpdk-dev] [PATCH RFC] lib/librte_vhost: vhost-user

2014-11-15 Thread Huawei Xie
. Signed-off-by: Huawei Xie --- lib/librte_vhost/Makefile | 14 +- lib/librte_vhost/eventfd_link/eventfd_link.c | 27 +- lib/librte_vhost/eventfd_link/eventfd_link.h | 48 +- lib/librte_vhost/libvirt/qemu-wrap.py | 367 --- lib/librte_vhost/rte_virtio_net.h

[dpdk-dev] [PATCH v3 0/2] lib/librte_pmd_i40e: set vlan filter fix

2014-11-25 Thread Huawei Xie
This patchset fixes "set vlan filter" issue. v2 changes: * add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for VFTA array operation. v3 changes: * code style fix * rebase on latest commit Huawei Xie (2): vlan id set fix add I40E_VFTA_IDX and I40E_VFTA_BIT macros for VFTA related

[dpdk-dev] [PATCH v3 1/2] lib/librte_pmd_i40e: set vlan id filter fix

2014-11-25 Thread Huawei Xie
">> 5" rather than ">> 4" Signed-off-by: Huawei Xie --- lib/librte_pmd_i40e/i40e_ethdev.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index dacf2db..518597f

[dpdk-dev] [PATCH v3 2/2] lib/librte_pmd_i40e: add I40E_VFTA_IDX and I40E_VFTA__BIT macros for VFTA related operation

2014-11-25 Thread Huawei Xie
Add two macros I40E_VFTA_IDX and I40E_VFTA_BIT for vlan filter search and set. Add vlan_id check in vlan filter search and set function. Signed-off-by: Huawei Xie --- lib/librte_pmd_i40e/i40e_ethdev.c | 17 ++--- lib/librte_pmd_i40e/i40e_ethdev.h | 9 + 2 files changed, 19

[dpdk-dev] [PATCH v6 00/25] user space vhost library

2014-10-09 Thread Huawei Xie
) split the patch per thomas' requirement v5) fine granularity split of the patch regenerate patches based on latest commit this patchset removes vhost example patches, which will be submitted later. Huawei Xie (25): move src files from examples/vhost to lib/librte_vhost rename main.c

[dpdk-dev] [PATCH v6 03/25] lib/librte_vhost: clean unused codes in vhost_rxtx.c

2014-10-09 Thread Huawei Xie
between mbuf and vring descriptors. This lib will create the tx functions based on virtio_dev_merge_tx. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 3050 + 1 file changed, 45 insertions(+), 3005 deletions(-) diff --git a/lib/librte_vhost

[dpdk-dev] [PATCH v6 04/25] lib/librte_vhost: remove mac learning, VMDQ, mac/vlan and other switching related logic

2014-10-09 Thread Huawei Xie
filter. 3. num_devices is used to specify the maximum vhost devices the nic supports. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 6 -- lib/librte_vhost/vhost_rxtx.c | 18 -- lib/librte_vhost/virtio-net.c | 15 --- 3 files changed

[dpdk-dev] [PATCH v6 05/25] lib/librte_vhost: remove zero copy memory region generation logic

2014-10-09 Thread Huawei Xie
Currently zero copy feature isn't generic as it couples closely with nic. It isn't put in the vhost lib in this version. gpa(guest physical address) to hpa(host physical address) mapping region logic is removed. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 19 lib

[dpdk-dev] [PATCH v6 06/25] lib/librte_vhost: remove retry logic

2014-10-09 Thread Huawei Xie
retry is used to wait some time and retry when there are not enough descriptors. App could implement this policy easily if it needs. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 34 -- 1 file changed, 34 deletions(-) diff --git a/lib

[dpdk-dev] [PATCH v6 08/25] lib/librte_vhost: calculate mbuf size

2014-10-09 Thread Huawei Xie
As a lib, we have no idea the app defined mbuf size. This patch will calculate mbuf size dynamically. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib

[dpdk-dev] [PATCH v6 10/25] lib/librte_vhost: define PACKET_BURST

2014-10-09 Thread Huawei Xie
define PACKET_BURST Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index ab76512..0690e23 100644 --- a/lib/librte_vhost/vhost_rxtx.c +++ b/lib/librte_vhost

[dpdk-dev] [PATCH v6 07/25] lib/librte_vhost: patch virtio_dev_merge_tx to return packets to upper layer

2014-10-09 Thread Huawei Xie
This patch makes virtio_dev_merge_tx return the received packets to app layer. Previously virtio_tx_route is called to route these packets and then free them. Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_rxtx.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff

[dpdk-dev] [PATCH v6 12/25] lib/librte_vhost: move virtio_net_config_ll structure to virtio_net.c

2014-10-09 Thread Huawei Xie
This structure is moved to virtio_net.c. It is related to internal virtio device management, so it should not be exposed to other files. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 9 - lib/librte_vhost/virtio-net.c | 8 2 files changed, 8 insertions

[dpdk-dev] [PATCH v6 13/25] lib/librte_vhost: remove index parameter

2014-10-09 Thread Huawei Xie
Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index 8cf806a..957f0c8 100644 --- a/lib/librte_vhost/vhost-net-cdev.c +++ b

[dpdk-dev] [PATCH v6 14/25] lib/librte_vhost: call get_virtio_net_callbacks to get internal ops in register_cuse_device

2014-10-09 Thread Huawei Xie
vhost_net_device_ops is internal implementation in vhost lib. register_cuse_device will be vhost driver register API. There is no need for it to know the internal vhost ops. Instead, that ops is retrieved in register_cuse_device through get_virtio_net_callbacks. Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v6 15/25] lib/librte_vhost: rte_vhost_driver_register and rte_vhost_session_start API

2014-10-09 Thread Huawei Xie
rename register_cuse_device as rte_vhost_driver_register API. rename start_session_loop as rte_vhost_driver_session_start API. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 5 + lib/librte_vhost/vhost-net-cdev.c | 4 ++-- lib/librte_vhost/vhost-net-cdev.h | 2 -- 3 files

[dpdk-dev] [PATCH v6 02/25] lib/librte_vhost: rename main.c to vhost_rxtx.c and virtio-net.h to rte_virtio_net.h

2014-10-09 Thread Huawei Xie
vhost_rxtx.c will provide vhost vring enqueue/dequeue API. rte_virtio_net.h is used as the API header file. Signed-off-by: Huawei Xie --- lib/librte_vhost/main.c | 3727 - lib/librte_vhost/rte_virtio_net.h | 161 ++ lib/librte_vhost/vhost_rxtx.c

[dpdk-dev] [PATCH v6 19/25] lib/librte_vhost: VHOST SUPPORTED FEATURES

2014-10-09 Thread Huawei Xie
VHOST_SUPPORTED_FEATURES is the feature mask that vhost lib supports. VHOST_FEATURES is the feature mask vhost currently supports after some features are turned on/off. Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[dpdk-dev] [PATCH v6 16/25] lib/librte_vhost: rename init_virtio_net to rte_vhost_callback_register

2014-10-09 Thread Huawei Xie
rename init_virtio_net as rte_vhost_callback_register API. rte_vhost_callback_register register the callbacks called when a vhost device is created and ready to be added to data processing core or is de-actived by guest. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 4

[dpdk-dev] [PATCH v6 21/25] lib/librte_vhost: static variable fixes

2014-10-09 Thread Huawei Xie
add "static" for some variable definitions Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_vhost/vhost-net-cdev.c b/lib/librte_vhost/vhost-net-cdev.c index 4dbd295..ce9f4ae 100644

[dpdk-dev] [PATCH v6 22/25] lib/librte_vhost: add priv context field to virtio_net structure

2014-10-09 Thread Huawei Xie
priv field could be used to store application specific context. Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_vhost/rte_virtio_net.h b/lib/librte_vhost/rte_virtio_net.h index 13d75fe..adf35e4 100644 --- a/lib

[dpdk-dev] [PATCH v6 23/25] lib/librte_vhost: coding style fixes

2014-10-09 Thread Huawei Xie
fixed serious coding style issues reported by checkpatch Signed-off-by: Huawei Xie --- lib/librte_vhost/rte_virtio_net.h | 85 +++-- lib/librte_vhost/vhost-net-cdev.c | 252 +++--- lib/librte_vhost/vhost-net-cdev.h | 33 +++-- lib/librte_vhost

[dpdk-dev] [PATCH v6 01/25] lib/librte_vhost: move src files from examples/vhost to lib/librte_vhost

2014-10-09 Thread Huawei Xie
Those files will be refactored in subsequent patches to form user space vhost library. Makefile and main.h are removed. Signed-off-by: Huawei Xie --- examples/vhost/Makefile | 60 - examples/vhost/eventfd_link/Makefile | 39 - examples/vhost/eventfd_link

[dpdk-dev] [PATCH 00/14] new vhost example

2014-10-20 Thread Huawei Xie
New vhost example is a transform of old vhost example. It calls vhost library API to receive/transmit packets from guest VM. zero copy logic is kept in vhost example. Huawei Xie (14): copy old vhost example files main.c/main.h as the base of new vhost example remove virtio_dev_(merge_)rx

[dpdk-dev] [PATCH 01/14] copy old vhost example

2014-10-20 Thread Huawei Xie
This patch copies two files main.c/main.h from most recent vhost example as the base for new vhost example. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 3727 + examples/vhost/main.h | 86 ++ 2 files changed, 3813 insertions(+) create

[dpdk-dev] [PATCH 02/14] remove virtio_dev_rx, virtio_dev_merge_rx, copy_from_mbuf_to_ring, virtio_dev_tx, virtio_dev_merge_tx

2014-10-20 Thread Huawei Xie
Those functions are integrated into the user space vhost library. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 806 -- 1 file changed, 806 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index c23d453..11d5d17

[dpdk-dev] [PATCH 03/14] add bak two hpa region functions

2014-10-20 Thread Huawei Xie
check_hpa_regions, fill_hpa_memory_regions and hpa memory region data structure are added back. zero copy logic will be implemented in vhost example. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 147 ++ examples/vhost/main.h | 15

[dpdk-dev] [PATCH 04/14] dev->vdev

2014-10-20 Thread Huawei Xie
define vhost_dev data structure. change reference to virtio_dev to vhost_dev. vhost example use vdev data structure for switching related logic and container for virtio_dev. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 269 -- examples

[dpdk-dev] [PATCH 05/14] hpa region

2014-10-20 Thread Huawei Xie
add hpa(host physical address) region generation/destroy logic. gpa<->hpa memory translation regions are generated at new_device, when a virtio device is ready for packet processing. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 44 +++-

[dpdk-dev] [PATCH 06/14] enqueue_burst, dequeue_burst, mac learning

2014-10-20 Thread Huawei Xie
guest VM, then virtio device will be bound to a queue in VMDQ for the first transmitted packet. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 53 +-- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/examples/vhost/main.c b

[dpdk-dev] [PATCH 07/14] patch virtio_tx_route

2014-10-20 Thread Huawei Xie
in new vhost example, the packet passed to virtio_tx_route has been allocated mbuf, so there is no need to allocate mbuf for it. use vlan offload to transmit vlan tagged packet. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 65 --- 1 file

[dpdk-dev] [PATCH 08/14] remove gpa_to_vva, base_index

2014-10-20 Thread Huawei Xie
remove gpa_to_vva macro and base_index parameter. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 42 +- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index bbfdef6..aaac88b 100644

[dpdk-dev] [PATCH 09/14] other APIs

2014-10-20 Thread Huawei Xie
rte_vhost_enable_guest_notification: disable guest notification Signed-off-by: Huawei Xie --- examples/vhost/main.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index aaac88b..e0bd452 100644

[dpdk-dev] [PATCH 10/14] vmdq_rx_q

2014-10-20 Thread Huawei Xie
vmdq_rx_q minior change Signed-off-by: Huawei Xie --- examples/vhost/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index e0bd452..15cb493 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1722,13

[dpdk-dev] [PATCH 11/14] minor fixes

2014-10-20 Thread Huawei Xie
minimal adjustment Signed-off-by: Huawei Xie --- examples/vhost/main.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 15cb493..b2b92e9 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -49,10

[dpdk-dev] [PATCH 12/14] add branch hint

2014-10-20 Thread Huawei Xie
add branch hint Signed-off-by: Huawei Xie --- examples/vhost/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index b2b92e9..fb22df4 100644 --- a/examples/vhost/main.c +++ b/examples/vhost/main.c @@ -1012,7 +1012,7

[dpdk-dev] [PATCH 13/14] INC_VEC

2014-10-20 Thread Huawei Xie
mergeable feature doesn't work with latest mbuf change. find that we could disable IXGBE_INC_VECTOR as a workaround. root cause is WIP. Signed-off-by: Huawei Xie --- examples/vhost/main.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/examples/vhost/main.c b/examples/vhost/main.c

[dpdk-dev] [PATCH 14/14] Makefile

2014-10-20 Thread Huawei Xie
new vhost example is ready. Add example makefile Signed-off-by: Huawei Xie --- examples/vhost/Makefile | 60 + 1 file changed, 60 insertions(+) create mode 100644 examples/vhost/Makefile diff --git a/examples/vhost/Makefile b/examples/vhost

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

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

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

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

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

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

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

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

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

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

<    1   2   3