From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tetsuya Mukawa Subject: Re: [RFC PATCH] vhost: Add VHOST PMD Date: Wed, 16 Sep 2015 12:06:07 +0900 Message-ID: <55F8DC9F.8030607@igel.co.jp> References: <1440732101-18704-1-git-send-email-mukawa@igel.co.jp> <1440732101-18704-2-git-send-email-mukawa@igel.co.jp> <74F120C019F4A64C9B78E802F6AD4CC24CB71296@IRSMSX106.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "ann.zhuangyanying@huawei.com" To: "Loftus, Ciara" , "dev@dpdk.org" Return-path: Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by dpdk.org (Postfix) with ESMTP id A4CD93784 for ; Wed, 16 Sep 2015 05:06:11 +0200 (CEST) Received: by pacex6 with SMTP id ex6so195084563pac.0 for ; Tue, 15 Sep 2015 20:06:10 -0700 (PDT) In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC24CB71296@IRSMSX106.ger.corp.intel.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 2015/09/16 1:27, Loftus, Ciara wrote: >> + >> +static int >> +rte_pmd_vhost_devinit(const char *name, const char *params) >> +{ >> + struct rte_kvargs *kvlist = NULL; >> + int ret = 0; >> + int index; >> + char *iface_name; >> + >> + RTE_LOG(INFO, PMD, "Initializing pmd_vhost for %s\n", name); >> + >> + kvlist = rte_kvargs_parse(params, valid_arguments); >> + if (kvlist == NULL) >> + return -1; >> + >> + if (strlen(name) < strlen("eth_vhost")) >> + return -1; >> + >> + index = strtol(name + strlen("eth_vhost"), NULL, 0); >> + if (errno == ERANGE) >> + return -1; >> + >> + if (rte_kvargs_count(kvlist, ETH_VHOST_IFACE_ARG) == 1) { >> + ret = rte_kvargs_process(kvlist, ETH_VHOST_IFACE_ARG, >> + &open_iface, &iface_name); >> + if (ret < 0) >> + goto out_free; >> + >> + eth_dev_vhost_create(name, index, iface_name, >> rte_socket_id()); >> + } >> + >> +out_free: >> + rte_kvargs_free(kvlist); >> + return ret; >> +} >> + > This suggests to me that vHost ports will only be available/created if one supplies the " --vdev 'eth_vhost0,iface=...' " options when launching the application. There seems to be no option available to add vHost ports on-the-fly after the init process. One would have to restart the application with different parameters in order to modify the vHost port configuration. Is this correct? Hi Ciara, Thanks for your checking and description. We can attach and detach a port created by vhost PMD using Port Hotplug functionality. example) ./testpmd -c f -n 4 -- -i testpmd> port attach eth_vhost0,iface=/tmp/aaa Does this fit your case? Thanks, Tetsuya > If so, this pmd implementation will not work with Open vSwitch. OVS relies on the ability to call the rte_vhost_driver_register function at any point in the lifetime of the application, in order to create new vHost ports and subsequently register/create the sockets. Being bound to the selection chosen on the command line when launching the application is not suitable for OVS. > > Thanks, > Ciara