162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* Copyright(c) 2013 - 2018 Intel Corporation. */ 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#ifndef _I40E_ALLOC_H_ 562306a36Sopenharmony_ci#define _I40E_ALLOC_H_ 662306a36Sopenharmony_ci 762306a36Sopenharmony_cistruct i40e_hw; 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci/* Memory allocation types */ 1062306a36Sopenharmony_cienum i40e_memory_type { 1162306a36Sopenharmony_ci i40e_mem_arq_buf = 0, /* ARQ indirect command buffer */ 1262306a36Sopenharmony_ci i40e_mem_asq_buf = 1, 1362306a36Sopenharmony_ci i40e_mem_atq_buf = 2, /* ATQ indirect command buffer */ 1462306a36Sopenharmony_ci i40e_mem_arq_ring = 3, /* ARQ descriptor ring */ 1562306a36Sopenharmony_ci i40e_mem_atq_ring = 4, /* ATQ descriptor ring */ 1662306a36Sopenharmony_ci i40e_mem_pd = 5, /* Page Descriptor */ 1762306a36Sopenharmony_ci i40e_mem_bp = 6, /* Backing Page - 4KB */ 1862306a36Sopenharmony_ci i40e_mem_bp_jumbo = 7, /* Backing Page - > 4KB */ 1962306a36Sopenharmony_ci i40e_mem_reserved 2062306a36Sopenharmony_ci}; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* prototype for functions used for dynamic memory allocation */ 2362306a36Sopenharmony_ciint i40e_allocate_dma_mem(struct i40e_hw *hw, 2462306a36Sopenharmony_ci struct i40e_dma_mem *mem, 2562306a36Sopenharmony_ci enum i40e_memory_type type, 2662306a36Sopenharmony_ci u64 size, u32 alignment); 2762306a36Sopenharmony_ciint i40e_free_dma_mem(struct i40e_hw *hw, 2862306a36Sopenharmony_ci struct i40e_dma_mem *mem); 2962306a36Sopenharmony_ciint i40e_allocate_virt_mem(struct i40e_hw *hw, 3062306a36Sopenharmony_ci struct i40e_virt_mem *mem, 3162306a36Sopenharmony_ci u32 size); 3262306a36Sopenharmony_ciint i40e_free_virt_mem(struct i40e_hw *hw, 3362306a36Sopenharmony_ci struct i40e_virt_mem *mem); 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#endif /* _I40E_ALLOC_H_ */ 36