[dpdk-dev] [PATCH v5 03/11] lib/librte_vhost: vhost lib transform

Thomas Monjalon thomas.monjalon at 6wind.com
Mon Sep 29 21:51:14 CEST 2014


2014-09-26 17:45, Huawei Xie:
> This vhost lib consists of five APIs plus several other helper routines
> for feature disable/enable.
> 1) rte_vhost_driver_register initialises vhost driver.
> 2) rte_vhost_driver_callback_register registers the callbacks.
> Callbacks are called from vhost driver when virtio device is ready
> for polling or is de-activated by guest.
> 3) rte_vhost_driver_session_start, a blocking API to start vhost
> message handler session.
> 4) rte_vhost_enqueue_burst and rte_vhost_dequeue_burst for
> enqueue/dequeue to/from virtio ring.

There are probably many things here to split in different patches.
It's not mandatory but would be very nice. Example: a patch to remove
hpa_memory_regions would explain why it is removed.

> Modifications include:
> 1) in vhost_rxtx.c
>    virtio_dev_rx -> rte_vhost_enqueue_burst
>    virtio_dev_tx -> rte_vhost_dequeue_burst
> 2) VMDQ, MAC learning and other switch related logics are removed.
> 3) zero copy feature isn't generic at this stage, and is removed.
> 4) retry logic is removed from vhost rx functions.
> The above three logics will be implemented in example as reference.
> 5) Add several TODO/FIXME:
>    -allow application to disable cmpset reserve in rte_vhost_enqueue_burst
> in case there is no contention.
>    -fix memcpy from mbuf to vring desc when mbuf is chained and the
> desc couldn't hold all the data
>    -fix vhost_set_mem_table possible race condition: two vqs concurrently
> calls set_mem_table which cause saved mem_temp to be overide.
> 6) merge-able feature is removed, which will be merged in subsequent patch.

Please do not remove a feature which is re-added later. It's really difficult
to follow such history.

-- 
Thomas


More information about the dev mailing list