i40e_alloc.h 1.1 KB

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