From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com
 [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 6EA03F72
 for <dev@dpdk.org>; Wed, 10 May 2017 12:28:39 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 1594D209B7;
 Wed, 10 May 2017 06:28:39 -0400 (EDT)
Received: from frontend1 ([10.202.2.160])
 by compute1.internal (MEProxy); Wed, 10 May 2017 06:28:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-sender
 :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=Rci3ey1kCsPPuN/
 So0rdWs5gdvkqIzxQURolY90FxoY=; b=KHNApeyoYhKgNv9gSbIPCuoyKNa7ou7
 7W4sKhDZJjEhYn1+Wh5ckOiNw2l/MLVIBo1llkXDzfVSsiTYJ857L4seku9Xi9sv
 6U8Kq7qzBqt+yGRtxt0JPMmU4sBFBarzQeSnDZd8L6lkMe8a07fx8ooF/ami/O5R
 wEaC28MOPDN0=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=
 fm1; bh=Rci3ey1kCsPPuN/So0rdWs5gdvkqIzxQURolY90FxoY=; b=jXzSzPTY
 fdzDt5ATSXSoE2T4tTBpL32/S8UInJxX6ucIDGct9UYBD3adR5iBJDq1pqDSsWoL
 /2ZCr5WeoaJt4PVvlXS/toz6BZ98BD8/RmItjasao1yLBibOQluttS0K8XfwH0ex
 Q/38z2kK+fU4EcR4x5RHFLv8Prj0UorTmvMIvm8a++6mIpg4qiVasNosSct+i5td
 bxh5bPbMJVEwHCn4ZWDikdf6HA+YxNENUMHf82KNzYtWE5S2c/0SiysuV6Gg7KAB
 H7e7nZNZaQEr+Cc2B+nCPGIZrrtuN6gLGnTPjHV9sFsNtTxFF/t4Pu4e+G9Yfwdy
 I2TqfmdRxdGv0g==
X-ME-Sender: <xms:V-sSWf62-XygtYJRvEmtItG5CIDHBz1QvGKB4G3HDnREqZW7iQEqVg>
X-Sasl-enc: aQTOXOdikW6WfA7Ge9qDrjp19UPJgqc6wOkabWVJpxG/ 1494412118
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id BF6737E5C8;
 Wed, 10 May 2017 06:28:38 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Radu Nicolau <radu.nicolau@intel.com>
Cc: dev@dpdk.org
Date: Wed, 10 May 2017 12:28:37 +0200
Message-ID: <18252037.5gudFzihFo@xps>
In-Reply-To: <b8756324-b908-a2bd-a24d-4558b20f8dbd@intel.com>
References: <1494341879-18718-1-git-send-email-radu.nicolau@intel.com>
 <1571308.M4Vgp8n44D@xps> <b8756324-b908-a2bd-a24d-4558b20f8dbd@intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [RFC][PATCH 2/5] pci: allow shared device instances.
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 10 May 2017 10:28:39 -0000

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 <radu.nicolau@intel.com>
> > 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?

Thanks