Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
510 views
in Technique[技术] by (71.8m points)

c - DPDK: Enable jumbo frames on X710 NIC card

enter image description hereI am working with dpdk-stable-18.05.1 on Linux with an Intel X710 NIC.

The above NIC is capable of sending a packet size up to 9000 Bytes. My application is not able to send a packet size of more than 1500. Here is my code:

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. (sample pcap is attached).

I also tried with rte_eth_dev_set_mtu(pid, 9000); But no luck.

Anything if I am missing please let me know.

question from:https://stackoverflow.com/questions/66048832/dpdk-enable-jumbo-frames-on-x710-nic-card

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Intel NIC x710 has no issues in supporting 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.

To enable multi-segmented JUMBO frames please change the port_conf to

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. As per DPDK releases (18.11 LTS) it is recommended to use DEV_RX_OFFLOAD_JUMBO_FRAME as jumbo_frame is deprecated.

Hence the assumption of x710 NIC not supporting Multi-segmented Jumbo frames is incorrect.

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]

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...