src/dpdk/drivers/crypto/snow3g/rte_snow3g_pmd_ops.c
static void
snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
		struct rte_cryptodev_sym_session *sess)
{
	uint8_t index = dev->driver_id;
	void *sess_priv = get_sym_session_private_data(sess, index);

	/* Zero out the whole structure */
	if (sess_priv) {
		memset(sess_priv, 0, sizeof(struct snow3g_session));
		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
		set_sym_session_private_data(sess, index, NULL);
		rte_mempool_put(sess_mp, sess_priv);
	}
}
/** Clear the memory of session so it doesn't leave key material behind */
Clear the memory of session so it doesn't leave key material behind
Clear the memory of session so it doesn ' t leave key material behind
static void
snow3g_pmd_sym_session_clear(struct rte_cryptodev *dev,
		struct rte_cryptodev_sym_session *sess)
{
	uint8_t index = dev->driver_id;
	void *sess_priv = get_sym_session_private_data(sess, index);
	if (sess_priv) {
		memset(sess_priv, 0, sizeof(struct snow3g_session));
		struct rte_mempool *sess_mp = rte_mempool_from_obj(sess_priv);
		set_sym_session_private_data(sess, index, NULL);
		rte_mempool_put(sess_mp, sess_priv);
	}
}
static void snow3g_pmd_sym_session_clear ( struct rte_cryptodev * dev , struct rte_cryptodev_sym_session * sess ) { uint8_t index = dev -> driver_id ; void * sess_priv = get_sym_session_private_data ( sess , index ) ; if ( sess_priv ) { memset ( sess_priv , 0 , sizeof ( struct snow3g_session ) ) ; struct rte_mempool * sess_mp = rte_mempool_from_obj ( sess_priv ) ; set_sym_session_private_data ( sess , index , NULL ) ; rte_mempool_put ( sess_mp , sess_priv ) ; } }
Clear the memory of session so it doesn't leave key material behind
Clear the memory of session so it doesn ' t leave key material behind
/* Zero out the whole structure */