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

2016-06-20 Thread Huawei Xie
13ce5e7eb94f ("virtio: mergeable buffers") Signed-off-by: Huawei Xie --- v2: use VIRTQUEUE_NUSED --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_ring.h| 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 3 +-- 3 files changed, 4 insertions(+), 5 deleti

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

2016-06-16 Thread Huawei Xie
13ce5e7eb94f ("virtio: mergeable buffers") Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_ring.h| 2 +- drivers/net/virtio/virtio_rxtx_simple.c | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drive

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

2016-06-15 Thread Huawei Xie
vring") Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/virtio-net-user.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost_user/virtio-net-user.c b/lib/librte_vhost/vhost_user/virtio-net-user.c index 5803182..5844a42 100644 --

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

2016-06-15 Thread Huawei Xie
m library (CHECKED_RETURN) >>> check_return: Calling fstat(fd, ) without checking return value. >>> This library function may fail and return an error code. Fixes: 8f972312b8f4 ("vhost: support vhost-user") Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_user/virt

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

2016-06-13 Thread Huawei Xie
We skip kernel managed virtio devices, if it isn't whitelisted. Before checking if the virtio device is whitelisted, check if devargs is specified. Fixes: ac5e1d838dc1 ("virtio: skip error when probing kernel managed device") Signed-off-by: Huawei Xie Reported-by: Vincent Li ---

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

2016-06-13 Thread Huawei Xie
through costly cmpset operation. This patch removes this internal lockless implementation and should improve performance a bit. Luckily DPDK OVS doesn't rely on this behavior. Signed-off-by: Huawei Xie --- doc/guides/rel_notes/release_16_07.rst | 3 + lib/librte_vhost/rte_virtio_net.h

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

2016-06-02 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 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] 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/

[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: 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: 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 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] 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] 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] [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 v2] virtio: fix rx ring descriptor starvation

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

[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] [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 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 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 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 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 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 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 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 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 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 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 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 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 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] 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 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 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 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 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] 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] 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 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 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 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 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] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

2015-12-28 Thread Huawei Xie
Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 +--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net

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

2015-12-28 Thread Huawei Xie
Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 +--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net

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

2015-12-28 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 v5 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-28 Thread Huawei Xie
Rogers Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_mbuf/rte_mbuf.h | 55 ++ 1 file changed, 55 insertions(+) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f234ac9..b2ed479 100644 --- a/lib

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

2015-12-28 Thread Huawei Xie
, it could directly call rte_mempool_put to free the bulk of mbufs, otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk API vhost: call

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

2015-12-25 Thread Huawei Xie
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 --- drivers/net/virtio/virtio_ethdev.c | 7 +++ 1 fi

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

2015-12-25 Thread Huawei Xie
Use RTE_KDRV_NONE to indicate that kernel driver isn't manipulating the device. Signed-off-by: Huawei Xie --- 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/librte_eal/linuxapp/eal/eal_pci.c

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

2015-12-25 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 0/4] check if any kernel driver is manipulating the virtio device

2015-12-25 Thread Huawei Xie
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: set kdrv to RTE_KDRV_NONE if kernel

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

2015-12-23 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 v4 1/2] mbuf: provide rte_pktmbuf_alloc_bulk API

2015-12-23 Thread Huawei Xie
implementation, we use while() loop rather than do{} while() loop because we could not assume 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 --- lib/librte_mbuf/rte_mbuf.h | 49

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

2015-12-23 Thread Huawei Xie
rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. 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 lib/librte_mbuf/rte_mbuf.h| 49

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

2015-12-23 Thread Huawei Xie
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 --- lib/librte_vhost/vhost_rxtx.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff

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

2015-12-23 Thread Huawei Xie
implementation, we use while() loop rather than do{} while() loop because we could not assume 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 --- lib/librte_mbuf/rte_mbuf.h | 49

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

2015-12-14 Thread Huawei Xie
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 --- lib/librte_vhost/vhost_rxtx.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff

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

