MCPcopy Create free account
hub / github.com/F-Stack/f-stack / parse_fwd_portlist

Function parse_fwd_portlist

dpdk/app/test-pmd/config.c:5336–5360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5334}
5335
5336void
5337parse_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
5362void
5363set_fwd_ports_mask(uint64_t portmask)

Callers 1

launch_args_parseFunction · 0.85

Calls 4

rte_exitFunction · 0.85
set_fwd_ports_listFunction · 0.85
parse_port_listFunction · 0.70

Tested by

no test coverage detected