From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: How to use mlx4 as bond Date: Wed, 27 Mar 2019 01:51:43 +0100 Message-ID: <3003267.NZbS04Euqv@xps> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, david.marchand@redhat.com, Chas Williams , gaetan.rivet@6wind.com To: chetan bhasin 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) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?