All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: "Zhang, Helin" <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [PATCH] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5
Date: Tue, 10 Jun 2014 17:27:50 +0200	[thread overview]
Message-ID: <82495518.zDeP5Vb6MD@xps13> (raw)
In-Reply-To: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A736EB8-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>

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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org] 
> Sent: Tuesday, June 10, 2014 6:03 PM
> To: Zhang, Helin
> Cc: dev-VfR2kkLFssw@public.gmane.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

  parent reply	other threads:[~2014-06-10 15:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09  8:38 [PATCH] kni: fix compile errors on Oracle Linux6.4 and RHEL6.5 Helin Zhang
     [not found] ` <1402303135-28248-1-git-send-email-helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2014-06-10 10:02   ` Thomas Monjalon
2014-06-10 14:59     ` Zhang, Helin
     [not found]       ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A736EB8-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-06-10 15:27         ` Thomas Monjalon [this message]
2014-06-10 11:23   ` Neil Horman
     [not found]     ` <20140610112321.GA6275-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2014-06-11  5:46       ` Zhang, Helin

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=82495518.zDeP5Vb6MD@xps13 \
    --to=thomas.monjalon-pdr9zngts4eavxtiumwx3w@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.