Lossless Ethernet simulation model and data processing method
By building a lossless Ethernet terminal, switch and network system model, the QoS guarantee and scalability problems faced by Ethernet in metropolitan area network and wide area network expansion are solved, and efficient network performance simulation and flow control strategy analysis are realized, reducing the Hardware simulation cost.
Patent Information
- Application Number
- CN202411936830.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-02-18
AI Technical Summary
When expanding to metropolitan area networks and wide area networks, Ethernet faces problems such as insufficient end-to-end QoS guarantee, slow network failure recovery, lack of service performance monitoring and OAM capabilities, and poor scalability.
By building a model of lossless Ethernet terminals, switches and network systems, we study the network performance under network design and configuration file loading, analyze the relationship between the triggering of flow control policies and network performance, and support Ethernet protocol specifications, RDMA, traffic control, and failures Injection and other functions to realize network system simulation and visual topology generation.
It realizes efficient simulation of terminals, switches and network systems, can count the delay and backlog situation under configuration, analyze the impact of flow control strategies on network performance, reduce hardware simulation costs, and improve network product design and verification efficiency.
Smart Images

Figure CN119484305A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of network simulation, and in particular to a lossless Ethernet simulation model and a data processing method. Background Art
[0002] The main factors for Ethernet's success include good standardization, interoperability, economy and ease of use. Today, people are trying to expand Ethernet to metropolitan area networks and even wide area networks, using the Ethernet frame structure consistent with IP to achieve seamless connection between different networks without any format conversion in the middle, forming a consistent Ethernet structure from local area networks, access networks, metropolitan area networks to wide area networks.
[0003] Although Ethernet has many advantages, in order to become a true carrier-grade technology to replace traditional frame relay and ATM, it still needs to overcome its own limitations, such as lack of end-to-end QoS guarantee, slow network fault recovery, lack of service performance monitoring and OAM capabilities, and poor scalability. Summary of the invention
[0004] Purpose of the invention: The present invention studies the network performance under network design and configuration file loading, such as delay, jitter, bandwidth, etc., by constructing models of lossless Ethernet terminals, switches, and network systems. By analyzing the flow control strategy, the relationship between the triggering of each flow control strategy and the network performance is obtained, and its impact on the network performance is demonstrated. The terminal simulation model supports Ethernet protocol specifications, supports RDMA, flow control, fault injection and other functions, supports message flow statistics and message configuration integrity analysis; the switch simulation model supports Ethernet protocol specifications, can carry out message scheduling, queue management, flow control and fault injection according to the switch configuration, supports status statistics and message configuration integrity analysis; the network system simulation model supports system ICD and general configuration files, supports 1 / 10 / 25 / 40 / 100Gbps rates, supports network system simulation, supports network system visualization topology structure generation and configuration, etc.
[0005] Technical solution:
[0006] In a first aspect, a lossless Ethernet simulation model is provided, including: a switch simulation model, a terminal simulation model and a network system simulation model;
[0007] The switch simulation model has switch modeling, lossless Ethernet flow control, fault injection, configuration loading, and simulation result statistics functions;
[0008] The terminal simulation model has the functions of terminal system modeling, RDMA modeling, flow control, configuration loading, and simulation result statistics.
[0009] The network system simulation model has the functions of simulation information import, simulation model input configuration generation, VLAN management, network topology generation, network management, fault injection, simulation report management and simulation result analysis.
[0010] Functions supported by terminal emulation model:
[0011] 1) Support high-speed network terminal emulation;
[0012] 2) The terminal model implements RDMA technology based on the RoCEv2 standard, including ECN and PFC;
[0013] 3) The terminal Ethernet models supported include UDP, IP, MAC and physical ports;
[0014] 4) Support terminal models to implement message generation, scheduling and sending based on SDN-generated configurations;
[0015] Functions supported by the switch simulation model:
[0016] 1) Support high-speed network switch simulation;
[0017] 2) The switch model implements RDMA technology based on the RoCEv2 standard, including ECN and PFC;
[0018] 3) Support switch models to implement data scheduling and forwarding based on SDN-generated configurations;
[0019] Functions supported by the network system simulation model:
[0020] 1) Support high-speed network link simulation;
[0021] 2) Supports the construction of network simulation topology to realize data sending and receiving between terminals and switches.
[0022] 3) Support the simulation model for SDN resource planning, allocation and configuration loading.
[0023] 4) Support the implementation of simulation model statistics on delay, backlog, and congestion results.
[0024] The terminal simulation model includes: port binding control model, switching model, RDMA model, Ethernet protocol model, and APP application model;
[0025] The port binding control model is used to control two standard Ethernet interfaces and supports the master-backup strategy and the balanced strategy binding mode;
[0026] The switching model is used to support Layer 2 switching and flow control. Data is forwarded and copied based on the entire packet. Data packets are prioritized and scheduled. The queue priority supports configuration. Each round of arbitration is composed of a combination of custom priority and polling priority. Flow control supports PAUSE flow control and PFC flow control, and also supports congestion management of data streams generated by multiple applications.
[0027] The RDMA model implements RDMA RoCEv2 protocol transmission and reception, supporting unicast and multicast;
[0028] The Ethernet protocol model supports standard TCP / IP, UDP protocol implementation and ECN congestion notification function, and supports unicast, multicast and broadcast;
[0029] The APP application model is used to generate messages according to the contents of the configuration file and supports multiple applications to generate data in parallel.
[0030] The switching model supports forwarding, flow control and copying of application data packets; supports forwarding based on the destination MAC address, receives data packets from the upper-layer application, and forwards them to the corresponding port according to the destination MAC address; when the application sends data packets, high-priority data packets are sent first, and when the high-priority data packets are empty, low-priority data packets are sent; the switching model implements link-level flow control LFC and priority-based flow control PFC.
[0031] The terminal port binding control model supports multiple binding modes:
[0032] 1) Bond 0 mode: Balanced polling strategy, which provides load balancing and fault tolerance.
[0033] 2) Bond 1 mode: primary-backup strategy, this mode only provides fault tolerance;
[0034] 3) Bond 2 mode: Balanced strategy, this mode provides load balancing and fault tolerance.
[0035] 4) Bond 3 mode: Broadcast strategy, this mode provides fault tolerance.
[0036] In a second aspect, a data processing method is provided, which is applied to the lossless Ethernet simulation model described in any one of the first aspects, and the method comprises:
[0037] 1) The switch simulation model receives data packets: The packet is input through the switch port. First, the complete data packet is obtained, the packet header information is parsed, the ICI object is created, and the packet is bound to prepare for the subsequent processing of the packet based on this information; the parsed fields include MACSA, MACDA, protocol type, and VLAN ID;
[0038] 2) MAC frame type identification: Differentiate different types of data frames based on the frame type byte;
[0039] 3) Check the MAC address to see if the destination address is the virtual address of this node, and determine whether the packet is received and forwarded upward. The following situations can be received:
[0040] a) The target address is my address / my link aggregation group address;
[0041] b) The target address is the virtual address of this node;
[0042] c) Packets in promiscuous mode and not sent by the local device;
[0043] d) Broadcast / multicast packets not sent by the local device;
[0044] 4) VLAN parsing: Parse the VLAN identification bytes. If the port is configured with VLAN, the VLAN entry rules are applied for filtering later;
[0045] 5) QoS priority analysis: If the switch is configured with QoS, different methods are used to obtain the priority of the packet according to the different sources of the packet, in preparation for the subsequent priority-based processing; priority information analysis, where the TOS field of the IP protocol header, IP Precedence is the first 3 bits of the TOS field, indicating 0 to 7 levels of priority. DSCP is the first 6 bits of the TOS field, indicating 0 to 63 levels of priority;
[0046] After the above steps, the packet is inserted into the end of the buffer queue, and the subsequent nodes take packets from the queue one by one to continue processing;
[0047] 6) PFC: According to the MAC frame type, first determine whether it is a PFC PAUSE frame. If it is, parse the information corresponding to the 8 priorities in the frame and stop sending data in the corresponding priority queue according to the back pressure enable vector and the back pressure timer;
[0048] 7) VLAN verification: Check the VLAN ID and verify and filter the VLAN;
[0049] 8) MAC table entry learning: Use the source MAC address to check the address mapping table. If it does not exist, add the address table entry. If it does exist, update the port information and aging time.
[0050] 9) Destination port query: Use the destination MAC address to check the address mapping table. If it exists, it will be forwarded to the corresponding port. If it does not exist, it will be forwarded to all ports except this port.
[0051] 10) Sending data packets upward: Sending data packets from the lower layer of the protocol stack to the IP layer and parsing the IP protocol header, including the IP address, protocol type, and TOS.
[0052] 11) ECN: If the ECN function is enabled, when the data packet is a RoCEv2 data packet, the ECN field is checked and the CE value is marked according to the current network congestion of the switch, so that the receiver can generate CNP to notify the sender of the network congestion event. CNP is an ordinary IP data packet for the switch. After receiving the event notification indicated by CNP, the sender controls the sending rate according to the algorithm.
[0053] 12) IP packet verification: Verify whether the packet is a legal IP data packet;
[0054] 13) IP routing: Determine the IP destination address type, including unicast, multicast, global broadcast, etc., and process them separately; IP unicast performs routing table query to obtain the most matching record, determine the next hop forwarding port, and check the TTL of the packet.
[0055] 14) ACL control: After determining the forwarding output port, check the output port status. If ACL is enabled, apply the ACL configuration to perform packet filtering.
[0056] 15) Forwarding packet header modification: Determine the type of the destination IP address. If it is a broadcast address, broadcast it. If it is a unicast address, perform an ARP table query to query the MAC address corresponding to the destination IP address and forward the packet to the lower layer.
[0057] 16) Forwarding data packets: clarify the source address and destination address, and forward the data packets to the corresponding output port; check the MAC protocol type between the source and destination ports to determine whether segmentation or decapsulation is required; if QoS is set, the message will be sent to an output queue of the port, and messages sent to different output queues of the port will receive transmission service strategies of different levels and natures.
[0058] The switching model receives and sets the PFC control logic. The corresponding process includes:
[0059] After the Ethernet frame is received by the port, it is forwarded to the Switch process model, and the frame header information is parsed. If the destination address of the MAC frame is the destination address and the type is IPv4, it is a PFC PAUSE frame. The payload content is further parsed to obtain the back pressure enable vector and the back pressure timers corresponding to the 8 priority queues; if the corresponding bit of priority_enable_vector is 1, the time point at which the next frame is allowed to be sent is set according to the value of the time [priority] timer; if the bit of priority_enable_vector is 0, no processing is performed, indicating that the timer is invalid;
[0060] If the frame header is parsed and it is determined that it is not a PFC PAUSE frame, then it is another data frame and is processed according to the normal forwarding logic;
[0061] When the payload is enqueued, the priority is first parsed, and the payload data packet is placed in the receiving subqueue mapped to the priority. The subqueue length is determined. If it is greater than the set flow control threshold XOFF, the bit corresponding to the back pressure enable vector is set to 1, and the value of time[priority] is 0x7FFF, indicating that the transmission is paused for 32767 transmission time units. Then, the PFC frame sending function is called to put the current flow control information into the next PFC PAUSE frame to be sent.
[0062] The physical transmission of the PFC frame is not performed every time the blocking state of a subqueue changes, but the blocking change states of multiple subqueues within the current time interval are sent out at a fixed frequency;
[0063] When the payload is dequeued and forwarded to the upper layer, if the length of the receiving subqueue is less than the set flow control recovery threshold XON, the bit corresponding to the back pressure enable vector is set to 1, the value of time[priority] is 0, and then the PFC frame sending function is called to put the current flow control information into the next PFC PAUSE frame to be sent.
[0064] The switching model sends the PFC control logic, and the corresponding process includes:
[0065] The Switch process model receives the upper layer data packet and prepares to put it into the sending subqueue according to the priority information;
[0066] When an Ethernet frame is queued, the priority is first parsed and the Ethernet frame is placed in the sending subqueue to which the priority is mapped. The subqueue length is determined. If it is greater than the set flow control threshold XOFF, the terminal service rate is reduced.
[0067] When the Ethernet frame is dequeued, select the sending subqueue to check whether the corresponding timer allows sending. If so, start sending the Ethernet frame. If not, select the next sending subqueue. After completing the Ethernet frame sending, check whether the length of all sending subqueues is less than the set flow control recovery threshold XON. If so, restore the terminal service rate.
[0068] Beneficial effects:
[0069] 1. For the first time, a design method for a lossless Ethernet simulation model is proposed. This method can effectively simulate the work of terminals, switches, and network systems, and statistically analyze the delay and backlog under the configuration, filling the gap in this research.
[0070] 2. By loading different configuration parameters, the flexibility and diversity of the model are increased, and the performance of lossless Ethernet networks under different configuration tables can be analyzed.
[0071] 3. The model simulates the flow control strategy to obtain the relationship between the triggering of each flow control strategy and network performance, and demonstrates its impact on network performance.
[0072] 4. This simulation model can effectively reduce the cost of hardware simulation and plays a vital role in the design and verification of current network configuration results and network products. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a lossless Ethernet simulation model, that is, the overall structure diagram of the simulation analysis system.
[0074] Figure 2 This is the terminal simulation model structure diagram.
[0075] Figure 3 Generates a sample graph for the PAUSE frame.
[0076] Figure 4 Example diagram for PFC function PAUSE frame generation.
[0077] Figure 5 The figure is a flow chart of the PFC processing in the data receiving direction of the switching model.
[0078] Figure 6 The figure is a flow chart of PFC processing for the data direction of the exchange model.
[0079] Figure 7 Schematic diagram of the switch node model.
[0080] Figure 8 The following is the flow chart of switch packet processing. DETAILED DESCRIPTION
[0081] The high-speed network simulation analysis system provides switch simulation model, terminal simulation model and network system simulation model functions. The switch simulation model includes switch modeling, lossless Ethernet flow control, fault injection function, configuration loading function, simulation result statistics and other functions; the terminal simulation model includes terminal system modeling function, RDMA modeling function, flow control function, configuration loading function, simulation result statistics and other functions. The network system simulation model includes simulation information import, simulation model input configuration generation, VLAN management, network topology generation, network management, fault injection, simulation report management and simulation result analysis and other functions.
[0082] The overall structure diagram of the high-speed network simulation analysis system is as follows: Figure 1 shown.
[0083] The terminal emulation model mainly supports the following functions:
[0084] 1) Support high-speed network terminal emulation, including terminal topology model, configuration node model, data frame model, traffic scheduling model and integrity check / redundancy management model.
[0085] 2) The terminal model implements RDMA technology based on the RoCEv2 standard, including ECN (congestion notification) and PFC (priority-based flow control, etc.).
[0086] 3) The terminal Ethernet models supported include UDP, IP, MAC and physical ports.
[0087] 4) Support terminal models to implement message generation, scheduling and sending based on SDN-generated configurations.
[0088] The switch simulation model mainly supports the following functions:
[0089] 1) Support high-speed network switch simulation, including data receiving and processing model, data receiving scheduling model, data aggregation and detection model, data replication and distribution model, data sending scheduling model and data sending processing model.
[0090] 2) The switch model implements RDMA technology based on the RoCEv2 standard, including ECN (congestion notification), PFC (priority-based flow control, etc.).
[0091] 3) Support switch models to implement data scheduling and forwarding based on SDN-generated configurations.
[0092] The network system simulation model mainly supports the following functions:
[0093] 1) Support high-speed network link simulation, including 1Gb / s, 10Gb / s, 25Gb / s, 40Gb / s, and 100Gb / s link models.
[0094] 2) Supports the construction of network simulation topology to realize data sending and receiving between terminals and switches.
[0095] 3) Support the simulation model for SDN resource planning, allocation and configuration loading.
[0096] 4) Support the implementation of simulation model statistics on delay, backlog, congestion and other results.
[0097] (1) Terminal emulation model
[0098] Modules related to the terminal processing process include port binding control model, switching model, RDMA model, Ethernet protocol model, APP application model, etc. The terminal simulation model structure is as follows: Figure 2 As shown:
[0099] 1) Port binding control model: controls two standard Ethernet interfaces and supports binding modes such as master-backup strategy and balance strategy.
[0100] 2) Switching model: supports Layer 2 switching and flow control, and performs operations such as data forwarding and replication based on the entire packet.
[0101] The priority queue management module prioritizes and schedules data packets. The queue priority supports configuration. Each round of arbitration is composed of a combination of custom priority and polling priority. Flow control supports PAUSE
[0102] Flow control and PFC flow control, while supporting congestion management of data streams generated by multiple applications.
[0103] 3) RDMA model, implements RDMA RoCEv2 protocol transmission and reception, and supports unicast and multicast.
[0104] 4) Ethernet protocol model: the model supports standard TCP / IP, UDP protocol implementation and ECN congestion notification function, and supports unicast, multicast and broadcast.
[0105] 5) APP application model, generates messages according to the content of the configuration file, and supports multiple applications to generate data in parallel.
[0106] The terminal model includes APP application model, Ethernet protocol model, RDMA model, switch model and port binding control model.
[0107] a) APP application model
[0108] The model obtains the terminal ID number of the terminal node, and uses the terminal ID to find the ID number of the message frame sent by the terminal, the length and period of the message frame, the sending application, and the configuration information of the receiving terminal. It generates the sending time according to the Poisson distribution, generates and sends the message frame. The message ID number, sending time, and receiving terminal information are stored in the message frame. The maximum length of the message frame supported by the application layer model is 2096 bytes.
[0109] b) Ethernet protocol model
[0110] The model supports standard TCP / IP, UDP protocol implementation and ECN congestion notification function, and supports unicast, multicast and broadcast.
[0111] In the Ethernet protocol, congestion information is carried in the TCP and IP headers to inform the sender of the network congestion status so that corresponding congestion control measures can be taken. RFC 3168 defines the ECN congestion signaling mechanism, which uses two bits in the TCP header (CWR congestion window reduction flag, ECE congestion response) and two bits in the TOS field in the IP header (ECT, CE) to mark data packets.
[0112] After detecting network congestion, the switch model has turned on the CE bit (0x03) in the IP header of the data frame. After receiving the service data packet, the receiving terminal model parses the IP protocol header in the Ethernet protocol model, sets the corresponding ICI flag according to the ECN bit and processes the message. After congestion is found, the congestion mapping table is updated. The congestion flags of multiple data packets of the same connection only need to be recorded once. Then, CNP data packets are created every 1ms according to the congestion mapping table, and the ECN of the message is set to 01, and sent to the sender of the current service data. CNP messages are encapsulated in UDP, and network devices process CNP messages in the same way as ordinary IP messages.
[0113] The sending terminal model receives the CNP message and sends it to the Ethernet protocol model according to the normal forwarding process. The ECN processing module filters ECN 01, parses the parameter identifier in the TCP header, and limits the sending rate of the corresponding data flow.
[0114] c) Exchange model
[0115] The switching model of the terminal emulation model supports forwarding, flow control and copying of application data packets. It supports forwarding based on the destination MAC address, receives data packets from upper-layer applications, and forwards them to the corresponding port according to the destination MAC address.
[0116] The application supports 4 priorities, prio0 to prio3, among which prio0 is the highest priority and prio3 is the lowest priority. High-priority data streams can interrupt low-priority data streams. That is, when the application sends data packets, high-priority data packets are sent first. When the high-priority data packets are empty, low-priority data packets are sent.
[0117] The switching model of the terminal emulation model implements LFC (Link Flow Control) or link-level flow control and PFC (Priority-Based Flow Control) or priority-based flow control.
[0118] LFC is a port-based flow control technology. The PAUSE frame generation example is as follows: Figure 3 As shown. PFC is a priority-based flow control technology, and its PAUSE frame is generated according to the backlog of different priorities. The generation example is as follows Figure 4 shown.
[0119] When receiving the model data, set the PFC control logic. The control logic is as follows: Figure 5 As shown, the receiving process flow is as follows:
[0120] (1) After the Ethernet frame is received by the port, it is forwarded to the Switch process model, and the frame header information is parsed. If the MAC frame destination address is "0x180c2000001" and the type is "0x8808", it is a PFC PAUSE frame. The payload content is further parsed to obtain the back pressure enable vector and the back pressure timers corresponding to the 8 priority queues. If the corresponding bit of priority_enable_vector is 1, the time point at which the next frame is allowed to be sent is set according to the value of the time [priority] timer; if the bit of priority_enable_vector is 0, no processing is performed, indicating that the timer is invalid.
[0121] (2) If the frame header is parsed and it is determined that it is not a PFC PAUSE frame, then it is another data frame and is processed according to the normal forwarding logic.
[0122] (3) Payload enqueue processing: First, the priority is parsed and the payload data packet is placed in the receiving subqueue mapped to the priority. The subqueue length is determined. If it is greater than the set flow control threshold XOFF, the bit corresponding to the back pressure enable vector is set to 1 and the value of time[priority] is 0x7FFF, indicating that the transmission is paused for 32767 transmission time units (one transmission time unit is the time required for the physical link to transmit 512 bits). Then, the PFC frame sending function is called to put the current flow control information into the next PFC PAUSE frame to be sent.
[0123] (4) The physical transmission of the PFC frame is not performed every time the blocking state of a subqueue changes, but the blocking change states of multiple subqueues within the current time interval are sent out at a fixed frequency. First, the back pressure enable vector and back pressure timer are updated according to the passed parameters, and then it is determined whether the transmission interval has expired. If the interval time has expired, the current back pressure enable vector and back pressure timer status are encapsulated as a PFC PAUSE frame and sent to the output port.
[0124] (5) The payload is dequeued and forwarded to the upper layer. If the length of the receiving subqueue is less than the set flow control recovery threshold XON, the bit corresponding to the back pressure enable vector is set to 1, the value of time[priority] is set to 0, and then the PFC frame sending function is called to put the current flow control information into the next PFC PAUSE frame to be sent.
[0125] When the model data is sent, the PFC control logic is set. The control logic is as follows Figure 6 As shown, the sending process is as follows:
[0126] (1) The Switch process model receives the upper-layer data packet and prepares to put it into the sending subqueue based on the priority information.
[0127] (2) Ethernet frame enqueue processing: First, the priority is parsed and the Ethernet frame is placed in the sending subqueue to which the priority is mapped. The subqueue length is determined. If it is greater than the set flow control threshold XOFF, the terminal service rate is reduced.
[0128] (3) Ethernet frame dequeue processing, select the sending subqueue, check whether the corresponding timer allows sending, if yes, start sending the Ethernet frame, if not, select the next sending subqueue. After completing the Ethernet frame sending, check whether the length of all sending subqueues is less than the set flow control recovery threshold XON, if yes, restore the terminal service rate.
[0129] d) Port Binding Control Model
[0130] The terminal port binding control model supports multiple binding modes:
[0131] 1) Bond 0 (balance-rr) mode, balanced polling strategy. The order of data packets is transmitted in sequence (ie: the first packet goes through eth0, the next packet goes through eth1... cycle until the transmission is completed). This mode provides load balancing and fault tolerance.
[0132] 2) Bond 1 (active-backup) mode, master-backup strategy. Only one device is active, and when one fails, the other immediately switches from backup to master. The MAC address is visible from the outside, and from the outside, the bond's MAC address is unique to avoid confusion on the switch. This mode only provides fault tolerance.
[0133] 3) Bond 2 (balance-xor) mode, balance strategy. Indicates XOR Hash load sharing, and the aggregation forced non-negotiation mode of the switch is coordinated. Data packets are transmitted based on the specified transmission HASH strategy. The default strategy is: (source MAC address XOR destination MAC address) % slave number. This mode provides load balancing and fault tolerance.
[0134] 4) Bond 3 (broadcast) mode, broadcast strategy. Indicates that all packets are sent from all network interfaces, load is unbalanced, and only redundancy mechanism is used. It needs to be coordinated with the aggregation forced non-negotiation mode of the switch. This mode provides fault tolerance.
[0135] (2) Switch Simulation Model
[0136] The functional structure of the switch simulation model is as follows Figure 7 The data packet processing process in the model is as follows Figure 8 As shown, the specific steps are as follows:
[0137] 1) Receive data packets. The packet is input through the switch port. First, obtain the complete data packet, parse the packet header information, create an ICI object, bind the packet, and prepare for further processing of the packet based on this information. The parsed fields include MACSA, MACDA, protocol type, VLAN ID, etc.
[0138] 2) MAC frame type identification: Different types of data frames are distinguished according to the frame type byte. For example, a type byte of 0x8808 indicates a PAUSE frame, and 0x0800 indicates an IPv4 protocol frame.
[0139] 3) Check the MAC address to see if the destination address is the virtual address of this node, and determine whether the packet is received and forwarded upward. The following situations can be received:
[0140] a) The target address is my address / my link aggregation group address;
[0141] b) The target address is the virtual address of this node;
[0142] c) Packets in promiscuous mode and not sent by the local device;
[0143] d) Broadcast / multicast packets not sent by the local host.
[0144] Since the destination address of the PAUSE frame is fixed at "0x180c2000001", it is forwarded directly without judgment.
[0145] 4) VLAN parsing: parse the VLAN identification byte. If the port is configured with VLAN, the VLAN entry rules are applied for filtering.
[0146] 5) QoS priority analysis: If the switch is configured with QoS, different methods are used to obtain the priority of the packet according to the different sources of the packet, in preparation for the subsequent priority-based processing. The priority information is mainly analyzed from the TOS field of the IP protocol header. IP Precedence is the first 3 bits of the TOS field, indicating priority levels 0 to 7. DSCP is the first 6 bits of the TOS field, indicating priority levels 0 to 63.
[0147] After the above steps, the packet is inserted into the tail of the buffer queue, and subsequent nodes take packets from the queue one by one to continue processing.
[0148] 6) PFC, according to the MAC frame type, first determine whether it is a PFC (Priority Flow Control) PAUSE frame. If so, parse the information corresponding to the 8 priorities in the frame and stop sending data in the corresponding priority queue according to the back pressure enable vector and the back pressure timer.
[0149] 7) VLAN verification, check the VLAN ID, and apply IEEE 802.1Q sec8.6 entry rules to verify and filter the VLAN.
[0150] 8) MAC table entry learning, use the source MAC address to check the address mapping table, if it does not exist, add the address table entry, if it exists, update the port information and aging time.
[0151] 9) Destination port query, use the destination MAC address to check the address mapping table, if it exists, forward it to the corresponding port, if not, forward it to all ports except this port. Before forwarding, apply IEEE 802.1Qsec8.8 egress rules to check and filter the VLAN. Here, if the target port type is not a regular forwarding port, the data packet is sent up and the three-layer routing logic is followed.
[0152] 10) Send the data packet upward: send the data packet of the lower layer of the protocol stack to the IP layer and parse the IP protocol header, including IP address, protocol type, TOS, etc.
[0153] 11) ECN. If the ECN function is enabled, when the data packet is a RoCEv2 data packet, the ECN field is checked and the CE value is added to the ECN field according to the current network congestion of the switch. The receiver will generate a CNP to notify the sender of the network congestion event. The CNP is an ordinary IP data packet for the switch. After the sender receives the event notification indicated by the CNP, it controls the sending rate according to the algorithm.
[0154] 12) IP packet verification: verify whether the packet is a legal IP data packet.
[0155] 13) IP routing, determine the IP destination address type, including unicast, multicast, global broadcast, etc., and process them separately. IP unicast performs routing table query, obtains the most matching record, determines the next hop forwarding port, and checks the TTL of the packet.
[0156] 14) ACL control: after determining the forwarding output port, check the output port status. If ACL is enabled, apply the ACL configuration to perform packet filtering.
[0157] 15) The forwarding packet header is modified to determine the type of the destination IP address. If it is a broadcast address, broadcast mode is used. If it is a unicast address, an ARP table query is performed to query the MAC address corresponding to the destination IP address and forward the packet to the lower layer.
[0158] 16) Forward data packets, identify the source address and destination address, and forward the data packets to the corresponding output port; check the MAC protocol type between the source and destination ports to determine whether segmentation or decapsulation is required (for example, packets need to be segmented when transmitted between Ethernet and WLAN, FDDI, or Token Ring); if QoS is set, the message will be sent to an output queue of the port, and messages sent to different output queues of the port will receive transmission service strategies of different levels and natures.
Claims
1. A lossless Ethernet simulation model, characterized in that: include: Switch simulation model, terminal simulation model and network system simulation model; The switch simulation model has switch modeling, lossless Ethernet flow control, fault injection, configuration loading, and simulation result statistics functions; The terminal simulation model has terminal system modeling function, RDMA modeling function, flow control function, configuration loading function, and simulation result statistics function; The network system simulation model has the functions of simulation information import, simulation model input configuration generation, VLAN management, network topology generation, network management, fault injection, simulation report management and simulation result analysis.
2. A lossless Ethernet simulation model according to claim 1, characterized in that: Functions supported by terminal emulation model: 1) Support high-speed network terminal emulation; 2) The terminal model implements RDMA technology based on the RoCEv2 standard, including ECN and PFC; 3) The terminal Ethernet models supported include UDP, IP, MAC and physical ports; 4) Support terminal models to implement message generation, scheduling and sending based on SDN-generated configurations; Functions supported by the switch simulation model: 1) Support high-speed network switch simulation; 2) The switch model implements RDMA technology based on the RoCEv2 standard, including ECN and PFC; 3) Support switch models to implement data scheduling and forwarding based on SDN-generated configurations; Functions supported by the network system simulation model: 1) Support high-speed network link simulation; 2) Support the construction of network simulation topology to realize data transmission and reception between terminals and switches; 3) Support the simulation model for SDN resource planning, allocation and configuration loading; 4) Support the implementation of simulation model statistics on delay, backlog, and congestion results.
3. A lossless Ethernet simulation model according to claim 2, characterized in that: The terminal simulation model includes: port binding control model, switching model, RDMA model, Ethernet protocol model, and APP application model; The port binding control model is used to control two standard Ethernet interfaces and supports the master-backup strategy and the balanced strategy binding mode; The switching model is used to support Layer 2 switching and flow control. Data is forwarded and copied based on the entire packet. Data packets are prioritized and scheduled. The queue priority supports configuration. Each round of arbitration is composed of a combination of custom priority and polling priority. Flow control supports PAUSE flow control and PFC flow control, and also supports congestion management of data streams generated by multiple applications. The RDMA model implements RDMA RoCEv2 protocol transmission and reception, supporting unicast and multicast; The Ethernet protocol model supports standard TCP / IP, UDP protocol implementation and ECN congestion notification function, and supports unicast, multicast and broadcast; The APP application model is used to generate messages according to the contents of the configuration file and supports multiple applications to generate data in parallel.
4. A lossless Ethernet simulation model according to claim 3, characterized in that: The switching model supports forwarding, flow control and copying of application data packets; supports forwarding based on the destination MAC address, receives data packets from the upper-layer application, and forwards them to the corresponding port according to the destination MAC address; when the application sends data packets, high-priority data packets are sent first, and when the high-priority data packets are empty, low-priority data packets are sent; the switching model implements link-level flow control LFC and priority-based flow control PFC.
5. A lossless Ethernet simulation model according to claim 4, characterized in that: The terminal port binding control model supports multiple binding modes: 1) Bond 0 mode: balanced polling strategy, which provides load balancing and fault tolerance; 2) Bond 1 mode: primary-backup strategy, this mode only provides fault tolerance; 3) Bond 2 mode: balancing strategy, this mode provides load balancing and fault tolerance; 4) Bond 3 mode: Broadcast strategy, this mode provides fault tolerance.
6. A data processing method, characterized in that: Applied to the lossless Ethernet simulation model according to any one of claims 1 to 5, the method comprises: 1) The switch simulation model receives data packets: The packet is input through the switch port. First, the complete data packet is obtained, the packet header information is parsed, the ICI object is created, and the packet is bound to prepare for the subsequent processing of the packet based on this information; the parsed fields include MACSA, MACDA, protocol type, and VLAN ID; 2) MAC frame type identification: Differentiate different types of data frames based on the frame type byte; 3) Check the MAC address to see if the destination address is the virtual address of this node, and determine whether the packet is received and forwarded upward. The following situations can be received: a) The target address is my address / my link aggregation group address; b) The target address is the virtual address of this node; c) Packets in promiscuous mode and not sent by the local device; d) Broadcast / multicast packets not sent by the local device; 4) VLAN parsing: Parse the VLAN identification bytes. If the port is configured with VLAN, the VLAN entry rules are applied for filtering later; 5) QoS priority analysis: If the switch is configured with QoS, different methods are used to obtain the priority of the packet according to the different sources of the packet, in preparation for the subsequent priority-based processing; priority information analysis, where the TOS field of the IP protocol header, IP Precedence is the first 3 bits of the TOS field, indicating 0 to 7 levels of priority; DSCP is the first 6 bits of the TOS field, indicating 0 to 63 levels of priority; After the above steps, the packet is inserted into the end of the buffer queue, and the subsequent nodes take packets from the queue one by one to continue processing; 6) PFC: According to the MAC frame type, first determine whether it is a PFC PAUSE frame. If it is, parse the information corresponding to the 8 priorities in the frame and stop sending data in the corresponding priority queue according to the back pressure enable vector and the back pressure timer; 7) VLAN verification: Check the VLAN ID and verify and filter the VLAN; 8) MAC table entry learning: Use the source MAC address to check the address mapping table. If it does not exist, add the address table entry. If it does exist, update the port information and aging time. 9) Destination port query: Use the destination MAC address to check the address mapping table. If it exists, it will be forwarded to the corresponding port. If it does not exist, it will be forwarded to all ports except this port. 10) Data packet upload: Send the data packet of the lower layer of the protocol stack to the IP layer and parse the IP protocol header, including IP address, protocol type, and TOS; 11) ECN: If the ECN function is enabled, when the data packet is a RoCEv2 data packet, the ECN field is checked and the CE value is marked according to the current network congestion of the switch, so that the receiver can generate CNP to notify the sender of the network congestion event. CNP is an ordinary IP data packet for the switch. After receiving the event notification indicated by CNP, the sender controls the sending rate according to the algorithm. 12) IP packet verification: Verify whether the packet is a legal IP data packet; 13) IP routing: Determine the IP destination address type, including unicast, multicast, global broadcast, etc., and process them separately; IP unicast performs routing table query to obtain the most matching record, determine the next hop forwarding port, and check the TTL of the packet; 14) ACL control: After determining the forwarding output port, check the output port status. If ACL is enabled, apply the ACL configuration to perform packet filtering; 15) Forwarding packet header modification: Determine the type of the destination IP address. If it is a broadcast address, broadcast it. If it is a unicast address, perform an ARP table query to query the MAC address corresponding to the destination IP address and forward the packet to the lower layer. 16) Forwarding data packets: clarify the source address and destination address, and forward the data packets to the corresponding output port; check the MAC protocol type between the source and destination ports to determine whether segmentation or decapsulation is required; if QoS is set, the message will be sent to an output queue of the port, and messages sent to different output queues of the port will receive transmission service strategies of different levels and natures.
7. The method according to claim 6, characterized in that The switching model receives and sets the PFC control logic. The corresponding process includes: After the Ethernet frame is received by the port, it is forwarded to the Switch process model, and the frame header information is parsed. If the destination address of the MAC frame is the destination address and the type is IPv4, it is a PFC PAUSE frame. The payload content is further parsed to obtain the back pressure enable vector and the back pressure timers corresponding to the 8 priority queues; if the corresponding bit of priority_enable_vector is 1, the time point at which the next frame is allowed to be sent is set according to the value of the time [priority] timer; if the bit of priority_enable_vector is 0, no processing is performed, indicating that the timer is invalid; If the frame header is parsed and it is determined that it is not a PFC PAUSE frame, then it is another data frame and is processed according to the normal forwarding logic; When the payload is enqueued, the priority is first parsed, and the payload data packet is placed in the receiving subqueue mapped to the priority. The subqueue length is determined. If it is greater than the set flow control threshold XOFF, the bit corresponding to the back pressure enable vector is set to 1, and the value of time[priority] is 0x7FFF, indicating that the transmission is paused for 32767 transmission time units. Then, the PFC frame sending function is called to put the current flow control information into the next PFC PAUSE frame to be sent. The physical transmission of the PFC frame is not performed every time the blocking state of a subqueue changes, but the blocking change states of multiple subqueues within the current time interval are sent out at a fixed frequency; When the payload is dequeued and forwarded to the upper layer, if the length of the receiving subqueue is less than the set flow control recovery threshold XON, the bit corresponding to the back pressure enable vector is set to 1, the value of time[priority] is 0, and then the PFC frame sending function is called to put the current flow control information into the next PFC PAUSE frame to be sent.
8. The method according to claim 7, characterized in that The switching model sends the PFC control logic, and the corresponding process includes: The Switch process model receives the upper layer data packet and prepares to put it into the sending subqueue according to the priority information; When an Ethernet frame is queued, the priority is first parsed and the Ethernet frame is placed in the sending subqueue to which the priority is mapped. The subqueue length is determined. If it is greater than the set flow control threshold XOFF, the terminal service rate is reduced. When the Ethernet frame is dequeued, select the sending subqueue to check whether the corresponding timer allows sending. If so, start sending the Ethernet frame. If not, select the next sending subqueue. After completing the Ethernet frame sending, check whether the length of all sending subqueues is less than the set flow control recovery threshold XON. If so, restore the terminal service rate.
Citation Information
Cited By
Fault injection method, device and equipment
CN120639582A
High-performance lossless transmission network for distributed molecular dynamics simulation calculation
CN120750775A
High performance lossless transport network for distributed molecular dynamics simulation computation
CN120750775B
A lossless ethernet emulation method and system based on DPU
CN122933501A