From mboxrd@z Thu Jan 1 00:00:00 1970 From: Neil Horman Subject: [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro Date: Tue, 15 Apr 2014 14:05:57 -0400 Message-ID: <1397585169-14537-4-git-send-email-nhorman@tuxdriver.com> References: <1397585169-14537-1-git-send-email-nhorman@tuxdriver.com> To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1397585169-14537-1-git-send-email-nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Rather than have each driver have to remember to add a constructor to it to make sure its gets registered properly, wrap that process up in a macro to make registration a one line affair. This also sets the stage for us to make registration of vdev pmds and physical pmds a uniform process Signed-off-by: Neil Horman --- lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/include/rte_pmd.h | 69 +++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 lib/librte_eal/common/include/rte_pmd.h diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile index 2f99bf4..b918a73 100644 --- a/lib/librte_eal/common/Makefile +++ b/lib/librte_eal/common/Makefile @@ -37,7 +37,7 @@ INC += rte_log.h rte_memcpy.h rte_memory.h rte_memzone.h rte_pci.h INC += rte_pci_dev_ids.h rte_per_lcore.h rte_prefetch.h rte_random.h INC += rte_rwlock.h rte_spinlock.h rte_tailq.h rte_interrupts.h rte_alarm.h INC += rte_string_fns.h rte_cpuflags.h rte_version.h rte_tailq_elem.h -INC += rte_eal_memconfig.h rte_malloc_heap.h +INC += rte_eal_memconfig.h rte_malloc_heap.h rte_pmd.h INC += rte_hexdump.h rte_devargs.h rte_vdev.h ifeq ($(CONFIG_RTE_INSECURE_FUNCTION_WARNING),y) diff --git a/lib/librte_eal/common/include/rte_pmd.h b/lib/librte_eal/common/include/rte_pmd.h new file mode 100644 index 0000000..b37fa28 --- /dev/null +++ b/lib/librte_eal/common/include/rte_pmd.h @@ -0,0 +1,69 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2014 Neil Horman