From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 36AE368CF for ; Thu, 10 Apr 2014 22:49:03 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1WYLvh-0004Nq-UK; Thu, 10 Apr 2014 16:50:39 -0400 From: Neil Horman To: dev@dpdk.org Date: Thu, 10 Apr 2014 16:49:54 -0400 Message-Id: <1397163009-29950-4-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1397163009-29950-1-git-send-email-nhorman@tuxdriver.com> References: <1397162846-28912-1-git-send-email-nhorman@tuxdriver.com> <1397163009-29950-1-git-send-email-nhorman@tuxdriver.com> X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: [dpdk-dev] [PATCH 04/19] pcap: Convert pcap poll mode driver to use new PMD_INIT_NONPCI macro 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: Thu, 10 Apr 2014 20:49:03 -0000 Convert the pcap poll mode driver to link itself to libpcap and register a init routine via the PMD_INIT_NONPCI macro Signed-off-by: Neil Horman --- lib/librte_eal/common/eal_common_nonpci_devs.c | 9 --------- lib/librte_pmd_pcap/Makefile | 2 ++ lib/librte_pmd_pcap/rte_eth_pcap.c | 2 ++ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/librte_eal/common/eal_common_nonpci_devs.c b/lib/librte_eal/common/eal_common_nonpci_devs.c index 0f94b65..d925b7f 100644 --- a/lib/librte_eal/common/eal_common_nonpci_devs.c +++ b/lib/librte_eal/common/eal_common_nonpci_devs.c @@ -40,9 +40,6 @@ #ifdef RTE_LIBRTE_PMD_RING #include #endif -#ifdef RTE_LIBRTE_PMD_PCAP -#include -#endif #ifdef RTE_LIBRTE_PMD_XENVIRT #include #endif @@ -65,12 +62,6 @@ struct device_init dev_types[] = { .init_fn = rte_pmd_ring_init }, #endif -#ifdef RTE_LIBRTE_PMD_PCAP - { - .dev_prefix = RTE_ETH_PCAP_PARAM_NAME, - .init_fn = rte_pmd_pcap_init - }, -#endif #ifdef RTE_LIBRTE_PMD_XENVIRT { .dev_prefix = RTE_ETH_XENVIRT_PARAM_NAME, diff --git a/lib/librte_pmd_pcap/Makefile b/lib/librte_pmd_pcap/Makefile index 5218f28..f7653fb 100644 --- a/lib/librte_pmd_pcap/Makefile +++ b/lib/librte_pmd_pcap/Makefile @@ -37,6 +37,8 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_pmd_pcap.a +CPU_LDFLAGS += -lpcap + CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c b/lib/librte_pmd_pcap/rte_eth_pcap.c index fe94a79..5bc81f7 100644 --- a/lib/librte_pmd_pcap/rte_eth_pcap.c +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c @@ -40,6 +40,7 @@ #include #include #include +#include #include @@ -766,3 +767,4 @@ rte_pmd_pcap_init(const char *name, const char *params) } +PMD_INIT_NONPCI(rte_pmd_pcap_init, RTE_ETH_PCAP_PARAM_NAME); -- 1.8.3.1