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_crosscheck.c:508–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508static int
509dev_configure_and_start(uint64_t ff_disable)
510{
511 struct crosscheck_testsuite_params *ts_params = &testsuite_params;
512 uint8_t i, dev_id;
513 uint16_t qp_id;
514
515 /* Reconfigure device to default parameters */
516 ts_params->conf.ff_disable = ff_disable;
517
518 /* Configure cryptodevs */
519 for (i = 0; i < ts_params->valid_dev_count; i++) {
520 dev_id = ts_params->valid_devs[i];
521 TEST_ASSERT_SUCCESS(rte_cryptodev_configure(dev_id, &ts_params->conf),
522 "Failed to configure cryptodev %u with %u qps",
523 dev_id, ts_params->conf.nb_queue_pairs);
524
525 for (qp_id = 0; qp_id < ts_params->conf.nb_queue_pairs; qp_id++) {
526 TEST_ASSERT_SUCCESS(rte_cryptodev_queue_pair_setup(
527 dev_id, qp_id, &ts_params->qp_conf,
528 rte_cryptodev_socket_id(dev_id)),
529 "Failed to setup queue pair %u on cryptodev %u",
530 qp_id, dev_id);
531 }
532 rte_cryptodev_stats_reset(dev_id);
533
534 /* Start the device */
535 TEST_ASSERT_SUCCESS(rte_cryptodev_start(dev_id), "Failed to start cryptodev %u",
536 dev_id);
537 }
538
539 return TEST_SUCCESS;
540}
541
542static int
543crosscheck_suite_setup(void)

Callers 1

crosscheck_suite_setupFunction · 0.70

Calls 5

rte_cryptodev_configureFunction · 0.85
rte_cryptodev_socket_idFunction · 0.85
rte_cryptodev_startFunction · 0.85

Tested by

no test coverage detected