numam-dpdk/lib/ip_frag
Huichao Cai e1522b328c ip_frag: fix build with GCC 12
GCC 12 raises warnings on usage of rte_memcpy with IPv4 options handling
in fragments for both the ip_frag library and unit tests.

For example in the library:
In function ‘_mm256_storeu_si256’,
    inlined from ‘rte_mov32’ at
        ../lib/eal/x86/include/rte_memcpy.h:347:2,
    inlined from ‘rte_mov128’ at
        ../lib/eal/x86/include/rte_memcpy.h:369:2,
    inlined from ‘rte_memcpy_generic’
        at ../lib/eal/x86/include/rte_memcpy.h:445:4,
    inlined from ‘rte_memcpy’
        at ../lib/eal/x86/include/rte_memcpy.h:851:10,
    inlined from ‘__create_ipopt_frag_hdr’
        at ../lib/ip_frag/rte_ipv4_fragmentation.c:68:4,
    inlined from ‘rte_ipv4_fragment_packet’
        at ../lib/ip_frag/rte_ipv4_fragmentation.c:242:16:
/usr/lib/gcc/x86_64-redhat-linux/12/include/avxintrin.h:935:8: error:
    array subscript ‘__m256i_u[1]’ is partly outside array bounds of
    ‘uint8_t[60]’ {aka ‘unsigned char[60]’} [-Werror=array-bounds]
  935 |   *__P = __A;
      |   ~~~~~^~~~~
../lib/ip_frag/rte_ipv4_fragmentation.c: In function
    ‘rte_ipv4_fragment_packet’:
../lib/ip_frag/rte_ipv4_fragmentation.c:122:17: note: at offset [52, 60]
    into object ‘ipopt_frag_hdr’ of size 60
  122 |         uint8_t ipopt_frag_hdr[IPV4_HDR_MAX_LEN];
      |                 ^~~~~~~~~~~~~~

To resolve the compilation warning, replace the rte_memcpy with memcpy.

Fixes: b50a14a853 ("ip_frag: add IPv4 options fragment")

Signed-off-by: Huichao Cai <chcchc88@163.com>
2022-06-23 16:32:00 +02:00
..
ip_frag_common.h ip_frag: hide internal structures 2021-11-08 22:37:47 +01:00
ip_frag_internal.c lib: remove librte_ prefix from directory names 2021-04-21 14:04:09 +02:00
ip_reassembly.h replace zero-length arrays with flexible ones 2022-06-07 16:44:21 +02:00
meson.build build/windows: remove separate list of libs 2021-10-22 22:40:59 +02:00
rte_ip_frag_common.c lib: remove unneeded header includes 2022-02-22 13:10:39 +01:00
rte_ip_frag.h ip_frag: add namespace 2021-11-17 10:29:14 +01:00
rte_ipv4_fragmentation.c ip_frag: fix build with GCC 12 2022-06-23 16:32:00 +02:00
rte_ipv4_reassembly.c fix spelling in comments and doxygen 2021-11-16 17:57:09 +01:00
rte_ipv6_fragmentation.c remove repeated 'the' in the code 2021-11-26 11:28:34 +01:00
rte_ipv6_reassembly.c ip_frag: add namespace 2021-11-17 10:29:14 +01:00
version.map ip_frag: add namespace 2021-11-17 10:29:14 +01:00