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 58F518E5F for ; Tue, 15 Sep 2015 18:27:56 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 15 Sep 2015 09:27:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,536,1437462000"; d="scan'208";a="789935415" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga001.fm.intel.com with ESMTP; 15 Sep 2015 09:27:49 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.112]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0224.002; Tue, 15 Sep 2015 17:27:48 +0100 From: "Loftus, Ciara" To: Tetsuya Mukawa , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [RFC PATCH] vhost: Add VHOST PMD Thread-Index: AQHQ4UDCcuVgl+chtUSEZWd0JgNj15494Yhg Date: Tue, 15 Sep 2015 16:27:48 +0000 Message-ID: <74F120C019F4A64C9B78E802F6AD4CC24CB71296@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> In-Reply-To: <1440732101-18704-2-git-send-email-mukawa@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.181] 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: Tue, 15 Sep 2015 16:27:57 -0000 > + > +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 the= application. There seems to be no option available to add vHost ports on-t= he-fly after the init process. One would have to restart the application wi= th different parameters in order to modify the vHost port configuration. Is= this correct? 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 chos= en on the command line when launching the application is not suitable for O= VS. Thanks, Ciara