Intel® Acceleration Stack用户指南: Intel FPGA Programmable Acceleration Card N3000

ID 683040
日期 8/17/2020
Public
文档目录

8.1. 修改接口Maximum Transmission Unit (MTU)大小

10G FPGA MAC Wrapper 0和Wrapper 1的默认Maximum Transmission Unit (MTU)大小是1518字节。25G FPGA MAC Wrapper 0和Wrapper 1的默认MTU是9600。XL710的默认MTU大小是1500字节。您必须将FPGA MAC wrapper和XL710配置为具有相同的MTU设置,以确保每个MAC支持所需的最大数据包大小。

配置FPGA MAC wrapper 0的MTU的命令:
$ ip link set dev npacfXgYlZ mtu <#>

<#> = desired MTU setting
配置XL710的MTU的命令:
$ ip link set dev <XL710 interface name> mtu <#>

<#> = desired MTU setting
当前设置的示例:
$ ip link show npacf0g0l0

48: npacf0g0l0: <LOWER_UP> mtu 9600 qdisc noop state UNKNOWN mode DEFAULT group default qlen 1000
    link/generic 
$ ip link show enp20s0f0

52: enp20s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 64:4c:36:00:17:28 brd ff:ff:ff:ff:ff:ff
示例:将FPGA和XL710的MTU都设置成
$ sudo ip link set dev npacf0g0l0 mtu 9600
$ sudo ip link set dev enp20s0f0 mtu 9600
$ ip link show npacf0g0l0

48: npacf0g0l0: <LOWER_UP> mtu 9600 qdisc noop state UNKNOWN mode DEFAULT group default qlen 1000
    link/generic 
$ ip link show enp20s0f0
52: enp20s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9600 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 64:4c:36:00:17:28 brd ff:ff:ff:ff:ff:ff
使用以下命令设置FPGA MAC Wrapper 1 MTU:
$ fpgadiag -B <bus> -m fpgamac --side=host --mtu <#>

<bus> = PCIe bus of FPGA in 0xYZ format
<#> = desired MTU setting
检查FPGA MAC Wrapper 1 MTU:
$ sudo fpgadiag -b <bus> -m fpgamac --side=host --mtu 
样例输出:
================================================================
maximum frame length     | transmit         | receive          | 
mac 0                    | 9600             | 9600             | 
mac 1                    | 9600             | 9600             | 
mac 2                    | 9600             | 9600             | 
mac 3                    | 9600             | 9600             |