| 327 | } |
| 328 | |
| 329 | static void |
| 330 | destroy_device(int vid) |
| 331 | { |
| 332 | struct vhost_crypto_info *info = NULL; |
| 333 | uint32_t i, j; |
| 334 | |
| 335 | for (i = 0; i < options.nb_los; i++) { |
| 336 | for (j = 0; j < options.los[i].nb_sockets; j++) { |
| 337 | if (options.infos[i]->vids[j] == vid) { |
| 338 | info = options.infos[i]; |
| 339 | break; |
| 340 | } |
| 341 | } |
| 342 | if (info) |
| 343 | break; |
| 344 | } |
| 345 | |
| 346 | if (!info) { |
| 347 | RTE_LOG(ERR, USER1, "Cannot find socket file from list\n"); |
| 348 | return; |
| 349 | } |
| 350 | |
| 351 | do { |
| 352 | |
| 353 | } while (info->nb_inflight_ops); |
| 354 | |
| 355 | info->initialized[j] = 0; |
| 356 | |
| 357 | rte_wmb(); |
| 358 | |
| 359 | rte_vhost_crypto_free(vid); |
| 360 | |
| 361 | RTE_LOG(INFO, USER1, "Vhost Crypto Device %i Removed\n", vid); |
| 362 | } |
| 363 | |
| 364 | static const struct rte_vhost_device_ops virtio_crypto_device_ops = { |
| 365 | .new_connection = new_device, |
nothing calls this directly
no test coverage detected