From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 690321B3D2 for ; Wed, 27 Mar 2019 01:51:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 54627473A; Tue, 26 Mar 2019 20:51:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 26 Mar 2019 20:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=DbmmwmgqKozFj3ZyplJWfHC0AELJun3I2W5G6Fyk6q4=; b=XjCCj150p2cj 9+fvSGz2ANuJSs6QmoQ5j1QW/5/9lwTrNgvfh2dX+jrMaO3oR/+ZFzzqU2IFTBcH ZAX+tGt4LXeBx5FYL96bSJn0dWU+4FGdJowBEfjDN0uJJQ5MvniCeLA3+c58ZHru SmpAccmnQ5m8G/xx0tJuY+I9fP5Bk/k= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=DbmmwmgqKozFj3ZyplJWfHC0AELJun3I2W5G6Fyk6 q4=; b=coXb62w5IJPgOj/L2GVZlfu7SzKD+CEOenXDgNjlYCfU9LpbJHrj69RVi Kzf5RW9Y0zEzOwhmWcGNlqHD93LMaqOVbRcwezzMfFKXRpicOlUBZs9oVXXynqmy iYJBudeYY2KQCizbbNWeUostQoyZO0bGufh9T38SY07/95Cn7mRqqJkzk4tzUjEC 0yvsuRXXJzGxhzvZSJ+scIvUhhmrFMF0QwTOB7SOA30OxXiQ67+xLMIu99LCYeyy R7ejlBNaQ/R8WjXS9RE9r9aMPu89sIDv9v1Ps2z+A7sTGi9c38iqwxtvMFvFlYHe Sghm8qsKwHbJ5Xg68t5t/jfaOhWBA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B6ABDE40FF; Tue, 26 Mar 2019 20:51:44 -0400 (EDT) From: Thomas Monjalon To: chetan bhasin Cc: dev@dpdk.org, david.marchand@redhat.com, Chas Williams , gaetan.rivet@6wind.com Date: Wed, 27 Mar 2019 01:51:43 +0100 Message-ID: <3003267.NZbS04Euqv@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] How to use mlx4 as bond X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Mar 2019 00:51:48 -0000 Hi, 26/03/2019 16:36, chetan bhasin: > Hi, > > I am using DPDK 17.11.4 with a Mellanox ConnectX-3 Pro dual port card, one > of the features of this card is that both ports have the same PCI address. > i.e. there are two ports here but only one PCI reported: > > # lspci | grep -i mell > 0a:00.0 Ethernet controller: Mellanox Technologies MT27520 Family > [ConnectX-3 Pro] > > Is there any way to configure DPDK to set up bonding with this card? > Bonding requires two unique PCI addresses, is there a way to tell DPDK > about the two interfaces other than via PCI? I am using VPP to interface > with DPDK and set up the bonding via vdev configuration. Is bonding just > not possible using the two interfaces on this device? It is a design mistake to use PCI address to select slave ports for bonding. It prevents using multi-port devices or non-PCI devices (like vdev). The solution is to use another format, like the new devargs syntax, which allows to match more properties (PCI address being one property). For ConnectX-3 Pro, it will allow to choose ports by MAC address with this string: "class=eth,mac=00:11:22:33:44:55" Unfortunately, this solution requires a patch in the bonding PMD to use RTE_ETH_FOREACH_MATCHING_DEV(). Note that RTE_ETH_FOREACH_MATCHING_DEV supports the old PCI-only syntax. Would you like to make it a try? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 5A318A05D3 for ; Wed, 27 Mar 2019 01:51:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52ACA1B42F; Wed, 27 Mar 2019 01:51:50 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 690321B3D2 for ; Wed, 27 Mar 2019 01:51:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 54627473A; Tue, 26 Mar 2019 20:51:47 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 26 Mar 2019 20:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=DbmmwmgqKozFj3ZyplJWfHC0AELJun3I2W5G6Fyk6q4=; b=XjCCj150p2cj 9+fvSGz2ANuJSs6QmoQ5j1QW/5/9lwTrNgvfh2dX+jrMaO3oR/+ZFzzqU2IFTBcH ZAX+tGt4LXeBx5FYL96bSJn0dWU+4FGdJowBEfjDN0uJJQ5MvniCeLA3+c58ZHru SmpAccmnQ5m8G/xx0tJuY+I9fP5Bk/k= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=DbmmwmgqKozFj3ZyplJWfHC0AELJun3I2W5G6Fyk6 q4=; b=coXb62w5IJPgOj/L2GVZlfu7SzKD+CEOenXDgNjlYCfU9LpbJHrj69RVi Kzf5RW9Y0zEzOwhmWcGNlqHD93LMaqOVbRcwezzMfFKXRpicOlUBZs9oVXXynqmy iYJBudeYY2KQCizbbNWeUostQoyZO0bGufh9T38SY07/95Cn7mRqqJkzk4tzUjEC 0yvsuRXXJzGxhzvZSJ+scIvUhhmrFMF0QwTOB7SOA30OxXiQ67+xLMIu99LCYeyy R7ejlBNaQ/R8WjXS9RE9r9aMPu89sIDv9v1Ps2z+A7sTGi9c38iqwxtvMFvFlYHe Sghm8qsKwHbJ5Xg68t5t/jfaOhWBA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedugddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id B6ABDE40FF; Tue, 26 Mar 2019 20:51:44 -0400 (EDT) From: Thomas Monjalon To: chetan bhasin Cc: dev@dpdk.org, david.marchand@redhat.com, Chas Williams , gaetan.rivet@6wind.com Date: Wed, 27 Mar 2019 01:51:43 +0100 Message-ID: <3003267.NZbS04Euqv@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] How to use mlx4 as bond X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190327005143.9_ryDYK3RqviOc0FP5j-meD2VIS1M3i5ucWJPMuYG6s@z> Hi, 26/03/2019 16:36, chetan bhasin: > Hi, > > I am using DPDK 17.11.4 with a Mellanox ConnectX-3 Pro dual port card, one > of the features of this card is that both ports have the same PCI address. > i.e. there are two ports here but only one PCI reported: > > # lspci | grep -i mell > 0a:00.0 Ethernet controller: Mellanox Technologies MT27520 Family > [ConnectX-3 Pro] > > Is there any way to configure DPDK to set up bonding with this card? > Bonding requires two unique PCI addresses, is there a way to tell DPDK > about the two interfaces other than via PCI? I am using VPP to interface > with DPDK and set up the bonding via vdev configuration. Is bonding just > not possible using the two interfaces on this device? It is a design mistake to use PCI address to select slave ports for bonding. It prevents using multi-port devices or non-PCI devices (like vdev). The solution is to use another format, like the new devargs syntax, which allows to match more properties (PCI address being one property). For ConnectX-3 Pro, it will allow to choose ports by MAC address with this string: "class=eth,mac=00:11:22:33:44:55" Unfortunately, this solution requires a patch in the bonding PMD to use RTE_ETH_FOREACH_MATCHING_DEV(). Note that RTE_ETH_FOREACH_MATCHING_DEV supports the old PCI-only syntax. Would you like to make it a try?