From: "Zhang, Helin" <helin.zhang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5
Date: Fri, 20 Jun 2014 02:08:47 +0000 [thread overview]
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A74527F@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <5971655.KRkzbCMV6h@xps13>
Hi Thomas
No special reason to avoid using '#define'. I think both are OK.
But inline function can provide more type checks for the input/output parameters. Also inline functions with even only one line code can be seen a lot in that file.
So I assume that it is not mandatory to use '#define' instead.
Regards,
Helin
-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
Sent: Thursday, June 19, 2014 11:33 PM
To: Zhang, Helin
Cc: dev@dpdk.org; Neil Horman
Subject: Re: [dpdk-dev] [PATCH v2] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5
2014-06-11 21:43, Helin Zhang:
> -#if !(RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >=
> RHEL_RELEASE_VERSION(6,4)) -static inline bool ether_addr_equal(const
> u8 *addr1, const u8 *addr2)
> +static inline bool __kc_ether_addr_equal(const u8 *addr1, const u8
> +*addr2)
> {
> return !compare_ether_addr(addr1, addr2); } -#endif
> +#define ether_addr_equal(_addr1, _addr2)
> +__kc_ether_addr_equal((_addr1),(_addr2))
Why not defining it in one line (as Neil suggested)?
#define ether_addr_equal(_addr1, _addr2) (!compare_ether_addr(addr1, addr2))
--
Thomas
next prev parent reply other threads:[~2014-06-20 2:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 13:43 Helin Zhang
2014-06-19 15:32 ` Thomas Monjalon
2014-06-20 2:08 ` Zhang, Helin [this message]
2014-06-23 20:57 ` Thomas Monjalon
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=F35DEAC7BCE34641BA9FAC6BCA4A12E70A74527F@SHSMSX104.ccr.corp.intel.com \
--to=helin.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.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).