iavf_alloc.h 1.1 KB

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