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

Function l2fwd_event_parse_portmask

dpdk/examples/l2fwd-event/main.c:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static int
37l2fwd_event_parse_portmask(const char *portmask)
38{
39 char *end = NULL;
40 unsigned long pm;
41
42 /* parse hexadecimal string */
43 pm = strtoul(portmask, &end, 16);
44 if ((portmask[0] == '\0') || (end == NULL) || (*end != '\0'))
45 return 0;
46
47 return pm;
48}
49
50static unsigned int
51l2fwd_event_parse_nqueue(const char *q_arg)

Callers 1

l2fwd_event_parse_argsFunction · 0.85

Calls 1

strtoulFunction · 0.85

Tested by

no test coverage detected