DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zoltan Kiss <zoltan.kiss@schaman.hu>
To: dev@dpdk.org
Cc: Zoltan Kiss <zoltan.kiss@schaman.hu>,
	Nicolas Pernas Maradei <nicolas.pernas.maradei@emutex.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] net/pcap: set rte_errno on TX error
Date: Mon, 25 Jul 2016 14:10:40 +0100	[thread overview]
Message-ID: <1469452240-1204-1-git-send-email-zoltan.kiss@schaman.hu> (raw)

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

             reply	other threads:[~2016-07-25 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-25 13:10 Zoltan Kiss [this message]
2016-07-25 13:33 ` Ferruh Yigit
2016-07-25 13:43   ` Thomas Monjalon

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=1469452240-1204-1-git-send-email-zoltan.kiss@schaman.hu \
    --to=zoltan.kiss@schaman.hu \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=nicolas.pernas.maradei@emutex.com \
    /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).