DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
@ 2017-06-02 16:31 Nirmoy Das
  2017-06-02 16:38 ` Markos Chandras
  0 siblings, 1 reply; 8+ messages in thread
From: Nirmoy Das @ 2017-06-02 16:31 UTC (permalink / raw)
  To: dev; +Cc: Nirmoy Das

disable truncation check to ignore below warning
dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]

Signed-off-by: Nirmoy Das <ndas@suse.de>
---
 lib/librte_eal/linuxapp/kni/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile
index 154c528db..79bb498dd 100644
--- a/lib/librte_eal/linuxapp/kni/Makefile
+++ b/lib/librte_eal/linuxapp/kni/Makefile
@@ -43,6 +43,9 @@ MODULE_CFLAGS += -I$(SRCDIR) --param max-inline-insns-single=50
 MODULE_CFLAGS += -I$(RTE_OUTPUT)/include -I$(SRCDIR)/ethtool/ixgbe -I$(SRCDIR)/ethtool/igb
 MODULE_CFLAGS += -include $(RTE_OUTPUT)/include/rte_config.h
 MODULE_CFLAGS += -Wall -Werror
+ifeq ($(shell test $(GCC_VERSION) -ge 70 && echo 1), 1)
+MODULE_CFLAGS += -Wno-format-truncation
+endif
 
 -include /etc/lsb-release
 
-- 
2.12.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-02 16:31 [dpdk-dev] [PATCH] mk: disable new gcc truncation flag Nirmoy Das
@ 2017-06-02 16:38 ` Markos Chandras
  2017-06-12 14:35   ` Markos Chandras
  0 siblings, 1 reply; 8+ messages in thread
From: Markos Chandras @ 2017-06-02 16:38 UTC (permalink / raw)
  To: Nirmoy Das, dev

On 06/02/2017 05:31 PM, Nirmoy Das wrote:
> disable truncation check to ignore below warning
> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
> 
> Signed-off-by: Nirmoy Das <ndas@suse.de>
> ---

I haven't check the code but is this a bogus warning or a real one? If
it's bogus then could you explain why in the commit message so we do not
bring it back in the future? If it's a real problem, then perhaps worth
fixing it instead of masking it?

-- 
markos

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-02 16:38 ` Markos Chandras
@ 2017-06-12 14:35   ` Markos Chandras
  2017-06-13  9:18     ` Nirmoy Das
  0 siblings, 1 reply; 8+ messages in thread
From: Markos Chandras @ 2017-06-12 14:35 UTC (permalink / raw)
  To: Nirmoy Das, dev

On 06/02/2017 07:38 PM, Markos Chandras wrote:
> On 06/02/2017 05:31 PM, Nirmoy Das wrote:
>> disable truncation check to ignore below warning
>> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
>>
>> Signed-off-by: Nirmoy Das <ndas@suse.de>
>> ---
> 
> I haven't check the code but is this a bogus warning or a real one? If
> it's bogus then could you explain why in the commit message so we do not
> bring it back in the future? If it's a real problem, then perhaps worth
> fixing it instead of masking it?
> 

Actually this should have already been fixed in the series posted in
http://dpdk.org/ml/archives/dev/2017-May/065261.html

-- 
markos

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-12 14:35   ` Markos Chandras
@ 2017-06-13  9:18     ` Nirmoy Das
  2017-06-13 10:01       ` Markos Chandras
  2017-06-13 13:45       ` Ferruh Yigit
  0 siblings, 2 replies; 8+ messages in thread
From: Nirmoy Das @ 2017-06-13  9:18 UTC (permalink / raw)
  To: Markos Chandras, dev



