简体   繁体   English

DPDK:在 X710 NIC 卡上启用巨型帧

[英]DPDK: Enable jumbo frames on X710 NIC card

在此处输入图像描述 I am working with dpdk-stable-18.05.1 on Linux with an Intel X710 NIC.我正在使用带有 Intel X710 NIC 的 Linux 上的 dpdk-stable-18.05.1 工作。

The above NIC is capable of sending a packet size up to 9000 Bytes.上述 NIC 能够发送最大 9000 字节的数据包。 My application is not able to send a packet size of more than 1500. Here is my code:我的应用程序无法发送超过 1500 的数据包大小。这是我的代码:

const struct rte_eth_conf default_port_conf = {.rxmode = {.max_rx_pkt_len = 9000, .offloads = DEV_RX_OFFLOAD_JUMBO_FRAME, .jumbo_frame = 1,}

.txmode = {.offloads = DEV_TX_OFFLOAD_MULTI_SEGS, } }

I am trying to send the IPV4 packet size of 8192Bytes but on the RX side, we are getting 2048Bytes.我正在尝试发送 8192Bytes 的 IPV4 数据包大小,但在 RX 端,我们得到 2048Bytes。 (sample pcap is attached). (附上示例 pcap)。

I also tried with rte_eth_dev_set_mtu(pid, 9000);我也试过rte_eth_dev_set_mtu(pid, 9000); But no luck.但没有运气。

Anything if I am missing please let me know.如果我丢失任何东西,请告诉我。

Intel NIC x710 has no issues in supporting multi-segmented Jumbo frames . Intel NIC x710 在支持multi-segmented Jumbo frames方面没有问题。 This can be easily verified using DPDK 18.11.7 LTS ( always use LTS for better support and fixes ) and DPDK example skeleton .这可以使用 DPDK 18.11.7 LTS始终使用 LTS 以获得更好的支持和修复)和 DPDK 示例skeleton轻松验证。

To enable multi-segmented JUMBO frames please change the port_conf to要启用多分段 JUMBO 帧,请将 port_conf 更改为

static const struct rte_eth_conf port_conf_default = {
.rxmode = {
        .max_rx_pkt_len = 9000,
        .split_hdr_size = 0,
        .offloads = (DEV_RX_OFFLOAD_JUMBO_FRAME),
},
.txmode = {
        .mq_mode = ETH_MQ_TX_NONE,
        .offloads = (DEV_TX_OFFLOAD_IPV4_CKSUM |
                     DEV_TX_OFFLOAD_MULTI_SEGS),
},
};

The only conflicting configuration is using jumbo_frame = 1 along with DEV_RX_OFFLOAD_JUMBO_FRAME .唯一冲突的配置是使用jumbo_frame = 1 along with DEV_RX_OFFLOAD_JUMBO_FRAME As per DPDK releases (18.11 LTS) it is recommended to use DEV_RX_OFFLOAD_JUMBO_FRAME as jumbo_frame is deprecated.根据 DPDK 版本 (18.11 LTS),建议使用 DEV_RX_OFFLOAD_JUMBO_FRAME,因为不推荐使用 jumbo_frame。

Hence the assumption of x710 NIC not supporting Multi-segmented Jumbo frames is incorrect .因此,x710 NIC 不支持多分段巨型帧的假设是不正确的

CMD: CMD:

# ./build/basicfwd -w 0000:08:00.0  -w 0000:08:00.1 -w 0000:08:00.2 -w 0000:08:00.3
EAL: Detected 88 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:08:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL:   using IOMMU type 1 (Type 1)
EAL: PCI device 0000:08:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL: PCI device 0000:08:00.2 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL: PCI device 0000:08:00.3 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
Port 0 MAC: 3c fd fe 9f 3a 00
Port 1 MAC: 3c fd fe 9f 3a 01
Port 2 MAC: 3c fd fe 9f 3a 02
Port 3 MAC: 3c fd fe 9f 3a 03

WARNING: Too many lcores enabled. Only 1 used.

Core 0 forwarding packets. [Ctrl+C to quit]

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM