DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: <kkanas@marvell.com>
Cc: 27ee549a-d01b-21a5-4a0b-a7e5594b38c0@intel.com, <dev@dpdk.org>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/af_packet: add string error for system errors
Date: Wed, 10 Jul 2019 09:04:56 -0700	[thread overview]
Message-ID: <20190710090456.4bfa5833@hermes.lan> (raw)
In-Reply-To: <20190710144630.14926-1-kkanas@marvell.com>

On Wed, 10 Jul 2019 16:46:30 +0200
<kkanas@marvell.com> wrote:

>  
> +#define PMD_LOG_ERRNO(level, fmt, args...) \
> +	rte_log(RTE_LOG_ ## level, af_packet_logtype, \
> +		"%s(): " fmt ":%s\n", __func__, ##args, rte_strerror(errno))
> +
>  static uint16_t
>  eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
>  {
> @@ -603,9 +609,7 @@ rte_pmd_init_internals(struct rte_vdev_device *dev,
>  		return -1;
>  	}
>  	if (ioctl(sockfd, SIOCGIFINDEX, &ifr) == -1) {
> -		PMD_LOG(ERR,
> -			"%s: ioctl failed (SIOCGIFINDEX)",
> -		        name);
> +		PMD_LOG_ERRNO(ERR, "%s: ioctl failed (SIOCGIFINDEX)", name);
>  		return -1;

This is wrong.
The ioctl sets errno not rte_errno.

Why not?
		PMD_LOG(ERR, "%s: ioctl failed (SIOCGIFINDEX): %s",
			name, strerror(errno));

  reply	other threads:[~2019-07-10 16:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-10 14:46 kkanas
2019-07-10 16:04 ` Stephen Hemminger [this message]
2019-07-11  9:56   ` [dpdk-dev] [EXT] " Krzysztof Kanas
2019-07-11 16:10     ` Stephen Hemminger
2019-07-12 10:01       ` [dpdk-dev] [PATCH v3] " kkanas
2019-07-15 14:06         ` Ferruh Yigit

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=20190710090456.4bfa5833@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=27ee549a-d01b-21a5-4a0b-a7e5594b38c0@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=kkanas@marvell.com \
    --cc=linville@tuxdriver.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).