From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gowrishankar Subject: [PATCH] net/bonding: support bifurcated driver in eal cli using --vdev Date: Wed, 14 Jun 2017 16:19:23 +0530 Message-ID: Cc: dev@dpdk.org, Chao Zhu , Gowrishankar Muthukrishnan To: Declan Doherty 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 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 List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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