DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jasvinder Singh <jasvinder.singh@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] ip_pipeline: fix cpu socket-id error
Date: Wed, 20 Jan 2016 10:32:50 -0800	[thread overview]
Message-ID: <20160120103250.23706716@xeon-e3> (raw)
In-Reply-To: <1453287677-221142-1-git-send-email-jasvinder.singh@intel.com>

On Wed, 20 Jan 2016 11:01:17 +0000
Jasvinder Singh <jasvinder.singh@intel.com> wrote:

> +static inline int
> +app_get_cpu_socket_id(uint32_t pmd_id)
> +{
> +	int status = rte_eth_dev_socket_id(pmd_id);
> +
> +	if (status == -1)
> +		return 0;
> +
> +	return status;
> +

Why not:
    return (status != SOCKET_ID_ANY) ? status : 0;

  reply	other threads:[~2016-01-20 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 11:01 Jasvinder Singh
2016-01-20 18:32 ` Stephen Hemminger [this message]
2016-01-27 11:47 ` [dpdk-dev] [PATCH v2] " Jasvinder Singh
2016-03-07 11:20   ` 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=20160120103250.23706716@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.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).