From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v5 11/12] drivers: update PMDs to use rte_driver probe and remove Date: Tue, 10 Jan 2017 09:39:07 +0530 Message-ID: <2ec485c9-c4b1-727c-28cb-46b270708ca8@nxp.com> References: <1482756644-13726-1-git-send-email-shreyansh.jain@nxp.com> <1482758645-23057-1-git-send-email-shreyansh.jain@nxp.com> <1482758645-23057-12-git-send-email-shreyansh.jain@nxp.com> <8484fc57-baa7-0f84-bc05-49d7f4ca79ad@intel.com> <03401dd4-5d78-6ad2-e199-c076495e186d@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Cc: , To: Ferruh Yigit , Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0069.outbound.protection.outlook.com [104.47.34.69]) by dpdk.org (Postfix) with ESMTP id 9EBCB1E2F for ; Tue, 10 Jan 2017 05:05:42 +0100 (CET) In-Reply-To: <03401dd4-5d78-6ad2-e199-c076495e186d@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Monday 09 January 2017 09:48 PM, Ferruh Yigit wrote: > On 1/9/2017 3:19 PM, Ferruh Yigit wrote: >> On 12/26/2016 1:24 PM, Shreyansh Jain wrote: >>> These callbacks now act as first layer of PCI interfaces from the Bus. >>> Bus probe would enter the PMDs through the rte_driver->probe/remove >>> callbacks, falling to rte_xxx_driver->probe/remove (Currently, all the >>> drivers are rte_pci_driver). >>> >>> This patch also changes QAT which is the only crypto PMD based on PCI. >>> All others would be changed in a separate patch focused on VDEV. >>> >>> Signed-off-by: Shreyansh Jain >>> --- > <...> >>> >>> diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c >>> index 1e7ee61..bc1a9c6 100644 >>> --- a/drivers/crypto/qat/rte_qat_cryptodev.c >>> +++ b/drivers/crypto/qat/rte_qat_cryptodev.c >>> @@ -120,6 +120,10 @@ crypto_qat_dev_init(__attribute__((unused)) struct rte_cryptodev_driver *crypto_ >>> >>> static struct rte_cryptodev_driver rte_qat_pmd = { >>> .pci_drv = { >>> + .driver = { >>> + .probe = rte_eal_pci_probe, >>> + .remove = rte_eal_pci_remove, >>> + }, >> >> Since this part is common for all PCI drivers, why not make this part of >> RTE_PMD_REGISTER_PCI macro? >> > > I have seen your comment [1] which looks like better idea. Thanks. And, actually, it is mostly Thomas's idea :) > > providing a rte_bus->probe(), > > and rte_eal_bus_probe() calls rte_bus->probe() > > for pci devices, rte_bus->probe = rte_eal_pci_probe .. > > > [1] > http://dpdk.org/ml/archives/dev/2017-January/054125.html > > Thanks, > ferruh >