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

Function edma_array_init

dpdk/lib/eventdev/rte_event_dma_adapter.c:164–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164static int
165edma_array_init(void)
166{
167 const struct rte_memzone *mz;
168 uint32_t sz;
169
170 mz = rte_memzone_lookup(DMA_ADAPTER_ARRAY);
171 if (mz == NULL) {
172 sz = sizeof(struct event_dma_adapter *) * RTE_EVENT_DMA_ADAPTER_MAX_INSTANCE;
173 sz = RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE);
174
175 mz = rte_memzone_reserve_aligned(DMA_ADAPTER_ARRAY, sz, rte_socket_id(), 0,
176 RTE_CACHE_LINE_SIZE);
177 if (mz == NULL) {
178 RTE_EDEV_LOG_ERR("Failed to reserve memzone : %s, err = %d",
179 DMA_ADAPTER_ARRAY, rte_errno);
180 return -rte_errno;
181 }
182 }
183
184 event_dma_adapter = mz->addr;
185
186 return 0;
187}
188
189static inline bool
190edma_circular_buffer_batch_ready(struct dma_ops_circular_buffer *bufp)

Callers 1

Calls 3

rte_memzone_lookupFunction · 0.85
rte_socket_idFunction · 0.85

Tested by

no test coverage detected