i40e_alloc.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*******************************************************************************
  2. *
  3. * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
  4. * Copyright(c) 2013 Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * The full GNU General Public License is included in this distribution in
  16. * the file called "COPYING".
  17. *
  18. * Contact Information:
  19. * e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  20. * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
  21. *
  22. ******************************************************************************/
  23. #ifndef _I40E_ALLOC_H_
  24. #define _I40E_ALLOC_H_
  25. struct i40e_hw;
  26. /* Memory allocation types */
  27. enum i40e_memory_type {
  28. i40e_mem_arq_buf = 0, /* ARQ indirect command buffer */
  29. i40e_mem_asq_buf = 1,
  30. i40e_mem_atq_buf = 2, /* ATQ indirect command buffer */
  31. i40e_mem_arq_ring = 3, /* ARQ descriptor ring */
  32. i40e_mem_atq_ring = 4, /* ATQ descriptor ring */
  33. i40e_mem_pd = 5, /* Page Descriptor */
  34. i40e_mem_bp = 6, /* Backing Page - 4KB */
  35. i40e_mem_bp_jumbo = 7, /* Backing Page - > 4KB */
  36. i40e_mem_reserved
  37. };
  38. /* prototype for functions used for dynamic memory allocation */
  39. i40e_status i40e_allocate_dma_mem(struct i40e_hw *hw,
  40. struct i40e_dma_mem *mem,
  41. enum i40e_memory_type type,
  42. u64 size, u32 alignment);
  43. i40e_status i40e_free_dma_mem(struct i40e_hw *hw,
  44. struct i40e_dma_mem *mem);
  45. i40e_status i40e_allocate_virt_mem(struct i40e_hw *hw,
  46. struct i40e_virt_mem *mem,
  47. u32 size);
  48. i40e_status i40e_free_virt_mem(struct i40e_hw *hw,
  49. struct i40e_virt_mem *mem);
  50. #endif /* _I40E_ALLOC_H_ */