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

Function parse_num_nodes

dpdk/examples/server_node_efd/efd_server/args.c:83–98  ·  view source on GitHub ↗

* Take the number of nodes parameter passed to the app * and convert to a number to store in the num_nodes variable */

Source from the content-addressed store, hash-verified

81 * and convert to a number to store in the num_nodes variable
82 */
83static int
84parse_num_nodes(const char *nodes)
85{
86 char *end = NULL;
87 unsigned long temp;
88
89 if (nodes == NULL || *nodes == '\0')
90 return -1;
91
92 temp = strtoul(nodes, &end, 10);
93 if (end == NULL || *end != '\0' || temp == 0)
94 return -1;
95
96 num_nodes = (uint8_t)temp;
97 return 0;
98}
99
100static int
101parse_num_flows(const char *flows)

Callers 1

parse_app_argsFunction · 0.85

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected