From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id CD8917CDB for ; Wed, 14 Jun 2017 12:49:51 +0200 (CEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5EAnmYD143362 for ; Wed, 14 Jun 2017 06:49:51 -0400 Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by mx0a-001b2d01.pphosted.com with ESMTP id 2b33m589hm-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Jun 2017 06:49:50 -0400 Received: from localhost by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Jun 2017 20:49:26 +1000 Received: from d23relay10.au.ibm.com (202.81.31.229) by e23smtp05.au.ibm.com (202.81.31.211) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 Jun 2017 20:49:25 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v5EAnOdx63111392 for ; Wed, 14 Jun 2017 20:49:24 +1000 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v5EAnGVN017769 for ; Wed, 14 Jun 2017 20:49:16 +1000 Received: from chozha.in.ibm.com ([9.109.223.81]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v5EAnEG4017716; Wed, 14 Jun 2017 20:49:15 +1000 From: Gowrishankar To: Declan Doherty Cc: dev@dpdk.org, Chao Zhu , Gowrishankar Muthukrishnan Date: Wed, 14 Jun 2017 16:19:23 +0530 X-Mailer: git-send-email 1.9.1 X-TM-AS-MML: disable x-cbid: 17061410-0016-0000-0000-0000024E0A77 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061410-0017-0000-0000-000006CD30E4 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-14_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706140185 Subject: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2017 10:49:52 -0000 From: Gowrishankar Muthukrishnan 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 --vdev 'net_bonding0,mode=1,slave=,socket_id=0' PMD: bond_ethdev_parse_slave_port_kvarg(150) - Invalid slave port value () specified EAL: Failed to parse slave ports for bonded device net_bonding0 This patch adds RTE_KDRV_BIFURCATED in rte_kernel_driver for the PMD driver like mlx5 to be a known one. Signed-off-by: Gowrishankar Muthukrishnan --- lib/librte_eal/common/include/rte_pci.h | 1 + lib/librte_eal/linuxapp/eal/eal_pci.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index b82ab9e..bbfd50d 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -126,6 +126,7 @@ enum rte_kernel_driver { RTE_KDRV_VFIO, RTE_KDRV_UIO_GENERIC, RTE_KDRV_NIC_UIO, + RTE_KDRV_BIFURCATED, RTE_KDRV_NONE, }; diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 595622b..a222ec3 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -351,6 +351,8 @@ dev->kdrv = RTE_KDRV_IGB_UIO; else if (!strcmp(driver, "uio_pci_generic")) dev->kdrv = RTE_KDRV_UIO_GENERIC; + else if (!strcmp(driver, "mlx5_core")) + dev->kdrv = RTE_KDRV_BIFURCATED; else dev->kdrv = RTE_KDRV_UNKNOWN; } else -- 1.9.1