summaryrefslogtreecommitdiffstats
path: root/lib/librte_compressdev
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-11-12 16:14:45 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2018-11-12 16:15:06 +0000
commit88fab00d4402af240c1b7cc2566133aece115488 (patch)
tree54525f2b8784dd20ce6886b429ef85d24df04532 /lib/librte_compressdev
parent8d01b9cd70a67cdafd5b965a70420c3bd7fb3f82 (diff)
New upstream version 18.11-rc2upstream/18.11-rc2
Change-Id: I43ca4edd0747b2dfc38c574ebf3c0aac17d7392c Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_compressdev')
-rw-r--r--lib/librte_compressdev/rte_comp.c10
-rw-r--r--lib/librte_compressdev/rte_compressdev.h7
2 files changed, 12 insertions, 5 deletions
diff --git a/lib/librte_compressdev/rte_comp.c b/lib/librte_compressdev/rte_comp.c
index c663be59..4634c127 100644
--- a/lib/librte_compressdev/rte_comp.c
+++ b/lib/librte_compressdev/rte_comp.c
@@ -174,7 +174,7 @@ rte_comp_op_alloc(struct rte_mempool *mempool)
int retval;
retval = rte_comp_op_raw_bulk_alloc(mempool, &op, 1);
- if (unlikely(retval < 0))
+ if (unlikely(retval != 1))
return NULL;
rte_comp_op_reset(op);
@@ -186,12 +186,12 @@ int __rte_experimental
rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
struct rte_comp_op **ops, uint16_t nb_ops)
{
- int ret;
+ int retval;
uint16_t i;
- ret = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops);
- if (unlikely(ret < nb_ops))
- return ret;
+ retval = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops);
+ if (unlikely(retval != nb_ops))
+ return 0;
for (i = 0; i < nb_ops; i++)
rte_comp_op_reset(ops[i]);
diff --git a/lib/librte_compressdev/rte_compressdev.h b/lib/librte_compressdev/rte_compressdev.h
index 5b4fca4d..7b68170a 100644
--- a/lib/librte_compressdev/rte_compressdev.h
+++ b/lib/librte_compressdev/rte_compressdev.h
@@ -408,6 +408,13 @@ rte_compressdev_dequeue_burst(uint8_t dev_id, uint16_t qp_id,
* @note All compression operations are Out-of-place (OOP) operations,
* as the size of the output data is different to the size of the input data.
*
+ * @note The rte_comp_op contains both input and output parameters and is the
+ * vehicle for the application to pass data into and out of the PMD. While an
+ * op is inflight, i.e. once it has been enqueued, the private_xform or stream
+ * attached to it and any mbufs or memory referenced by it should not be altered
+ * or freed by the application. The PMD may use or change some of this data at
+ * any time until it has been returned in a dequeue operation.
+ *
* @note The flush flag only applies to operations which return SUCCESS.
* In OUT_OF_SPACE cases whether STATEFUL or STATELESS, data in dest buffer
* is as if flush flag was FLUSH_NONE.