[dpdk-dev] [PATCH 3/4] crypto: add sgl support for sw PMDs
Michał Mirosław
mirqus at gmail.com
Sat Dec 3 09:28:28 CET 2016
2016-12-02 18:07 GMT+01:00 Tomasz Kulasek <tomaszx.kulasek at intel.com>:
> This patch introduces RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER feature flag
> informing that selected crypto device supports segmented mbufs natively
> and doesn't need to be coalesced before crypto operation.
>
> While using segmented buffers in crypto devices may have unpredictable
> results, for PMDs which doesn't support it natively, additional check is
> made for debug compilation.
>
[...]
> +#ifdef RTE_LIBRTE_PMD_AESNI_GCM_DEBUG
> + if (!rte_pktmbuf_is_contiguous(ops[i]->sym->m_src) ||
> + (ops[i]->sym->m_dst != NULL &&
> + !rte_pktmbuf_is_contiguous(
> + ops[i]->sym->m_dst))) {
> + ops[i]->status = RTE_CRYPTO_OP_STATUS_INVALID_ARGS;
> + GCM_LOG_ERR("PMD supports only contiguous mbufs, "
> + "op (%p) provides noncontiguous mbuf as "
> + "source/destination buffer.\n", ops[i]);
> + qp->qp_stats.enqueue_err_count++;
> + break;
> + }
> +#endif
[...]
Why are there so many copies of this code?
Best Regards,
Michał Mirosław
More information about the dev
mailing list