1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(C) 2023 Marvell. 3 */ 4 5 /** 6 * @file rte_pmd_cnxk_mempool.h 7 * Marvell CNXK Mempool PMD specific functions. 8 * 9 **/ 10 11 #ifndef _PMD_CNXK_MEMPOOL_H_ 12 #define _PMD_CNXK_MEMPOOL_H_ 13 14 #include <rte_mbuf.h> 15 #include <rte_mempool.h> 16 17 /** 18 * Exchange mbufs between two mempools. 19 * 20 * @param m1 21 * First mbuf 22 * @param m2 23 * Second mbuf 24 * 25 * @return 26 * 0 on success, a negative errno value otherwise. 27 */ 28 __rte_experimental 29 int rte_pmd_cnxk_mempool_mbuf_exchange(struct rte_mbuf *m1, 30 struct rte_mbuf *m2); 31 32 /** 33 * Check whether a mempool is a hwpool. 34 * 35 * @param mp 36 * Mempool to check. 37 * 38 * @return 39 * 1 if mp is a hwpool, 0 otherwise. 40 */ 41 __rte_experimental 42 int rte_pmd_cnxk_mempool_is_hwpool(struct rte_mempool *mp); 43 44 /** 45 * Disable buffer address range check on a mempool. 46 * 47 * @param mp 48 * Mempool to disable range check on. 49 * 50 * @return 51 * 0 on success, a negative errno value otherwise. 52 */ 53 __rte_experimental 54 int rte_pmd_cnxk_mempool_range_check_disable(struct rte_mempool *mp); 55 56 #endif /* _PMD_CNXK_MEMPOOL_H_ */ 57