[dpdk-dev] net/pcap: set rte_errno on TX error
Zoltan Kiss
zoltan.kiss at schaman.hu
Mon Jul 25 15:10:40 CEST 2016
This returns the error code provided by pcap_sendpacket()
Signed-off-by: Zoltan Kiss <zoltan.kiss at 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);
More information about the dev
mailing list