From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id BB1781B18C for ; Fri, 8 Dec 2017 17:56:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Dec 2017 08:56:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,378,1508828400"; d="scan'208";a="10841339" Received: from awalabdu-mobl.ger.corp.intel.com (HELO [163.33.228.212]) ([163.33.228.212]) by fmsmga004.fm.intel.com with ESMTP; 08 Dec 2017 08:56:36 -0800 To: Remy Horton , Ferruh Yigit , dev@dpdk.org Cc: Declan Doherty References: <1510929733-7225-1-git-send-email-mohammad.abdul.awal@intel.com> <1510929733-7225-4-git-send-email-mohammad.abdul.awal@intel.com> <3098fb7d-02d5-e959-13ae-e9d93cdee0de@intel.com> From: Mohammad Abdul Awal Message-ID: <67194c45-6cba-6706-ab63-c9dfbf9eed0c@intel.com> Date: Fri, 8 Dec 2017 16:56:35 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v2 4/6] net/representor: Implement port representor PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Dec 2017 16:56:41 -0000 On 08/12/2017 15:02, Remy Horton wrote: > > On 20/11/2017 07:46, Ferruh Yigit wrote: > [..] >> Why we need this PMD? >> It looks like this has been used only for parameter parsing. >> >> Can it be possible to rte_representor_broker_init() will allocate >> ethdevs and >> fill brokers with this information? > > Possible, but not sure it gains much in practice. It would require > workarounds to avoid pulling in driver code dependencies (e.g. > drivers/bus/vdev/rte_bus_vdev.h). I think it possible to create the representor without pulling in driver codes. We probably can avoid using the rte_eth_vdev_allocate by calling the rte_eth_dev_allocate() directly. Right now, the port representor register API looks like int rte_representor_port_register(struct rte_representor_broker *broker, uint32_t vport_id, struct rte_eth_dev *ethdev); So, we probably can have that API (and make it public) as below. int rte_representor_port_register(const char *devargs); We can parse the devargs to get all the parameters, create the ethdev using rte_eth_dev_allocate(), fill all the private data, pci_device, pci_driver etc. and register to the broker. This way we can avoid having a separate PMD for port representor. This comes with a limitation/benefit that user do need need to pass the vdev info as EAL argument. Regards, Awal.