From: Jerin Jacob <jerinjacobk@gmail.com>
To: Gaetan Rivet <grive@u256.net>
Cc: Stephen Hemminger <stephen@networkplumber.org>, dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC PATCH 1/5] graph: introduce graph subsystem
Date: Mon, 3 Feb 2020 15:19:09 +0530 [thread overview]
Message-ID: <CALBAE1PZVK+jbxa4zOant+ObXEtA3ATwcYerg7p53wRYgwhraA@mail.gmail.com> (raw)
In-Reply-To: <c56273c6-0bba-5183-5428-e9c6c13c0b86@u256.net>
On Mon, Feb 3, 2020 at 2:44 PM Gaetan Rivet <grive@u256.net> wrote:
>
> On 02/02/2020 12:21, Jerin Jacob wrote:
> > On Sun, Feb 2, 2020 at 4:08 PM Stephen Hemminger
> > <stephen@networkplumber.org> wrote:
> >>
> >> On Fri, 31 Jan 2020 22:31:57 +0530
> >> <jerinj@marvell.com> wrote:
> >>
> >>> +
> >>> +#define set_err(err, where, fmt, ...) do { \
> >>> + graph_err(fmt, ##__VA_ARGS__); \
> >>> + rte_errno = err; \
> >>> + goto where; \
> >>> +} while (0)
> >>
> >> I dislike this macro, it makes static analysis harder and requires
> >> the reader to know that the argument is a goto target. And since it is lower
> >> case, implies that it is a function. Usually macros are in upper case.
> >>
> >> It makes the code smaller but a cost of being different which impacts the
> >> readability of the code.
> >
> > I don't like macro either. That's the only case where I have used
> > macro, Even in the fast path,
> > I did multiple rework to remove macro. Without that macro, that code bloats
> > and will have a lot repeatable code. I have a preference in using _goto_ to have
> > a unified exit to simply the stuff and therefor maintain the code.
> > You could see the amount of verification done in rte_graph_create(). So, IMO,
> > In this case, it is justified to use the macro.
> >
>
> Hi Jerin,
Hi Gaetan,
>
> Renaming it in uppercase and making clear there will be a jump could alleviate some concerns?
> Something like SET_ERR_JMP() maybe or SET_ERR_GOTO().
OK. I will change to SET_ERR_JMP() in the next version.
next prev parent reply other threads:[~2020-02-03 9:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 17:01 [dpdk-dev] [RFC PATCH 0/5] " jerinj
2020-01-31 17:01 ` [dpdk-dev] [RFC PATCH 1/5] " jerinj
2020-02-02 10:34 ` Stephen Hemminger
2020-02-02 10:35 ` Stephen Hemminger
2020-02-02 11:08 ` Jerin Jacob
2020-02-02 10:38 ` Stephen Hemminger
2020-02-02 11:21 ` Jerin Jacob
2020-02-03 9:14 ` Gaetan Rivet
2020-02-03 9:49 ` Jerin Jacob [this message]
2020-01-31 17:01 ` [dpdk-dev] [RFC PATCH 2/5] node: add packet processing nodes jerinj
2020-01-31 17:01 ` [dpdk-dev] [RFC PATCH 3/5] test: add graph functional tests jerinj
2020-01-31 17:02 ` [dpdk-dev] [RFC PATCH 4/5] test: add graph performance test cases jerinj
2020-01-31 17:02 ` [dpdk-dev] [RFC PATCH 5/5] example/l3fwd_graph: l3fwd using graph architecture jerinj
2020-01-31 18:34 ` [dpdk-dev] [RFC PATCH 0/5] graph: introduce graph subsystem Ray Kinsella
2020-02-01 5:44 ` Jerin Jacob
2020-02-17 7:19 ` Jerin Jacob
2020-02-17 8:38 ` Thomas Monjalon
2020-02-17 10:58 ` Jerin Jacob
2020-02-21 10:30 ` Jerin Jacob
2020-02-21 11:10 ` Thomas Monjalon
2020-02-21 15:38 ` Mattias Rönnblom
2020-02-21 15:53 ` dave
2020-02-21 16:04 ` Thomas Monjalon
2020-02-21 15:56 ` Jerin Jacob
2020-02-21 16:14 ` Thomas Monjalon
2020-02-22 9:05 ` Jerin Jacob
2020-02-22 9:52 ` Thomas Monjalon
2020-02-22 10:24 ` Jerin Jacob
2020-02-24 10:59 ` Ray Kinsella
2020-02-25 5:22 ` Honnappa Nagarahalli
2020-02-25 6:14 ` Jerin Jacob
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=CALBAE1PZVK+jbxa4zOant+ObXEtA3ATwcYerg7p53wRYgwhraA@mail.gmail.com \
--to=jerinjacobk@gmail.com \
--cc=dev@dpdk.org \
--cc=grive@u256.net \
--cc=stephen@networkplumber.org \
/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).