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

Function dpaa2_sec_uninit

dpdk/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c:4232–4264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4230};
4231
4232static int
4233dpaa2_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
4266static int
4267check_devargs_handler(const char *key, const char *value,

Callers 1

Calls 3

dpseci_closeFunction · 0.85
rte_freeFunction · 0.85
rte_socket_idFunction · 0.85

Tested by

no test coverage detected