Intel® Acceleration Stack User Guide: Intel FPGA Programmable Acceleration Card N3000

ID 683040
Date 6/14/2021
Public
Document Table of Contents

8.1. Modifying the Interface Maximum Transmission Unit (MTU) Size

The default Maximum Transmission Unit (MTU) size for 10G FPGA MAC Wrapper 0 and Wrapper 1 is 1518 bytes. The default MTU size for 25G FPGA MAC Wrapper 0 and Wrapper 1 is 9600. The default MTU size for XL710 is 1500 bytes. You must configure FPGA MAC wrappers and XL710 to have the same MTU setting to ensure each MAC will allow your desired maximum packet size.

Command for configuring MTU of FPGA MAC wrapper 0:
$ ip link set dev npacfXgYlZ mtu <#>

<#> = desired MTU setting
Command for configuring MTU of XL710:
$ ip link set dev <XL710 interface name> mtu <#>

<#> = desired MTU setting
Example of current settings:
$ 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
Example: Set MTU to 9600 for both FPGA and XL710
$ 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
To set the FPGA MAC Wrapper 1 MTU, use the following command:
$ fpgadiag -B <bus> -m fpgamac --side=host --mtu <#>

<bus> = PCIe bus of FPGA in 0xYZ format
<#> = desired MTU setting
To check FPGA MAC Wrapper 1 MTU:
$ sudo fpgadiag -b <bus> -m fpgamac --side=host --mtu 
Sample output:
================================================================
maximum frame length     | transmit         | receive          | 
mac 0                    | 9600             | 9600             | 
mac 1                    | 9600             | 9600             | 
mac 2                    | 9600             | 9600             | 
mac 3                    | 9600             | 9600             |