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

Function cmd_detach_parsed

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

Source from the content-addressed store, hash-verified

68}
69
70void
71cmd_detach_parsed(void *parsed_result,
72 struct cmdline *cl,
73 __rte_unused void *data)
74{
75 struct cmd_detach_result *res = parsed_result;
76 struct rte_devargs da;
77
78 memset(&da, 0, sizeof(da));
79
80 if (rte_devargs_parsef(&da, "%s", res->devargs)) {
81 cmdline_printf(cl, "cannot parse devargs\n");
82 return;
83 }
84
85 printf("detaching...\n");
86 if (!rte_eal_hotplug_remove(rte_bus_name(da.bus), da.name))
87 cmdline_printf(cl, "detached device %s\n",
88 da.name);
89 else
90 cmdline_printf(cl, "failed to detach device %s\n",
91 da.name);
92 rte_devargs_reset(&da);
93}

Callers

nothing calls this directly

Calls 7

memsetFunction · 0.85
rte_devargs_parsefFunction · 0.85
cmdline_printfFunction · 0.85
rte_eal_hotplug_removeFunction · 0.85
rte_bus_nameFunction · 0.85
rte_devargs_resetFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected