[dpdk-dev] [PATCH v2 5/5] lib_vhost: Add support copying scattered mbuf to vring

2015-05-29 Thread Ouyang Changchun
Add support copying scattered mbuf to vring which is done by dev_scatter_rx, and check the 'next' pointer in mbuf on the fly to select suitable function to rx packets. Signed-off-by: Changchun Ouyang --- lib/librte_vhost/vhost_rxtx.c | 116 +- 1 file

[dpdk-dev] [PATCH v2 4/5] lib_vhost: Remove unnecessary vring descriptor length updating

2015-05-29 Thread Ouyang Changchun
Remove these unnecessary vring descriptor length updating, vhost should not change them. virtio in front end should assign value to desc.len for both rx and tx. Signed-off-by: Changchun Ouyang --- lib/librte_vhost/vhost_rxtx.c | 18 +- 1 file changed, 1 insertion(+), 17

[dpdk-dev] [PATCH v2 3/5] lib_vhost: Extract function

2015-05-29 Thread Ouyang Changchun
Extract codes into 2 common functions: update_secure_len which is used to accumulate the buffer len in the vring descriptors. and fill_buf_vec which is used to fill struct buf_vec. Signed-off-by: Changchun Ouyang --- lib/librte_vhost/vhost_rxtx.c | 79

[dpdk-dev] [PATCH v2 2/5] lib_vhost: Refine code style

2015-05-29 Thread Ouyang Changchun
Remove unnecessary new line. Signed-off-by: Changchun Ouyang --- lib/librte_vhost/vhost_rxtx.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c index 06ae2df..a15578b 100644 ---

[dpdk-dev] [PATCH v2 1/5] lib_vhost: Fix enqueue/dequeue can't handle chained vring descriptors

2015-05-29 Thread Ouyang Changchun
Vring enqueue need consider the 2 cases: 1. Vring descriptors chained together, the first one is for virtio header, the rest are for real data, virtio driver in Linux usually use this scheme; 2. Only one descriptor, virtio header and real data share one single descriptor, virtio-net pmd

[dpdk-dev] [PATCH v2 0/5] Fix vhost enqueue/dequeue issue

2015-05-29 Thread Ouyang Changchun
Fix enqueue/dequeue can't handle chained vring descriptors; Remove unnecessary vring descriptor length updating; Add support copying scattered mbuf to vring; Changchun Ouyang (5): lib_vhost: Fix enqueue/dequeue can't handle chained vring descriptors lib_vhost: Refine code style lib_vhost:

<    1   2