| 586 | } |
| 587 | |
| 588 | static void |
| 589 | parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx) |
| 590 | { |
| 591 | char *end = NULL; |
| 592 | unsigned long value; |
| 593 | |
| 594 | /* parse decimal string */ |
| 595 | value = strtoul(queue_size_arg, &end, 10); |
| 596 | if ((queue_size_arg[0] == '\0') || (end == NULL) || |
| 597 | (*end != '\0') || (value == 0)) { |
| 598 | if (rx == 1) |
| 599 | rte_exit(EXIT_FAILURE, "Invalid rx-queue-size\n"); |
| 600 | else |
| 601 | rte_exit(EXIT_FAILURE, "Invalid tx-queue-size\n"); |
| 602 | |
| 603 | return; |
| 604 | } |
| 605 | |
| 606 | if (value > UINT16_MAX) { |
| 607 | if (rx == 1) |
| 608 | rte_exit(EXIT_FAILURE, "rx-queue-size %lu > %d\n", |
| 609 | value, UINT16_MAX); |
| 610 | else |
| 611 | rte_exit(EXIT_FAILURE, "tx-queue-size %lu > %d\n", |
| 612 | value, UINT16_MAX); |
| 613 | |
| 614 | return; |
| 615 | } |
| 616 | |
| 617 | *queue_size = value; |
| 618 | } |
| 619 | |
| 620 | #ifdef RTE_LIB_EVENTDEV |
| 621 | static void |
no test coverage detected