diff options
author | Tianyu Li <tianyu.li@arm.com> | 2021-08-26 09:43:42 +0800 |
---|---|---|
committer | Tianyu Li <tianyu.li@arm.com> | 2021-08-26 10:28:17 +0800 |
commit | c6b6816bed8a4fa2baa396bc0af56e4ac373d713 (patch) | |
tree | ffeba68e517c6b803ff0faf650c5f243c51a7edb /test/test_vxlan_gpe.py | |
parent | ee04de552d1749948e8802c2c6a87646f3b81625 (diff) |
acl: fix prefetch out of struct bound on Arm
fa_session_t *sess;
CLIB_PREFETCH (sess, 2 * CLIB_CACHE_LINE_BYTES, STORE);
sizeof(fa_session_t) is 128 bytes
i) on 64B cacheline size Arm machine,
above CLIB_PREFETCH () macro will be expand to
__builtin_prefetch(sess)
__builtin_prefetch(sess + 64)
__builtin_prefetch(sess + 128) << prefetch is out of range of *sess.
__builtin_prefetch(sess + 192) <<
ii) on 128B cacheline size Arm machine, CLIB_PREFETCH () expands to
__builtin_prefetch(sess)
__builtin_prefetch(sess + 128) << still out of bound
Solution:
Change to CLIB_PREFETCH (sess, sizeof(*sess), STORE);
Type: fix
Signed-off-by: Tianyu Li <tianyu.li@arm.com>
Reviewed-by: Lijian Zhang <lijian.zhang@arm.com>
Change-Id: I4b3d4fc55747f3d9ad1bcf24f8834601a03ef55e
Diffstat (limited to 'test/test_vxlan_gpe.py')
0 files changed, 0 insertions, 0 deletions