i40e_alloc.h 782 B

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. #include <linux/types.h>
  6. struct i40e_hw;
  7. /* memory allocation tracking */
  8. struct i40e_dma_mem {
  9. void *va;
  10. dma_addr_t pa;
  11. u32 size;
  12. };
  13. struct i40e_virt_mem {
  14. void *va;
  15. u32 size;
  16. };
  17. /* prototype for functions used for dynamic memory allocation */
  18. int i40e_allocate_dma_mem(struct i40e_hw *hw,
  19. struct i40e_dma_mem *mem,
  20. u64 size, u32 alignment);
  21. int i40e_free_dma_mem(struct i40e_hw *hw,
  22. struct i40e_dma_mem *mem);
  23. int i40e_allocate_virt_mem(struct i40e_hw *hw,
  24. struct i40e_virt_mem *mem,
  25. u32 size);
  26. int i40e_free_virt_mem(struct i40e_hw *hw,
  27. struct i40e_virt_mem *mem);
  28. #endif /* _I40E_ALLOC_H_ */