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 2/4] net/failsafe: change back-reference from sub-device
Date: Thu, 28 Feb 2019 09:16:19 -0800	[thread overview]
Message-ID: <20190228091619.249e9899@shemminger-XPS-13-9360> (raw)
In-Reply-To: <1551368952-1871-3-git-send-email-rasland@mellanox.com>

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

> +/* sdev: (struct sub_device *) */
> +#define FSDEV_FROM_SUBDEV(sdev) \
> +	(&rte_eth_devices[sdev->fs_port_id])

If at all possible, inline functions are preferable to macros because
inline functions don't allow side effects and keep the type checking.

This could just be an inline function without any impact to code
generation.

  reply	other threads:[~2019-02-28 17:16 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 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 2/4] net/failsafe: change back-reference from sub-device Raslan Darawsheh
2019-02-28 17:16   ` Stephen Hemminger [this message]
2019-02-28 15:49 ` [dpdk-dev] [PATCH 3/4] net/failsafe: replace local sub-device with shared data Raslan Darawsheh
2019-02-28 17:22   ` Stephen Hemminger
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=20190228091619.249e9899@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).