| 256 | } |
| 257 | |
| 258 | static void |
| 259 | close_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 | |
| 281 | static void |
| 282 | vdpa_sample_quit(void) |
no test coverage detected