pci-vntb-function.rst 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =================
  3. PCI vNTB Function
  4. =================
  5. :Author: Frank Li <[email protected]>
  6. The difference between PCI NTB function and PCI vNTB function is
  7. PCI NTB function need at two endpoint instances and connect HOST1
  8. and HOST2.
  9. PCI vNTB function only use one host and one endpoint(EP), use NTB
  10. connect EP and PCI host
  11. .. code-block:: text
  12. +------------+ +---------------------------------------+
  13. | | | |
  14. +------------+ | +--------------+
  15. | NTB | | | NTB |
  16. | NetDev | | | NetDev |
  17. +------------+ | +--------------+
  18. | NTB | | | NTB |
  19. | Transfer | | | Transfer |
  20. +------------+ | +--------------+
  21. | | | | |
  22. | PCI NTB | | | |
  23. | EPF | | | |
  24. | Driver | | | PCI Virtual |
  25. | | +---------------+ | NTB Driver |
  26. | | | PCI EP NTB |<------>| |
  27. | | | FN Driver | | |
  28. +------------+ +---------------+ +--------------+
  29. | | | | | |
  30. | PCI BUS | <-----> | PCI EP BUS | | Virtual PCI |
  31. | | PCI | | | BUS |
  32. +------------+ +---------------+--------+--------------+
  33. PCI RC PCI EP
  34. Constructs used for Implementing vNTB
  35. =====================================
  36. 1) Config Region
  37. 2) Self Scratchpad Registers
  38. 3) Peer Scratchpad Registers
  39. 4) Doorbell (DB) Registers
  40. 5) Memory Window (MW)
  41. Config Region:
  42. --------------
  43. It is same as PCI NTB Function driver
  44. Scratchpad Registers:
  45. ---------------------
  46. It is appended after Config region.
  47. .. code-block:: text
  48. +--------------------------------------------------+ Base
  49. | |
  50. | |
  51. | |
  52. | Common Config Register |
  53. | |
  54. | |
  55. | |
  56. +-----------------------+--------------------------+ Base + span_offset
  57. | | |
  58. | Peer Span Space | Span Space |
  59. | | |
  60. | | |
  61. +-----------------------+--------------------------+ Base + span_offset
  62. | | | + span_count * 4
  63. | | |
  64. | Span Space | Peer Span Space |
  65. | | |
  66. +-----------------------+--------------------------+
  67. Virtual PCI Pcie Endpoint
  68. NTB Driver NTB Driver
  69. Doorbell Registers:
  70. -------------------
  71. Doorbell Registers are used by the hosts to interrupt each other.
  72. Memory Window:
  73. --------------
  74. Actual transfer of data between the two hosts will happen using the
  75. memory window.
  76. Modeling Constructs:
  77. ====================
  78. 32-bit BARs.
  79. ====== ===============
  80. BAR NO CONSTRUCTS USED
  81. ====== ===============
  82. BAR0 Config Region
  83. BAR1 Doorbell
  84. BAR2 Memory Window 1
  85. BAR3 Memory Window 2
  86. BAR4 Memory Window 3
  87. BAR5 Memory Window 4
  88. ====== ===============
  89. 64-bit BARs.
  90. ====== ===============================
  91. BAR NO CONSTRUCTS USED
  92. ====== ===============================
  93. BAR0 Config Region + Scratchpad
  94. BAR1
  95. BAR2 Doorbell
  96. BAR3
  97. BAR4 Memory Window 1
  98. BAR5
  99. ====== ===============================