git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test/ring: add contention stress test for HTS ring
[dpdk.git]
/
lib
/
librte_compressdev
/
rte_comp.c
diff --git
a/lib/librte_compressdev/rte_comp.c
b/lib/librte_compressdev/rte_comp.c
index
d596ba8
..
3b0e46f
100644
(file)
--- a/
lib/librte_compressdev/rte_comp.c
+++ b/
lib/librte_compressdev/rte_comp.c
@@
-6,7
+6,7
@@
#include "rte_compressdev.h"
#include "rte_compressdev_internal.h"
#include "rte_compressdev.h"
#include "rte_compressdev_internal.h"
-const char *
__rte_experimental
+const char *
rte_comp_get_feature_name(uint64_t flag)
{
switch (flag) {
rte_comp_get_feature_name(uint64_t flag)
{
switch (flag) {
@@
-14,8
+14,12
@@
rte_comp_get_feature_name(uint64_t flag)
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
return "STATEFUL_COMPRESSION";
case RTE_COMP_FF_STATEFUL_DECOMPRESSION:
return "STATEFUL_DECOMPRESSION";
- case RTE_COMP_FF_MBUF_SCATTER_GATHER:
- return "MBUF_SCATTER_GATHER";
+ case RTE_COMP_FF_OOP_SGL_IN_SGL_OUT:
+ return "OOP_SGL_IN_SGL_OUT";
+ case RTE_COMP_FF_OOP_SGL_IN_LB_OUT:
+ return "OOP_SGL_IN_LB_OUT";
+ case RTE_COMP_FF_OOP_LB_IN_SGL_OUT:
+ return "OOP_LB_IN_SGL_OUT";
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
case RTE_COMP_FF_MULTI_PKT_CHECKSUM:
return "MULTI_PKT_CHECKSUM";
case RTE_COMP_FF_ADLER32_CHECKSUM:
@@
-32,6
+36,10
@@
rte_comp_get_feature_name(uint64_t flag)
return "SHA2_SHA256_HASH";
case RTE_COMP_FF_SHAREABLE_PRIV_XFORM:
return "SHAREABLE_PRIV_XFORM";
return "SHA2_SHA256_HASH";
case RTE_COMP_FF_SHAREABLE_PRIV_XFORM:
return "SHAREABLE_PRIV_XFORM";
+ case RTE_COMP_FF_HUFFMAN_FIXED:
+ return "HUFFMAN_FIXED";
+ case RTE_COMP_FF_HUFFMAN_DYNAMIC:
+ return "HUFFMAN_DYNAMIC";
default:
return NULL;
}
default:
return NULL;
}
@@
-75,8
+83,8
@@
struct rte_comp_op_pool_private {
* @param nb_ops
* Number of operations to allocate
* @return
* @param nb_ops
* Number of operations to allocate
* @return
- * -
0: Success
- * -
-ENOENT
: Not enough entries in the mempool; no ops are retrieved.
+ * -
nb_ops: Success, the nb_ops requested was allocated
+ * -
0
: Not enough entries in the mempool; no ops are retrieved.
*/
static inline int
rte_comp_op_raw_bulk_alloc(struct rte_mempool *mempool,
*/
static inline int
rte_comp_op_raw_bulk_alloc(struct rte_mempool *mempool,
@@
-104,7
+112,7
@@
rte_comp_op_init(struct rte_mempool *mempool,
op->mempool = mempool;
}
op->mempool = mempool;
}
-struct rte_mempool *
__rte_experimental
+struct rte_mempool *
rte_comp_op_pool_create(const char *name,
unsigned int nb_elts, unsigned int cache_size,
uint16_t user_size, int socket_id)
rte_comp_op_pool_create(const char *name,
unsigned int nb_elts, unsigned int cache_size,
uint16_t user_size, int socket_id)
@@
-159,14
+167,14
@@
rte_comp_op_pool_create(const char *name,
return mp;
}
return mp;
}
-struct rte_comp_op *
__rte_experimental
+struct rte_comp_op *
rte_comp_op_alloc(struct rte_mempool *mempool)
{
struct rte_comp_op *op = NULL;
int retval;
retval = rte_comp_op_raw_bulk_alloc(mempool, &op, 1);
rte_comp_op_alloc(struct rte_mempool *mempool)
{
struct rte_comp_op *op = NULL;
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);
return NULL;
rte_comp_op_reset(op);
@@
-174,16
+182,16
@@
rte_comp_op_alloc(struct rte_mempool *mempool)
return op;
}
return op;
}
-int
__rte_experimental
+int
rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
struct rte_comp_op **ops, uint16_t nb_ops)
{
rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
struct rte_comp_op **ops, uint16_t nb_ops)
{
- int ret;
+ int ret
val
;
uint16_t i;
uint16_t i;
- ret = rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops);
- if (unlikely(ret
<
nb_ops))
- return
ret
;
+ ret
val
= rte_comp_op_raw_bulk_alloc(mempool, ops, nb_ops);
+ if (unlikely(ret
val !=
nb_ops))
+ return
0
;
for (i = 0; i < nb_ops; i++)
rte_comp_op_reset(ops[i]);
for (i = 0; i < nb_ops; i++)
rte_comp_op_reset(ops[i]);
@@
-199,9
+207,21
@@
rte_comp_op_bulk_alloc(struct rte_mempool *mempool,
* @param op
* Compress operation
*/
* @param op
* Compress operation
*/
-void
__rte_experimental
+void
rte_comp_op_free(struct rte_comp_op *op)
{
if (op != NULL && op->mempool != NULL)
rte_mempool_put(op->mempool, op);
}
rte_comp_op_free(struct rte_comp_op *op)
{
if (op != NULL && op->mempool != NULL)
rte_mempool_put(op->mempool, op);
}
+
+void
+rte_comp_op_bulk_free(struct rte_comp_op **ops, uint16_t nb_ops)
+{
+ uint16_t i;
+
+ for (i = 0; i < nb_ops; i++) {
+ if (ops[i] != NULL && ops[i]->mempool != NULL)
+ rte_mempool_put(ops[i]->mempool, ops[i]);
+ ops[i] = NULL;
+ }
+}