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

Function destroy_device

dpdk/examples/vhost_crypto/main.c:329–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329static void
330destroy_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
364static const struct rte_vhost_device_ops virtio_crypto_device_ops = {
365 .new_connection = new_device,

Callers

nothing calls this directly

Calls 1

rte_vhost_crypto_freeFunction · 0.85

Tested by

no test coverage detected