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

Function close_vdpa

dpdk/examples/vdpa/main.c:258–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258static void
259close_vdpa(struct vdpa_port *vport)
260{
261 int ret;
262 char *socket_path = vport->ifname;
263
264 ret = rte_vhost_driver_detach_vdpa_device(socket_path);
265 if (ret != 0)
266 RTE_LOG(ERR, VDPA,
267 "detach vdpa device failed: %s\n",
268 socket_path);
269
270 ret = rte_vhost_driver_unregister(socket_path);
271 if (ret != 0)
272 RTE_LOG(ERR, VDPA,
273 "Fail to unregister vhost driver for %s.\n",
274 socket_path);
275 if (vport->stats_names) {
276 rte_free(vport->stats_names);
277 vport->stats_names = NULL;
278 }
279}
280
281static void
282vdpa_sample_quit(void)

Callers 1

vdpa_sample_quitFunction · 0.85

Calls 3

rte_freeFunction · 0.85

Tested by

no test coverage detected