vnic_resource.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright 2014 Cisco Systems, Inc. All rights reserved.
  3. *
  4. * This program is free software; you may redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; version 2 of the License.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  9. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  11. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  12. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  13. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  14. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  15. * SOFTWARE.
  16. */
  17. #ifndef _VNIC_RESOURCE_H_
  18. #define _VNIC_RESOURCE_H_
  19. #define VNIC_RES_MAGIC 0x766E6963L /* 'vnic' */
  20. #define VNIC_RES_VERSION 0x00000000L
  21. /* vNIC resource types */
  22. enum vnic_res_type {
  23. RES_TYPE_EOL, /* End-of-list */
  24. RES_TYPE_WQ, /* Work queues */
  25. RES_TYPE_RQ, /* Receive queues */
  26. RES_TYPE_CQ, /* Completion queues */
  27. RES_TYPE_RSVD1,
  28. RES_TYPE_NIC_CFG, /* Enet NIC config registers */
  29. RES_TYPE_RSVD2,
  30. RES_TYPE_RSVD3,
  31. RES_TYPE_RSVD4,
  32. RES_TYPE_RSVD5,
  33. RES_TYPE_INTR_CTRL, /* Interrupt ctrl table */
  34. RES_TYPE_INTR_TABLE, /* MSI/MSI-X Interrupt table */
  35. RES_TYPE_INTR_PBA, /* MSI/MSI-X PBA table */
  36. RES_TYPE_INTR_PBA_LEGACY, /* Legacy intr status */
  37. RES_TYPE_RSVD6,
  38. RES_TYPE_RSVD7,
  39. RES_TYPE_DEVCMD, /* Device command region */
  40. RES_TYPE_PASS_THRU_PAGE, /* Pass-thru page */
  41. RES_TYPE_SUBVNIC, /* subvnic resource type */
  42. RES_TYPE_MQ_WQ, /* MQ Work queues */
  43. RES_TYPE_MQ_RQ, /* MQ Receive queues */
  44. RES_TYPE_MQ_CQ, /* MQ Completion queues */
  45. RES_TYPE_DEPRECATED1, /* Old version of devcmd 2 */
  46. RES_TYPE_DEPRECATED2, /* Old version of devcmd 2 */
  47. RES_TYPE_DEVCMD2, /* Device control region */
  48. RES_TYPE_MAX, /* Count of resource types */
  49. };
  50. struct vnic_resource_header {
  51. u32 magic;
  52. u32 version;
  53. };
  54. struct vnic_resource {
  55. u8 type;
  56. u8 bar;
  57. u8 pad[2];
  58. u32 bar_offset;
  59. u32 count;
  60. };
  61. #endif /* _VNIC_RESOURCE_H_ */