[dpdk-dev,1/2] net/thunderx: select -fno-prefetch-loop-arrays only for gcc

Message ID 1467044166-31912-1-git-send-email-jerin.jacob@caviumnetworks.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Jerin Jacob June 27, 2016, 4:16 p.m. UTC
  'fno-prefetch-loop-arrays' optimization flag is not supported with clang

Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx functions")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/thunderx/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Ferruh Yigit June 28, 2016, 8:55 a.m. UTC | #1
On 6/27/2016 5:16 PM, Jerin Jacob wrote:
> 'fno-prefetch-loop-arrays' optimization flag is not supported with clang
> 
> Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx functions")
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>

check-git-log gives following errors:

Wrong 'Fixes' reference:
        Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx
functions")

This looks like because of missing " in the beginning
  
Bruce Richardson June 29, 2016, 10:39 a.m. UTC | #2
On Tue, Jun 28, 2016 at 09:55:55AM +0100, Ferruh Yigit wrote:
> On 6/27/2016 5:16 PM, Jerin Jacob wrote:
> > 'fno-prefetch-loop-arrays' optimization flag is not supported with clang
> > 
> > Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx functions")
> > 
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> check-git-log gives following errors:
> 
> Wrong 'Fixes' reference:
>         Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx
> functions")
> 
> This looks like because of missing " in the beginning

Yes, but I can fix that on apply.

Other very minor nit is that the standard for fixes lines is to use a 12-char
commit id, rather than 8. Per contributors guide:
   git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")'"

/Bruce
  
Bruce Richardson June 29, 2016, 10:43 a.m. UTC | #3
On Wed, Jun 29, 2016 at 11:39:07AM +0100, Bruce Richardson wrote:
> On Tue, Jun 28, 2016 at 09:55:55AM +0100, Ferruh Yigit wrote:
> > On 6/27/2016 5:16 PM, Jerin Jacob wrote:
> > > 'fno-prefetch-loop-arrays' optimization flag is not supported with clang
> > > 
> > > Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx functions")
> > > 
> > > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > > Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > 
> > check-git-log gives following errors:
> > 
> > Wrong 'Fixes' reference:
> >         Fixes: dcc49041 (net/thunderx: add single and multi-segment Tx
> > functions")
> > 
> > This looks like because of missing " in the beginning
> 
> Yes, but I can fix that on apply.
> 
> Other very minor nit is that the standard for fixes lines is to use a 12-char
> commit id, rather than 8. Per contributors guide:
>    git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")'"
> 
> /Bruce

Applied to dpdk-next-net/rel_16_07

/Bruce
  

Patch

diff --git a/drivers/net/thunderx/Makefile b/drivers/net/thunderx/Makefile
index 9079b5b..078237e 100644
--- a/drivers/net/thunderx/Makefile
+++ b/drivers/net/thunderx/Makefile
@@ -56,7 +56,10 @@  SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_hw.c
 SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_mbox.c
 SRCS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += nicvf_ethdev.c
 
-CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays -Ofast
+ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
+CFLAGS_nicvf_rxtx.o += -fno-prefetch-loop-arrays
+endif
+CFLAGS_nicvf_rxtx.o += -Ofast
 
 # this lib depends upon:
 DEPDIRS-$(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD) += lib/librte_eal lib/librte_ether