From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 968811B60A for ; Tue, 7 Nov 2017 10:08:17 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 23886142E; Tue, 7 Nov 2017 04:08:17 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 07 Nov 2017 04:08:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; 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; s=fm1; bh=F7LNoGt4IMUc8ceIX He8Xbbn6N5ADw/Fv6MF5amEViA=; b=So2j4PtdMB8GZ9/VAx3Z8UrCduRgEyTes hrIDYIZ5Bs4U/hXm7c/PuEaJA6RK3IHzvAV8uUThaH4cE8vzsfXEnGymKgPGYv26 DiWOCKchgl3DiPKQHcM8xbzV6Qr8u6B6DbdoxHhnlj6WBdsdc6Z3p6MlhAE+xjo/ ZVFz/Pi4xIOMppodrZuF7PST4hc7txAeGbaym755y6EzNpm7FCVlVru2+xpfIZbx bo8a556j8eWVKbtu22Jh7T7sxlhsef8FBFGD9gWvcHi0BxvKdr9UDcTr1wHomQd4 RWjS8TkMtWQgyLURLVhnoMUj3jzjBd1oZYdXReD2qwLMuyZunbGzA== 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; s=fm1; bh=F7LNoG t4IMUc8ceIXHe8Xbbn6N5ADw/Fv6MF5amEViA=; b=F2g+Sq3vm8bxHtwNXfPn+G zH++QStaNBVZUbqGFFjts7XZF2LVX8oMNccD2s+426fbaO9CY+Qjmn+5E0mt0O1j iSJqYUQnEQhgKR6ov4LcpiEGoyHhDYZwzR9FNozIgKown/KDqUKP0fPdyXjOmfyR 8AHFpuA5ygh/IqoPpPHpconpCzOkW4pkbEA2b6LixQork/xMQZwNcgvGgkLxqA3w mb//gSXGojMGu7f+MCSm0mTnwVDE/0GoYyBvOD/YkessQJIlw8a1hwi1ZFH5Ea5v 4jsXqETOdh1344Is5BBnV94qS5JcxjZGv1iwC4Levg+DRvPWYItsm9SaKMhKZzdA == X-ME-Sender: Received: from yliu-home (unknown [222.64.173.197]) by mail.messagingengine.com (Postfix) with ESMTPA id C4DBA7FAD9; Tue, 7 Nov 2017 04:08:15 -0500 (EST) Date: Tue, 7 Nov 2017 17:08:07 +0800 From: Yuanhan Liu To: devendra rawat Cc: "Loftus, Ciara" , Thomas Monjalon , Kevin Traynor , "ovs-dev@openvswitch.org" , Adrien Mazarguil , "nelio.laranjeiro@6wind.com" , "users@dpdk.org" , "olgas@mellanox.com" , Darrell Ball Message-ID: <20171107090807.GP12931@yliu-home> References: <1990042.kGnXgAYS5O@xps> <74F120C019F4A64C9B78E802F6AD4CC278E0EB1C@IRSMSX106.ger.corp.intel.com> <1785021.jQYphEuIaN@xps> <74F120C019F4A64C9B78E802F6AD4CC278E0EB69@IRSMSX106.ger.corp.intel.com> <74F120C019F4A64C9B78E802F6AD4CC278E1B981@IRSMSX106.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Tue, 07 Nov 2017 15:32:19 +0100 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: Tue, 07 Nov 2017 09:08:17 -0000 On Tue, Oct 10, 2017 at 06:26:51PM +0530, devendra rawat wrote: > > Hi Everyone, > > > > Anything finalized for sorting out this issue, do you need any more > > information regarding this issue ? > > Hi, > > I put together a very rough RFC that aims to work-around the issue: > https://mail.openvswitch.org/pipermail/ovs-dev/2017-October/339496.html > > It hasn't been tested as I don't have access to the type of card that has > one PCI for multiple ports. > If anybody does have access to such a device, I welcome you to try the > patch although I'm not hopeful it will succeed first -pass. > Looking for feedback on implementation, interface, etc. > > >  I applied the patch on top of OVS v2.8.1 and used DPDK v17.08. I used Mellanox > ConnectX-3 pro NIC for testing, this NIC provides two 10G ports > that share a single PCI address. > > The patch is working fine, I was able to add both the 10G ports to OVS bridge > by specifying the port no. (0 or 1) in the dpdk-devargs. > > # ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk > options:dpdk-devargs=0002:01:00.0,0 > # ovs-vsctl add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk > options:dpdk-devargs=0002:01:00.0,1 I think the patch should work. But there something I want to point out: - you were assuming the ports with the same PCI addresses are continuous in the port number. I don't think it's a good assumption, though it's very likely it's always the case in reality. - I also think the index can not tell which port it is from the ports having the same PCI address. Having said that, I think using the mac address to referencing a DPDK port might be a better idea. Something like: options:dpdk-devargs=$mac_addr Then from the ovs-dpdk point of you, it can detect whether it's a mac or an PCI address, and use that to get the right port. Or, we could have it both, if that's really needed: dpdk-devargs=$pci_addr,$mac_addr In such way, the original issue would also be solved. Moreover, people know exactly what the underlie port he want to deal with. Comments/thought? --yliu > > the port no. (0 and 1) are bound to actual physical port, i.e if I keep on > adding and deleting port no. 0 to bridge br0 multiple times, > every time I add the port back to br0, the same physical port is added to > bridge br0. >