DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Raslan Darawsheh <rasland@mellanox.com>
Cc: "gaetan.rivet@6wind.com" <gaetan.rivet@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Thomas Monjalon <thomas@monjalon.net>
Subject: Re: [dpdk-dev] [PATCH 3/4] net/failsafe: replace local sub-device with shared data
Date: Thu, 28 Feb 2019 09:22:09 -0800	[thread overview]
Message-ID: <20190228092209.5043ea48@shemminger-XPS-13-9360> (raw)
In-Reply-To: <1551368952-1871-4-git-send-email-rasland@mellanox.com>

On Thu, 28 Feb 2019 15:49:27 +0000
Raslan Darawsheh <rasland@mellanox.com> wrote:

>  
>  /* sdev: (struct sub_device *) */
>  #define ETH(sdev) \
> -	((sdev)->edev)
> +	(sdev->data == NULL ? NULL : &rte_eth_devices[sdev->data->port_id])

Macro arguments should always be parenthesised and you can shorten
by using abbreviated trigraph.

#define ETH(sdev) \
	((sdev)->data ? &rte_eth_devices[(sdev)->data->port_id] : )

  reply	other threads:[~2019-02-28 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 15:49 [dpdk-dev] [PATCH 0/4] support secondary process for failsafe Raslan Darawsheh
2019-02-28 15:49 ` [dpdk-dev] [PATCH 2/4] net/failsafe: change back-reference from sub-device Raslan Darawsheh
2019-02-28 17:16   ` Stephen Hemminger
2019-02-28 15:49 ` [dpdk-dev] [PATCH 1/4] net/failsafe: replace local device with shared data Raslan Darawsheh
2019-02-28 16:27   ` Thomas Monjalon
2019-02-28 15:49 ` [dpdk-dev] [PATCH 3/4] net/failsafe: replace local sub-device " Raslan Darawsheh
2019-02-28 17:22   ` Stephen Hemminger [this message]
2019-02-28 15:49 ` [dpdk-dev] [PATCH 4/4] net/failsafe: support secondary process Raslan Darawsheh
2019-02-28 17:23   ` Stephen Hemminger
2019-02-28 17:24   ` Stephen Hemminger
2019-03-05  9:33     ` Raslan Darawsheh
2019-03-05 10:00       ` 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=20190228092209.5043ea48@shemminger-XPS-13-9360 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=rasland@mellanox.com \
    --cc=thomas@monjalon.net \
    /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).