[dpdk-dev] [PATCH] net/enic: move macro to the correct file
John Daley (johndale)
johndale at cisco.com
Tue Jan 21 20:49:43 CET 2020
You are right, just need to cast #define parameters, then can use the RTE_MIN and MAX.
Will do a patch.
Thanks,
john
> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Sunday, January 19, 2020 12:24 PM
> To: John Daley (johndale) <johndale at cisco.com>; Hyong Youb Kim
> (hyonkim) <hyonkim at cisco.com>
> Cc: ferruh.yigit at intel.com; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/enic: move macro to the correct file
>
> 14/01/2020 01:24, John Daley:
> > +#define min_t(type, x, y) ({ \
> > + type __min1 = (x); \
> > + type __min2 = (y); \
> > + __min1 < __min2 ? __min1 : __min2; })
> > +
> > +#define max_t(type, x, y) ({ \
> > + type __max1 = (x); \
> > + type __max2 = (y); \
> > + __max1 > __max2 ? __max1 : __max2; })
>
> Why not using RTE_MIN/RTE_MAX which use typeof?
> You need to specify a type?
>
More information about the dev
mailing list