On 06/12/2017 04:35 PM, Markos Chandras wrote:
> On 06/02/2017 07:38 PM, Markos Chandras wrote:
>> On 06/02/2017 05:31 PM, Nirmoy Das wrote:
>>> disable truncation check to ignore below warning
>>> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
>>>
>>> Signed-off-by: Nirmoy Das <ndas@suse.de>
>>> ---
>> I haven't check the code but is this a bogus warning or a real one? If
>> it's bogus then could you explain why in the commit message so we do not
>> bring it back in the future? If it's a real problem, then perhaps worth
>> fixing it instead of masking it?
>>
> Actually this should have already been fixed in the series posted in
> http://dpdk.org/ml/archives/dev/2017-May/065261.html
I see the issue in master with CONFIG_RTE_KNI_KMOD_ETHTOOL=y

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-13  9:18     ` Nirmoy Das
@ 2017-06-13 10:01       ` Markos Chandras
  2017-06-13 13:45       ` Ferruh Yigit
  1 sibling, 0 replies; 8+ messages in thread
From: Markos Chandras @ 2017-06-13 10:01 UTC (permalink / raw)
  To: Nirmoy Das, dev

On 06/13/2017 12:18 PM, Nirmoy Das wrote:
> 
> 
> On 06/12/2017 04:35 PM, Markos Chandras wrote:
>> On 06/02/2017 07:38 PM, Markos Chandras wrote:
>>> On 06/02/2017 05:31 PM, Nirmoy Das wrote:
>>>> disable truncation check to ignore below warning
>>>> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
>>>>
>>>> Signed-off-by: Nirmoy Das <ndas@suse.de>
>>>> ---
>>> I haven't check the code but is this a bogus warning or a real one? If
>>> it's bogus then could you explain why in the commit message so we do not
>>> bring it back in the future? If it's a real problem, then perhaps worth
>>> fixing it instead of masking it?
>>>
>> Actually this should have already been fixed in the series posted in
>> http://dpdk.org/ml/archives/dev/2017-May/065261.html
> I see the issue in master with CONFIG_RTE_KNI_KMOD_ETHTOOL=y
> 

Yeah I think you are right. This doesn't seem to have been fixed yet. In
the end, I think your patch is good so:

Reviewed-by: Markos Chandras <mchandras@suse.de>

-- 
markos

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-13  9:18     ` Nirmoy Das
  2017-06-13 10:01       ` Markos Chandras
@ 2017-06-13 13:45       ` Ferruh Yigit
  2017-06-13 13:49         ` Markos Chandras
  1 sibling, 1 reply; 8+ messages in thread
From: Ferruh Yigit @ 2017-06-13 13:45 UTC (permalink / raw)
  To: Nirmoy Das, Markos Chandras, dev

On 6/13/2017 10:18 AM, Nirmoy Das wrote:
> 
> 
> On 06/12/2017 04:35 PM, Markos Chandras wrote:
>> On 06/02/2017 07:38 PM, Markos Chandras wrote:
>>> On 06/02/2017 05:31 PM, Nirmoy Das wrote:
>>>> disable truncation check to ignore below warning
>>>> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
>>>>
>>>> Signed-off-by: Nirmoy Das <ndas@suse.de>
>>>> ---
>>> I haven't check the code but is this a bogus warning or a real one? If
>>> it's bogus then could you explain why in the commit message so we do not
>>> bring it back in the future? If it's a real problem, then perhaps worth
>>> fixing it instead of masking it?
>>>
>> Actually this should have already been fixed in the series posted in
>> http://dpdk.org/ml/archives/dev/2017-May/065261.html
> I see the issue in master with CONFIG_RTE_KNI_KMOD_ETHTOOL=y

I confirm the build error, and patch fixes it.

Although that piece of code most probably will not be used at all, and
previous solution was to disable warnings, since this warning is only
single place in KNI code, it is easy to fix and I am for fixing it [1],
what do you think?


diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
index d077b49e9..8667f29ca 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
@@ -607,7 +607,7 @@ struct igb_adapter {
        int int_mode;
        u32 rss_queues;
        u32 vmdq_pools;
-       char fw_version[32];
+       char fw_version[43];
        u32 wvbr;
        struct igb_mac_addr *mac_table;
 #ifdef CONFIG_IGB_VMDQ_NETDEV

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-13 13:45       ` Ferruh Yigit
@ 2017-06-13 13:49         ` Markos Chandras
  2017-06-13 16:50           ` Ferruh Yigit
  0 siblings, 1 reply; 8+ messages in thread
From: Markos Chandras @ 2017-06-13 13:49 UTC (permalink / raw)
  To: Ferruh Yigit, Nirmoy Das, dev

