From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas.monjalon@6wind.com>
Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com
 [209.85.212.176]) by dpdk.org (Postfix) with ESMTP id C9832B0AD
 for <dev@dpdk.org>; Tue, 10 Jun 2014 17:27:38 +0200 (CEST)
Received: by mail-wi0-f176.google.com with SMTP id n3so3709635wiv.9
 for <dev@dpdk.org>; Tue, 10 Jun 2014 08:27:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:organization
 :user-agent:in-reply-to:references:mime-version
 :content-transfer-encoding:content-type;
 bh=Cx+jbWWeyHSC977h6scQV3OT1rLzbG3ikXsspdVyxSI=;
 b=mJUaXPwyAOShjGLmF6sb1HzdoM7Ygz7sjOw/VAZFF0htJV1O4RhW+VDfWrLUpQfHk6
 EOSiFn9UdNpafewQLljDdCnlDSH8cLPtH2UhbKnOLfQtTNZlM9eN1Q8IgjJL+vz+zfcF
 CzDmLuk9jV4wnAOUrAP7eLyxI7WxohD8576cDpx8QJg6VwV2sPoJOrkSlg00l44Nb5WM
 v0O49HJfvGQQqhUGFvgAzFS1hL720KmyyI/T3Y8OMRusldhLEpEDxUf+qsQcZE2136na
 3OUZAJdqJaDhlyvdyWe9G7nVQCuIa23TSY2s8fYMZ09agERAMnwE0lVVAe+o8UTr51zT
 JZBQ==
X-Gm-Message-State: ALoCoQmNAAJGjs/dYJhl0Dn7hnHxIN78G5R85jXE8DQq5qNSiKGhy2lCku2fPdUFVwnE30oLKUKp
X-Received: by 10.194.21.103 with SMTP id u7mr42857864wje.14.1402414070552;
 Tue, 10 Jun 2014 08:27:50 -0700 (PDT)
Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237])
 by mx.google.com with ESMTPSA id vm8sm30068486wjc.27.2014.06.10.08.27.49
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 10 Jun 2014 08:27:49 -0700 (PDT)
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "Zhang, Helin" <helin.zhang@intel.com>
Date: Tue, 10 Jun 2014 17:27:50 +0200
Message-ID: <82495518.zDeP5Vb6MD@xps13>
Organization: 6WIND
User-Agent: KMail/4.13.1 (Linux/3.14.4-1-ARCH; KDE/4.13.1; x86_64; ; )
In-Reply-To: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A736EB8@SHSMSX104.ccr.corp.intel.com>
References: <1402303135-28248-1-git-send-email-helin.zhang@intel.com>
 <3962139.NISuUL0v1x@xps13>
 <F35DEAC7BCE34641BA9FAC6BCA4A12E70A736EB8@SHSMSX104.ccr.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Cc: 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 15:27:39 -0000

Hi Helin,

Please answer below the question.

2014-06-10 14:59, Zhang, Helin:
> Were you talking about the "#ifndef ether_addr_equal "?

yes

> The compile errors I copied in that patch shows that the function
> has already been defined in include/linux/etherdevice.h on Oracle
> Linux6.4. In this case, it seems not always true as you said.

No, ether_addr_equal() is defined for the processor but not for the preprocessor.

> The method came from the standard Linux driver, so I think
> it should be useful and has been reviewed by Linux kernel community.

No, I think that this code come from the opaque Intel development
of the sourceforge driver.
On kernel.org, there is no need for kcompat glue as drivers are in-tree.

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

Thanks
-- 
Thomas

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] 
> 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 
> > skb_tx_timestamp(skb) do {} while (0) -#if !(RHEL_RELEASE_CODE && 
> > RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,4)) -static inline bool 
> > 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 
> > +*addr2)
> >  {
> >  	return !compare_ether_addr(addr1, addr2);  } -#endif
> > +#define ether_addr_equal(_addr1, _addr2) 
> > +__kc_ether_addr_equal((_addr1),(_addr2))
> > +#endif /* __kc_ether_addr_equal*/
> 
> So it is always replacing ether_addr_equal() by a kcompat equivalent for old 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