2015-12-14 Thread Huawei Xie
v2 changes: unroll the loop a bit to help the performance rte_pktmbuf_alloc_bulk allocates a bulk of packet mbufs. There is related thread about this bulk API. http://dpdk.org/dev/patchwork/patch/4718/ Thanks to Konstantin's loop unrolling. Signed-off-by: Gerald Rogers Signed-off-by: Huawei

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

2015-12-14 Thread Huawei Xie
to the same mbuf memory pool, it could directly call rte_mempool_put to free the bulk of mbufs, otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. This patchset will not provide this symmetric implementation. Huawei Xie (2): mbuf: provide rte_pktmbuf_alloc_bulk

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

2015-12-14 Thread Huawei Xie
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 --- lib/librte_vhost/vhost_rxtx.c | 35 ++- 1 file changed, 22 insertions(+), 13 deletions(-) diff

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

2015-12-14 Thread Huawei Xie
of mbufs, otherwise rte_pktmbuf_free_bulk has to call rte_pktmbuf_free to free the mbuf one by one. 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 lib/librte_mbuf

[dpdk-dev] [PATCH v6 7/8] virtio: pick simple rx/tx func

2015-10-29 Thread Huawei Xie
Changes in v4: Check merge-able feature when select simple rx/tx functions. simple rx/tx func is chose when merge-able rx is disabled and user specifies single segment and no offload support. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 +++ 1 file changed

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

2015-10-29 Thread Huawei Xie
clean used ring. shift operation of idx could be saved if vq_free_cnt means free slots rather than free descriptors. TODO: rearrange vq data structure, pack the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio

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

2015-10-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 v6 4/8] virtio: fill RX avail ring with blank mbufs

2015-10-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| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

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

2015-10-29 Thread Huawei Xie
| ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24

[dpdk-dev] [PATCH v6 2/8] virtio: add software rx ring, fake_buf into virtqueue

2015-10-29 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use global simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v6 1/8] virtio: add virtio_rxtx.h header file

2015-10-29 Thread Huawei Xie
Would move all rx/tx related declarations into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34

[dpdk-dev] [PATCH v6 0/8] virtio ring layout optimization and simple rx/tx processing

2015-10-29 Thread Huawei Xie
+-+-+-+--+--+--+--+ || || ++ Performance boost could be observed only if the virtio backend isn't the bottleneck or in VM2VM case. There are also several vhost optimization patches to be submitted later. Huawei Xie (8): virtio

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

2015-10-26 Thread Huawei Xie
clean used ring. shift operation of idx could be saved if vq_free_cnt means free slots rather than free descriptors. TODO: rearrange vq data structure, pack the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio

[dpdk-dev] [PATCH v5 5/7] virtio: virtio vec rx

2015-10-26 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 v5 4/7] virtio: fill RX avail ring with blank mbufs

2015-10-26 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| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH v5 3/7] virtio: rx/tx ring layout optimization

2015-10-26 Thread Huawei Xie
| ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24

[dpdk-dev] [PATCH v5 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-26 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use global simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v5 1/7] virtio: add virtio_rxtx.h header file

2015-10-26 Thread Huawei Xie
Would move all rx/tx related declarations into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34

[dpdk-dev] [PATCH v5 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-26 Thread Huawei Xie
could be observed only if the virtio backend isn't the bottleneck or in VM2VM case. There are also several vhost optimization patches to be submitted later. Huawei Xie (7): virtio: add virtio_rxtx.h header file virtio: add software rx ring, fake_buf into virtqueue virtio: rx/tx ring layout

[dpdk-dev] [PATCH v4 7/7] virtio: pick simple rx/tx func

2015-10-22 Thread Huawei Xie
Changes in v4: Check merge-able feature when select simple rx/tx functions. simple rx/tx func is chose when merge-able rx is disabled and user specifies single segment and no offload support. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 15 +++ 1 file changed

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

2015-10-22 Thread Huawei Xie
slots rather than free descriptors. TODO: rearrange vq data structure, pack the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 93

[dpdk-dev] [PATCH v4 5/7] virtio: virtio vec rx

2015-10-22 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 v4 4/7] virtio: fill RX avail ring with blank mbufs

