From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 192B8ADAB for ; Fri, 8 Jul 2016 21:10:36 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3rmPG35PlVzCC4; Fri, 8 Jul 2016 21:10:35 +0200 (CEST) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , Shreyansh Jain , thomas.monjalon@6wind.com, David Marchand Date: Fri, 8 Jul 2016 21:09:30 +0200 Message-Id: <20160708190945.24225-1-viktorin@rehivetech.com> X-Mailer: git-send-email 2.9.0 Subject: [dpdk-dev] [PATCH v1 00/15] rte_driver/device infrastructure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 19:10:36 -0000 Hello, based on the discussions with Shreyansh, I propose a patchset with the important EAL changes. It is incomplete and I suppose to extend and change certain things in the foreseeable future. Important notes: * pmd_type is removed * introduced rte_vdev_driver inheriting rte_driver * PMD_REGISTER_DRIVER is replaced by RTE_EAL_VDRV_REGISTER * rte_driver/device integrated into rte_pci_driver/device * all drivers and devices are in 2 lists - general and bus-specific Shreyansh, I hope I do not duplicate your work. I tried to avoid touching pmd_type but it quite complicated... There is also an initial generalization of rte_pci_resource. More such generalizations are to be done. The init/uninit functions cannot be generalized easily, I think. Both PCI and VDEV have different requirements. No idea about hotplug... The patchset is based on (all rebased on top of 34d279): [PATCH v5 00/17] Prepare for rte_device / rte_driver Thanks anybody for some quick review and notes. Regards Jan -- Jan Viktorin (15): eal: extract vdev infra eal: no need to test for PMD_VDEV anymore eal: do not call init for PMD_PDEV drivers drivers: convert PMD_VDEV drivers to use rte_vdev_driver eal: move init/uninit to rte_vdev_driver eal: remove PMD_REGISTER_DRIVER eal: get rid of pmd_type eal: define macro container_of eal: rte_pci.h includes rte_dev.h eal: rename and move rte_pci_resource eal/pci: inherit rte_driver by rte_pci_driver eal: call rte_eal_driver_register eal: introduce rte_device eal/pci: inherit rte_device by rte_pci_device eal/pci: insert rte_device on scan app/test/test_pci.c | 10 ++- app/test/virtual_pmd.c | 6 +- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 13 ++-- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 13 ++-- drivers/crypto/kasumi/rte_kasumi_pmd.c | 13 ++-- drivers/crypto/null/null_crypto_pmd.c | 13 ++-- drivers/crypto/qat/rte_qat_cryptodev.c | 4 +- drivers/crypto/snow3g/rte_snow3g_pmd.c | 13 ++-- drivers/net/af_packet/rte_eth_af_packet.c | 11 ++-- drivers/net/bnx2x/bnx2x_ethdev.c | 8 ++- drivers/net/bonding/rte_eth_bond_pmd.c | 11 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 4 +- drivers/net/cxgbe/sge.c | 6 +- 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 | 10 +-- drivers/net/i40e/i40e_ethdev.c | 4 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 +- drivers/net/i40e/i40e_fdir.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++- drivers/net/mlx4/mlx4.c | 4 +- drivers/net/mlx5/mlx5.c | 4 +- drivers/net/mpipe/mpipe_tilegx.c | 20 +++--- drivers/net/nfp/nfp_net.c | 4 +- drivers/net/null/rte_eth_null.c | 11 ++-- drivers/net/pcap/rte_eth_pcap.c | 11 ++-- drivers/net/qede/qede_ethdev.c | 4 ++ drivers/net/ring/rte_eth_ring.c | 11 ++-- drivers/net/szedata2/rte_eth_szedata2.c | 8 ++- drivers/net/vhost/rte_eth_vhost.c | 11 ++-- drivers/net/virtio/virtio_ethdev.c | 6 +- drivers/net/virtio/virtio_pci.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 7 +- drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +- drivers/net/xenvirt/rte_eth_xenvirt.c | 11 ++-- lib/librte_cryptodev/rte_cryptodev.c | 6 +- lib/librte_eal/bsdapp/eal/Makefile | 1 + lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/eal_common_dev.c | 67 +++---------------- lib/librte_eal/common/eal_common_pci.c | 20 +++--- lib/librte_eal/common/eal_common_vdev.c | 100 +++++++++++++++++++++++++++++ lib/librte_eal/common/include/rte_common.h | 16 +++++ lib/librte_eal/common/include/rte_dev.h | 54 +++++++++------- lib/librte_eal/common/include/rte_pci.h | 20 ++---- lib/librte_eal/common/include/rte_vdev.h | 96 +++++++++++++++++++++++++++ lib/librte_eal/linuxapp/eal/Makefile | 1 + lib/librte_eal/linuxapp/eal/eal_ivshmem.c | 2 +- lib/librte_eal/linuxapp/eal/eal_pci.c | 7 +- lib/librte_ether/rte_ethdev.c | 16 +++-- 51 files changed, 468 insertions(+), 229 deletions(-) create mode 100644 lib/librte_eal/common/eal_common_vdev.c create mode 100644 lib/librte_eal/common/include/rte_vdev.h -- 2.9.0