From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <john.mcnamara@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id 67CCC69C3
 for <dev@dpdk.org>; Mon,  6 Mar 2017 15:10:57 +0100 (CET)
Received: from fmsmga004.fm.intel.com ([10.253.24.48])
 by fmsmga105.fm.intel.com with ESMTP; 06 Mar 2017 06:10:56 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.35,254,1484035200"; d="scan'208";a="232813191"
Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28])
 by fmsmga004.fm.intel.com with ESMTP; 06 Mar 2017 06:10:55 -0800
Received: from irsmsx104.ger.corp.intel.com ([169.254.5.142]) by
 irsmsx105.ger.corp.intel.com ([169.254.7.38]) with mapi id 14.03.0248.002;
 Mon, 6 Mar 2017 14:10:54 +0000
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>
Thread-Topic: [dpdk-dev] [v4 2/3] LPM config file read option.
Thread-Index: AQHSlel+CK7CS8/7yEmra1/I1sM0NqGH1EQQgAAGg2A=
Date: Mon, 6 Mar 2017 14:10:54 +0000
Message-ID: <B27915DBBA3421428155699D51E4CFE23324F99B@IRSMSX104.ger.corp.intel.com>
References: <1488743225-25750-1-git-send-email-rkerur@gmail.com>
 <1488743225-25750-3-git-send-email-rkerur@gmail.com>
 <B27915DBBA3421428155699D51E4CFE23324F8E9@IRSMSX104.ger.corp.intel.com>
In-Reply-To: <B27915DBBA3421428155699D51E4CFE23324F8E9@IRSMSX104.ger.corp.intel.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ctpclassification: CTP_IC
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNDA5MmQxY2YtZDBjYS00YzJmLTgzODktNWM3OGZjYjhkYTE4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjlDUUc5cE9nK1BLcFowa2FIYmJPWERjUExSdFM2dU10Vko1WW9CQ09raWM9In0=
x-originating-ip: [163.33.239.180]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [v4 2/3] LPM config file read option.
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Mar 2017 14:10:57 -0000



> -----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.
>=20
>=20
>=20
> > -----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 =3D 0;                                              \
> > +	val =3D strtoul((in), &end, (base));                      \
> > +	if (errno !=3D 0 || end[0] !=3D (dlm) || val > (lim))       \
> > +		return -EINVAL;                               \
> > +	(fd) =3D (typeof(fd))val;                                 \
> > +	(in) =3D end + 1;                                         \
> > +} while (0)
>=20
> Hi,
>=20
> 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.
>=20

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

John