DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] net/pcap: set rte_errno on TX error
@ 2016-07-25 13:10 Zoltan Kiss
  2016-07-25 13:33 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Zoltan Kiss @ 2016-07-25 13:10 UTC (permalink / raw)
  To: dev; +Cc: Zoltan Kiss, Nicolas Pernas Maradei, Ferruh Yigit

This returns the error code provided by pcap_sendpacket()

Signed-off-by: Zoltan Kiss <zoltan.kiss@schaman.hu>

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 7e213eb..0899bac 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -41,6 +41,7 @@
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
 #include <rte_dev.h>
+#include <rte_errno.h>
 
 #include <net/if.h>
 
@@ -360,8 +361,10 @@ eth_pcap_tx(void *queue,
 			}
 		}
 
-		if (unlikely(ret != 0))
+		if (unlikely(ret != 0)) {
+			rte_errno = ret;
 			break;
+		}
 		num_tx++;
 		tx_bytes += mbuf->pkt_len;
 		rte_pktmbuf_free(mbuf);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-25 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-25 13:10 [dpdk-dev] net/pcap: set rte_errno on TX error Zoltan Kiss
2016-07-25 13:33 ` Ferruh Yigit
2016-07-25 13:43   ` Thomas Monjalon

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).