From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0089.outbound.protection.outlook.com [104.47.34.89]) by dpdk.org (Postfix) with ESMTP id 0FEA058CF for ; Mon, 26 Dec 2016 13:50:56 +0100 (CET) Received: from BY2PR03CA038.namprd03.prod.outlook.com (10.141.249.11) 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.803.11; Mon, 26 Dec 2016 12:50:55 +0000 Received: from BN1BFFO11FD044.protection.gbl (2a01:111:f400:7c10::1:121) by BY2PR03CA038.outlook.office365.com (2a01:111:e400:2c5d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.803.11 via Frontend Transport; Mon, 26 Dec 2016 12:50:55 +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 BN1BFFO11FD044.mail.protection.outlook.com (10.58.144.107) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.789.10 via Frontend Transport; Mon, 26 Dec 2016 12:50:54 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBQCl90Q011201; Mon, 26 Dec 2016 05:50:52 -0700 From: Shreyansh Jain To: CC: , , Shreyansh Jain Date: Mon, 26 Dec 2016 18:20:40 +0530 Message-ID: <1482756644-13726-9-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> References: <1481893853-31790-1-git-send-email-shreyansh.jain@nxp.com> <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131272302551973568; (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)(336005)(39400400002)(39410400002)(39450400003)(39850400002)(39380400002)(39840400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(38730400001)(77096006)(8656002)(47776003)(5660300001)(92566002)(2950100002)(6666003)(69596002)(50466002)(356003)(110136003)(305945005)(6916009)(48376002)(86362001)(81166006)(5003940100001)(105606002)(104016004)(8936002)(85426001)(8676002)(81156014)(33646002)(2906002)(4326007)(189998001)(50226002)(68736007)(626004)(36756003)(97736004)(106466001)(76176999)(2351001)(50986999)(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; BN1BFFO11FD044; 1:V6EXjhsikR/Jx93ZCdvaw/hLffDpPnO6KMkd/CF8R/ppoSm8wu320V7muTHUWuqNyDz7SfPunGriPYoL2c2wVS7Iv6CG9VaTyAgGTaWanPx6BfUL7QjJiJ+8JUnpAfmTEV9wpyYlfVkkL4qNppsrJeKQJKNmh7O49zGSTjmisKNR99+ofCiU/jRTrkZTOcY+yI81VV1g/rtzd8Wb1NZLQlbT1ggNVm4EdvgrROKlX/4lMzrMGogiEpARxQU2YlJawAI5vH8PVcyt6AL9G4g8/72PWVa5cfsrwS+ka59nrE0GM6TYpEtBkJOZjAvWCYhjQWcyXsNCc78A7uqARkn8Zdb8c7Z0WLHkTQcCQt3RxiVHt7/6SAPs8+X3EZIULSAw6cVGNF9Isvj2exlNZZZbkTNg4BBrHg3DjsYr7ZhaAISDY9vxGmXEXIniEpcC590/53/FpWlv8VcqahsTrLaGqrrLOh/qnfC4kdPo647AxVcMrxyWUCzA5fG0zBrqpumO5Sfo3NPLawS9Z38n9dW3xJKtlQnRmFCTWSvBMsNqrn6er7E0eiY87jC7kOWrGhIrG0DBYXAe0FEphy+Oym9DSFhK5jvh1fFiI2L1qHqqfnvF/88/f9cBaiIGwHE3qP1wUXS/svZPL418cdnJQH2ZyRPMDt9EoDnkwlV0ADru1GfdnF7uAOi2QT7RW92xlrvDfao57IcT7yhOOzb2mi7o/Km84zEUFzrEdu8of7Vrh34= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 5cba35b7-68ab-4450-dd5f-08d42d8dd4e9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY4PR03MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 3:95LwETCdita1UGwh/onE6YFVwYQWuR+xYzhCsjDqtGZWZKuOdeUqaBRRbBhkB3NghxpEe9SnpoiZ7COaO1xp8pVFAigGTP+H06ee3omUXSSRRXBFIlkZ+/UKrQXitmNz1AljVQ8Ns1huNHIgfTKtyIexMFXVhDJ0ZS1p6T0EwexZ9Y7z0ZFXHbu9giF1OH/b6WYXmpcD701vwCaQRwV5buakDc9j9LI9z6MOFdwvGLneM7zWZF/BViW6j5q59UDI8N/m9wWPqRD0NOZQGnIFxHrz6vIlU64cQkesT1CO8Z/CQOmVicdwCQI4cmd5ycN4k+sg512dYpr1XTpbecoiEkM9g6xwu+vPUL2qGlVYZYg=; 25:K/py9xiQjWPc0BMo0yoOmqSIkMOaL1IoIvM9rPo3YgAj5tvBmGVf2Ia6pjGen1V1GQ0xorc16JFJZh0t0jpsJpwdkKst2wNxWjqQgW2HKzQVeQQowsNTM7a3cjQC+jiVzdyn0z2aQL4cm6fBsu3YW0B9F572zpfHw9CaKg4gOCJPCY2CjAxlywpptKUgeah6bP2qePFJZr1kkXYdBYyFqojN+wQ8hNG8aAsCEcycmcoqZzWBSYyAKyGTOZfPUySusjcz/Hwyoqlj077BH3L2vWjQ7cfSpn1FbemIabHDTCSM4JI/C+YEYAa4Noc5HpEX2vfjD6/GX6FCr+MZCsnUt3CRBn6a6vA30ZWoRsMlD24G0LRIpreqTyVHoQggLDcOTnEc6PR+R70Rg1uJyuT9Lupqlqs/2lPABgt3Nug+K1S05ZrNj7OMgOAD7fj5AE4dGOHlaxz96xSXT3+VqVRaLw== X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 31:d7RujJS5gMNeQAxuVT2VLBVo2dMnCPbhfP9OlcFqz3B/oaMgzirttgYM8XkXwTAIKBH2hobG+cqshv9n3AgLUZdrFO1Nr1/r80kNOMHfcMga+5O7qU4eTfYPbRHsZWLDwQwMzC7avaJdQLEO1lMrM5vonegywiqC1qXQN2GiXuv/ixGpy3o6cai5NA1jqU9FFPAU5GZqRYtVnPgtgA9XaBuyA/oOU5XumZJevT0xZrHbpcSsYoqxz0FbenyR9nmkTH96g3Lxpq1WtyvHQI/Pdg== 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)(13024025)(13023025)(13015025)(13018025)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:CY4PR03MB2472; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2472; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 4:+JOb0GwFljxwc7r58WbzQyj0on7qvV1aLjgVxp7rkOTMWmQ0LqT4s6CvBzBFmYidLjBQLwQ5zURXCdSGAKix8vaBKq2jriZwiYOUFXY2eJXt1Z/a4Z/9VphBO4rephR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shN5/Hwy1fV4OkRSBdfZayWej/BmwaYwfNEtgCzlk3BmMtaq25FxzjygwF?= =?us-ascii?Q?z3d3yCAEDscnWS7+xQEITr54ufd9hCq58mW+BXKORArJSsBGOMBBpJ/qr3bq?= =?us-ascii?Q?Odd8DqiKAE4ieEGcwZv5XU=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 6:+IcGgTeHdj3LGYS7kJcfoLxYWfq7Qbps1ZZwen61L+begnAb0coY/8Us9BuzKkTkW69SVK7LseOCdJu3gb7WW3oYjMC0DUv03BEm7O81+OCBTXQHoY+ouPm+MtxlONW/XyEPo//AKmAQ7btaKefil67JNNy1iNzOeLSmF1xkciH1qHfZbnd58hTmryBDoiuWh7sWa4Rmu79rIIybAlEpuLOV/L5z+Wc5MW61reWzaW6X7N2hYSYpKOFcTP/0H3VfbBlKUB8wzYpxuoJkaUZhYYcguRsRDw9XL41kQZO31/DfaLBKywxbCbDl51M/i/RsH5paAS83rZhkoeq/IPOava8JKoojni+rprdAwLahuvt6ykOunGyLFk198MwAydIo1azEwNS3XYnJISockg0MwwWe74SXnwVq16K1GYPTW7tL1DkYmW8gK4iJURJO7sfL; 5:9utaA/GmxWl7wDmLf1NSnwjl9qgGszMmNlzJAcZB6eSn7DDK0RHxdfFBi97kbi0N5XSTbALYIyie+g8F8IznS/z3zPHNOtvtmcFGEIbhQxTl5e6pXXzqlEBWNLCpBRbb8F03/I4K1tyx0WOzw1xLP/q5V+ZhinfuPVesLqvucTsXP434HEtXTY4zU2c0mINP; 24:xDRwYNoJsb7hTaMKOf2Ir62YQ300PC1zspuA+kBJSfXombvSFZ+o26Jvafu86AV6LsdecbJRNNN4svQeK9Mz/6rB8t7VPbk0c5/bwIkpHuQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2472; 7:ykqtoyqgBwgb29mqvJ0pGcYJFpcqYG4HZNPXibHY519UHsvD21chZADaRmnC28LZitjg9OuubNNVGHTiPu2ZB4cUHP5kWR8cBGq5iDjgj/DERxefi+YsH1Doq4xLi+lzFqqOW7XKZadqPHout+Sz7IDWAXtTB4VziMuCVSl2q1UIWzsIs0e1yKpTSvOH+0OXLlMTRJj39b95osR9XeH1b4eIf2s9wav2SNd2cnuNQ7zK90mh4pePp2nM3z9kZjzTeHRpCKXYpPj+7VZmK0JZ7+1CQYU+dgcPK+sbOnfICl0dd8d8mvyOcJjl1aa6aTIcuMe6MznDWgbnNRycU8ewBxKL4/VLiwyvyTQU5Pab4pJodvtSvapbXUL8Zqa8lG+9zM58ueNXlLUCEz6OXXfeXuK2m6kvJHCRBbR4qOv0+KMC5USKmBqS8j0W+kKChteX8Ha8Hx4EFS/Pu8qnEc11wg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2016 12:50:54.9477 (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 v4 08/12] 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: Mon, 26 Dec 2016 12:50:57 -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 | 28 +++++++++++++++++++++------- lib/librte_eal/common/include/rte_pci.h | 16 +++++++++------- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 ++-- 5 files changed, 35 insertions(+), 19 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 3a5c315..56b506e 100644 --- a/lib/librte_eal/bsdapp/eal/eal_pci.c +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c @@ -352,7 +352,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; @@ -667,7 +667,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 f466448..b7be6aa 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(struct rte_pci_driver *pci_drv, - struct rte_pci_device *pci_dev) +rte_eal_pci_match(struct rte_driver *drv, + struct rte_device *dev) { int match = 1; 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 */ @@ -201,11 +206,15 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr, struct rte_pci_device *dev) { int ret; + struct rte_driver *driver; + struct rte_device *device; struct rte_pci_addr *loc; if ((dr == NULL) || (dev == NULL)) return -EINVAL; + driver = &dr->driver; + device = &dev->device; loc = &dev->addr; RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n", @@ -222,11 +231,11 @@ 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(dr, dev); + ret = rte_eal_pci_match(driver, device); if (ret) { /* Match of device and driver failed */ RTE_LOG(DEBUG, EAL, "Driver (%s) doesn't match the device\n", - dr->driver.name); + driver->name); return 1; } @@ -263,12 +272,17 @@ rte_eal_pci_detach_dev(struct rte_pci_driver *dr, struct rte_pci_device *dev) { int ret; + struct rte_driver *driver = NULL; + struct rte_device *device; struct rte_pci_addr *loc; if ((dr == NULL) || (dev == NULL)) return -EINVAL; - ret = rte_eal_pci_match(dr, dev); + driver = &(dr->driver); + device = &(dev->device); + + ret = rte_eal_pci_match(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 34ff3d1..e5e58dd 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -367,25 +367,27 @@ 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(struct rte_pci_driver *pci_drv, - struct rte_pci_device *pci_dev); +rte_eal_pci_match(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 4350134..7e092d2 100644 --- a/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -446,7 +446,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; @@ -724,7 +724,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