#include <rte_random.h>
#include <rte_io.h>
+#include "ice_alloc.h"
+
#include "../ice_logs.h"
#ifndef __INTEL_NET_BASE_OSDEP__
#define ice_memset(a, b, c, d) memset((a), (b), (c))
#define ice_memcpy(a, b, c, d) rte_memcpy((a), (b), (c))
-#define ice_memdup(a, b, c, d) rte_memcpy(ice_malloc(a, c), b, c)
/* SW spinlock */
struct ice_lock {
struct ice_hw;
+static __rte_always_inline void *
+ice_memdup(__rte_unused struct ice_hw *hw, const void *src, size_t size,
+ __rte_unused enum ice_memcpy_type dir)
+{
+ void *p;
+
+ p = ice_malloc(hw, size);
+ if (p)
+ rte_memcpy(p, src, size);
+
+ return p;
+}
+
static inline void *
ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
struct ice_dma_mem *mem, u64 size)