brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · 162ea70 Raw
34 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright(c) 2013 - 2018 Intel Corporation. */3 4#ifndef _IAVF_ALLOC_H_5#define _IAVF_ALLOC_H_6 7struct iavf_hw;8 9/* Memory allocation types */10enum iavf_memory_type {11	iavf_mem_arq_buf = 0,		/* ARQ indirect command buffer */12	iavf_mem_asq_buf = 1,13	iavf_mem_atq_buf = 2,		/* ATQ indirect command buffer */14	iavf_mem_arq_ring = 3,		/* ARQ descriptor ring */15	iavf_mem_atq_ring = 4,		/* ATQ descriptor ring */16	iavf_mem_pd = 5,		/* Page Descriptor */17	iavf_mem_bp = 6,		/* Backing Page - 4KB */18	iavf_mem_bp_jumbo = 7,		/* Backing Page - > 4KB */19	iavf_mem_reserved20};21 22/* prototype for functions used for dynamic memory allocation */23enum iavf_status iavf_allocate_dma_mem(struct iavf_hw *hw,24				       struct iavf_dma_mem *mem,25				       enum iavf_memory_type type,26				       u64 size, u32 alignment);27enum iavf_status iavf_free_dma_mem(struct iavf_hw *hw,28				   struct iavf_dma_mem *mem);29enum iavf_status iavf_allocate_virt_mem(struct iavf_hw *hw,30					struct iavf_virt_mem *mem, u32 size);31void iavf_free_virt_mem(struct iavf_hw *hw, struct iavf_virt_mem *mem);32 33#endif /* _IAVF_ALLOC_H_ */34