From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=czPRjOBBSDEARUjHd4nJztOgumng5mabc/G/7no34QE=; b=Am8pw2w/bIw1sY/4rDqUXbU7TjqDwdS+CEXm9BLxklsG7NqCioF1ysVXF/YsLRrJcI Of1XOqAKD7iO/4hqYVvBVqOpeU67jUiTh4CLVS2XPHyXj3UNccEAV0J6ebh6mgYtV6vY uM+fXhRJqEYz82InXobYWOen15aG/BEysYqdGQYhUzy6uYu+enIDNTS3iRmIghKV0Ztx h8OMPlQy3dXNthOXQfFCywixu0MjbPo/ulJhVRxjHaRmptLyM5w7UFARHMuwoSN8S4LM 26V9g/CTn2GPzyjF1IAdUOVothP9ThEqfTqxnpPI+CDvRFC/ZNXjQp1/iftsS7kp2YKI Vy2Q== X-Gm-Message-State: ALoCoQmXHOutC26bK4TMQeOfu1TVJ2EZ6cAZYV1MdO82S6vau3G0yaf1aEYMhe+Pk0GP2q5gzx9P X-Received: by 10.68.233.200 with SMTP id ty8mr54558090pbc.80.1442372770804; Tue, 15 Sep 2015 20:06:10 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id gq7sm24737494pac.5.2015.09.15.20.06.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Sep 2015 20:06:10 -0700 (PDT) To: "Loftus, Ciara" , "dev@dpdk.org" 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> From: Tetsuya Mukawa X-Enigmail-Draft-Status: N1110 Message-ID: <55F8DC9F.8030607@igel.co.jp> Date: Wed, 16 Sep 2015 12:06:07 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <74F120C019F4A64C9B78E802F6AD4CC24CB71296@IRSMSX106.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "ann.zhuangyanying@huawei.com" Subject: Re: [dpdk-dev] [RFC PATCH] vhost: Add VHOST PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2015 03:06:12 -0000 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