From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 420917D04 for ; Thu, 21 Sep 2017 00:08:48 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C0E8B20C46; Wed, 20 Sep 2017 18:08:47 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 20 Sep 2017 18:08:47 -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=dP4Zd0xWH1655Cn KHpb9Q30eva/iwasZFF2y8sFqPMs=; b=OI7Jcxvvp/TrgTP4noJujPtiA/d3nWe RLWXruIl+XiY6Q1pnRX7oLHlDqLtjKjuUxZxs+SJVTYY/v7qcIPKi2Rd/szDCs9x 5ixIHzu7Hci/C9xXWgyUElG/wSCxkySR/pKPd/eGpqWBns+/r3gR6md+ZdNCN4Em rjxRW0c2ySN4= 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=dP4Zd0xWH1655CnKHpb9Q30eva/iwasZFF2y8sFqPMs=; b=G8/JdhT3 zavSYlVVK5HKxasfIaofx4PdOWquxmB67yneZU9FX0iwJTm+6Pzl+O8HNt3J4hud Kf2p0/205MKt4vLddkXVJ+sl40wmikxAcENkLvd0vK80k4RRJpXsyERSBqI/Ifgn rIfI+dsO0DAr+jyjdgJeIls/z8kVq1LyhrwHaCv6l5Ved2NGbPcLQeZz3yYCVyU/ X1qb6hf5uMC58HEaoIorwqOiSHW9i9SoptGpoqhoTi7jTpIo+DHzfpY8hP8UI6mu cjxNrcVMKK1h1q86bcoPmt8Aiq9jQidkIHZHD/Qe2MfIuSdKwDBBvtvsRVyP04yn fDsTdoAsAXKTUg== X-ME-Sender: X-Sasl-enc: djifTk27RAGO3O4UGwReofcmNfP9ih+4QOO4aiUC4pxf 1505945327 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 307C97E13C; Wed, 20 Sep 2017 18:08:47 -0400 (EDT) From: Thomas Monjalon To: Kevin Traynor , "Loftus, Ciara" Cc: devendra rawat , ovs-dev@openvswitch.org, Adrien Mazarguil , nelio.laranjeiro@6wind.com, users@dpdk.org, Yuanhan Liu , olgas@mellanox.com Date: Thu, 21 Sep 2017 00:08:45 +0200 Message-ID: <1990042.kGnXgAYS5O@xps> In-Reply-To: References: <74F120C019F4A64C9B78E802F6AD4CC278E04762@IRSMSX106.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-users] [ovs-dev] adding dpdk ports sharing same pci address to ovs-dpdk bridge X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 22:08:48 -0000 20/09/2017 19:33, Kevin Traynor: > On 09/08/2017 10:56 AM, Loftus, Ciara wrote: > >> Hi, > >> > >> I have compiled and built ovs-dpdk using DPDK v17.08 and OVS v2.8.0. The > >> NIC that I am using is Mellanox ConnectX-3 Pro, which is a dual port 10G > >> NIC. The problem with this NIC is that it provides only one PCI address for > >> both the 10G ports. > >> > >> So when I am trying to add the two DPDK ports to my br0 bridge > >> > >> # ovs-vsctl --no-wait add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk > >> options:dpdk-devargs=0002:01:00.0 > >> > >> # ovs-vsctl --no-wait add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk > >> options:dpdk-devargs=0002:01:00.0 > >> > >> The port dpdk1 is added successfully and able to transfer data, but adding > >> dpdk0 to br0 fails: [...] > >> With OVS v2.6.1 I never had this problem as dpdk-devargs was not > >> mandatory > >> and just specifying port name was enough to add that port to bridge. > >> > >> Is there a way to add port both ports to bridge ? > > > > It seems the DPDK function rte_eth_dev_get_port_by_name() will always return the port ID of the first port on your NIC, when you specify the single PCI address and that's where the problem is. There doesn't seem to be a way currently to indicate to the calling application that in fact two (or more) port IDs are associated with the one PCI address. We have two ports (with the same PCI address) so we should have two different names. Where the names passed to rte_eth_dev_get_port_by_name() come from? It is the user parameter from options:dpdk-devargs=0002:01:00.0, right? > > I am cc-ing DPDK users mailing list for hopefully some input. Are there any plans for the rte_eth_dev_get_port_by_name function to be compatible with NICs with multiple ports under the same PCI address? We cannot return two different ports for the same name. There are two issues here: - the input should not be the PCI address - the ethdev function should look at ethdev name, not rte_device one The idea is that we have only one rte_device object and we instantiate two rte_eth_dev ports. An ethdev port can be identified with its id (a number) or its unique name. Unfortunately, the user cannot guess the port id or the name set by the PMD. > Hi Adrien/Nelio, > > Is this something you can answer? We're wondering how to handle this in > OVS and whether a temporary or long term solution is needed. I suggest to rely on ethdev name. You will need to show to the user the mapping between the bus information (PCI id here) and the device names. Another alternative is to add a new function returning all ethdev ports associated to a given rte_device resource. So you would get two ports and you could pick one on the first "add-port", and the other one for the second "add-port" command. It means the user would be forced to add them in the right order if he wants a reproducible result.