From: Gavin Hu Date: Thu, 17 May 2018 02:46:09 +0000 (+0800) Subject: eventdev: fix build with clang on ARM X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=454878ff834449ecd55fdb00b8da249c89e7ca75;p=dpdk.git eventdev: fix build with clang on ARM This patch fix the clang compiling issue reported on the ARM64 builing hosts. ev is a pointer in size of 64bit, but herein it should be the size of its content. lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: error: 'rte_memcpy' call operates on objects of type 'struct rte_event' while the size is based on a different type 'struct rte_event *' [-Werror,-Wsizeof-pointer-memaccess] rte_memcpy(ev, &m_data->response_info, sizeof(ev)); lib/librte_eventdev/rte_event_crypto_adapter.c:530:49: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)? rte_memcpy(ev, &m_data->response_info, sizeof(ev)); Fixes: 7901eac340 ("eventdev: add crypto adapter implementation") Signed-off-by: Gavin Hu Reviewed-by: Honnappa Nagarahalli Reviewed-by: Jerin Jacob --- diff --git a/lib/librte_eventdev/rte_event_crypto_adapter.c b/lib/librte_eventdev/rte_event_crypto_adapter.c index 831f842485..ba63a87b77 100644 --- a/lib/librte_eventdev/rte_event_crypto_adapter.c +++ b/lib/librte_eventdev/rte_event_crypto_adapter.c @@ -527,7 +527,7 @@ eca_ops_enqueue_burst(struct rte_event_crypto_adapter *adapter, continue; } - rte_memcpy(ev, &m_data->response_info, sizeof(ev)); + rte_memcpy(ev, &m_data->response_info, sizeof(*ev)); ev->event_ptr = ops[i]; ev->event_type = RTE_EVENT_TYPE_CRYPTODEV; if (adapter->implicit_release_disabled)