git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
pcap: fix Tx mbuf corruption
[dpdk.git]
/
lib
/
librte_pmd_pcap
/
rte_eth_pcap.c
diff --git
a/lib/librte_pmd_pcap/rte_eth_pcap.c
b/lib/librte_pmd_pcap/rte_eth_pcap.c
index
dc4670c
..
6a411a9
100644
(file)
--- a/
lib/librte_pmd_pcap/rte_eth_pcap.c
+++ b/
lib/librte_pmd_pcap/rte_eth_pcap.c
@@
-239,8
+239,9
@@
eth_pcap_tx(void *queue,
mbuf = bufs[i];
ret = pcap_sendpacket(tx_queue->pcap, (u_char*) mbuf->pkt.data,
mbuf->pkt.data_len);
- if(likely(!ret))
- num_tx++;
+ if (unlikely(ret != 0))
+ break;
+ num_tx++;
rte_pktmbuf_free(mbuf);
}