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

Function generic_ut_setup

dpdk/app/test/test_compressdev.c:296–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296static int
297generic_ut_setup(void)
298{
299 /* Configure compressdev (one device, one queue pair) */
300 struct rte_compressdev_config config = {
301 .socket_id = rte_socket_id(),
302 .nb_queue_pairs = 1,
303 .max_nb_priv_xforms = NUM_MAX_XFORMS,
304 .max_nb_streams = 1
305 };
306
307 if (rte_compressdev_configure(0, &config) < 0) {
308 RTE_LOG(ERR, USER1, "Device configuration failed\n");
309 return -1;
310 }
311
312 if (rte_compressdev_queue_pair_setup(0, 0, NUM_MAX_INFLIGHT_OPS,
313 rte_socket_id()) < 0) {
314 RTE_LOG(ERR, USER1, "Queue pair setup failed\n");
315 return -1;
316 }
317
318 if (rte_compressdev_start(0) < 0) {
319 RTE_LOG(ERR, USER1, "Device could not be started\n");
320 return -1;
321 }
322
323 return 0;
324}
325
326static void
327generic_ut_teardown(void)

Callers

nothing calls this directly

Calls 4

rte_socket_idFunction · 0.85
rte_compressdev_startFunction · 0.85

Tested by

no test coverage detected