[dpdk-dev] [PATCH v4 0/9] support in-order feature

2018-06-30 Thread Marvin Liu
In latest virtio-spec, new feature bit VIRTIO_F_IN_ORDER was introduced. When this feature has been negotiated, virtio driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Vhost devices will always use descriptors in the same o

[dpdk-dev] [PATCH v4 2/9] net/virtio: add in-order feature bit definition

2018-06-30 Thread Marvin Liu
If VIRTIO_F_IN_ORDER has been negotiated, driver will use descriptors in ring order: starting from offset 0 in the table, and wrapping around at the end of the table. Also introduce use_inorder_[rt]x flag for selection of IN_ORDER [RT]x handlers. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coqu

[dpdk-dev] [PATCH v4 3/9] net/virtio-user: add unsupported features mask

2018-06-30 Thread Marvin Liu
This patch introduces unsupported features mask for virtio-user device. For virtio-user server mode, when reconnecting virtio-user will retrieve vhost device features as base and then unmask unsupported features. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/vi

[dpdk-dev] [PATCH v4 1/9] vhost: advertise support in-order feature

2018-06-30 Thread Marvin Liu
If devices always use descriptors in the same order in which they have been made available. These devices can offer the VIRTIO_F_IN_ORDER feature. If negotiated, this knowledge allows devices to notify the use of a batch of buffers to virtio driver by only writing used ring index. Vhost user devic

[dpdk-dev] [PATCH v4 4/9] net/virtio-user: add mrg-rxbuf and in-order vdev parameters

2018-06-30 Thread Marvin Liu
Add parameters for configuring VIRTIO_NET_F_MRG_RXBUF and VIRTIO_F_IN_ORDER feature bits. If feature is disabled, also update corresponding unsupported feature bit. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/doc/guides/nics/virtio.rst b/doc/guides/nics/virtio.rst index

[dpdk-dev] [PATCH v4 5/9] net/virtio: free in-order descriptors before device start

2018-06-30 Thread Marvin Liu
Add new function for freeing IN_ORDER descriptors. As descriptors will be allocated and freed sequentially when IN_ORDER feature was negotiated. There will be no need to utilize chain for freed descriptors management, only index update is enough. Signed-off-by: Marvin Liu diff --git a/drivers/ne

[dpdk-dev] [PATCH v4 8/9] net/virtio: add in-order Rx/Tx into selection

2018-06-30 Thread Marvin Liu
After IN_ORDER Rx/Tx paths added, need to update Rx/Tx path selection logic. Rx path select logic: If IN_ORDER is disabled will select normal Rx path. If IN_ORDER is enabled, Rx offload and merge-able are disabled will select simple Rx path. Otherwise will select IN_ORDER Rx path. Tx path select

[dpdk-dev] [PATCH v4 7/9] net/virtio: support in-order Rx and Tx

2018-06-30 Thread Marvin Liu
IN_ORDER Rx function depends on merge-able feature. Descriptors allocation and free will be done in bulk. Virtio dequeue logic: dequeue_burst_rx(burst mbufs) for (each mbuf b) { if (b need merge) { merge remained mbufs add merged mbuf to

[dpdk-dev] [PATCH v4 6/9] net/virtio: extract common part for in-order functions

2018-06-30 Thread Marvin Liu
IN_ORDER virtio-user Tx function support Tx checksum offloading and TSO which also support on normal Tx function. So extracts common part into separated function for reuse. Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/

[dpdk-dev] [PATCH v4 9/9] net/virtio: advertise support in-order feature

2018-06-30 Thread Marvin Liu
Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index cd8070248..350e9ce73 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -36,6 +36,7 @@ 1ULL << VIRT

Re: [dpdk-dev] [PATCH v3 00/11] support in-order feature

2018-06-30 Thread Liu, Yong
Thanks, Maxime. I have sent v4 with checkpatch and commit log warnings fixed. Regards, Marvin > -Original Message- > From: Maxime Coquelin [mailto:maxime.coque...@redhat.com] > Sent: Friday, June 29, 2018 9:10 PM > To: Liu, Yong ; Bie, Tiwei > Cc: Wang, Zhihong ; dev@dpdk.org > Subject: