DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mcnamara, John" <john.mcnamara@intel.com>
To: "Mcnamara, John" <john.mcnamara@intel.com>,
	Ravi Kerur <rkerur@gmail.com>,  "dev@dpdk.org" <dev@dpdk.org>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [v4 2/3] LPM config file read option.
Date: Mon, 6 Mar 2017 14:10:54 +0000	[thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE23324F99B@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <B27915DBBA3421428155699D51E4CFE23324F8E9@IRSMSX104.ger.corp.intel.com>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Mcnamara, John
> Sent: Monday, March 6, 2017 1:57 PM
> To: Ravi Kerur <rkerur@gmail.com>; dev@dpdk.org
> Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Subject: Re: [dpdk-dev] [v4 2/3] LPM config file read option.
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Ravi Kerur
> > Sent: Sunday, March 5, 2017 7:47 PM
> > To: dev@dpdk.org
> > Cc: Ananyev, Konstantin <konstantin.ananyev@intel.com>; Richardson,
> > Bruce <bruce.richardson@intel.com>; Ravi Kerur <rkerur@gmail.com>
> > Subject: [dpdk-dev] [v4 2/3] LPM config file read option.
> >
> > ...
> > +
> > +#define	IPV6_ADDR_LEN	16
> > +#define	IPV6_ADDR_U16	(IPV6_ADDR_LEN / sizeof(uint16_t))
> > +#define	IPV6_ADDR_U32	(IPV6_ADDR_LEN / sizeof(uint32_t))
> > +
> > +#define GET_CB_FIELD(in, fd, base, lim, dlm)	do {            \
> > +	unsigned long val;                                      \
> > +	char *end;                                              \
> > +	errno = 0;                                              \
> > +	val = strtoul((in), &end, (base));                      \
> > +	if (errno != 0 || end[0] != (dlm) || val > (lim))       \
> > +		return -EINVAL;                               \
> > +	(fd) = (typeof(fd))val;                                 \
> > +	(in) = end + 1;                                         \
> > +} while (0)
> 
> Hi,
> 
> It is probably worth putting a comment before this macro to explain what
> it does. Also, it isn't clear, to me, what CB stands for. Also, having a
> return in the middle of the macro might be problematic if it is used in a
> function with a different, or not, return value.
> 

Nevermind. I see that this macro was already there and you just moved it.
So, it is not your problem. :-)

John

  reply	other threads:[~2017-03-06 14:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05 19:47 [dpdk-dev] [v4 0/3] Merge l3fwd-acl and l3fwd Ravi Kerur
2017-03-05 19:47 ` [dpdk-dev] [v4 1/3] Merge l3fwd-acl and l3fwd code Ravi Kerur
2017-03-08 21:32   ` [dpdk-dev] [PATCH v5 0/3] examples/l3fwd: merge l3fwd-acl code into l3fwd Ravi Kerur
2017-03-08 21:32     ` [dpdk-dev] [PATCH v5 1/3] " Ravi Kerur
2017-03-09 10:42       ` Mcnamara, John
2017-03-10 20:58       ` [dpdk-dev] [PATCH v6 0/3] " Ravi Kerur
2017-03-10 20:58         ` [dpdk-dev] [PATCH v6 1/3] " Ravi Kerur
2017-03-10 20:58         ` [dpdk-dev] [PATCH v6 2/3] examples/l3fwd: add config file support for lpm Ravi Kerur
2017-03-10 20:58         ` [dpdk-dev] [PATCH v6 3/3] examples/l3fwd: add config file support for exact Ravi Kerur
2017-06-04 11:14         ` [dpdk-dev] [PATCH v6 0/3] examples/l3fwd: merge l3fwd-acl code into l3fwd Thomas Monjalon
2019-01-23 16:32         ` Ferruh Yigit
2019-01-23 17:10           ` Thomas Monjalon
2019-01-23 17:20             ` Ananyev, Konstantin
2019-01-23 17:26               ` Thomas Monjalon
2019-01-23 19:36                 ` Ferruh Yigit
2019-01-23 20:27                   ` Thomas Monjalon
2019-01-24  9:14               ` Rami Rosen
2017-03-08 21:32     ` [dpdk-dev] [PATCH v5 2/3] examples/l3fwd: add config file support for LPM Ravi Kerur
2017-03-09 10:43       ` Mcnamara, John
2017-03-08 21:32     ` [dpdk-dev] [PATCH v5 3/3] examples/l3fwd: add config file support for EM Ravi Kerur
2017-03-09 10:45       ` Mcnamara, John
2017-03-10  0:00         ` Ravi Kerur
2017-03-05 19:47 ` [dpdk-dev] [v4 2/3] LPM config file read option Ravi Kerur
2017-03-06 13:57   ` Mcnamara, John
2017-03-06 14:10     ` Mcnamara, John [this message]
2017-03-05 19:47 ` [dpdk-dev] [v4 3/3] EM " Ravi Kerur
2017-03-06 13:42   ` Mcnamara, John
2017-03-06 13:33 ` [dpdk-dev] [v4 0/3] Merge l3fwd-acl and l3fwd Mcnamara, John
2017-03-06 23:20   ` Ravi Kerur
2017-03-08 21:50     ` Ravi Kerur
2017-03-09 10:37       ` Mcnamara, John
2017-03-09 10:23     ` Mcnamara, John
2017-03-10  0:07       ` Ravi Kerur
2017-03-14 21:14         ` Ravi Kerur

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=B27915DBBA3421428155699D51E4CFE23324F99B@IRSMSX104.ger.corp.intel.com \
    --to=john.mcnamara@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=rkerur@gmail.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).