From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 5668A58CB for ; Thu, 17 Sep 2015 15:56:36 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 17 Sep 2015 06:56:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,547,1437462000"; d="scan'208";a="563571991" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by FMSMGA003.fm.intel.com with ESMTP; 17 Sep 2015 06:56:33 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.110]) by IRSMSX154.ger.corp.intel.com ([169.254.12.34]) with mapi id 14.03.0248.002; Thu, 17 Sep 2015 14:56:14 +0100 From: "Loftus, Ciara" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH] vhost: Add VHOST PMD Thread-Index: AQHQ4UDCcuVgl+chtUSEZWd0JgNj15494YhggACkdYCAAlX+IA== Date: Thu, 17 Sep 2015 13:56:13 +0000 Message-ID: <74F120C019F4A64C9B78E802F6AD4CC24CB8411A@IRSMSX106.ger.corp.intel.com> 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> <55F8DC9F.8030607@igel.co.jp> In-Reply-To: <55F8DC9F.8030607@igel.co.jp> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Thu, 17 Sep 2015 13:56:36 -0000 >=20 > 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 =3D NULL; > >> + int ret =3D 0; > >> + int index; > >> + char *iface_name; > >> + > >> + RTE_LOG(INFO, PMD, "Initializing pmd_vhost for %s\n", name); > >> + > >> + kvlist =3D rte_kvargs_parse(params, valid_arguments); > >> + if (kvlist =3D=3D NULL) > >> + return -1; > >> + > >> + if (strlen(name) < strlen("eth_vhost")) > >> + return -1; > >> + > >> + index =3D strtol(name + strlen("eth_vhost"), NULL, 0); > >> + if (errno =3D=3D ERANGE) > >> + return -1; > >> + > >> + if (rte_kvargs_count(kvlist, ETH_VHOST_IFACE_ARG) =3D=3D 1) { > >> + ret =3D 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=3D...' " options when launching t= he > 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 wit= h > different parameters in order to modify the vHost port configuration. Is = this > correct? >=20 > Hi Ciara, >=20 > Thanks for your checking and description. > We can attach and detach a port created by vhost PMD using Port Hotplug > functionality. >=20 > example) > ./testpmd -c f -n 4 -- -i > testpmd> port attach eth_vhost0,iface=3D/tmp/aaa >=20 > Does this fit your case? >=20 > Thanks, > Tetsuya Hi, Thanks for your reply. I wasn't aware of the hotplug functionality but this= should work for this use case. Thanks! I will continue to review the remainder of the patch and reply if I have an= y further feedback. Ciara >=20 > > If so, this pmd implementation will not work with Open vSwitch. OVS rel= ies > on the ability to call the rte_vhost_driver_register function at any poin= t 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