From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <helin.zhang@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id EF5925908
 for <dev@dpdk.org>; Tue, 10 Jun 2014 16:59:03 +0200 (CEST)
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by fmsmga101.fm.intel.com with ESMTP; 10 Jun 2014 07:59:17 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="4.98,1009,1392192000"; d="scan'208";a="545747474"
Received: from fmsmsx103.amr.corp.intel.com ([10.19.9.34])
 by fmsmga001.fm.intel.com with ESMTP; 10 Jun 2014 07:59:15 -0700
Received: from fmsmsx153.amr.corp.intel.com (10.19.17.7) by
 FMSMSX103.amr.corp.intel.com (10.19.9.34) with Microsoft SMTP Server (TLS) id
 14.3.123.3; Tue, 10 Jun 2014 07:59:14 -0700
Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by
 FMSMSX153.amr.corp.intel.com (10.19.17.7) with Microsoft SMTP Server (TLS) id
 14.3.123.3; Tue, 10 Jun 2014 07:59:14 -0700
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.192]) by
 SHSMSX152.ccr.corp.intel.com ([169.254.6.23]) with mapi id 14.03.0123.003;
 Tue, 10 Jun 2014 22:59:13 +0800
From: "Zhang, Helin" <helin.zhang@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Thread-Topic: [dpdk-dev] [PATCH] kni: fix compile errors on Oracle Linux6.4
 and RHEL6.5
Thread-Index: AQHPhJMo5kZRffLfV0ewSZXA9DDz8ptqbkAw
Date: Tue, 10 Jun 2014 14:59:13 +0000
Message-ID: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A736EB8@SHSMSX104.ccr.corp.intel.com>
References: <1402303135-28248-1-git-send-email-helin.zhang@intel.com>
 <3962139.NISuUL0v1x@xps13>
In-Reply-To: <3962139.NISuUL0v1x@xps13>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] kni: fix compile errors on Oracle Linux6.4
 and RHEL6.5
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <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: Tue, 10 Jun 2014 14:59:04 -0000

Hi Thomas

Were you talking about the "#ifndef ether_addr_equal "?
The compile errors I copied in that patch shows that the function has alrea=
dy been defined in include/linux/etherdevice.h on Oracle Linux6.4. In this =
case, it seems not always true as you said.
The method came from the standard Linux driver, so I think it should be use=
ful and has been reviewed by Linux kernel community.

Oops, it seems that there are useless code which I need to remove. I will u=
pdate it later! Thank you very much for the pointing!

Regards,
Helin

-----Original Message-----
From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]=20
Sent: Tuesday, June 10, 2014 6:03 PM
To: Zhang, Helin
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] kni: fix compile errors on Oracle Linux6.4 =
and RHEL6.5

Hi Helin,

2014-06-09 16:38, Helin Zhang:
>  #if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) )  #define=20
> skb_tx_timestamp(skb) do {} while (0) -#if !(RHEL_RELEASE_CODE &&=20
> RHEL_RELEASE_CODE >=3D RHEL_RELEASE_VERSION(6,4)) -static inline bool=20
> ether_addr_equal(const u8 *addr1, const u8 *addr2)
> +#ifndef ether_addr_equal

It should be always true as it is a function (not known by the preprocessor=
).

> +static inline bool __kc_ether_addr_equal(const u8 *addr1, const u8=20
> +*addr2)
>  {
>  	return !compare_ether_addr(addr1, addr2);  } -#endif
> +#define ether_addr_equal(_addr1, _addr2)=20
> +__kc_ether_addr_equal((_addr1),(_addr2))
> +#endif /* __kc_ether_addr_equal*/

So it is always replacing ether_addr_equal() by a kcompat equivalent for ol=
d kernels, even if ether_addr_equal() is already defined as a C function.
Just to confirm: is it really what we want?

[...]
> -#endif
> +#define ethtool_adv_to_mmd_eee_adv_t(adv) \
> +__kc_ethtool_adv_to_mmd_eee_adv_t(adv)

An indentation is missing here.

> +#endif /* ethtool_adv_to_mmd_eee_adv_t */ #endif /* */

Why an empty comment?

Thanks
--
Thomas