From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com
 [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id AE0E62BB9
 for <dev@dpdk.org>; Fri, 16 Jun 2017 16:34:42 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 5562E207D2;
 Fri, 16 Jun 2017 10:34:42 -0400 (EDT)
Received: from frontend1 ([10.202.2.160])
 by compute1.internal (MEProxy); Fri, 16 Jun 2017 10:34:42 -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=3yhuEWtJMQFMr5V
 DppI+cw24IoX7qUSLsQoVeG5V524=; b=Nd8aNVAiWox0TVqytS6HkDXl18PlHpI
 caadBvo3mcY2txHcNOJhDDWX7JTRmCwdMD9opGlP/i9F2XINT+B8KjL1EJzmeT4K
 WF0vsNJIkqcCZoFRuL0nLmB1vUU/6+u7OY35l3z9KW0ImIgsKv01bYOvdponbCyE
 E7WGgNyLcZOM=
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=3yhuEWtJMQFMr5VDppI+cw24IoX7qUSLsQoVeG5V524=; b=HBpuoUE/
 9OWPeQNyOwWJ0vTpKJ4fTrP+fLw2SFzdxXQdX4/iVtfs6b2fJoS1SAo77enOaKZx
 PN57XxGl71xn5N08B5D0vHGhyL2ZyX5dGU+XIP0VhkW5xNrNMC4Q/0gewMlCy426
 45FOsZlC1Bqs2JjTEpH2/Wd8yNOU0/0nMXE0Fx/PqgKCRgdPSdKI/cErV25Zhm45
 xSXQJnKla2Q9OLph4ddA+aww7IIqKRw4KqzLNPzcfnTjYjJ4ZMp219LolWFy8U6X
 G1qJl7sqU6gQw9VWWEob232XrmkThHU4nYraV3wkO/DYmP4nVS3s+j/K6AVmUGXj
 2dDM660eUGoa2w==
X-ME-Sender: <xms:guxDWdY4eMb4cwP5_VUfpiknj5GEuSvyC9Xp2Pu2JaynXqGS3gYing>
X-Sasl-enc: s1m9dYZ1qGKxUSb/HhHGqR0qCozeqbcYEGjtrvyOfLFt 1497623682
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 084177E7B1;
 Fri, 16 Jun 2017 10:34:42 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Gowrishankar <gowrishankar.m@linux.vnet.ibm.com>
Cc: dev@dpdk.org, Declan Doherty <declan.doherty@intel.com>,
 Chao Zhu <chaozhu@linux.vnet.ibm.com>, olgas@mellanox.com,
 adrien.mazarguil@6wind.com, gaetan.rivet@6wind.com
Date: Fri, 16 Jun 2017 16:34:41 +0200
Message-ID: <3047033.M7f3S2WmBF@xps>
In-Reply-To: <f48d6def9336149378e332b91d15d07c12c63182.1497437314.git.gowrishankar.m@linux.vnet.ibm.com>
References: <f48d6def9336149378e332b91d15d07c12c63182.1497437314.git.gowrishankar.m@linux.vnet.ibm.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-dev] [PATCH] net/bonding: support bifurcated driver in
	eal cli using --vdev
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: Fri, 16 Jun 2017 14:34:43 -0000

14/06/2017 12:49, Gowrishankar:
> At present, creating bonding devices using --vdev is broken for PMD like
> mlx5 as it is neither UIO nor VFIO based and hence PMD driver is unknown
> to find_port_id_by_pci_addr(), as below.
> 
> testpmd <EAL args> --vdev 'net_bonding0,mode=1,slave=<PCI>,socket_id=0'
> 
> PMD: bond_ethdev_parse_slave_port_kvarg(150) - Invalid slave port value
>  (<PCI ID>) specified
> EAL: Failed to parse slave ports for bonded device net_bonding0

Thanks for reporting.

> This patch adds RTE_KDRV_BIFURCATED in rte_kernel_driver for the PMD
> driver like mlx5 to be a known one.

The current kdrv value should be RTE_KDRV_UNKNOWN for Mellanox devices.
I do not see the value of creating a new type.

I think the issue is in the bonding code (find_port_id_by_pci_addr):

	* TODO: Once the PCI bus has arrived we should have a better
	* way to test for being a PCI device or not.
	*/
	if (rte_eth_devices[i].data->kdrv == RTE_KDRV_UNKNOWN ||
	    rte_eth_devices[i].data->kdrv == RTE_KDRV_NONE)
			continue;