| 5334 | } |
| 5335 | |
| 5336 | void |
| 5337 | parse_fwd_portlist(const char *portlist) |
| 5338 | { |
| 5339 | unsigned int portcount; |
| 5340 | unsigned int portindex[RTE_MAX_ETHPORTS]; |
| 5341 | unsigned int i, valid_port_count = 0; |
| 5342 | |
| 5343 | portcount = parse_port_list(portlist, portindex, RTE_MAX_ETHPORTS); |
| 5344 | if (!portcount) |
| 5345 | rte_exit(EXIT_FAILURE, "Invalid fwd port list\n"); |
| 5346 | |
| 5347 | /* |
| 5348 | * Here we verify the validity of the ports |
| 5349 | * and thereby calculate the total number of |
| 5350 | * valid ports |
| 5351 | */ |
| 5352 | for (i = 0; i < portcount && i < RTE_DIM(portindex); i++) { |
| 5353 | if (rte_eth_dev_is_valid_port(portindex[i])) { |
| 5354 | portindex[valid_port_count] = portindex[i]; |
| 5355 | valid_port_count++; |
| 5356 | } |
| 5357 | } |
| 5358 | |
| 5359 | set_fwd_ports_list(portindex, valid_port_count); |
| 5360 | } |
| 5361 | |
| 5362 | void |
| 5363 | set_fwd_ports_mask(uint64_t portmask) |
no test coverage detected