From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v5 03/11] lib/librte_vhost: vhost lib transform Date: Mon, 29 Sep 2014 21:51:14 +0200 Message-ID: <2272982.l4SiTbeYM2@xps13> References: <1411724758-27488-1-git-send-email-huawei.xie@intel.com> <1411724758-27488-4-git-send-email-huawei.xie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Huawei Xie Return-path: In-Reply-To: <1411724758-27488-4-git-send-email-huawei.xie-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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