rte_iova_t iova;
/** length of the data buffer */
uint32_t len;
+ /** total buffer length */
+ uint32_t tot_len;
};
/**
/** number of operations to perform */
uint32_t num;
/** array of SGL vectors */
- struct rte_crypto_sgl *sgl;
+ struct rte_crypto_sgl *src_sgl;
+ /** array of SGL vectors for OOP, keep it NULL for inplace*/
+ struct rte_crypto_sgl *dest_sgl;
/** array of pointers to cipher IV */
struct rte_crypto_va_iova_ptr *iv;
/** array of pointers to digest */
vec[0].base = rte_pktmbuf_mtod_offset(mb, void *, ofs);
vec[0].iova = rte_pktmbuf_iova_offset(mb, ofs);
+ vec[0].tot_len = mb->buf_len - rte_pktmbuf_headroom(mb) - ofs;
/* whole data lies in the first segment */
seglen = mb->data_len - ofs;
vec[i].base = rte_pktmbuf_mtod(nseg, void *);
vec[i].iova = rte_pktmbuf_iova(nseg);
+ vec[i].tot_len = mb->buf_len - rte_pktmbuf_headroom(mb) - ofs;
seglen = nseg->data_len;
if (left <= seglen) {
/* whole requested data is completed */
vec[i].len = left;
left = 0;
+ i++;
break;
}
}
RTE_ASSERT(left == 0);
- return i + 1;
+ return i;
}