1987 views|1 replies
至芯科技FPGA大牛
Currently offline
|
The OP
Published on 2020-6-11 15:07
Only look at the author
This post is from FPGA/CPLD
Latest reply
When testing DPDK performance today, I found that the packet sending rate of the packet sending tool could not be increased. The Gigabit network card was set to a rate of 70W qps, but could only send out a rate of 1W.
Packet capture revealed a large number of PAUSE flow control frames.
[attach]482522[/attach]
1. Introduction to PAUSE frame
The PAUSE frame is a flow control frame sent by the MAC control sublayer in full-duplex Ethernet mode. The IEEE802.3 protocol provides a full-duplex flow control structure framework for the MAC control sublayer. The MAC control sublayer is an optional function between the logical link control sublayer and the media access control sublayer.
To prevent buffer overflow, the switching control circuit can use the MAC control sublayer to control the operation of the Ethernet media access control sublayer. When the used buffer capacity reaches a preset threshold, the port sends a request to the other party of the full-duplex link to stop sending data. This request is implemented through the control frame generated by the MAC control sublayer.
Similarly, the port can receive control frames generated by the MAC control sublayer of other sites. The control frames are sent in the client data frame stream. The receiver will separate the control frames according to the content of the frames and submit them to the flow control module in the MAC control sublayer. The flow control module parses the content of the control frames, extracts the control parameters in the frames, and decides the time to suspend sending according to the control parameters.
The PAUSE frame carries a time parameter. The device that receives the PAUSE frame can determine the duration of stopping transmission by simply parsing it. In the case of congestion on the peer device, the local port will usually receive multiple PAUSE frames in succession. As long as the congestion status of the peer device is not resolved, the relevant port will continue to send PAUSE.
2. PAUSE frame format
The length of the PAUSE frame is 64 bytes, and its structure is very simple, as shown below:
[attach]482523[/attach]
The destination MAC address of the PAUSE frame is the reserved MAC address 0180-C200-0001, and the source MAC is the MAC address of the device sending the PAUSE frame.
The Length/Type field is the hexadecimal number 0x8808.
The value of the MAC Control Opcode field is 0x0001. In fact, the PAUSE frame is a type of MAC control frame. Other types of MAC control frames use different opcode values, which will not be explained in detail here. The PFC frame, which is similar to the PAUSE frame, will be discussed later. The value of this field in the PFC frame is 0x0101.
The MAC Control Parameters field needs to be parsed according to the type of MAC Control Opcode. For PAUSE frames, this field is a 2-byte unsigned number with a value range of 0 to 65535. The time unit of this field is pause_quanta, and each pause_quanta is equivalent to 512 bits of time.
PAUSE operation parameter: It is a 2-byte pause time parameter. It is the length of time that the PAUSE sender requests the other party to stop sending data frames. It is usually 0xFFFF. The time measurement unit is the time used to transmit 512 bits of data at the current transmission rate. The actual pause time of the receiver is the product of the content of the operation parameter field and the time used to transmit 512 bits of data at the current transmission rate.
3. Other flow control technologies
In half-duplex mode, the Back-Pressure technology is mainly used. The port sends some signals to occupy the link, and the other end has no chance to send messages. In this way, the effect similar to flow control can be indirectly achieved.
4. Enable/disable Ethernet card flow control
Most network cards have flow control switch commands. In Linux systems, this can be controlled by the ethtool tool.
ethtool -A ethx autoneg off //Auto-negotiation off
ethtool -A ethx tx off //Transmit module off
ethtool -A ethx rx off //Receive module off
Details
Published on 2020-6-12 10:23
| |
|
||
qoistoochee128
Currently offline
|
2
Published on 2020-6-12 10:23
Only look at the author
This post is from FPGA/CPLD
| |
|
||
|
EEWorld Datasheet Technical Support
EEWorld
subscription
account
EEWorld
service
account
Automotive
development
circle
About Us Customer Service Contact Information Datasheet Sitemap LatestNews
Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190