On 06/13/2017 04:45 PM, Ferruh Yigit wrote:
> On 6/13/2017 10:18 AM, Nirmoy Das wrote:
>>
>>
>> On 06/12/2017 04:35 PM, Markos Chandras wrote:
>>> On 06/02/2017 07:38 PM, Markos Chandras wrote:
>>>> On 06/02/2017 05:31 PM, Nirmoy Das wrote:
>>>>> disable truncation check to ignore below warning
>>>>> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
>>>>>
>>>>> Signed-off-by: Nirmoy Das <ndas@suse.de>
>>>>> ---
>>>> I haven't check the code but is this a bogus warning or a real one? If
>>>> it's bogus then could you explain why in the commit message so we do not
>>>> bring it back in the future? If it's a real problem, then perhaps worth
>>>> fixing it instead of masking it?
>>>>
>>> Actually this should have already been fixed in the series posted in
>>> http://dpdk.org/ml/archives/dev/2017-May/065261.html
>> I see the issue in master with CONFIG_RTE_KNI_KMOD_ETHTOOL=y
> 
> I confirm the build error, and patch fixes it.
> 
> Although that piece of code most probably will not be used at all, and
> previous solution was to disable warnings, since this warning is only
> single place in KNI code, it is easy to fix and I am for fixing it [1],
> what do you think?
> 
> 
> diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
> b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
> index d077b49e9..8667f29ca 100644
> --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
> +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
> @@ -607,7 +607,7 @@ struct igb_adapter {
>         int int_mode;
>         u32 rss_queues;
>         u32 vmdq_pools;
> -       char fw_version[32];
> +       char fw_version[43];
>         u32 wvbr;
>         struct igb_mac_addr *mac_table;
>  #ifdef CONFIG_IGB_VMDQ_NETDEV
> 

Looks reasonable to me

-- 
markos

SUSE LINUX GmbH | GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg) Maxfeldstr. 5, D-90409, Nürnberg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] [PATCH] mk: disable new gcc truncation flag
  2017-06-13 13:49         ` Markos Chandras
@ 2017-06-13 16:50           ` Ferruh Yigit
  0 siblings, 0 replies; 8+ messages in thread
From: Ferruh Yigit @ 2017-06-13 16:50 UTC (permalink / raw)
  To: Markos Chandras, Nirmoy Das, dev

On 6/13/2017 2:49 PM, Markos Chandras wrote:
> On 06/13/2017 04:45 PM, Ferruh Yigit wrote:
>> On 6/13/2017 10:18 AM, Nirmoy Das wrote:
>>>
>>>
>>> On 06/12/2017 04:35 PM, Markos Chandras wrote:
>>>> On 06/02/2017 07:38 PM, Markos Chandras wrote:
>>>>> On 06/02/2017 05:31 PM, Nirmoy Das wrote:
>>>>>> disable truncation check to ignore below warning
>>>>>> dpdk/x86_64-native-linuxapp-gcc-default/build/lib/librte_eal/linuxapp/kni/igb_main.c:2476:30: error: '%d' directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 11 [-Werror=format-truncation=]
>>>>>>
>>>>>> Signed-off-by: Nirmoy Das <ndas@suse.de>
>>>>>> ---
>>>>> I haven't check the code but is this a bogus warning or a real one? If
>>>>> it's bogus then could you explain why in the commit message so we do not
>>>>> bring it back in the future? If it's a real problem, then perhaps worth
>>>>> fixing it instead of masking it?
>>>>>
>>>> Actually this should have already been fixed in the series posted in
>>>> http://dpdk.org/ml/archives/dev/2017-May/065261.html
>>> I see the issue in master with CONFIG_RTE_KNI_KMOD_ETHTOOL=y
>>
>> I confirm the build error, and patch fixes it.
>>
>> Although that piece of code most probably will not be used at all, and
>> previous solution was to disable warnings, since this warning is only
>> single place in KNI code, it is easy to fix and I am for fixing it [1],
>> what do you think?
>>
>>
>> diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
>> b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
>> index d077b49e9..8667f29ca 100644
>> --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
>> +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
>> @@ -607,7 +607,7 @@ struct igb_adapter {
>>         int int_mode;
>>         u32 rss_queues;
>>         u32 vmdq_pools;
>> -       char fw_version[32];
>> +       char fw_version[43];
>>         u32 wvbr;
>>         struct igb_mac_addr *mac_table;
>>  #ifdef CONFIG_IGB_VMDQ_NETDEV
>>
> 
> Looks reasonable to me

Sent http://dpdk.org/dev/patchwork/patch/25297/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-06-13 16:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 16:31 [dpdk-dev] [PATCH] mk: disable new gcc truncation flag Nirmoy Das
2017-06-02 16:38 ` Markos Chandras
2017-06-12 14:35   ` Markos Chandras
2017-06-13  9:18     ` Nirmoy Das
2017-06-13 10:01       ` Markos Chandras
2017-06-13 13:45       ` Ferruh Yigit
2017-06-13 13:49         ` Markos Chandras
2017-06-13 16:50           ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).