* Uninitialize the crypto device * * @param vdev Pointer to device structure. * @returns 0 in case of success, negative value otherwise. */
| 1251 | * @returns 0 in case of success, negative value otherwise. |
| 1252 | */ |
| 1253 | static int |
| 1254 | cryptodev_mrvl_crypto_uninit(struct rte_vdev_device *vdev) |
| 1255 | { |
| 1256 | struct rte_cryptodev *cryptodev; |
| 1257 | const char *name = rte_vdev_device_name(vdev); |
| 1258 | |
| 1259 | if (name == NULL) |
| 1260 | return -EINVAL; |
| 1261 | |
| 1262 | MRVL_LOG(INFO, "Closing Marvell crypto device %s on numa socket %u.", |
| 1263 | name, rte_socket_id()); |
| 1264 | |
| 1265 | sam_deinit(); |
| 1266 | rte_mvep_deinit(MVEP_MOD_T_SAM); |
| 1267 | |
| 1268 | cryptodev = rte_cryptodev_pmd_get_named_dev(name); |
| 1269 | if (cryptodev == NULL) |
| 1270 | return -ENODEV; |
| 1271 | |
| 1272 | return rte_cryptodev_pmd_destroy(cryptodev); |
| 1273 | } |
| 1274 | |
| 1275 | /** |
| 1276 | * Basic driver handlers for use in the constructor. |
no test coverage detected