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

Function cmd_attach_parsed

dpdk/examples/multi_process/hotplug_mp/commands.c:47–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void
48cmd_attach_parsed(void *parsed_result,
49 struct cmdline *cl,
50 __rte_unused void *data)
51{
52 struct cmd_attach_result *res = parsed_result;
53 struct rte_devargs da;
54
55 memset(&da, 0, sizeof(da));
56
57 if (rte_devargs_parsef(&da, "%s", res->devargs)) {
58 cmdline_printf(cl, "cannot parse devargs\n");
59 return;
60 }
61
62 if (!rte_eal_hotplug_add(rte_bus_name(da.bus), da.name, da.args))
63 cmdline_printf(cl, "attached device %s\n", da.name);
64 else
65 cmdline_printf(cl, "failed to attached device %s\n",
66 da.name);
67 rte_devargs_reset(&da);
68}
69
70void
71cmd_detach_parsed(void *parsed_result,

Callers

nothing calls this directly

Calls 6

memsetFunction · 0.85
rte_devargs_parsefFunction · 0.85
cmdline_printfFunction · 0.85
rte_eal_hotplug_addFunction · 0.85
rte_bus_nameFunction · 0.85
rte_devargs_resetFunction · 0.85

Tested by

no test coverage detected