opa_vnic.rst 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. =================================================================
  2. Intel Omni-Path (OPA) Virtual Network Interface Controller (VNIC)
  3. =================================================================
  4. Intel Omni-Path (OPA) Virtual Network Interface Controller (VNIC) feature
  5. supports Ethernet functionality over Omni-Path fabric by encapsulating
  6. the Ethernet packets between HFI nodes.
  7. Architecture
  8. =============
  9. The patterns of exchanges of Omni-Path encapsulated Ethernet packets
  10. involves one or more virtual Ethernet switches overlaid on the Omni-Path
  11. fabric topology. A subset of HFI nodes on the Omni-Path fabric are
  12. permitted to exchange encapsulated Ethernet packets across a particular
  13. virtual Ethernet switch. The virtual Ethernet switches are logical
  14. abstractions achieved by configuring the HFI nodes on the fabric for
  15. header generation and processing. In the simplest configuration all HFI
  16. nodes across the fabric exchange encapsulated Ethernet packets over a
  17. single virtual Ethernet switch. A virtual Ethernet switch, is effectively
  18. an independent Ethernet network. The configuration is performed by an
  19. Ethernet Manager (EM) which is part of the trusted Fabric Manager (FM)
  20. application. HFI nodes can have multiple VNICs each connected to a
  21. different virtual Ethernet switch. The below diagram presents a case
  22. of two virtual Ethernet switches with two HFI nodes::
  23. +-------------------+
  24. | Subnet/ |
  25. | Ethernet |
  26. | Manager |
  27. +-------------------+
  28. / /
  29. / /
  30. / /
  31. / /
  32. +-----------------------------+ +------------------------------+
  33. | Virtual Ethernet Switch | | Virtual Ethernet Switch |
  34. | +---------+ +---------+ | | +---------+ +---------+ |
  35. | | VPORT | | VPORT | | | | VPORT | | VPORT | |
  36. +--+---------+----+---------+-+ +-+---------+----+---------+---+
  37. | \ / |
  38. | \ / |
  39. | \/ |
  40. | / \ |
  41. | / \ |
  42. +-----------+------------+ +-----------+------------+
  43. | VNIC | VNIC | | VNIC | VNIC |
  44. +-----------+------------+ +-----------+------------+
  45. | HFI | | HFI |
  46. +------------------------+ +------------------------+
  47. The Omni-Path encapsulated Ethernet packet format is as described below.
  48. ==================== ================================
  49. Bits Field
  50. ==================== ================================
  51. Quad Word 0:
  52. 0-19 SLID (lower 20 bits)
  53. 20-30 Length (in Quad Words)
  54. 31 BECN bit
  55. 32-51 DLID (lower 20 bits)
  56. 52-56 SC (Service Class)
  57. 57-59 RC (Routing Control)
  58. 60 FECN bit
  59. 61-62 L2 (=10, 16B format)
  60. 63 LT (=1, Link Transfer Head Flit)
  61. Quad Word 1:
  62. 0-7 L4 type (=0x78 ETHERNET)
  63. 8-11 SLID[23:20]
  64. 12-15 DLID[23:20]
  65. 16-31 PKEY
  66. 32-47 Entropy
  67. 48-63 Reserved
  68. Quad Word 2:
  69. 0-15 Reserved
  70. 16-31 L4 header
  71. 32-63 Ethernet Packet
  72. Quad Words 3 to N-1:
  73. 0-63 Ethernet packet (pad extended)
  74. Quad Word N (last):
  75. 0-23 Ethernet packet (pad extended)
  76. 24-55 ICRC
  77. 56-61 Tail
  78. 62-63 LT (=01, Link Transfer Tail Flit)
  79. ==================== ================================
  80. Ethernet packet is padded on the transmit side to ensure that the VNIC OPA
  81. packet is quad word aligned. The 'Tail' field contains the number of bytes
  82. padded. On the receive side the 'Tail' field is read and the padding is
  83. removed (along with ICRC, Tail and OPA header) before passing packet up
  84. the network stack.
  85. The L4 header field contains the virtual Ethernet switch id the VNIC port
  86. belongs to. On the receive side, this field is used to de-multiplex the
  87. received VNIC packets to different VNIC ports.
  88. Driver Design
  89. ==============
  90. Intel OPA VNIC software design is presented in the below diagram.
  91. OPA VNIC functionality has a HW dependent component and a HW
  92. independent component.
  93. The support has been added for IB device to allocate and free the RDMA
  94. netdev devices. The RDMA netdev supports interfacing with the network
  95. stack thus creating standard network interfaces. OPA_VNIC is an RDMA
  96. netdev device type.
  97. The HW dependent VNIC functionality is part of the HFI1 driver. It
  98. implements the verbs to allocate and free the OPA_VNIC RDMA netdev.
  99. It involves HW resource allocation/management for VNIC functionality.
  100. It interfaces with the network stack and implements the required
  101. net_device_ops functions. It expects Omni-Path encapsulated Ethernet
  102. packets in the transmit path and provides HW access to them. It strips
  103. the Omni-Path header from the received packets before passing them up
  104. the network stack. It also implements the RDMA netdev control operations.
  105. The OPA VNIC module implements the HW independent VNIC functionality.
  106. It consists of two parts. The VNIC Ethernet Management Agent (VEMA)
  107. registers itself with IB core as an IB client and interfaces with the
  108. IB MAD stack. It exchanges the management information with the Ethernet
  109. Manager (EM) and the VNIC netdev. The VNIC netdev part allocates and frees
  110. the OPA_VNIC RDMA netdev devices. It overrides the net_device_ops functions
  111. set by HW dependent VNIC driver where required to accommodate any control
  112. operation. It also handles the encapsulation of Ethernet packets with an
  113. Omni-Path header in the transmit path. For each VNIC interface, the
  114. information required for encapsulation is configured by the EM via VEMA MAD
  115. interface. It also passes any control information to the HW dependent driver
  116. by invoking the RDMA netdev control operations::
  117. +-------------------+ +----------------------+
  118. | | | Linux |
  119. | IB MAD | | Network |
  120. | | | Stack |
  121. +-------------------+ +----------------------+
  122. | | |
  123. | | |
  124. +----------------------------+ |
  125. | | |
  126. | OPA VNIC Module | |
  127. | (OPA VNIC RDMA Netdev | |
  128. | & EMA functions) | |
  129. | | |
  130. +----------------------------+ |
  131. | |
  132. | |
  133. +------------------+ |
  134. | IB core | |
  135. +------------------+ |
  136. | |
  137. | |
  138. +--------------------------------------------+
  139. | |
  140. | HFI1 Driver with VNIC support |
  141. | |
  142. +--------------------------------------------+