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

Function mlx5_crypto_dev_remove

dpdk/drivers/crypto/mlx5/mlx5_crypto.c:427–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427static int
428mlx5_crypto_dev_remove(struct mlx5_common_device *cdev)
429{
430 struct mlx5_crypto_priv *priv = NULL;
431
432 pthread_mutex_lock(&priv_list_lock);
433 TAILQ_FOREACH(priv, &mlx5_crypto_priv_list, next)
434 if (priv->crypto_dev->device == cdev->dev)
435 break;
436 if (priv)
437 TAILQ_REMOVE(&mlx5_crypto_priv_list, priv, next);
438 pthread_mutex_unlock(&priv_list_lock);
439 if (priv) {
440 claim_zero(mlx5_devx_cmd_destroy(priv->login_obj));
441 mlx5_devx_uar_release(&priv->uar);
442 rte_cryptodev_pmd_destroy(priv->crypto_dev);
443 }
444 return 0;
445}
446
447static const struct rte_pci_id mlx5_crypto_pci_id_map[] = {
448 {

Callers

nothing calls this directly

Calls 5

pthread_mutex_lockFunction · 0.85
pthread_mutex_unlockFunction · 0.85
mlx5_devx_cmd_destroyFunction · 0.85
mlx5_devx_uar_releaseFunction · 0.85

Tested by

no test coverage detected