[dpdk-dev] [PATCH 1/4] l3fwd: some functions are unused in l3fwd-acl

2014-07-21 Thread Richardson, Bruce
> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Matthew Hall
> Sent: Sunday, July 20, 2014 8:48 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH 1/4] l3fwd: some functions are unused in l3fwd-acl
> 
> Signed-off-by: Matthew Hall 
> ---
>  examples/l3fwd/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
> index 68de8fc..5cd7396 100644
> --- a/examples/l3fwd/Makefile
> +++ b/examples/l3fwd/Makefile
> @@ -46,6 +46,7 @@ SRCS-y := main.c
> 
>  CFLAGS += -O3 $(USER_FLAGS)
>  CFLAGS += $(WERROR_FLAGS)
> +CFLAGS += -Wno-unused-function
> 

Rather than disabling the warnings, would it not be better to remove the 
functions entirely from the compile? I would assume that these are functions 
for one leg of the l3fwd code (e.g. hash lookup vs lpm lookup) that are not 
used in the other leg of the code, in which case the proper fix should be to 
add some more #ifdefs, right?

/Bruce


[dpdk-dev] [PATCH 1/4] l3fwd: some functions are unused in l3fwd-acl

2014-07-21 Thread Thomas Monjalon
Hi,

2014-07-20 20:47, Matthew Hall:
> +CFLAGS += -Wno-unused-function

I think it's better to fix the code instead of removing a warning.
If there is a very good reason to not do it, it would appear in the log.

Thanks
-- 
Thomas


[dpdk-dev] [PATCH 1/4] l3fwd: some functions are unused in l3fwd-acl

2014-07-21 Thread Matthew Hall
The same code is used in l3fwd and l3fwd-acl. When it is reused in l3fwd-acl a 
packet processing function from original l3fwd is not used any more.
-- 
Sent from my mobile device.

On July 21, 2014 6:44:41 AM PDT, Thomas Monjalon  
wrote:
>Hi,
>
>2014-07-20 20:47, Matthew Hall:
>> +CFLAGS += -Wno-unused-function
>
>I think it's better to fix the code instead of removing a warning.
>If there is a very good reason to not do it, it would appear in the
>log.
>
>Thanks



[dpdk-dev] [PATCH 1/4] l3fwd: some functions are unused in l3fwd-acl

2014-07-20 Thread Matthew Hall
Signed-off-by: Matthew Hall 
---
 examples/l3fwd/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile
index 68de8fc..5cd7396 100644
--- a/examples/l3fwd/Makefile
+++ b/examples/l3fwd/Makefile
@@ -46,6 +46,7 @@ SRCS-y := main.c

 CFLAGS += -O3 $(USER_FLAGS)
 CFLAGS += $(WERROR_FLAGS)
+CFLAGS += -Wno-unused-function

 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
-- 
1.9.1