DPDK patches and discussions
 help / color / mirror / Atom feed
From: "John Daley (johndale)" <johndale@cisco.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Hyong Youb Kim (hyonkim)" <hyonkim@cisco.com>
Subject: Re: [dpdk-dev] [PATCH] net/enic: move macro to the correct file
Date: Tue, 21 Jan 2020 19:49:43 +0000	[thread overview]
Message-ID: <BYAPR11MB253524CC57B1615D8CB5024ACF0D0@BYAPR11MB2535.namprd11.prod.outlook.com> (raw)
In-Reply-To: <1958262.htQpZWrp2x@xps>

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@monjalon.net>
> Sent: Sunday, January 19, 2020 12:24 PM
> To: John Daley (johndale) <johndale@cisco.com>; Hyong Youb Kim
> (hyonkim) <hyonkim@cisco.com>
> Cc: ferruh.yigit@intel.com; dev@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?
> 


  reply	other threads:[~2020-01-21 19:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-14  0:24 [dpdk-dev] [PATCH] net/enic: use standard RTE defines John Daley
2020-01-14  0:24 ` [dpdk-dev] [PATCH] net/enic: consolidate and remove some defines John Daley
2020-01-14 17:58   ` Ferruh Yigit
2020-01-14  0:24 ` [dpdk-dev] [PATCH] net/enic: move macro to the correct file John Daley
2020-01-14 17:59   ` Ferruh Yigit
2020-01-19 20:23   ` Thomas Monjalon
2020-01-21 19:49     ` John Daley (johndale) [this message]
2020-01-21 20:35   ` [dpdk-dev] [PATCH v2] net/enic: use RTE min and max macros John Daley
2020-01-24 12:55     ` Ferruh Yigit
2020-01-14 17:57 ` [dpdk-dev] [PATCH] net/enic: use standard RTE defines Ferruh Yigit

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=BYAPR11MB253524CC57B1615D8CB5024ACF0D0@BYAPR11MB2535.namprd11.prod.outlook.com \
    --to=johndale@cisco.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=hyonkim@cisco.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).