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 68F0B1F3 for ; Sat, 29 Mar 2014 02:31:20 +0100 (CET) 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 1WTi8T-0008Pl-2Q; Fri, 28 Mar 2014 21:32:53 -0400 From: Neil Horman To: dev@dpdk.org Date: Fri, 28 Mar 2014 21:32:29 -0400 Message-Id: <1396056749-11738-1-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: [dpdk-dev] [PATCH] pcap: remove test for PCAP_CAN_SEND 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: Sat, 29 Mar 2014 01:31:20 -0000 The libpcap library has had the ability to send packets since 2004, theres really no need to test for it. Especially in the way dpdk is doing as, as according to the libpcap git tree pcap_sendpacket has never been a #define, and dpdk tests for its existance with an #ifdef. Its easier just to remove the test entirely Signed-off-by: Neil Horman --- lib/librte_pmd_pcap/rte_eth_pcap.c | 12 ------------ 1 file changed, 12 deletions(-) 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) -- 1.8.3.1