From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v5 resend 05/12] vhost: add VHOST_USER_SET_VRING_ENABLE message Date: Mon, 21 Sep 2015 10:22:52 +0800 Message-ID: <20150921022252.GO2339@yliu-dev.sh.intel.com> References: <1442589061-19225-1-git-send-email-yuanhan.liu@linux.intel.com> <1442589061-19225-6-git-send-email-yuanhan.liu@linux.intel.com> <20150920123021-mutt-send-email-mst@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: "Michael S. Tsirkin" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A18755A51 for ; Mon, 21 Sep 2015 04:21:03 +0200 (CEST) Content-Disposition: inline In-Reply-To: <20150920123021-mutt-send-email-mst@redhat.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Sun, Sep 20, 2015 at 12:37:35PM +0300, Michael S. Tsirkin wrote: > On Fri, Sep 18, 2015 at 11:10:54PM +0800, Yuanhan Liu wrote: > > From: Changchun Ouyang > > > > This message is used to enable/disable a specific vring queue pair. > > The first queue pair is enabled by default. > > > > Signed-off-by: Changchun Ouyang > > Signed-off-by: Yuanhan Liu > > --- [snip...] > > void > > user_destroy_device(struct vhost_device_ctx ctx) > > { > > It might be a good idea to flush any packets being processed > on relevant cores at this point. They are offloaded to the application (examples/vhost/vhost-switch in this case). user_destroy_device will invoke the application's "destroy_device()" callback in the end, which, in our case, will set "remove" flag. The core worker will then drain and free the RX queue and free TX queue once the "remove" flag is set. --yliu