From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Zoltan Kiss <zoltan.kiss@schaman.hu>, dev@dpdk.org
Cc: Nicolas Pernas Maradei <nicolas.pernas.maradei@emutex.com>
Subject: Re: net/pcap: set rte_errno on TX error
Date: Mon, 25 Jul 2016 14:33:46 +0100 [thread overview]
Message-ID: <5796153A.1070007@intel.com> (raw)
In-Reply-To: <1469452240-1204-1-git-send-email-zoltan.kiss@schaman.hu>
On 7/25/2016 2:10 PM, Zoltan Kiss wrote:
> This returns the error code provided by pcap_sendpacket()
Although this is good idea, this adds undocumented side effect to
rte_eth_tx_burst().
I am not able to find any information in rte_eth_tx_burst() that it can
alter rte_errno.
Since rte_errno is shared resource, it shouldn't be updated without
documented.
>
> 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);
>
next prev parent reply other threads:[~2016-07-25 13:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-25 13:10 net/pcap: set rte_errno on TX error Zoltan Kiss
2016-07-25 13:33 ` Ferruh Yigit [this message]
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=5796153A.1070007@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=nicolas.pernas.maradei@emutex.com \
--cc=zoltan.kiss@schaman.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.