Documentation/translations/zh_CN/infiniband/ipoib.rst

Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/infiniband/ipoib.rst

File Facts

System
Linux kernel
Corpus path
Documentation/translations/zh_CN/infiniband/ipoib.rst
Extension
.rst
Size
4181 bytes
Lines
112
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. include:: ../disclaimer-zh_CN.rst

:Original: Documentation/infiniband/ipoib.rst

:翻译:

 司延腾 Yanteng Si <siyanteng@loongson.cn>

:校译:

 王普宇 Puyu Wang <realpuyuwang@gmail.com>
 时奎亮 Alex Shi <alexs@kernel.org>

.. _cn_infiniband_ipoib:

=========================
infiniband上的IP(IPoIB)
=========================

  ib_ipoib驱动是IETF ipoib工作组发布的RFC 4391和4392所规定的
  infiniband上IP协议的一个实现。它是一个“本地”实现,即把接口类型设置为
  ARPHRD_INFINIBAND,硬件地址长度为20(早期的专有实现向内核伪装为以太网
  接口)。

分区和P_Keys
============

  当IPoIB驱动被加载时,它会使用索引为0的P_Key给每个端口创建一个接口。要用
  不同的P_Key创建一个接口,将所需的P_Key写入主接口的
  /sys/class/net/<intf name>/create_child文件里面。比如说::

    echo 0x8001 > /sys/class/net/ib0/create_child

  这将用P_Key 0x8001创建一个名为ib0.8001的接口。要删除一个子接口,使用
  ``delete_child`` 文件::

    echo 0x8001 > /sys/class/net/ib0/delete_child

  任何接口的P_Key都由“pkey”文件给出,而子接口的主接口在“parent”中。

  子接口的创建/删除也可以使用IPoIB的rtnl_link_ops来完成,使用两种
  方式创建的子接口的行为是一样的。

数据报与连接模式
================

  IPoIB驱动支持两种操作模式:数据报和连接。模式是通过接口的
  /sys/class/net/<intf name>/mode文件设置和读取的。

  在数据报模式下,使用IB UD(不可靠数据报)传输,因此接口MTU等于IB L2 MTU
  减去IPoIB封装头(4字节)。例如,在一个典型的具有2K MTU的IB结构中,IPoIB
  MTU将是2048 - 4 = 2044字节。

  在连接模式下,使用IB RC(可靠的连接)传输。连接模式利用IB传输的连接特性,
  允许MTU达到最大的IP包大小64K,这减少了处理大型UDP数据包、TCP段等所需的
  IP包数量,提高了大型信息的性能。

  在连接模式下,接口的UD QP仍被用于组播和与不支持连接模式的对等体的通信。
  在这种情况下,ICMP PMTU数据包的RX仿真被用来使网络堆栈对这些邻居使用较
  小的UD MTU。

无状态卸载
==========

  如果IB HW支持IPoIB无状态卸载,IPoIB会向网络堆栈广播TCP/IP校验和/或大量
  传送(LSO)负载转移能力。

  大量传送(LSO)负载转移也已实现,可以使用ethtool调用打开/关闭。目前,LRO
  只支持具有校验和卸载能力的设备。

Annotation

Implementation Notes