From: Tianyu Li Date: Thu, 29 Jul 2021 05:39:24 +0000 (+0800) Subject: l2: fix array-bounds error for prefetch on Arm X-Git-Tag: v22.06-rc0~287 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=ad1bc84e6e4faad747aaf6b8499f0f467c242fc6;hp=ad1bc84e6e4faad747aaf6b8499f0f467c242fc6;p=vpp.git l2: fix array-bounds error for prefetch on Arm make build-release CC=gcc-10 vpp/src/vppinfra/cache.h:73:31: error: array subscript 80 is outside array bounds of ‘l2_in_out_feat_arc_main_t[1]’ [-Werror=array-bounds] __builtin_prefetch (_addr + (n) *CLIB_CACHE_PREFETCH_BYTES, _CLIB_PREFETCH (3, size, type); vpp/src/vnet/l2/l2_in_out_feat_arc.c:260:3: note: in expansion of macro ‘CLIB_PREFETCH’ CLIB_PREFETCH (next_node_indices, 2 * CLIB_CACHE_LINE_BYTES, LOAD); 2 * CLIB_CACHE_LINE_BYTES is 256 bytes on Arm, the offset is out of range of fam->feat_next_node_index[1], which is 128 bytes, use sizeof array instead. Type: fix Signed-off-by: Tianyu Li Change-Id: Ib7e06fcb643b2e863985ba89efcc274076752133 ---