DPDK patches and discussions
 help / color / mirror / Atom feed
From: Neil Horman <nhorman@tuxdriver.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] pcap: remove test for PCAP_CAN_SEND
Date: Fri, 28 Mar 2014 21:32:29 -0400	[thread overview]
Message-ID: <1396056749-11738-1-git-send-email-nhorman@tuxdriver.com> (raw)

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 <nhorman@tuxdriver.com>
---
 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

             reply	other threads:[~2014-03-29  1:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-29  1:32 Neil Horman [this message]
2014-03-29 10:34 ` Thomas Monjalon
2014-03-29 13:00   ` Neil Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1396056749-11738-1-git-send-email-nhorman@tuxdriver.com \
    --to=nhorman@tuxdriver.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).