| 529 | "cryptodev <cryptodev_name> queues <n_queue_pairs> qsize <queue_size>\n"; |
| 530 | |
| 531 | static void |
| 532 | cmd_cryptodev(char **tokens, |
| 533 | uint32_t n_tokens, |
| 534 | char *out, |
| 535 | size_t out_size, |
| 536 | void *obj __rte_unused) |
| 537 | { |
| 538 | struct cryptodev_params params; |
| 539 | char *cryptodev_name; |
| 540 | int status; |
| 541 | |
| 542 | if (n_tokens != 6) { |
| 543 | snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); |
| 544 | return; |
| 545 | } |
| 546 | |
| 547 | if (strcmp(tokens[0], "cryptodev")) { |
| 548 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "cryptodev"); |
| 549 | return; |
| 550 | } |
| 551 | |
| 552 | cryptodev_name = tokens[1]; |
| 553 | |
| 554 | if (strcmp(tokens[2], "queues")) { |
| 555 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "queues"); |
| 556 | return; |
| 557 | } |
| 558 | |
| 559 | if (parser_read_uint32(¶ms.n_queue_pairs, tokens[3])) { |
| 560 | snprintf(out, out_size, MSG_ARG_INVALID, "n_queue_pairs"); |
| 561 | return; |
| 562 | } |
| 563 | |
| 564 | if (strcmp(tokens[4], "qsize")) { |
| 565 | snprintf(out, out_size, MSG_ARG_NOT_FOUND, "qsize"); |
| 566 | return; |
| 567 | } |
| 568 | |
| 569 | |
| 570 | if (parser_read_uint32(¶ms.queue_size, tokens[5])) { |
| 571 | snprintf(out, out_size, MSG_ARG_INVALID, "queue_size"); |
| 572 | return; |
| 573 | } |
| 574 | |
| 575 | status = cryptodev_config(cryptodev_name, ¶ms); |
| 576 | if (status) |
| 577 | snprintf(out, out_size, "Crypto device configuration failed (%d).\n", status); |
| 578 | } |
| 579 | |
| 580 | static const char cmd_pipeline_codegen_help[] = |
| 581 | "pipeline codegen <spec_file> <code_file>\n"; |
no test coverage detected