From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0089.outbound.protection.outlook.com [104.47.32.89]) by dpdk.org (Postfix) with ESMTP id 03120558D for ; Mon, 26 Dec 2016 13:50:48 +0100 (CET) Received: from BN6PR03CA0063.namprd03.prod.outlook.com (10.173.137.25) by BN6PR03MB2467.namprd03.prod.outlook.com (10.168.223.21) 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:47 +0000 Received: from BN1AFFO11FD027.protection.gbl (2a01:111:f400:7c10::112) by BN6PR03CA0063.outlook.office365.com (2603:10b6:404:4c::25) 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:47 +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 BN1AFFO11FD027.mail.protection.outlook.com (10.58.52.87) 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:47 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uBQCl90N011201; Mon, 26 Dec 2016 05:50:44 -0700 From: Shreyansh Jain To: CC: , , Shreyansh Jain Date: Mon, 26 Dec 2016 18:20:37 +0530 Message-ID: <1482756644-13726-6-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: 131272302478979953; (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)(39450400003)(39840400002)(39860400002)(39410400002)(39400400002)(39850400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(85426001)(36756003)(626004)(86362001)(5660300001)(77096006)(38730400001)(356003)(47776003)(2906002)(68736007)(8676002)(81156014)(81166006)(50226002)(8936002)(50466002)(6666003)(106466001)(2351001)(48376002)(8656002)(4326007)(5003940100001)(92566002)(97736004)(69596002)(110136003)(105606002)(33646002)(305945005)(104016004)(50986999)(2950100002)(6916009)(76176999)(189998001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2467; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD027; 1:34FhdQrpTa/3nw21njXdojfh4kMtLwKtK6oUPKN2fUchpPSfIDTylOx3ioMKPliDDYPGy9tivxenbSgkQLJPr9YcMw1W5vSZzvujJSW2Yj+Rq+wDCHX7G7we/YJXRy+VfgOaSbS8vM4bZ2zQ2myCdNZYXfrs91Nh3C9a7w1BwCWCB5aVYsyVijBNmzFCZ+oyKXXiNd83P7KsjTVEfbpUfxefgDNnG6UB760c4n/qA0QEuRIPZ2bQqc7yK/vgmaGelnM08hJDnEgnCtt3bz+tqksIAI/qcVpbsu9MFBxPQoik6xqjNehj8oHBDniw4b5GtDO1PBlGQLC/s2NRC2FB+sUszJdHmrzmQF7dPe9nrz8xxXW7wynLKML5LXo1QtcNq2L3EtJZZW4lflGRp6IU4mksPH8/IYUp4z98gUbUgV3Bu86OaXBcfRPYsKH+kjPILho7dVqOt1Q9hMei9liK397u1FWiBtbUF/INYV6c7InxC0itnBxpXYm79ZdMk9XN1ZM3I/dj3CXtRZ1PeV4fWDIoahsk3+iM2rmzGsSdgT24temsaYEjO7G87biX1bTS6QTcAwSPAZsu2fi4ntYGwQ7HjPns3d9K9at754uJ9WuoAn/07xpI4zmhI1HwZGB5JJGghXpyy5V1nclKc5Elhl1dj/1tW8Mgbz61RL49V07Gfw/ew8AHsGp9/pxGreddcu4uuOwosWLHXSUkKp7UrAGrwFQ3UPwCicWUT8NMA6M= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f67dd286-6e59-462f-7371-08d42d8dd092 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2467; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2467; 3:a6gG37A/ysU2yYeFHkJHHovCsbZM4+mG3NPJMnYlpCxwoJ302RbAsqMdcFn+bvdTT92p6RhVbelYmG4J5n0NJTY3g6IXcdK0YICiadl9ZTFwd9Lbm7rlxOpoNeCvS+Qk87hiJ7HO+j54Dox7riC/iD1MNrprYExg7E5rcsibV5OhaCaA7cl6y4O0Ss7GifFC1y+oBbipcnu0Ctmp3VBU87WNbTN4+8gUYRQbIIghfh4ckkxGXgu4pyA3AGRDaGwp/LEJtUfglg56IZK/dsG+FtIAwohdRhN6U/JVqIHL0B7WPdGkzt+51GIbZtTNrHAmbfW4S2HIXV6NIKVZ3VzHSnU5KYlWRXZI5E+SyXAQbMI= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2467; 25:dBma1iCbWlp+TId09bTDoD4Rrbhn39+uOguGwIGdGhbqS77bHusVTN7BHCdf7XqbL8mEivKCEbfVzoOP8n2wImgpBJUGWs7NmOg6Iqg8gjUI/bvJ6e58r9ZfgDvY0UP6ELoLONsj8oWQzlxlO24UVt6exG/TkhtPYJDxR6HGW4WxHJNGli3hPOty5qS92MXMoqQCFHJIz+aAhB5W0M4eOC3GWMDprkVbViscLNGR3oQznSYrIozpYJFilk+fWhBRcj3UMxgRFoWUn6iKXNgTHtW/4kR8bPWHJ00Zr4YV3h4vy3QE79eB9ASE9/V2lKQkwBcUU92+D5Wpngxjnd73FV2+7/mCK4dn6QsvmaGizuqlHpdAfflb+rSHFEgMNFea5g2NM6qftT+iECD994gMFjbUIKWbHP3DJTfR1vBStCSNcXutW/B11P2bd+F8l5Vcx+JhR8l3et2UcM7qIkOxbvA5hKWOeHYKjFe+7XLeZUBbrMCzD0hYbBSStdLWKMgS/neajJXOl/Z6aaXIg8z9DCRUuX5SBsy2dv/AnrBI9croAXLIuIH9uqs4gGFiDgK4JKudjwiXCq+DJVDAxb760NRXJqb9nzSRH29JVQOcd9TLkj1DoYkuaKMCNg6ejxdQvUkZ+v5HyStNLsCccYbTNAbPMwiE92s/K3HQMY8zYrPx1PwZgTuCofIabqYW0euPTyLlfoW0I9NR2hHqPB27uGrlPvsGE22aaYLxQ6+VD9TEeUO25QNXlZ9v/80ChvZDWMxUl+T/zKw1XbU+/vGvcTY9Wi5rVzbnA2qMKs/T3+g= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2467; 31:vyMEy7aaGmpf0uD17G+2Pq/eiegNwLcrHmD3anc++vYgomhhLMIZC0MkOq1pDVXaUdbsJiygMXM5TEQfu6mxEmgkn+y6TE/hv+hGf5my3w7+PyX0z/MP7lgOGu5BbqzpaF6J3E7CFbc/9DqTYjSuPIXRspFccdXKEYpVnESTGC3ARE+I265ZISQwVPbg/MJIzDMqDzFdKBNRuQTDvqWy/mMr1wtSzejucLE5HusilaYYVsXnEka+1zMSB317EPQVYvhgfH1zZzueJVJmALtd1Q== 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)(13015025)(13017025)(13018025)(13023025)(8121501046)(13024025)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123559025)(20161123556025)(20161123563025)(20161123561025)(20161123565025); SRVR:BN6PR03MB2467; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2467; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2467; 4:MfRQC4T34kjhvN319IzOe0m1rw4498bsKB/fApOPi2vUfpiepF8vpkD0n9VoVjGhH+Sz5Cdz2YEQ18BslKzwAyENLs1momiBIHUQ78YpzC9BEaULZzYbNDgsormXIaet6zt9srizsFXtsECnh+laHpqEnDOnJ9SuO+N+nlJj7oPYl4jExZaWNAKcyqUYbEC+hbQj1zvwb1lCL6Jq63jFi6e4kzQHX4td+C0ICxfPIZtMj+AYnDZEJAWTOlAZ9hG4sjk5WawTO3U8Ab9U3zb63vJkDY5eEQoIQ/NOH7DkBA1HQimsYxbU0tLiCZx5JAVej0tkoLZftfH7oWCvzXW9r3V4O5xxHuWIgdIGRYyh5n/dpKZnf5G90pu/H73bTCMHrknDmMQu1Rko9Wdtzzxjf+WuE+AwUhtmWB/0wN14OT2OepBcdoXjQRJ04qYJHdYZu1fpVVjhwzpmPr9s9mmvGnsQEg6eWNgtk1d4Obg2X28XjoHlhITnj/bgUizCtbnP7MMEy/UXH2qNw8D47wKtYmaUtNWcuIj1sIXD8WQ5VvhqeibSR4j/u3wz7uV5A455YkugN/442O2Dz0ZJVtQdBc583Ot4hVO1p0HRu4/HBMQya5br3QOc3K5tagcH3hvpUZA8uGSwyPhY0s3TK055k/ifbcwx/UD5JfcNpFbH7n2vSbCcR2rtXBnDmvnwHIz/3stziMu3Qeehez23j49vnGMU72fwO0WmgNSGqn6dDrMQ5u7ALDPgC2YdDA1PArks X-Forefront-PRVS: 016885DD9B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2467; 23:1UVo+7w95FwfC/AaE8+JAKgosE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MV4SgXDTe3QINXHwHVG4Xjv437qUM0Yh7TcqYA29rcW5uND/48yAz8nvwPB9TpS7SJzk5eAYAc/4JUDj+VOk6YnRPY+nyEGIDHja2inLsB7gnw8KO7/De9d7Zo5kA3kwPTqTNuqNVS; 24:5/JBg5eHuRogvzyCkFmNi71xTXPH09SiVUQipicdcW9HGm5GVFArq43FMXOGsJpnWXHBC1x3+g7PT1yLvsryVWlBzkGWESvdgQvZAMCdurk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2467; 7:BqydPOfmsCP309eT4LoHxXZY4BImgFR8YuEj3QOSwGykG/RQtvXQy68afUeeS0rKvCqGb3gAdBqhTdlfc2HVtF1DCvIsGfzIpHZSI1rpuagrBiG89HFcxZ0oZ7LpiO/eZOYfPHuoBSQ+RqFuK9hIEoRHn64CErd4BvhEzWwFvFZNBsukV24uf7S37pVRNHQtcB77lV88q4u/xanDjhFHu0IiJOHkt+AwlGwp9qR7UlPqMZLsl/RZMxlOwvEGtEBegcF6ELcZ9r6nGJnWwS8PNa/qF99gZlzRF4y8rUOcQkbHjTcJfE0Os4k29jpaX8yeQzpmimLcDSywgAYkgjxMBkDWAGy9NE5OaRUzuRIDohLZXqlUijqXbWhvUJHZyC4xQQ3/fiHEVmbtmT7Eyzk8bj1+cahi0FesasuTo8ZXbkDR2BNJJ/9Af6WauhesF2AuNOVqRwmZZzvW2AXvqW/+9g== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2016 12:50:47.6639 (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: BN6PR03MB2467 Subject: [dpdk-dev] [PATCH v4 05/12] eal: add probe and remove support for rte_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:49 -0000 rte_driver now supports probe and remove. These would be used for generic device type (PCI, etc) probe and remove. Signed-off-by: Shreyansh Jain --- lib/librte_eal/common/include/rte_dev.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 8ac09e0..3a3dc9b 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -145,6 +145,16 @@ void rte_eal_device_insert(struct rte_device *dev); void rte_eal_device_remove(struct rte_device *dev); /** + * Initialisation function for the driver called during probing. + */ +typedef int (driver_probe_t)(struct rte_driver *, struct rte_device *); + +/** + * Uninitialisation function for the driver called during hotplugging. + */ +typedef int (driver_remove_t)(struct rte_device *); + +/** * A structure describing a device driver. */ struct rte_driver { @@ -152,6 +162,8 @@ struct rte_driver { struct rte_bus *bus; /**< Bus serviced by this driver */ const char *name; /**< Driver name. */ const char *alias; /**< Driver alias. */ + driver_probe_t *probe; /**< Probe the device */ + driver_remove_t *remove; /**< Remove/hotplugging the device */ }; /** -- 2.7.4