• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright(c) 2013 - 2018 Intel Corporation. */
3 
4 #ifndef _I40E_ALLOC_H_
5 #define _I40E_ALLOC_H_
6 
7 struct i40e_hw;
8 
9 /* Memory allocation types */
10 enum i40e_memory_type {
11 	i40e_mem_arq_buf = 0,		/* ARQ indirect command buffer */
12 	i40e_mem_asq_buf = 1,
13 	i40e_mem_atq_buf = 2,		/* ATQ indirect command buffer */
14 	i40e_mem_arq_ring = 3,		/* ARQ descriptor ring */
15 	i40e_mem_atq_ring = 4,		/* ATQ descriptor ring */
16 	i40e_mem_pd = 5,		/* Page Descriptor */
17 	i40e_mem_bp = 6,		/* Backing Page - 4KB */
18 	i40e_mem_bp_jumbo = 7,		/* Backing Page - > 4KB */
19 	i40e_mem_reserved
20 };
21 
22 /* prototype for functions used for dynamic memory allocation */
23 int i40e_allocate_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem,
24 			  enum i40e_memory_type type, u64 size, u32 alignment);
25 int i40e_free_dma_mem(struct i40e_hw *hw, struct i40e_dma_mem *mem);
26 int i40e_allocate_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem,
27 			   u32 size);
28 int i40e_free_virt_mem(struct i40e_hw *hw, struct i40e_virt_mem *mem);
29 
30 #endif /* _I40E_ALLOC_H_ */
31