MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ccp_queue_dma_zone_reserve

Function ccp_queue_dma_zone_reserve

dpdk/drivers/crypto/ccp/ccp_dev.c:84–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84static const struct rte_memzone *
85ccp_queue_dma_zone_reserve(const char *queue_name,
86 uint32_t queue_size,
87 int socket_id)
88{
89 const struct rte_memzone *mz;
90
91 mz = rte_memzone_lookup(queue_name);
92 if (mz != 0) {
93 if (((size_t)queue_size <= mz->len) &&
94 ((socket_id == SOCKET_ID_ANY) ||
95 (socket_id == mz->socket_id))) {
96 CCP_LOG_INFO("re-use memzone already "
97 "allocated for %s", queue_name);
98 return mz;
99 }
100 CCP_LOG_ERR("Incompatible memzone already "
101 "allocated %s, size %u, socket %d. "
102 "Requested size %u, socket %u",
103 queue_name, (uint32_t)mz->len,
104 mz->socket_id, queue_size, socket_id);
105 return NULL;
106 }
107
108 CCP_LOG_INFO("Allocate memzone for %s, size %u on socket %u",
109 queue_name, queue_size, socket_id);
110
111 return rte_memzone_reserve_aligned(queue_name, queue_size,
112 socket_id, RTE_MEMZONE_IOVA_CONTIG, queue_size);
113}
114
115/* bitmap support apis */
116static inline void

Callers 1

ccp_add_deviceFunction · 0.85

Calls 2

rte_memzone_lookupFunction · 0.85

Tested by

no test coverage detected