qat: fix physical address of content descriptor

Fix an error with computation of physical address of
content descriptor in the symmetric operations session

Fixes: 1703e94ac5 ("qat: add driver for QuickAssist devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
This commit is contained in:
Arek Kusztal 2016-06-01 11:52:00 +01:00 committed by Thomas Monjalon
parent 61d124fd46
commit 577ac94c12
2 changed files with 7 additions and 4 deletions

View File

@ -808,12 +808,15 @@ static inline uint32_t adf_modulo(uint32_t data, uint32_t shift)
return data - mult;
}
void qat_crypto_sym_session_init(struct rte_mempool *mp, void *priv_sess)
void qat_crypto_sym_session_init(struct rte_mempool *mp, void *sym_sess)
{
struct qat_session *s = priv_sess;
struct rte_cryptodev_sym_session *sess = sym_sess;
struct qat_session *s = (void *)sess->_private;
PMD_INIT_FUNC_TRACE();
s->cd_paddr = rte_mempool_virt2phy(mp, &s->cd);
s->cd_paddr = rte_mempool_virt2phy(mp, sess) +
offsetof(struct qat_session, cd) +
offsetof(struct rte_cryptodev_sym_session, _private);
}
int qat_dev_config(__rte_unused struct rte_cryptodev *dev)

View File

@ -956,7 +956,7 @@ rte_cryptodev_sym_session_init(struct rte_mempool *mp,
sess->mp = mp;
if (dev->dev_ops->session_initialize)
(*dev->dev_ops->session_initialize)(mp, sess->_private);
(*dev->dev_ops->session_initialize)(mp, sess);
}
static int