[v2,1/9] test/bbdev: fix TB logic
Checks
Commit Message
Fix discrepancy in logic when using large fake mbuf.
Fixes: fd96ef3787f1 ("test/bbdev: extend support for large TB")
Cc: stable@dpdk.org
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
app/test-bbdev/test_bbdev_perf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@@ -2131,7 +2131,8 @@ validate_op_chain(struct rte_bbdev_op_data *op,
uint16_t data_len = rte_pktmbuf_data_len(m) - offset;
total_data_size += orig_op->segments[i].length;
- if (orig_op->segments[i].length > RTE_BBDEV_LDPC_E_MAX_MBUF)
+ if ((orig_op->segments[i].length + RTE_PKTMBUF_HEADROOM)
+ > RTE_BBDEV_LDPC_E_MAX_MBUF)
ignore_mbuf = true;
if (!ignore_mbuf)
TEST_ASSERT(orig_op->segments[i].length == data_len,