1 /* SPDX-License-Identifier: BSD-3-Clause
5 #ifndef _RTE_MBUF_POOL_OPS_H_
6 #define _RTE_MBUF_POOL_OPS_H_
12 * These APIs are for configuring the mbuf pool ops names to be largely used by
13 * rte_pktmbuf_pool_create(). However, this can also be used to set and inquire
14 * the best mempool ops available.
17 * @b EXPERIMENTAL: this API may change without prior notice
25 * Set the platform supported pktmbuf HW mempool ops name
27 * This function allow the HW to register the actively supported HW mempool
28 * ops_name. Only one HW mempool ops can be registered at any point of time.
33 * - On failure, a negative value.
36 rte_mbuf_set_platform_mempool_ops(const char *ops_name);
39 * Get configured platform supported pktmbuf HW mempool ops name
41 * This function returns the platform supported mempool ops name.
44 * - On success, platform pool ops name.
48 rte_mbuf_platform_mempool_ops(void);
51 * Set the user preferred pktmbuf mempool ops name
53 * This function can be used by the user to configure user preferred
59 * - On failure, a negative value.
62 rte_mbuf_set_user_mempool_ops(const char *ops_name);
65 * Get user preferred pool ops name for mbuf
67 * This function returns the user configured mempool ops name.
70 * - On success, user pool ops name..
74 rte_mbuf_user_mempool_ops(void);
77 * Get the best mempool ops name for pktmbuf.
79 * This function is used to determine the best options for mempool ops for
80 * pktmbuf allocations. Following are the priority order:
81 * 1. User defined, 2. Platform HW supported, 3. Compile time configured.
82 * This function is also used by the rte_pktmbuf_pool_create to get the best
86 * returns preferred mbuf pool ops name
89 rte_mbuf_best_mempool_ops(void);
96 #endif /* _RTE_MBUF_POOL_OPS_H_ */