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

Function dev_configure_and_start

dpdk/app/test/test_cryptodev.c:1376–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374}
1375
1376static int
1377dev_configure_and_start(uint64_t ff_disable)
1378{
1379 struct crypto_testsuite_params *ts_params = &testsuite_params;
1380 struct crypto_unittest_params *ut_params = &unittest_params;
1381
1382 uint16_t qp_id;
1383
1384 /* Clear unit test parameters before running test */
1385 memset(ut_params, 0, sizeof(*ut_params));
1386
1387 /* Reconfigure device to default parameters */
1388 ts_params->conf.socket_id = SOCKET_ID_ANY;
1389 ts_params->conf.ff_disable = ff_disable;
1390 ts_params->qp_conf.nb_descriptors = MAX_NUM_OPS_INFLIGHT;
1391 ts_params->qp_conf.mp_session = ts_params->session_mpool;
1392
1393 TEST_ASSERT_SUCCESS(rte_cryptodev_configure(ts_params->valid_devs[0],
1394 &ts_params->conf),
1395 "Failed to configure cryptodev %u",
1396 ts_params->valid_devs[0]);
1397
1398 for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs ; qp_id++) {
1399 TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
1400 ts_params->valid_devs[0], qp_id,
1401 &ts_params->qp_conf,
1402 rte_cryptodev_socket_id(ts_params->valid_devs[0])),
1403 "Failed to setup queue pair %u on cryptodev %u",
1404 qp_id, ts_params->valid_devs[0]);
1405 }
1406
1407
1408 rte_cryptodev_stats_reset(ts_params->valid_devs[0]);
1409
1410 /* Start the device */
1411 TEST_ASSERT_SUCCESS(rte_cryptodev_start(ts_params->valid_devs[0]),
1412 "Failed to start cryptodev %u",
1413 ts_params->valid_devs[0]);
1414
1415 return TEST_SUCCESS;
1416}
1417
1418int
1419ut_setup(void)

Callers 4

ut_setupFunction · 0.70
ut_setup_securityFunction · 0.70

Calls 6

memsetFunction · 0.85
rte_cryptodev_configureFunction · 0.85
rte_cryptodev_socket_idFunction · 0.85
rte_cryptodev_startFunction · 0.85

Tested by

no test coverage detected