| 4230 | }; |
| 4231 | |
| 4232 | static int |
| 4233 | dpaa2_sec_uninit(const struct rte_cryptodev *dev) |
| 4234 | { |
| 4235 | struct dpaa2_sec_dev_private *priv = dev->data->dev_private; |
| 4236 | struct fsl_mc_io *dpseci = (struct fsl_mc_io *)priv->hw; |
| 4237 | int ret; |
| 4238 | |
| 4239 | PMD_INIT_FUNC_TRACE(); |
| 4240 | |
| 4241 | /* Function is reverse of dpaa2_sec_dev_init. |
| 4242 | * It does the following: |
| 4243 | * 1. Detach a DPSECI from attached resources i.e. buffer pools, dpbp_id |
| 4244 | * 2. Close the DPSECI device |
| 4245 | * 3. Free the allocated resources. |
| 4246 | */ |
| 4247 | |
| 4248 | /*Close the device at underlying layer*/ |
| 4249 | ret = dpseci_close(dpseci, CMD_PRI_LOW, priv->token); |
| 4250 | if (ret) { |
| 4251 | DPAA2_SEC_ERR("Failure closing dpseci device: err(%d)", ret); |
| 4252 | return -1; |
| 4253 | } |
| 4254 | |
| 4255 | /*Free the allocated memory for ethernet private data and dpseci*/ |
| 4256 | priv->hw = NULL; |
| 4257 | rte_free(dpseci); |
| 4258 | rte_free(dev->security_ctx); |
| 4259 | |
| 4260 | DPAA2_SEC_INFO("Closing DPAA2_SEC device %s on numa socket %u", |
| 4261 | dev->data->name, rte_socket_id()); |
| 4262 | |
| 4263 | return 0; |
| 4264 | } |
| 4265 | |
| 4266 | static int |
| 4267 | check_devargs_handler(const char *key, const char *value, |
no test coverage detected