- /* Source buffer is the compressed data from the previous operation */
- op->m_src = op_processed->m_dst;
- op->m_dst = uncomp_buf;
- op->src.offset = 0;
- /*
- * Set the length of the compressed data to the
- * number of bytes that were produced in the previous stage
- */
- op->src.length = op_processed->produced;
- op->dst.offset = 0;
- if (state == RTE_COMP_OP_STATELESS) {
- op->flush_flag = RTE_COMP_FLUSH_FINAL;
- } else {
- RTE_LOG(ERR, USER1,
- "Stateful operations are not supported "
- "in these tests yet\n");
- goto exit;
+ /* Source buffer is the compressed data from the previous operations */
+ for (i = 0; i < num_bufs; i++) {
+ ops[i]->m_src = ops_processed[i]->m_dst;
+ ops[i]->m_dst = uncomp_bufs[i];
+ ops[i]->src.offset = 0;
+ /*
+ * Set the length of the compressed data to the
+ * number of bytes that were produced in the previous stage
+ */
+ ops[i]->src.length = ops_processed[i]->produced;
+ ops[i]->dst.offset = 0;
+ if (state == RTE_COMP_OP_STATELESS) {
+ ops[i]->flush_flag = RTE_COMP_FLUSH_FINAL;
+ } else {
+ RTE_LOG(ERR, USER1,
+ "Stateful operations are not supported "
+ "in these tests yet\n");
+ goto exit;
+ }
+ ops[i]->input_chksum = 0;
+ /*
+ * Copy private data from previous operations,
+ * to keep the pointer to the original buffer
+ */
+ memcpy(ops[i] + 1, ops_processed[i] + 1,
+ sizeof(struct priv_op_data));