2015-10-22 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| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH v4 3/7] virtio: rx/tx ring layout optimization

2015-10-22 Thread Huawei Xie
| ... | 127 || 0 | 1 | ... | 127 | desc ring for tx dat +-+-+-+--+--+--+--+ || || ++ Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 24

[dpdk-dev] [PATCH v4 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-22 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use global simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v4 1/7] virtio: add virtio_rxtx.h header file

2015-10-22 Thread Huawei Xie
Would move all rx/tx related declarations into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34

[dpdk-dev] [PATCH v4 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-22 Thread Huawei Xie
case. There are also several vhost optimization patches to be submitted later. Huawei Xie (7): virtio: add virtio_rxtx.h header file virtio: add software rx ring, fake_buf into virtqueue virtio: rx/tx ring layout optimization virtio: fill RX avail ring with blank mbufs virtio: virtio vec rx

[dpdk-dev] [PATCH v3 7/7] virtio: pick simple rx/tx func

2015-10-21 Thread Huawei Xie
simple rx/tx func is enabled when user specifies single segment and no offload support. merge-able should be disabled to use simple rxtx. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/virtio

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

2015-10-21 Thread Huawei Xie
the stats var together so that we could use one vec instruction to update all of them. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.h | 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 93 + 2 files changed, 96 insertions(+) diff --git

[dpdk-dev] [PATCH v3 5/7] virtio: virtio vec rx

2015-10-21 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 v3 4/7] virtio: fill RX avail ring with blank mbufs

2015-10-21 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| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH v3 3/7] virtio: rx/tx ring layout optimization

2015-10-21 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

[dpdk-dev] [PATCH v3 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-21 Thread Huawei Xie
Changes in v3: - Remove unnecessary NULL test for rte_free - Remove unnecessary assign of local var vq after free Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use global simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v3 1/7] virtio: add virtio_rxtx.h header file

2015-10-21 Thread Huawei Xie
Would move all rx/tx related declarations into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34

[dpdk-dev] [PATCH v3 0/7] virtio ring layout optimization and simple rx/tx processing

2015-10-21 Thread Huawei Xie
boost could be observed only if the virtio backend isn't the bottleneck or in VM2VM case. There are also several vhost optimization patches to be submitted later. Huawei Xie (7): virtio: add virtio_rxtx.h header file virtio: add software rx ring, fake_buf into virtqueue virtio: rx/tx ring

[dpdk-dev] [PATCH v2 7/7] virtio: pick simple rx/tx func

2015-10-18 Thread Huawei Xie
simple rx/tx func is enabled when user specifies single segment, no offload support. merge-able should be disabled to use simple rxtx. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/net/virtio

[dpdk-dev] [PATCH v2 5/7] virtio: virtio vec rx

2015-10-18 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 v2 4/7] virtio: fill RX avail ring with blank mbufs

2015-10-18 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| 6 ++- drivers/net/virtio/virtio_rxtx.h| 3 ++ drivers/net/virtio/virtio_rxtx_simple.c | 84

[dpdk-dev] [PATCH v2 3/7] virtio: rx/tx ring layout optimization

2015-10-18 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 5c00e9d..7c82a6a 100644

[dpdk-dev] [PATCH v2 2/7] virtio: add software rx ring, fake_buf into virtqueue

2015-10-18 Thread Huawei Xie
Add software RX ring in virtqueue. Add fake_mbuf in virtqueue for wraparound processing. Use global simple_rxtx to indicate whether simple rxtx is enabled Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 12 drivers/net/virtio/virtio_rxtx.c | 7 +++ drivers

[dpdk-dev] [PATCH v2 1/7] virtio: add virtio_rxtx.h header file

2015-10-18 Thread Huawei Xie
Would move all rx/tx related code into this header file in future. Add RTE_VIRTIO_PMD_MAX_BURST. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_ethdev.c | 1 + drivers/net/virtio/virtio_rxtx.c | 1 + drivers/net/virtio/virtio_rxtx.h | 34 ++ 3

  1   2   3   >