[PATCH] examples/ipsec-secgw: compilation fix for GCC-12
Akhil Goyal
gakhil at marvell.com
Thu Aug 25 10:07:59 CEST 2022
> Subject: [PATCH] examples/ipsec-secgw: compilation fix for GCC-12
>
> Typecasting uint32_t array to uint16_t and accessing it as max array
> size(at time of declaration of uint32_t array) causes gcc-12 to
> throw an error.
>
> GCC 12 raises the following warning:
>
> In function 'send_multi_pkts',
> inlined from 'route6_pkts_neon' at
> ../examples/ipsec-secgw/ipsec_lpm_neon.h:170:2,
> inlined from 'ipsec_poll_mode_wrkr_inl_pr' at
> ../examples/ipsec-secgw/ipsec_worker.c:1257:4:
> ../examples/ipsec-secgw/ipsec_neon.h:261:21: error: 'dst_port' may be used
> uninitialized [-Werror=maybe-uninitialized]
> 261 | dlp = dst_port[i - 1];
> | ~~~~^~~~~~~~~~~~~~~~~
> In file included from ../examples/ipsec-secgw/ipsec_worker.c:16:
> ../examples/ipsec-secgw/ipsec_worker.c: In function
> 'ipsec_poll_mode_wrkr_inl_pr':
> ../examples/ipsec-secgw/ipsec_lpm_neon.h:118:17:
> note: 'dst_port' declared here
> 118 | int32_t dst_port[MAX_PKT_BURST];
> | ^~~~~~~~
>
> Fixes: ce23f7ceec6b ("examples/ipsec-secgw: add support of NEON with poll
> mode")
> Fixes: dcbf9ad5fdf4 ("examples/ipsec-secgw: move fast path helper functions")
> Cc: stable at dpdk.org
>
> Signed-off-by: Amit Prakash Shukla <amitprakashs at marvell.com>
> Change-Id: I083405d2c083cb1228e1a0126240937675a44cd9
Change-id need to be removed. Will remove while applying.
Acked-by: Akhil Goyal <gakhil at marvell.com>
> ---
More information about the stable
mailing list