aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk
diff options
context:
space:
mode:
authorTianyu Li <tianyu.li@arm.com>2021-08-26 09:47:31 +0800
committerDamjan Marion <dmarion@me.com>2021-09-13 13:38:36 +0000
commitdb79ac0502f3a2ecc20d4fa2e9f9be20bfb8e18c (patch)
treecf8240b961c7601a6a5b100900bed540c1bb6fff /src/plugins/dpdk
parent14b472e373228be0f4c96f5450f2ecd8aef4ac34 (diff)
dpdk: fix prefetch assert on Arm
CLIB_PREFETCH (cop[1], CLIB_CACHE_LINE_BYTES * 3, STORE); Note on 64 bytes cache line size arm machines, CLIB_CACHE_LINE_BYTES 128 CLIB_CACHE_PREFETCH_BYTES 6 above CLIB_PREFETCH () macro will be expand to ASSERT ((size) <= 4 * CLIB_CACHE_PREFETCH_BYTES); it will hit assert due to size (i.e. 3 * 128) > 4 * 64 Solution: Change to CLIB_PREFETCH (cop[1], sizeof(*cop[1]), STORE); Type: fix Signed-off-by: Tianyu Li <tianyu.li@arm.com> Reviewed-by: Lijian Zhang <lijian.zhang@arm.com> Change-Id: Id0981fd5bd2b25ff71db4197b25578d0b7a9803e
Diffstat (limited to 'src/plugins/dpdk')
-rw-r--r--src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c b/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c
index 4545e24fc83..771d8045e84 100644
--- a/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c
+++ b/src/plugins/dpdk/cryptodev/cryptodev_op_data_path.c
@@ -169,8 +169,8 @@ cryptodev_frame_linked_algs_enqueue (vlib_main_t *vm,
if (n_elts > 2)
{
- CLIB_PREFETCH (cop[1], CLIB_CACHE_LINE_BYTES * 3, STORE);
- CLIB_PREFETCH (cop[2], CLIB_CACHE_LINE_BYTES * 3, STORE);
+ CLIB_PREFETCH (cop[1], sizeof (*cop[1]), STORE);
+ CLIB_PREFETCH (cop[2], sizeof (*cop[2]), STORE);
clib_prefetch_load (&fe[1]);
clib_prefetch_load (&fe[2]);
}
@@ -286,8 +286,8 @@ cryptodev_frame_aead_enqueue (vlib_main_t *vm,
if (n_elts > 2)
{
- CLIB_PREFETCH (cop[1], CLIB_CACHE_LINE_BYTES * 3, STORE);
- CLIB_PREFETCH (cop[2], CLIB_CACHE_LINE_BYTES * 3, STORE);
+ CLIB_PREFETCH (cop[1], sizeof (*cop[1]), STORE);
+ CLIB_PREFETCH (cop[2], sizeof (*cop[2]), STORE);
clib_prefetch_load (&fe[1]);
clib_prefetch_load (&fe[2]);
}