crypto/dpaa_sec: support authonly and chain with raw API
[dpdk.git] / drivers / net / ice / base / ice_osdep.h
index f4cc762..8160eb6 100644 (file)
@@ -21,7 +21,6 @@
 #include <rte_cycles.h>
 #include <rte_spinlock.h>
 #include <rte_log.h>
-#include <rte_random.h>
 #include <rte_io.h>
 
 #include "ice_alloc.h"
@@ -74,12 +73,6 @@ typedef uint64_t        s64;
 #define min(a, b) RTE_MIN(a, b)
 #define max(a, b) RTE_MAX(a, b)
 
-#ifdef RTE_EXEC_ENV_WINDOWS
-#define ice_access _access
-#else
-#define ice_access access
-#endif
-
 #define FIELD_SIZEOF(t, f) RTE_SIZEOF_FIELD(t, f)
 #define ARRAY_SIZE(arr) RTE_DIM(arr)
 
@@ -207,7 +200,7 @@ struct ice_virt_mem {
 } __rte_packed;
 
 #define ice_malloc(h, s)    rte_zmalloc(NULL, s, 0)
-#define ice_calloc(h, c, s) rte_zmalloc(NULL, (c) * (s), 0)
+#define ice_calloc(h, c, s) rte_calloc(NULL, c, s, 0)
 #define ice_free(h, m)         rte_free(m)
 
 #define ice_memset(a, b, c, d) memset((a), (b), (c))
@@ -260,13 +253,15 @@ static inline void *
 ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
                  struct ice_dma_mem *mem, u64 size)
 {
+       static uint64_t ice_dma_memzone_id;
        const struct rte_memzone *mz = NULL;
        char z_name[RTE_MEMZONE_NAMESIZE];
 
        if (!mem)
                return NULL;
 
-       snprintf(z_name, sizeof(z_name), "ice_dma_%"PRIu64, rte_rand());
+       snprintf(z_name, sizeof(z_name), "ice_dma_%" PRIu64,
+               __atomic_fetch_add(&ice_dma_memzone_id, 1, __ATOMIC_RELAXED));
        mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY, 0,
                                         0, RTE_PGSIZE_2M);
        if (!mz)