Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright(c) 2013 - 2018 Intel Corporation. */
0003 
0004 #ifndef _IAVF_ALLOC_H_
0005 #define _IAVF_ALLOC_H_
0006 
0007 struct iavf_hw;
0008 
0009 /* Memory allocation types */
0010 enum iavf_memory_type {
0011     iavf_mem_arq_buf = 0,       /* ARQ indirect command buffer */
0012     iavf_mem_asq_buf = 1,
0013     iavf_mem_atq_buf = 2,       /* ATQ indirect command buffer */
0014     iavf_mem_arq_ring = 3,      /* ARQ descriptor ring */
0015     iavf_mem_atq_ring = 4,      /* ATQ descriptor ring */
0016     iavf_mem_pd = 5,        /* Page Descriptor */
0017     iavf_mem_bp = 6,        /* Backing Page - 4KB */
0018     iavf_mem_bp_jumbo = 7,      /* Backing Page - > 4KB */
0019     iavf_mem_reserved
0020 };
0021 
0022 /* prototype for functions used for dynamic memory allocation */
0023 enum iavf_status iavf_allocate_dma_mem(struct iavf_hw *hw,
0024                        struct iavf_dma_mem *mem,
0025                        enum iavf_memory_type type,
0026                        u64 size, u32 alignment);
0027 enum iavf_status iavf_free_dma_mem(struct iavf_hw *hw,
0028                    struct iavf_dma_mem *mem);
0029 enum iavf_status iavf_allocate_virt_mem(struct iavf_hw *hw,
0030                     struct iavf_virt_mem *mem, u32 size);
0031 enum iavf_status iavf_free_virt_mem(struct iavf_hw *hw,
0032                     struct iavf_virt_mem *mem);
0033 
0034 #endif /* _IAVF_ALLOC_H_ */