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

Function parse_distrib

dpdk/app/test-sad/main.c:95–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93static struct rule *tuples_tbl;
94
95static int
96parse_distrib(const char *in)
97{
98 int a, b, c;
99
100 GET_CB_FIELD(in, a, 0, UINT8_MAX, '/');
101 GET_CB_FIELD(in, b, 0, UINT8_MAX, '/');
102 GET_CB_FIELD(in, c, 0, UINT8_MAX, 0);
103
104 if ((a + b + c) != 100)
105 return -EINVAL;
106
107 config.fract_32 = a;
108 config.fract_64 = b;
109 config.fract_96 = c;
110
111 return 0;
112}
113
114static void
115print_config(void)

Callers 1

parse_optsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected