From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nbfkord-smmo02.seg.att.com (nbfkord-smmo02.seg.att.com [209.65.160.78]) by dpdk.org (Postfix) with ESMTP id 08946370 for ; Tue, 13 Dec 2016 14:52:24 +0100 (CET) Received: from unknown [12.187.104.26] (EHLO webmail.solarflare.com) by nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) with ESMTP id 91dff485.2b454208f940.106216.00-2458.206519.nbfkord-smmo02.seg.att.com (envelope-from ); Tue, 13 Dec 2016 13:52:25 +0000 (UTC) X-MXL-Hash: 584ffd19658ac6a8-26c96b3114d6c94a04d59760ffe460c882338598 Received: from unknown [12.187.104.26] (EHLO webmail.solarflare.com) by nbfkord-smmo02.seg.att.com(mxl_mta-7.2.4-7) over TLS secured channel with ESMTP id 51dff485.0.106214.00-2344.206509.nbfkord-smmo02.seg.att.com (envelope-from ); Tue, 13 Dec 2016 13:52:23 +0000 (UTC) X-MXL-Hash: 584ffd17598044c2-c96f7734af9078b381184508acaf117fec6d480c Received: from [192.168.38.17] (84.52.89.52) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Tue, 13 Dec 2016 05:52:17 -0800 To: Shreyansh Jain , , References: <1480846288-2517-1-git-send-email-shreyansh.jain@nxp.com> <1481636232-2300-1-git-send-email-shreyansh.jain@nxp.com> <1481636232-2300-13-git-send-email-shreyansh.jain@nxp.com> CC: , , From: Andrew Rybchenko Message-ID: <44213d68-1e87-c464-549a-274e389b9c0f@solarflare.com> Date: Tue, 13 Dec 2016 16:52:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1481636232-2300-13-git-send-email-shreyansh.jain@nxp.com> X-Originating-IP: [84.52.89.52] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ocex03.SolarFlarecom.com (10.20.40.36) X-AnalysisOut: [v=2.1 cv=Yd+7kllf c=1 sm=1 tr=0 a=8BlWFWvVlq5taO8ncb8nKg==] X-AnalysisOut: [:17 a=RB3BGLmKESwA:10 a=n5n_aSjo0skA:10 a=8AirrxEcAAAA:8 a] X-AnalysisOut: [=y7ZugLHjmKawjLb9XU0A:9 a=pILNOxqGKmIA:10 a=l2QVttdWv94njw] X-AnalysisOut: [hWVbwA:9 a=k14242C85zuRj6D7:21 a=_W_S_7VecoQA:10 a=ST-jHhO] X-AnalysisOut: [KWsTCqRlWije3:22] X-Spam: [F=0.2000000000; CM=0.500; S=0.200(2015072901)] X-MAIL-FROM: X-SOURCE-IP: [12.187.104.26] Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 12/12] drivers: update PMDs to use rte_driver probe and remove 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: Tue, 13 Dec 2016 13:52:25 -0000 On 12/13/2016 04:37 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). I think similar changes in drivers/net/sfc/sfc_ethdev.c (already in dpdk-next-net) are required as well. > Signed-off-by: Shreyansh Jain > --- > drivers/net/bnx2x/bnx2x_ethdev.c | 8 ++++++++ > drivers/net/bnxt/bnxt_ethdev.c | 4 ++++ > drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++++ > drivers/net/e1000/em_ethdev.c | 4 ++++ > drivers/net/e1000/igb_ethdev.c | 8 ++++++++ > drivers/net/ena/ena_ethdev.c | 4 ++++ > drivers/net/enic/enic_ethdev.c | 4 ++++ > drivers/net/fm10k/fm10k_ethdev.c | 4 ++++ > drivers/net/i40e/i40e_ethdev.c | 4 ++++ > drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++ > drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++++++ > drivers/net/mlx4/mlx4.c | 4 +++- > drivers/net/mlx5/mlx5.c | 1 + > drivers/net/nfp/nfp_net.c | 4 ++++ > drivers/net/qede/qede_ethdev.c | 8 ++++++++ > drivers/net/szedata2/rte_eth_szedata2.c | 4 ++++ > drivers/net/thunderx/nicvf_ethdev.c | 4 ++++ > drivers/net/virtio/virtio_ethdev.c | 2 ++ > drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++++ > 19 files changed, 86 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c > index 0eae433..9f3b3f2 100644 > --- a/drivers/net/bnx2x/bnx2x_ethdev.c > +++ b/drivers/net/bnx2x/bnx2x_ethdev.c > @@ -618,6 +618,10 @@ eth_bnx2xvf_dev_init(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_bnx2x_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_bnx2x_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, > .probe = rte_eth_dev_pci_probe, > @@ -632,6 +636,10 @@ static struct eth_driver rte_bnx2x_pmd = { > */ > static struct eth_driver rte_bnx2xvf_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_bnx2xvf_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index 035fe07..c8671c8 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -1160,6 +1160,10 @@ bnxt_dev_uninit(struct rte_eth_dev *eth_dev) { > > static struct eth_driver bnxt_rte_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = bnxt_pci_id_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | > RTE_PCI_DRV_DETACHABLE | RTE_PCI_DRV_INTR_LSC, > diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c > index b7f28eb..67714fa 100644 > --- a/drivers/net/cxgbe/cxgbe_ethdev.c > +++ b/drivers/net/cxgbe/cxgbe_ethdev.c > @@ -1039,6 +1039,10 @@ static int eth_cxgbe_dev_init(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_cxgbe_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = cxgb4_pci_tbl, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c > index aee3d34..7be5da3 100644 > --- a/drivers/net/e1000/em_ethdev.c > +++ b/drivers/net/e1000/em_ethdev.c > @@ -391,6 +391,10 @@ eth_em_dev_uninit(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_em_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_em_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | > RTE_PCI_DRV_DETACHABLE, > diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c > index 2fddf0c..70dd24c 100644 > --- a/drivers/net/e1000/igb_ethdev.c > +++ b/drivers/net/e1000/igb_ethdev.c > @@ -1078,6 +1078,10 @@ eth_igbvf_dev_uninit(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_igb_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_igb_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | > RTE_PCI_DRV_DETACHABLE, > @@ -1094,6 +1098,10 @@ static struct eth_driver rte_igb_pmd = { > */ > static struct eth_driver rte_igbvf_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_igbvf_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c > index ab9a178..54fc8de 100644 > --- a/drivers/net/ena/ena_ethdev.c > +++ b/drivers/net/ena/ena_ethdev.c > @@ -1705,6 +1705,10 @@ static uint16_t eth_ena_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, > > static struct eth_driver rte_ena_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_ena_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c > index 2b154ec..c2783db 100644 > --- a/drivers/net/enic/enic_ethdev.c > +++ b/drivers/net/enic/enic_ethdev.c > @@ -634,6 +634,10 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_enic_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_enic_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c > index 923690c..d1a2efa 100644 > --- a/drivers/net/fm10k/fm10k_ethdev.c > +++ b/drivers/net/fm10k/fm10k_ethdev.c > @@ -3061,6 +3061,10 @@ static const struct rte_pci_id pci_id_fm10k_map[] = { > > static struct eth_driver rte_pmd_fm10k = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_fm10k_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | > RTE_PCI_DRV_DETACHABLE, > diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c > index 67778ba..9c5d50f 100644 > --- a/drivers/net/i40e/i40e_ethdev.c > +++ b/drivers/net/i40e/i40e_ethdev.c > @@ -670,6 +670,10 @@ static const struct rte_i40e_xstats_name_off rte_i40e_txq_prio_strings[] = { > > static struct eth_driver rte_i40e_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_i40e_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | > RTE_PCI_DRV_DETACHABLE, > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c > index aa306d6..10bf6ab 100644 > --- a/drivers/net/i40e/i40e_ethdev_vf.c > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > @@ -1527,6 +1527,10 @@ i40evf_dev_uninit(struct rte_eth_dev *eth_dev) > */ > static struct eth_driver rte_i40evf_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_i40evf_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c > index edc9b22..80ee232 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -1564,6 +1564,10 @@ eth_ixgbevf_dev_uninit(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_ixgbe_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_ixgbe_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | > RTE_PCI_DRV_DETACHABLE, > @@ -1580,6 +1584,10 @@ static struct eth_driver rte_ixgbe_pmd = { > */ > static struct eth_driver rte_ixgbevf_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_ixgbevf_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c > index da61a85..e3dcd41 100644 > --- a/drivers/net/mlx4/mlx4.c > +++ b/drivers/net/mlx4/mlx4.c > @@ -5907,7 +5907,9 @@ static const struct rte_pci_id mlx4_pci_id_map[] = { > static struct eth_driver mlx4_driver = { > .pci_drv = { > .driver = { > - .name = MLX4_DRIVER_NAME > + .name = MLX4_DRIVER_NAME, > + .probe = rte_eal_pci_probe, > + }, > }, > .id_table = mlx4_pci_id_map, > .probe = mlx4_pci_probe, > diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c > index 90cc35e..76dda13 100644 > --- a/drivers/net/mlx5/mlx5.c > +++ b/drivers/net/mlx5/mlx5.c > @@ -731,6 +731,7 @@ static struct eth_driver mlx5_driver = { > .pci_drv = { > .driver = { > .name = MLX5_DRIVER_NAME > + .probe = rte_eal_pci_probe, > }, > .id_table = mlx5_pci_id_map, > .probe = mlx5_pci_probe, > diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c > index de80b46..125ba86 100644 > --- a/drivers/net/nfp/nfp_net.c > +++ b/drivers/net/nfp/nfp_net.c > @@ -2469,6 +2469,10 @@ static struct rte_pci_id pci_id_nfp_net_map[] = { > > static struct eth_driver rte_nfp_net_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_nfp_net_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | > RTE_PCI_DRV_DETACHABLE, > diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c > index d106dd0..31f6733 100644 > --- a/drivers/net/qede/qede_ethdev.c > +++ b/drivers/net/qede/qede_ethdev.c > @@ -1642,6 +1642,10 @@ static struct rte_pci_id pci_id_qede_map[] = { > > static struct eth_driver rte_qedevf_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_qedevf_map, > .drv_flags = > RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, > @@ -1655,6 +1659,10 @@ static struct eth_driver rte_qedevf_pmd = { > > static struct eth_driver rte_qede_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_qede_map, > .drv_flags = > RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, > diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c > index f3cd52d..a649e60 100644 > --- a/drivers/net/szedata2/rte_eth_szedata2.c > +++ b/drivers/net/szedata2/rte_eth_szedata2.c > @@ -1572,6 +1572,10 @@ static const struct rte_pci_id rte_szedata2_pci_id_table[] = { > > static struct eth_driver szedata2_eth_driver = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = rte_szedata2_pci_id_table, > .probe = rte_eth_dev_pci_probe, > .remove = rte_eth_dev_pci_remove, > diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c > index 466e49c..72ac748 100644 > --- a/drivers/net/thunderx/nicvf_ethdev.c > +++ b/drivers/net/thunderx/nicvf_ethdev.c > @@ -2110,6 +2110,10 @@ static const struct rte_pci_id pci_id_nicvf_map[] = { > > static struct eth_driver rte_nicvf_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_nicvf_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, > .probe = rte_eth_dev_pci_probe, > diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c > index 079fd6c..4d5d1bb 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -1377,6 +1377,8 @@ static struct eth_driver rte_virtio_pmd = { > .pci_drv = { > .driver = { > .name = "net_virtio", > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > }, > .id_table = pci_id_virtio_map, > .drv_flags = RTE_PCI_DRV_DETACHABLE, > diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c > index 8bb13e5..57f66cb 100644 > --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c > +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c > @@ -335,6 +335,10 @@ eth_vmxnet3_dev_uninit(struct rte_eth_dev *eth_dev) > > static struct eth_driver rte_vmxnet3_pmd = { > .pci_drv = { > + .driver = { > + .probe = rte_eal_pci_probe, > + .remove = rte_eal_pci_remove, > + }, > .id_table = pci_id_vmxnet3_map, > .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_DETACHABLE, > .probe = rte_eth_dev_pci_probe,