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

Function eca_init

dpdk/lib/eventdev/rte_event_crypto_adapter.c:169–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static int
170eca_init(void)
171{
172 const struct rte_memzone *mz;
173 unsigned int sz;
174
175 sz = sizeof(*event_crypto_adapter) *
176 RTE_EVENT_CRYPTO_ADAPTER_MAX_INSTANCE;
177 sz = RTE_ALIGN(sz, RTE_CACHE_LINE_SIZE);
178
179 mz = rte_memzone_lookup(ECA_ADAPTER_ARRAY);
180 if (mz == NULL) {
181 mz = rte_memzone_reserve_aligned(ECA_ADAPTER_ARRAY, sz,
182 rte_socket_id(), 0,
183 RTE_CACHE_LINE_SIZE);
184 if (mz == NULL) {
185 RTE_EDEV_LOG_ERR("failed to reserve memzone err = %"
186 PRId32, rte_errno);
187 return -rte_errno;
188 }
189 }
190
191 event_crypto_adapter = mz->addr;
192 return 0;
193}
194
195static int
196eca_memzone_lookup(void)

Callers 1

Calls 3

rte_memzone_lookupFunction · 0.85
rte_socket_idFunction · 0.85

Tested by

no test coverage detected