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

Function rte_cryptodev_pmd_release_device

dpdk/lib/cryptodev/rte_cryptodev.c:1112–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1110}
1111
1112int
1113rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev)
1114{
1115 int ret;
1116 uint8_t dev_id;
1117
1118 if (cryptodev == NULL)
1119 return -EINVAL;
1120
1121 dev_id = cryptodev->data->dev_id;
1122
1123 cryptodev_fp_ops_reset(rte_crypto_fp_ops + dev_id);
1124
1125 /* Close device only if device operations have been set */
1126 if (cryptodev->dev_ops) {
1127 ret = rte_cryptodev_close(dev_id);
1128 if (ret < 0)
1129 return ret;
1130 }
1131
1132 ret = rte_cryptodev_data_free(dev_id, &cryptodev_globals.data[dev_id]);
1133 if (ret < 0)
1134 return ret;
1135
1136 cryptodev->attached = RTE_CRYPTODEV_DETACHED;
1137 cryptodev_globals.nb_devs--;
1138 return 0;
1139}
1140
1141uint16_t
1142rte_cryptodev_queue_pair_count(uint8_t dev_id)

Callers 7

rte_cryptodev_pmd_createFunction · 0.85
virtio_crypto_dev_uninitFunction · 0.85
otx_cpt_pci_removeFunction · 0.85
caam_jr_dev_initFunction · 0.85
cryptodev_dpaa_sec_probeFunction · 0.85

Calls 3

cryptodev_fp_ops_resetFunction · 0.85
rte_cryptodev_closeFunction · 0.85
rte_cryptodev_data_freeFunction · 0.85

Tested by

no test coverage detected