From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0050.outbound.protection.outlook.com [104.47.33.50]) by dpdk.org (Postfix) with ESMTP id 23D714A59 for ; Sun, 4 Dec 2016 11:09:28 +0100 (CET) Received: from BN6PR03CA0054.namprd03.prod.outlook.com (10.173.137.16) by CY4PR03MB2472.namprd03.prod.outlook.com (10.168.165.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Sun, 4 Dec 2016 10:09:26 +0000 Received: from BL2FFO11OLC001.protection.gbl (2a01:111:f400:7c09::103) by BN6PR03CA0054.outlook.office365.com (2603:10b6:404:4c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Sun, 4 Dec 2016 10:09:26 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11OLC001.mail.protection.outlook.com (10.173.161.185) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.734.4 via Frontend Transport; Sun, 4 Dec 2016 10:09:25 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:718; Count:10 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uB4A8pKE019825; Sun, 4 Dec 2016 03:09:23 -0700 From: Shreyansh Jain To: CC: , , Shreyansh Jain Date: Sun, 4 Dec 2016 15:41:25 +0530 Message-ID: <1480846288-2517-11-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480846288-2517-1-git-send-email-shreyansh.jain@nxp.com> References: <1480846288-2517-1-git-send-email-shreyansh.jain@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131253197662095848; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(336004)(199003)(189002)(39400400001)(68736007)(39380400001)(38730400001)(39410400001)(85426001)(39450400002)(47776003)(92566002)(77096006)(8676002)(81156014)(8936002)(50226002)(81166006)(5660300001)(110136003)(305945005)(86362001)(7846002)(356003)(2906002)(4326007)(5003940100001)(8666005)(48376002)(50466002)(104016004)(189998001)(76176999)(50986999)(97736004)(106466001)(626004)(2351001)(105606002)(33646002)(2950100002)(69596002)(6916009)(36756003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2472; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC001; 1:ch5HPaeZXODOsb30f5Awj6C0meJAtyl4zxDq7XWqMrRRByDHTRtMt3v6cZc5d1OQ5NOHXQEeZ5XDTF6IGogPatq+KJBcOcmfj55soxsBiBvk+Syuj7SMNeKlw4MxWmqF/+TXqEF/4AnOBTlWCHZ9rNeOrogPmIJiTtdJVqMtwaNBqh2rwMy71VLtnRwUlyTB2wUZDl3p9l4ie0LQEJMf+9BL0mD0Ks199e05peox8nNI52zD9v6lEj3u2SDLMVRxO2RhfB2JNZ2gha3CCgWKa+7cnixQvTQmNRZ1zCnNfJMZ7L5gqNvpBCGZXeCLvKKaWAbgVgP7/Jj8uL88IJjL8UOC22iCMg4EZGJ9I1WwMpMXWCNoiK0HROipprXu0j12veO5Pn/PN/9m/9mL2abQWvPHzYJIMIymMyvS0qOFvuRtEGriqCqNsPMYpeja65n1FXJ5PozZRBz5R/59NnYB+/572dsPRYQ5rvdujxntepdhH5bhFNopanMIZZ4zKhqIdtDOwPkQSE0NiIGI5Ivgrxfu5imp7tW0Q8o3MPXXOg5Tm4lZrR9AuuK+NVvzhmEylxN8M5vAnvZESXvg+jE/UlSY+nSgpd0DbfFs7wpgCgx3gKeZwfusnlVhstjSq2l6NFOJ5rSiH+cyvAtiiwYAO6r7LbY9/bqUsFrowMsXbc9tr1UfXgQ06K82yJK6Rag0sUVZq6IMuVrSUxnaST4jElP3V1ALsR0TpRsZkaDOwpI= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: c2d98bcb-1d56-4a88-89e8-08d41c2da0bf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR03MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 3:wIbXkD00LlKlft8aZziVmMcql74CAnOEKbo2pGJ4yabPt12UTXv5MupSLi2v8/8diaYFrXpy7TeRi7sGk4R0vbjNhNE3DSl7WygHDic8xGSG8IgtJ5/y9J81pUvV6kVYsKuoNSmhNwp79lUq3pVM4gAv7bJInH8ZY+uULYjB5zUlpmZs35DBvyAqBczGz4+1gEmeYP56hTybkZG/fXN2srifG4ae5iggwdBjoZr0PD4zO1uM3hYOJQckMwpCI+Wts4sc4JePM2nhK3fE6POELwAiIZ6ZmAKwGt3gTvsjtEj3OjN12mIBnyCpTMk4qRMMoYxVc3aKvTpDSvZmswiM0c6AZO2APufz0xcNXzSORBj7bmX8d/Q4TNASx7UT2w6Q X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 25:r3GAV2MmeBokQgv7FiG/V8ZfUWa1VERyfD+gCWle0foX0mjaObH26QReuHuZ3gcr5mzxCy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XkoqUwRbrC237XKU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13017025)(13023025)(13015025)(13024025)(13018025)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6096035)(20161123565025)(20161123561025)(20161123559025)(20161123556025)(20161123563025); SRVR:CY4PR03MB2472; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 4:787PeD1MmbZrpwgS2VkX5nL4Tr4SXCiEwfgwuxovxBiumeIyTYo2XwBNPDlbfd5AiZosu4vpK9QIf+6e5Rl8dZQiMeqnQf2M5TbPv1Ov8EaKDKktUjBQ21Cqa13M2cCn6cJ4XcIH3zpx27K+xSchMDjq8aiRXlcAHO2SaRo2Bx3d3AD9tvaVBLYRGgIfBkHwsPX2Ejxg0fH38/p223r3g7+/PMy6St7cNlpzHc/IAXOn9FQktGD37teN/AmL4yCQtGXlBppDRePFg2nzGgL8clqv4faD5DB01aNhQdb3qUN9dSk2H5jE+YdS4/wi6UxJQABEL7ul5138Otz1zGV1DdxbbM/MjBe9w9RHz0er5YUNOaHQsLKJyW/cuD9sHb/PFDunWHrg036b7p/Qxn0ZGqUFZNkUnYC64IvgtvNc49kOUPPUGbX0oU9vsAeGOM+Y6YrA0sPuHZG3lGmUuTsinIujS3Rc2PlkbuTs9ceE/JePNOiBKMDDGxqTlIOQOmc5ziqK0FrWLirN6A4dmQ/BV7IAXOAifrQj9+GOJhjvieqoZZi7uMl8Q1qvueOzd994kvozF20JiHMaBs2CqHJ5iWjods7O/MoH87+dYM95vTJtXOFi92nrTyBYQT5XuAYaRk1WOC41U6pKvBMRuYEiDs4RgPeC3JDuzBJ8YofDnPlqUtaabn2dVY2HE7O5OEezFuAJ0o28b35KBPzoXCSLVx17Da0Wuds2j6RLWT+utppQ5CLK410KQPd/U3//viLt X-Forefront-PRVS: 014617085B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2472; 23:3VV2vBVx5n8ftnhHyF35yDEV036FdpIxeP0hmcGRD?= =?us-ascii?Q?8zf1gJ5skcpLsM2M7oKfMdTHWAl727setegTsm8eqHqro6nirBYfHYhuMMA1?= =?us-ascii?Q?iAkHG6Xczc/dKYAoZCs6KYYZW8+w7eWS1atH8ErfL7AveCSup7spE06NoD6+?= =?us-ascii?Q?+pTKbrnkOV3ivukrHdnXQLtHEGWGCcs7bv520TpsGaocHsTv0cEU2RzhLu8L?= =?us-ascii?Q?3NOelM1M/ynt+pn4l7ODjzvW8q0/pNyi+vSe7R3lTaOA3TlO7pB662RdYzZk?= =?us-ascii?Q?xeXenZPIXOdrfUVcyGQ6pYoBFKoyaC6dQt8aQhfNI0WoLGCYYLZQj13ayoEg?= =?us-ascii?Q?LK9hcMD6s7guJjhPXmfqAgabZxrrHkiC9lSr8lD2Ji71ZKzlJlFgek826AgM?= =?us-ascii?Q?5SQfQ118CZnrcat5ZJTSSElqF9g+/pPLXi7pGcWuA2M8kaSWEgU0tNtEP5tf?= =?us-ascii?Q?gVc0UOkpkVbKjhvYb7nhoOuBeB81TGNFqxgGQtdr971mvNmBc3uiHjRWt+yI?= =?us-ascii?Q?802jvcsBIWkcF6MruKgRBjNX+w0SFKOKOcvh7fYGHEPWsSKDV1eTOe1cRifn?= =?us-ascii?Q?c8mi6eHV6Ok+rsyX3f6ZcEymP7PDYN8n9/TPOb2XYnBLQ5S3Huep/T4NxlOt?= =?us-ascii?Q?C062/rbhuY/5O4sGBPw5yPpr6Y/BB0s678m+kdgBzrDyw+bDIwmXuaQ540T9?= =?us-ascii?Q?H/jRL3g3RM2o83o/mnVuxICHt+7YBbVkltCAxB/1aI4jcpruMp7pnabFXQh8?= =?us-ascii?Q?InIulyqZ2LL6PI8emc0yPJNqZ/kd+vGN4wpHVKUEhtk5alL+mql70AnYPXUx?= =?us-ascii?Q?mW1C8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534Cotm8DGQ20xwJUTQ0tJLRt0YBbN83B/YhkUP4XLkHOkjcWtJkruTG9bZp4ENxhYRppDYJCEugH4/TCnuYw+3tb6t7GGPz9x7Xr4cSgVPxswSnGfDHpFizwDcc0n1q3Me; 24:DvEccRHshelzU/ad99ROcuQtJgv8XfpMwzbFwR9opEW+Mbs4PW9nyVFf5M1NaAaObyDHPcQLUI5kOFU7vndgW8QLqzrqp2FVSeAkVyZs6WE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 7:pJzmR+JT+eQfcNQMIQy+ppUomOFVoDwwV5QRoMAI0Hy/R7F1jr+4SFGaD3zlwUXoAbTxsJGDYJexD855eW9ZKYRSdetaIp6l86w+dFyveE2J4wayq6fds+6LwajHpJee8OclXq/KbD0Ly1PxtO4zjdy25tODCpS9cTfKOaT70xhPblOsbwUvCooFatQHMzdh83vGd9sJR7vlKoAxbMuJqCLLfSAvtlceeOEizyc/mU915OTxJolb/2YypSWTZwmG8Rq84RCEY0tiGy30qXBiiEKkUtPzGGjkDwi41dH6zWryCvv3Sz+NXNJq6wAg1VGFX3y7qGoXGAabQMjvpzsmmBIFmfBh3lah6aowqHbFPq6ZmUggwcmYeHhxdZzdCm3mKmSbDmuFdHDig4nVp4wbi1TAZwbTebtSP/lqL2k8wKHM9C9httDOZOxe+3PFebsIXZWsYL+Tx/Q4dXqg0xEE9A== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2016 10:09:25.9755 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2472 Subject: [dpdk-dev] [PATCH 10/13] eal/pci: generalize args of PCI scan/match towards RTE device/driver 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: Sun, 04 Dec 2016 10:09:28 -0000 PCI scan and match now work on rte_device/rte_driver rather than PCI specific objects. These functions can now be plugged to the generic bus callbacks for scanning and matching devices/drivers. Signed-off-by: Shreyansh Jain --- app/test/test_pci.c | 2 +- lib/librte_eal/bsdapp/eal/eal_pci.c | 4 ++-- lib/librte_eal/common/eal_common_pci.c | 17 +++++++++++------ lib/librte_eal/common/include/rte_pci.h | 17 ++++++++++------- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++-- 5 files changed, 26 insertions(+), 18 deletions(-) diff --git a/app/test/test_pci.c b/app/test/test_pci.c index cda186d..f9b84db 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -180,7 +180,7 @@ test_pci_setup(void) TAILQ_INSERT_TAIL(&real_pci_device_list, dev, next); } - ret = rte_eal_pci_scan(); + ret = rte_eal_pci_scan(NULL); TEST_ASSERT_SUCCESS(ret, "failed to scan PCI bus"); rte_eal_pci_dump(stdout); diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c index 8b3ed88..10b234e 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -361,7 +361,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) * list. Call pci_scan_one() for each pci entry found. */ int -rte_eal_pci_scan(void) +rte_eal_pci_scan(struct rte_bus *bus __rte_unused) { int fd; unsigned dev_count = 0; @@ -676,7 +676,7 @@ rte_eal_pci_init(void) if (internal_config.no_pci) return 0; - if (rte_eal_pci_scan() < 0) { + if (rte_eal_pci_scan(NULL) < 0) { RTE_LOG(ERR, EAL, "%s(): Cannot scan PCI bus\n", __func__); return -1; } diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 793ac59..ba84ccb 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -153,17 +153,22 @@ pci_unmap_resource(void *requested_addr, size_t size) } int -rte_eal_pci_match_default(struct rte_pci_driver *pci_drv, - struct rte_pci_device *pci_dev) +rte_eal_pci_match_default(struct rte_driver *drv, + struct rte_device *dev) { int match = 0; const struct rte_pci_id *id_table; + struct rte_pci_driver *pci_drv; + struct rte_pci_device *pci_dev; - if (!pci_drv || !pci_dev || !pci_drv->id_table) { - RTE_LOG(DEBUG, EAL, "Invalid PCI Driver object\n"); + if (!drv || !dev) { + RTE_LOG(DEBUG, EAL, "Invalid Device/Driver\n"); return -1; } + pci_drv = container_of(drv, struct rte_pci_driver, driver); + pci_dev = container_of(dev, struct rte_pci_device, device); + for (id_table = pci_drv->id_table; id_table->vendor_id != 0; id_table++) { /* check if device's identifiers match the driver's ones */ @@ -226,7 +231,7 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, } /* The device is not blacklisted; Check if driver supports it */ - ret = rte_eal_pci_match_default(dr, dev); + ret = rte_eal_pci_match_default(driver, device); if (ret) { /* Match of device and driver failed */ RTE_LOG(DEBUG, EAL, "Driver (%s) doesn't match the device\n", @@ -282,7 +287,7 @@ rte_eal_pci_detach_dev(struct rte_pci_driver *dr, driver = &(dr->driver); device = &(dev->device); - ret = rte_eal_pci_match_default(dr, dev); + ret = rte_eal_pci_match_default(driver, device); if (ret) { /* Device and driver don't match */ return 1; diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index eb9ef7d..2a5f766 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -363,25 +363,28 @@ rte_eal_compare_pci_addr(const struct rte_pci_addr *addr, * Scan the content of the PCI bus, and the devices in the devices * list * + * @param bus + * Reference to the PCI bus + * * @return * 0 on success, negative on error */ -int rte_eal_pci_scan(void); +int rte_eal_pci_scan(struct rte_bus *bus); /** * Match the PCI Driver and Device using the ID Table * - * @param pci_drv - * PCI driver from which ID table would be extracted - * @param pci_dev - * PCI device to match against the driver + * @param drv + * driver from which ID table would be extracted + * @param dev + * device to match against the driver * @return * 0 for successful match * !0 for unsuccessful match */ int -rte_eal_pci_match_default(struct rte_pci_driver *pci_drv, - struct rte_pci_device *pci_dev); +rte_eal_pci_match_default(struct rte_driver *drv, + struct rte_device *dev); /** * Probe the PCI bus for registered drivers. diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c index 876ba38..bafb7fb 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -485,7 +485,7 @@ parse_pci_addr_format(const char *buf, int bufsize, uint16_t *domain, * list */ int -rte_eal_pci_scan(void) +rte_eal_pci_scan(struct rte_bus *bus_p __rte_unused) { struct dirent *e; DIR *dir; @@ -763,7 +763,7 @@ rte_eal_pci_init(void) if (internal_config.no_pci) return 0; - if (rte_eal_pci_scan() < 0) { + if (rte_eal_pci_scan(NULL) < 0) { RTE_LOG(ERR, EAL, "%s(): Cannot scan PCI bus\n", __func__); return -1; } -- 2.7.4