opa_vnic.txt 6.8 KB

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