Multi-segment mbufs are not supported for DOCSIS security protocol.
This patch adds an explicit check for this and returns an op error if
this case is found. This limitation is also added to the QAT cryptodev
documentation.
Fixes:
6f0ef237404b ("crypto/qat: support DOCSIS protocol")
Signed-off-by: David Coyle <david.coyle@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
protocol.
* ``RTE_CRYPTO_CIPHER_DES_DOCSISBPI`` is not supported for combined Crypto-CRC
DOCSIS security protocol.
+* Multi-segment buffers are not supported for combined Crypto-CRC DOCSIS
+ security protocol.
Extra notes on KASUMI F9
~~~~~~~~~~~~~~~~~~~~~~~~
/* DOCSIS processing */
#ifdef RTE_LIBRTE_SECURITY
if (is_docsis_sec) {
- /* Check for OOP */
- if (unlikely((op->sym->m_dst != NULL) &&
+ /* Check for OOP or multi-segment buffers */
+ if (unlikely(((op->sym->m_dst != NULL) &&
(op->sym->m_dst !=
- op->sym->m_src))) {
+ op->sym->m_src)) ||
+ op->sym->m_src->nb_segs > 1)) {
QAT_DP_LOG(ERR,
- "OOP not supported for DOCSIS "
- "security");
+ "OOP and/or multi-segment "
+ "buffers are not supported for "
+ "DOCSIS security");
op->status =
RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
return -EINVAL;