Skip to contentSkip to conversation

Building DPDK with gcc 11.1.1 Generates Multiple Warning Messages in the i40e PMD

dpdk-dev [email protected] 1 participant 2 messages Jun 17, 2021 – Nov 9, 2021

lore
Share & tools
lore
#0 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=743

Bug ID: 743
Summary: Building DPDK with gcc 11.1.1 Generates Multiple
Warning Messages in the i40e PMD
Product: DPDK
Version: unspecified
Hardware: POWER
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---

Using Fedora 34 container on ppc64le host with gcc 11. Running the same test in a Fedora 34 VM on x86 does not produce an error.

[root@ee54008db177 dpdk]# gcc --version
gcc (GCC) 11.1.1 20210531 (Red Hat 11.1.1-3)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Warning errors generated when building the i40e PMD, even after proposed fixes for bug 739 are applied.

[root@ee54008db177 dpdk]# ninja -C build
ninja: Entering directory `build'
[1270/2422] Compiling C object drivers/libtmp_rte_net_i40e.a.p/net_i40e_i40e_flow.c.o
In function 'i40e_flow_parse_fdir_pattern',
inlined from 'i40e_flow_parse_fdir_filter' at
../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3052:69: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

 3052 |                                 filter->input.flow_ext.flexbytes[j] =
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3053 |                                         raw_spec->pattern[i];
      |                                         ~~~~~~~~~~~~~~~~~~~~

In file included from ../drivers/net/i40e/i40e_flow.c:25:
../drivers/net/i40e/i40e_flow.c: In function 'i40e_flow_parse_fdir_filter':
../drivers/net/i40e/i40e_ethdev.h:628:17: note: at offset 16 into destination object 'flexbytes' of size 16

  628 |         uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];
      |                 ^~~~~~~~~

In function 'i40e_flow_parse_fdir_pattern',
inlined from 'i40e_flow_parse_fdir_filter' at
../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3054:69: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

 3054 |                                 filter->input.flow_ext.flex_mask[j] =
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3055 |                                         raw_mask->pattern[i];
      |                                         ~~~~~~~~~~~~~~~~~~~~

In file included from ../drivers/net/i40e/i40e_flow.c:25:
../drivers/net/i40e/i40e_flow.c: In function 'i40e_flow_parse_fdir_filter':
../drivers/net/i40e/i40e_ethdev.h:630:17: note: at offset 16 into destination object 'flex_mask' of size 16

  630 |         uint8_t flex_mask[I40E_FDIR_MAX_FLEX_LEN];
      |                 ^~~~~~~~~

In function 'i40e_flow_parse_fdir_pattern',
inlined from 'i40e_flow_parse_fdir_filter' at
../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3052:69: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

 3052 |                                 filter->input.flow_ext.flexbytes[j] =
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3053 |                                         raw_spec->pattern[i];
      |                                         ~~~~~~~~~~~~~~~~~~~~

In file included from ../drivers/net/i40e/i40e_flow.c:25:
../drivers/net/i40e/i40e_flow.c: In function 'i40e_flow_parse_fdir_filter':
../drivers/net/i40e/i40e_ethdev.h:628:17: note: at offset [17, 271] into destination object 'flexbytes' of size 16

  628 |         uint8_t flexbytes[RTE_ETH_FDIR_MAX_FLEXLEN];
      |                 ^~~~~~~~~

In function 'i40e_flow_parse_fdir_pattern',
inlined from 'i40e_flow_parse_fdir_filter' at
../drivers/net/i40e/i40e_flow.c:3274:8:
../drivers/net/i40e/i40e_flow.c:3054:69: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]

 3054 |                                 filter->input.flow_ext.flex_mask[j] =
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
 3055 |                                         raw_mask->pattern[i];
      |                                         ~~~~~~~~~~~~~~~~~~~~

In file included from ../drivers/net/i40e/i40e_flow.c:25:
../drivers/net/i40e/i40e_flow.c: In function 'i40e_flow_parse_fdir_filter':
../drivers/net/i40e/i40e_ethdev.h:630:17: note: at offset [17, 271] into destination object 'flex_mask' of size 16

  630 |         uint8_t flex_mask[I40E_FDIR_MAX_FLEX_LEN];
      |                 ^~~~~~~~~

[2422/2422] Linking target app/test/dpdk-test

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

https://bugs.dpdk.org/show_bug.cgi?id=743

David Christensen ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED

--- Comment #5 from David Christensen ([email protected]) --- Fixed in the following commit:
d01201829b net/i40e: fix 32-bit build

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.