From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by dpdk.org (Postfix) with ESMTP id 86BFF3989 for ; Thu, 6 Mar 2014 11:10:55 +0100 (CET) Received: by mail-we0-f177.google.com with SMTP id u57so2716874wes.8 for ; Thu, 06 Mar 2014 02:12:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=+07XBk8LOZVmXhfdtkNFPF1bHZYMBXiVqBxK5wQhDpU=; b=E/B18CFVtoE2P9bvclR6XF7pxvrTxUX79ecb7fW96ryvueNeWBK9Nbb7iGvp/zrmqn dXstqO+XR/rsIT8QN4js6U6Hcomz8vAPYIKbujzKlJqHwDpV9/jAkaaq+Z7HNIeaXEmu mCVSPnwX6Hlf6n40srwQLimZzH35HbUCBZfE4Aw+6Rt65vlIPxNqoCy+PjiGYKwG/nO2 NRyiaWEpjJep5YIG/9KIuMV4HrT1AAJv9rTKEbq9lJfo59zx28nQgcr/XxT+6f+boPjg F2U16ZDoEORZPqsFCBohI2jHq2z0qCFxAwC2a+ay8jM/eD+foC/GNVBxOWLMkzQRFXja vSqQ== X-Gm-Message-State: ALoCoQkMnjQ5TY0bPrkAin7hQKk8xEowwZ0kBNiRX/BX9tMNcDLDFqS1BVT3vcWhaMG29Ls8mpfR X-Received: by 10.194.236.9 with SMTP id uq9mr8500538wjc.31.1394100743506; Thu, 06 Mar 2014 02:12:23 -0800 (PST) Received: from alcyon.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id dk9sm14517357wjb.4.2014.03.06.02.12.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Mar 2014 02:12:22 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Thu, 6 Mar 2014 11:11:56 +0100 Message-Id: <1394100716-26424-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.7.10.4 Subject: [dpdk-dev] [PATCH] pcap: revert build patches 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, 06 Mar 2014 10:10:56 -0000 This reverts commit a0cdfcf936bcccd15d08a22c9cf38013b6859ad2, ef5b2363627dadacfee7da6ee0c7d1c2b40a30db and 60191b8919ef630a0fd50c32a734dd04802ccbfc . These patches are creating more problems than solving the initial one (which was a build error with too old pcap libraries). Since old pcap librabries are not that common, just revert them. Reported-by: Meir Tseitlin Reported-by: Mats Liljegren Signed-off-by: David Marchand --- app/test-pmd/Makefile | 4 ++++ doc/build-sdk-quick.txt | 2 -- lib/librte_pmd_pcap/rte_eth_pcap.c | 12 ------------ lib/librte_pmd_pcap/rte_eth_pcap.h | 6 ------ mk/rte.app.mk | 5 +---- mk/rte.sdkbuild.mk | 7 ------- mk/target/generic/rte.vars.mk | 2 +- 7 files changed, 6 insertions(+), 32 deletions(-) diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index f0d4b4d..bec83eb 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -39,6 +39,10 @@ APP = testpmd CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) +LDFLAGS += -lpcap +endif + # # all source are stored in SRCS-y # diff --git a/doc/build-sdk-quick.txt b/doc/build-sdk-quick.txt index bf7c350..8989a32 100644 --- a/doc/build-sdk-quick.txt +++ b/doc/build-sdk-quick.txt @@ -11,8 +11,6 @@ Build variables EXTRA_CPPFLAGS preprocessor options EXTRA_CFLAGS compiler options EXTRA_LDFLAGS linker options - LIBPCAP_CFLAGS libpcap compiler options - LIBPCAP_LDFLAGS libpcap linker options RTE_KERNELDIR linux headers path CROSS toolchain prefix V verbose diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c b/lib/librte_pmd_pcap/rte_eth_pcap.c index fbafd19..fe94a79 100644 --- a/lib/librte_pmd_pcap/rte_eth_pcap.c +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c @@ -217,7 +217,6 @@ eth_pcap_tx_dumper(void *queue, return num_tx; } -#ifdef PCAP_CAN_SEND /* * Callback to handle sending packets through a real NIC. */ @@ -248,17 +247,6 @@ eth_pcap_tx(void *queue, tx_queue->err_pkts += nb_pkts - num_tx; return num_tx; } -#else -static uint16_t -eth_pcap_tx(__rte_unused void *queue, - __rte_unused struct rte_mbuf **bufs, - __rte_unused uint16_t nb_pkts) -{ - RTE_LOG(ERR, PMD, "pcap library cannot send packets, please rebuild " - "with a more up to date libpcap\n"); - return -1; -} -#endif static int eth_dev_start(struct rte_eth_dev *dev) diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.h b/lib/librte_pmd_pcap/rte_eth_pcap.h index 344b78d..79373c0 100644 --- a/lib/librte_pmd_pcap/rte_eth_pcap.h +++ b/lib/librte_pmd_pcap/rte_eth_pcap.h @@ -39,12 +39,6 @@ extern "C" { #endif #include -#ifdef pcap_sendpacket -#define PCAP_CAN_SEND -#else -#undef PCAP_CAN_SEND -#endif - #define RTE_ETH_PCAP_PARAM_NAME "eth_pcap" /** diff --git a/mk/rte.app.mk b/mk/rte.app.mk index d90a0b0..ec8e24e 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -170,10 +170,7 @@ LDLIBS += -lrte_cmdline endif ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) -LDLIBS += -lrte_pmd_pcap -LIBPCAP_LDFLAGS ?= $(shell pcap-config --libs) -$(if $(LIBPCAP_LDFLAGS),,$(error LIBPCAP_LDFLAGS is undefined)) -LDLIBS += $(LIBPCAP_LDFLAGS) +LDLIBS += -lrte_pmd_pcap -lpcap endif LDLIBS += $(EXECENV_LDLIBS) diff --git a/mk/rte.sdkbuild.mk b/mk/rte.sdkbuild.mk index 112c288..2975ee4 100644 --- a/mk/rte.sdkbuild.mk +++ b/mk/rte.sdkbuild.mk @@ -40,13 +40,6 @@ else include $(RTE_SDK)/mk/rte.vars.mk endif -ifeq ($(CONFIG_RTE_LIBRTE_PMD_PCAP),y) -LIBPCAP_CFLAGS ?= $(shell pcap-config --cflags) -EXTERNAL_LIB_CFLAGS += $(LIBPCAP_CFLAGS) -endif - -export EXTERNAL_LIB_CFLAGS - # # include .depdirs and define rules to order priorities between build # of directories. diff --git a/mk/target/generic/rte.vars.mk b/mk/target/generic/rte.vars.mk index a163272..796cca7 100644 --- a/mk/target/generic/rte.vars.mk +++ b/mk/target/generic/rte.vars.mk @@ -108,7 +108,7 @@ include $(RTE_SDK)/mk/rte.cpuflags.mk # merge all CFLAGS CFLAGS := $(CPU_CFLAGS) $(EXECENV_CFLAGS) $(TOOLCHAIN_CFLAGS) $(MACHINE_CFLAGS) -CFLAGS += $(TARGET_CFLAGS) $(EXTERNAL_LIB_CFLAGS) +CFLAGS += $(TARGET_CFLAGS) # merge all LDFLAGS LDFLAGS := $(CPU_LDFLAGS) $(EXECENV_LDFLAGS) $(TOOLCHAIN_LDFLAGS) $(MACHINE_LDFLAGS) -- 1.7.10.4