Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright(c) 2013 - 2018 Intel Corporation. */
0003 
0004 #ifndef _I40E_ALLOC_H_
0005 #define _I40E_ALLOC_H_
0006 
0007 struct i40e_hw;
0008 
0009 /* Memory allocation types */
0010 enum i40e_memory_type {
0011     i40e_mem_arq_buf = 0,       /* ARQ indirect command buffer */
0012     i40e_mem_asq_buf = 1,
0013     i40e_mem_atq_buf = 2,       /* ATQ indirect command buffer */
0014     i40e_mem_arq_ring = 3,      /* ARQ descriptor ring */
0015     i40e_mem_atq_ring = 4,      /* ATQ descriptor ring */
0016     i40e_mem_pd = 5,        /* Page Descriptor */
0017     i40e_mem_bp = 6,        /* Backing Page - 4KB */
0018     i40e_mem_bp_jumbo = 7,      /* Backing Page - > 4KB */
0019     i40e_mem_reserved
0020 };
0021 
0022 /* prototype for functions used for dynamic memory allocation */
0023 i40e_status i40e_allocate_dma_mem(struct i40e_hw *hw,
0024                         struct i40e_dma_mem *mem,
0025                         enum i40e_memory_type type,
0026                         u64 size, u32 alignment);
0027 i40e_status i40e_free_dma_mem(struct i40e_hw *hw,
0028                     struct i40e_dma_mem *mem);
0029 i40e_status i40e_allocate_virt_mem(struct i40e_hw *hw,
0030                          struct i40e_virt_mem *mem,
0031                          u32 size);
0032 i40e_status i40e_free_virt_mem(struct i40e_hw *hw,
0033                      struct i40e_virt_mem *mem);
0034 
0035 #endif /* _I40E_ALLOC_H_ */