From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mohammad Abdul Awal Subject: Re: [PATCH v2 4/6] net/representor: Implement port representor PMD Date: Fri, 8 Dec 2017 16:56:35 +0000 Message-ID: <67194c45-6cba-6706-ab63-c9dfbf9eed0c@intel.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Declan Doherty To: Remy Horton , Ferruh Yigit , dev@dpdk.org 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) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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.