From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radu Nicolau Subject: Re: [RFC][PATCH 2/5] pci: allow shared device instances. Date: Wed, 10 May 2017 11:47:59 +0100 Message-ID: <927625af-b26e-b166-b05f-c1b4059fce36@intel.com> References: <1494341879-18718-1-git-send-email-radu.nicolau@intel.com> <1571308.M4Vgp8n44D@xps> <18252037.5gudFzihFo@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 885842952 for ; Wed, 10 May 2017 12:48:05 +0200 (CEST) In-Reply-To: <18252037.5gudFzihFo@xps> 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 5/10/2017 11:28 AM, Thomas Monjalon wrote: > 10/05/2017 12:11, Radu Nicolau: >> Hi >> >> >> On 5/10/2017 10:09 AM, Thomas Monjalon wrote: >>> Hi, >>> >>> 09/05/2017 16:57, Radu Nicolau: >>>> Updated PCI initialization code to allow devices to be shared across multiple PMDs. >>>> >>>> Signed-off-by: Radu Nicolau >>> I was waiting the day when we have a device shared >>> by two different interfaces. >>> Note that some Mellanox and Chelsio devices already instantiate >>> two ethdev ports per PCI device. >>> >>> Please explain your idea behind this "shared" flag. >>> What is your exact need? >> Currently for each pci device a look-up into a list of PMDs is >> performed, and when a match is found the system moves to the next >> device. Having this flag will allow a PMD to inform the system that >> there may be more matches, more PMDs that can be used for this >> particular device. >> There is a difference when comparing to the devices you mentioned above, >> in this case the PMDs are totally different types, one network and one >> cryptodev PMD for each IXGBE network card. > Yes I know it is a lack in DPDK. > Linux introduced MultiFunction Device in 2005: > http://events.linuxfoundation.org/sites/events/files/slides/belloni-mfd-regmap-syscon_0.pdf > >>> Do you think it is the best solution? >> We evaluated different approaches and this is what we settled on. It >> might not be the best, if there are any suggestions of other ways to >> achieve this I would be thankful. > Please could you explain the other approaches you thought > with pros and cons? We have considered a vdev crypto PMD approach that would have not require changes to the eal section, but it would have required some sort of side communication with the IXGBE PMD; another one was a some sort of on-demant initialized cryptodev. Over these approaches the current one is cleaner and makes more sense, initialize a net and crypto PMD for a device that is both a NIC and a cryptro device. > > Thanks