X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_mempool%2Frte_mempool_ops.c;h=a27e1fa5144abc88844456a2754d2168184efb86;hb=62250c1d09780e3d75ae252d9f69ca862e5bfca7;hp=ea9be1eb24668397400cf84f707ffa2978da0571;hpb=05912855bcd69742eeea42c1cf987fb501b7239a;p=dpdk.git diff --git a/lib/librte_mempool/rte_mempool_ops.c b/lib/librte_mempool/rte_mempool_ops.c index ea9be1eb24..a27e1fa514 100644 --- a/lib/librte_mempool/rte_mempool_ops.c +++ b/lib/librte_mempool/rte_mempool_ops.c @@ -59,6 +59,8 @@ rte_mempool_register_ops(const struct rte_mempool_ops *h) ops->get_count = h->get_count; ops->calc_mem_size = h->calc_mem_size; ops->populate = h->populate; + ops->get_info = h->get_info; + ops->dequeue_contig_blocks = h->dequeue_contig_blocks; rte_spinlock_unlock(&rte_mempool_ops_table.sl); @@ -134,6 +136,20 @@ rte_mempool_ops_populate(struct rte_mempool *mp, unsigned int max_objs, obj_cb_arg); } +/* wrapper to get additional mempool info */ +int +rte_mempool_ops_get_info(const struct rte_mempool *mp, + struct rte_mempool_info *info) +{ + struct rte_mempool_ops *ops; + + ops = rte_mempool_get_ops(mp->ops_index); + + RTE_FUNC_PTR_OR_ERR_RET(ops->get_info, -ENOTSUP); + return ops->get_info(mp, info); +} + + /* sets mempool ops previously registered by rte_mempool_register_ops. */ int rte_mempool_set_ops_byname(struct rte_mempool *mp, const char *name,