| 587 | } |
| 588 | |
| 589 | static void |
| 590 | cli_ip4_addr(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused) |
| 591 | { |
| 592 | struct ethdev_ip4_cmd_tokens *res = parsed_result; |
| 593 | struct ipv4_addr_config config; |
| 594 | int rc = -EINVAL; |
| 595 | |
| 596 | if (parser_ip4_read(&config.ip, res->ip)) { |
| 597 | printf(MSG_ARG_INVALID, "ip"); |
| 598 | return; |
| 599 | } |
| 600 | |
| 601 | if (parser_ip4_read(&config.mask, res->mask)) { |
| 602 | printf(MSG_ARG_INVALID, "netmask"); |
| 603 | return; |
| 604 | } |
| 605 | |
| 606 | rc = ethdev_ip4_addr_add(res->dev, &config); |
| 607 | if (rc < 0) |
| 608 | printf(MSG_CMD_FAIL, res->cmd); |
| 609 | } |
| 610 | |
| 611 | static void |
| 612 | cli_ip6_addr(void *parsed_result, __rte_unused struct cmdline *cl, void *data __rte_unused) |
nothing calls this directly
no test coverage detected