MCPcopy Index your code
hub / github.com/F-Stack/f-stack / add_parameter_allow

Function add_parameter_allow

dpdk/app/test/process.h:40–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#define PREFIX_ALLOW "--allow="
39
40static int
41add_parameter_allow(char **argv, int max_capacity)
42{
43 struct rte_devargs *devargs;
44 int count = 0;
45
46 RTE_EAL_DEVARGS_FOREACH(NULL, devargs) {
47 if (strlen(devargs->name) == 0)
48 continue;
49
50 if (devargs->data == NULL || strlen(devargs->data) == 0) {
51 if (asprintf(&argv[count], PREFIX_ALLOW"%s", devargs->name) < 0)
52 break;
53 } else {
54 if (asprintf(&argv[count], PREFIX_ALLOW"%s,%s",
55 devargs->name, devargs->data) < 0)
56 break;
57 }
58
59 if (++count == max_capacity)
60 break;
61 }
62
63 return count;
64}
65
66/*
67 * launches a second copy of the test process using the given argv parameters,

Callers 1

process_dupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected