ipoib.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. IP OVER INFINIBAND
  2. The ib_ipoib driver is an implementation of the IP over InfiniBand
  3. protocol as specified by RFC 4391 and 4392, issued by the IETF ipoib
  4. working group. It is a "native" implementation in the sense of
  5. setting the interface type to ARPHRD_INFINIBAND and the hardware
  6. address length to 20 (earlier proprietary implementations
  7. masqueraded to the kernel as ethernet interfaces).
  8. Partitions and P_Keys
  9. When the IPoIB driver is loaded, it creates one interface for each
  10. port using the P_Key at index 0. To create an interface with a
  11. different P_Key, write the desired P_Key into the main interface's
  12. /sys/class/net/<intf name>/create_child file. For example:
  13. echo 0x8001 > /sys/class/net/ib0/create_child
  14. This will create an interface named ib0.8001 with P_Key 0x8001. To
  15. remove a subinterface, use the "delete_child" file:
  16. echo 0x8001 > /sys/class/net/ib0/delete_child
  17. The P_Key for any interface is given by the "pkey" file, and the
  18. main interface for a subinterface is in "parent."
  19. Datagram vs Connected modes
  20. The IPoIB driver supports two modes of operation: datagram and
  21. connected. The mode is set and read through an interface's
  22. /sys/class/net/<intf name>/mode file.
  23. In datagram mode, the IB UD (Unreliable Datagram) transport is used
  24. and so the interface MTU has is equal to the IB L2 MTU minus the
  25. IPoIB encapsulation header (4 bytes). For example, in a typical IB
  26. fabric with a 2K MTU, the IPoIB MTU will be 2048 - 4 = 2044 bytes.
  27. In connected mode, the IB RC (Reliable Connected) transport is used.
  28. Connected mode takes advantage of the connected nature of the IB
  29. transport and allows an MTU up to the maximal IP packet size of 64K,
  30. which reduces the number of IP packets needed for handling large UDP
  31. datagrams, TCP segments, etc and increases the performance for large
  32. messages.
  33. In connected mode, the interface's UD QP is still used for multicast
  34. and communication with peers that don't support connected mode. In
  35. this case, RX emulation of ICMP PMTU packets is used to cause the
  36. networking stack to use the smaller UD MTU for these neighbours.
  37. Stateless offloads
  38. If the IB HW supports IPoIB stateless offloads, IPoIB advertises
  39. TCP/IP checksum and/or Large Send (LSO) offloading capability to the
  40. network stack.
  41. Large Receive (LRO) offloading is also implemented and may be turned
  42. on/off using ethtool calls. Currently LRO is supported only for
  43. checksum offload capable devices.
  44. Stateless offloads are supported only in datagram mode.
  45. Interrupt moderation
  46. If the underlying IB device supports CQ event moderation, one can
  47. use ethtool to set interrupt mitigation parameters and thus reduce
  48. the overhead incurred by handling interrupts. The main code path of
  49. IPoIB doesn't use events for TX completion signaling so only RX
  50. moderation is supported.
  51. Debugging Information
  52. By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
  53. to 'y', tracing messages are compiled into the driver. They are
  54. turned on by setting the module parameters debug_level and
  55. mcast_debug_level to 1. These parameters can be controlled at
  56. runtime through files in /sys/module/ib_ipoib/.
  57. CONFIG_INFINIBAND_IPOIB_DEBUG also enables files in the debugfs
  58. virtual filesystem. By mounting this filesystem, for example with
  59. mount -t debugfs none /sys/kernel/debug
  60. it is possible to get statistics about multicast groups from the
  61. files /sys/kernel/debug/ipoib/ib0_mcg and so on.
  62. The performance impact of this option is negligible, so it
  63. is safe to enable this option with debug_level set to 0 for normal
  64. operation.
  65. CONFIG_INFINIBAND_IPOIB_DEBUG_DATA enables even more debug output in
  66. the data path when data_debug_level is set to 1. However, even with
  67. the output disabled, enabling this configuration option will affect
  68. performance, because it adds tests to the fast path.
  69. References
  70. Transmission of IP over InfiniBand (IPoIB) (RFC 4391)
  71. http://ietf.org/rfc/rfc4391.txt
  72. IP over InfiniBand (IPoIB) Architecture (RFC 4392)
  73. http://ietf.org/rfc/rfc4392.txt
  74. IP over InfiniBand: Connected Mode (RFC 4755)
  75. http://ietf.org/rfc/rfc4755.txt