A method for error-free transmission based on Ethernet link

By adopting five message encapsulation types and retransmission mechanisms in Ethernet link transmission, the problem of frame discarding in traditional methods is solved, high-speed lossless data transmission between chips is achieved, and the correctness and smoothness of the link are ensured. Suitable for high-speed error-free data transmission within the local area network.

CN118214522BActive Publication Date: 2024-10-01苏州特思恩科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410406351.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-07
Publication Date
2024-10-01
Estimated Expiration
2044-04-07

AI Technical Summary

Technical Problem

In traditional LAN transmission, the switch chip interface checks the CRC check code at the end of the frame when receiving the data frame. If the check fails, the frame will be discarded, which cannot meet the requirements of Ethernet links between chips in the artificial intelligence era. Transmission requirements, especially the requirement not to drop any data frames.

Method used

Design an error-free transmission method based on Ethernet links. By defining five message encapsulation types, including write request, read request, write response, read response and control message, using the retransmission buffer module and forward feedback system, Ensure the correctness and smoothness of data transmission, including identifying message errors at the receiving end and retransmitting them, and using Layer 2 frame encapsulation and timer matching to control the message sending frequency.

Benefits of technology

It achieves high-speed, lossless data transmission between chips, ensures the correctness and smoothness of the link, simplifies the implementation process, and can be expanded to a variety of communication scenarios, suitable for high-speed error-free data transmission within the local area network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118214522B_ABST
    Figure CN118214522B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of communication technology, and specifically to an error-free transmission method based on an Ethernet link, including defining five types of message encapsulation, sending corresponding messages to the opposite end according to the needs of the upper-layer application, and the opposite end identifying the message after receiving it and sending a response to the local end. During this process, all messages sent must enter the retransmission buffer module for backup. Compared with the traditional method, this solution operates based on the transaction-level transmission of read requests, write requests, read responses and write responses within the Ethernet link, and sets a rigorous error correction and retransmission mechanism to ensure the correctness and smoothness of data within the link. The solution is easy to implement and can be easily expanded to a variety of similar communication scenarios based on this method. High-speed, error-free data transmission within the local area network can be carried out between communication nodes through multiple switches.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to an error-free transmission method based on an Ethernet link. Background Art

[0002] In the interface design of all switching chips, data is generally encapsulated in the MAC layer, and then a 4-byte CRC check code is added to the end of the frame, and finally sent to the transmission link through the physical layer.

[0003] The patent document with patent publication number: CN114124833A discloses a method, network device and system for controlling message sending, including a receiving device of a link state notification message obtaining a first number of link state notification messages sent by a sending device to the receiving device within a first time period; and obtaining the number of link state notification messages received by the receiving device from the sending device in a second time period, and then adjusting the link state notification message receiving window value of the receiving device according to the first number and the second number, and sending the adjusted link state notification message receiving window value to the sending device, so that the sending device controls the rate of sending link state notification messages to the receiving device according to the adjusted link state notification message receiving window value.

[0004] The above scheme improves the waste of network resources caused by message retransmission. In traditional LAN transmission, the switching chip interface will check the CRC check code at the end of the frame when receiving the data frame. If the check fails, it means that the frame has an error during transmission, and it will be discarded. This is allowed in traditional network transmission, but in the era of the rise of artificial intelligence, there is a demand for Ethernet link transmission between chips. In addition to fast speed, there is a requirement that no data frame transmitted between chips can be discarded. At this time, the behavior of discarding data in the CRC check is obviously not advisable. Summary of the invention

[0005] In order to overcome the above technical problems, the purpose of the present invention is to provide an error-free transmission method based on an Ethernet link, which meets the current demand for point-to-point lossless transmission between chips based on an Ethernet link.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] An error-free transmission method based on an Ethernet link is used to transmit data between chips at opposite ends, wherein the chips at opposite ends are defined as chip A and chip B, respectively, and comprises the following steps:

[0008] S1. First, define five message encapsulation types;

[0009] ①Write request;

[0010] ②Read request;

[0011] ③Write response;

[0012] ④Read response;

[0013] ⑤Control message when there is no request or response;

[0014] S2. Chip A receives the request sent by the upper-layer application, and encapsulates it into a corresponding request message according to the request type to be sent, and then stores the request message to be sent in the sending request buffer of chip A to wait for scheduling. The requested message is sent to the retransmission buffer module of chip A for backup. The request message coming out of the retransmission buffer module is sent to the receiving end of chip B through the sending end of chip A;

[0015] S3. After receiving the request message sent by chip A, the receiving end of chip B stores the received request message in the receiving request buffer of chip B and waits for scheduling. The receiving request buffer identifies the type and correctness of the request message.

[0016] S4. When the request message in the receiving request buffer in chip B is correct, the correct request message is retrieved from the receiving request buffer and sent to the upper-layer application. After the upper-layer application processes the request, it sends a response to chip B. Chip B encapsulates the response into a response message of the corresponding type according to the response type to be sent.

[0017] When the request message received in the request buffer of chip B is wrong, chip B makes a corresponding retransmission response message;

[0018] S5. The response message to be sent is stored in the sending response buffer of chip B and waits for scheduling. The scheduled response message enters the retransmission buffer module of chip B for backup. The response message coming out of the retransmission buffer module is sent to the receiving end of chip A through the sending end of chip B.

[0019] S6. After receiving the response message, the receiving end of chip A stores the received response message in the receiving response buffer of chip A and waits for scheduling. The receiving response buffer identifies the type of the response message.

[0020] S7. When the response message in the response buffer received in chip A is a retransmission response message, chip A calls out the request message corresponding to the retransmission response message from the retransmission buffer module, and resends the request message to the receiving end of chip B through the sending end of chip A until the request message in the request buffer received in chip B is correct.

[0021] When the response message in the receiving response cache of chip A is not a retransmitted response message, the corresponding response message is retrieved from the receiving response cache and sent to the upper-layer application. The upper-layer application receives the response. At this time, a complete data transmission is completed between chip A and chip B.

[0022] Furthermore, when there is no request and response interaction between chip A and chip B, control messages for detecting the state of the data transmission link are periodically sent between the two to ensure that the link is unobstructed.

[0023] Furthermore, the sending frequency of the control messages between chip A and chip B is time-matched by a timer.

[0024] Furthermore, the request message sent by chip A is a write request message or a read request message, and according to different types of the received request messages, chip B correspondingly sends a write response message or a read response message.

[0025] Furthermore, the order of sending requests and responses between chip A and chip B is not unique. The order here is determined according to the requirements of the upper-layer application with which the two communicate.

[0026] Furthermore, whether it is a request or a response, it will be encapsulated in a layer 2 frame before being sent through the sending end of chip A or chip B.

[0027] Furthermore, when encountering the following three situations, it can be determined that the message received by the receiving end of chip A or chip B is wrong and needs to be retransmitted;

[0028] ① In the message format, the crc checksum field in the ctr l field is wrong;

[0029] ② In the message format, the trc field in the ctr l field is not the expected value;

[0030] ③The Layer 2 frame encapsulation format of the message is incorrect.

[0031] Furthermore, the retransmission mechanism in the data transmission link between chip A and chip B includes the following steps:

[0032] ① When chip A sends a request message to chip B, the request message received by the receiving end of chip B is wrong, and this situation is notified to the control unit of chip B, and chip B makes a retransmission response message;

[0033] ② The control unit of chip B configures the ctr l field of the retransmission response message and sets the reTran field in the ctr l field. Then the retransmission response message enters the retransmission buffer module of chip B for backup. At this time, the trc field in the ctr l field of the retransmission response message is increased by 1. After coming out of the retransmission buffer module of chip B, the control unit performs layer 2 frame encapsulation on the retransmission response message and sends it to chip A through the transmitter of chip B.

[0034] ③ After receiving the retransmission response message, the receiving end of chip A informs the control unit of chip A. Chip A calls out the request message corresponding to the retransmission response message from the retransmission buffer module. At this time, the rwc field in the ctr l field of the request message is increased by 1, and the sending end of chip A is informed of this situation;

[0035] ④ The control unit of chip A encapsulates the request message that needs to be retransmitted into a layer 2 frame and resends the request message to chip B.

[0036] Furthermore, a positive feedback system is formed on the data link formed between chip A and chip B, and the clockwise direction of the positive feedback system is a time vector;

[0037] When chip A and chip B are making requests and responses normally, the rwc pointer in the system acts as a read pointer, chasing the trc pointer as a write pointer on the time vector, and the read pointer is always chasing the write pointer and will never catch up.

[0038] When data retransmission is required between chip A and chip B, the write pointer needs to be returned to the read pointer that needs to be retransmitted, and the data at the read pointer is rewritten and sent to the other end.

[0039] Furthermore, by performing addition and subtraction operations on the number of messages entering and exiting the retransmission buffer modules in chip A and chip B, flow control can be performed on the data flowing on the data link formed between chip A and chip B.

[0040] Beneficial effects of the present invention:

[0041] Compared with traditional methods, this solution operates based on transaction-level transmission of read requests, write requests, read responses and write responses within the Ethernet link, and sets up a rigorous error correction and retransmission mechanism to ensure the correctness and smoothness of data within the link. This solution is easy to implement and can be easily expanded to a variety of similar communication scenarios based on this method. High-speed, error-free data transmission within the local area network can be carried out between communication nodes through multiple switches. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The present invention will be further described below in conjunction with the accompanying drawings.

[0043] Figure 1 It is the message format of the write request in the present invention;

[0044] Figure 2 It is the message format of the read request in the present invention;

[0045] Figure 3 It is the message format of writing response in the present invention;

[0046] Figure 4 It is the message format of the read response in the present invention;

[0047] Figure 5 It is the control message format when there is no request response in the present invention;

[0048] Figure 6 It is the ctr l field domain in the message format of the present invention;

[0049] Figure 7 It is the layer 2 frame encapsulation format in the present invention;

[0050] Figure 8 It is a positive feedback system used for the retransmission mechanism in the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] like Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 As shown, an error-free transmission method based on an Ethernet link is used to transmit data between chips at opposite ends. The chips at opposite ends are defined as chip A and chip B respectively, so as to facilitate understanding. The transmission method includes the following steps:

[0053] S1, such as Figure 1 , Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown, five message encapsulation types are first defined;

[0054] ①Write request;

[0055] ②Read request;

[0056] ③Write response;

[0057] ④Read response;

[0058] ⑤Control message when there is no request or response.

[0059] In this solution, when there is no request and response interaction between chip A and chip B, the two periodically send control messages for detecting the status of the data transmission link to ensure that the link is unobstructed, and the frequency of sending control messages between the two is time-matched through a timer.

[0060] In all five types of messages, there is a ctr l field to facilitate marking the corresponding message when retransmitting data.

[0061] like Figure 6 As shown, the analysis of the ctr l field domain is as follows:

[0062]

[0063] S2. When data is transmitted between chip A and chip B, take chip A sending data to chip B as an example;

[0064] When the system is powered on and the reset signal is released, both parties send control messages when there is no transmission service request. The message format is as follows: Figure 5 As shown;

[0065] The control message can ensure the stability and reliability of the link status. The linkST field in the control message ctr l field is used to inform the link status of the receiving end of chip A and chip B. When the link status is link down, the linkST in the control message sent by the transmitter of chip A is cleared to 0. After chip B parses this indication bit, it stops sending service flows and continues to send idle frames.

[0066] When the link state is linked up, the upper layer application will send different application requests, that is, chip A has a write request message and a read request message; at the same time, chip B sends a write response message or a read response message according to the type of request message received, as shown below:

[0067] Chip A receives the request sent by the upper-layer application, and encapsulates it into a corresponding request message according to the request type to be sent, and then stores the request message to be sent in the sending request cache of chip A waiting for scheduling. The scheduled request message enters the retransmission buffer module of chip A for backup. After coming out of the retransmission buffer module, the request message is sent to the receiving end of chip B through the sending end of chip A.

[0068] S3. After the receiving end of chip B receives the request message sent by chip A, it stores the received request message in the receiving request cache of chip B and waits for scheduling. The receiving request cache identifies the type and correctness of the request message.

[0069] S4. When the request message in the request cache received in chip B is correct, the correct request message is retrieved from the request cache and sent to the upper-layer application. After the upper-layer application processes the request, it sends a response to chip B. Chip B encapsulates it into a response message of the corresponding type according to the response type to be sent. When the request message in the request cache received in chip B is incorrect, chip B makes a corresponding retransmission response message.

[0070] like Figure 7 As shown, in this solution, whether it is a request or a response, before being sent through the sending end of chip A or chip B, a layer 2 frame will be encapsulated. The encapsulation of the layer 2 frame means that before sending a request or a response, the data is packaged into the format of a layer 2 frame so that it can be transmitted in the network. The layer 2 frame usually contains the MAC address of the target device, the MAC address of the source device, and the content of the data. After being encapsulated into a layer 2 frame, it can be transmitted in the network, and the content of the data and the address of the target device can be parsed at the receiving end to correctly transmit and process the data.

[0071] When encountering the following three situations, it can be determined that the message received by the receiving end of chip A or chip B is wrong and needs to be retransmitted;

[0072] ① In the message format, the crc checksum field in the ctr l field is wrong;

[0073] ② In the message format, the trc field in the ctr l field is not the expected value;

[0074] The expected value here can be understood as being different from the expected data. For example, when the message is correct, the trc value is always an increasing sequence, such as 1-2-3-4-5-6-7-8. However, when the message is erroneous due to electromagnetic interference or other abnormal conditions in the link, the trc value may be disconnected, such as 1-2-3-5-6-7-8. At this time, after the receiving end receives the message, it can determine that the message is erroneous by reading the trc value and needs to be retransmitted.

[0075] ③The Layer 2 frame encapsulation format of the message is incorrect.

[0076] S5. The response message to be sent in the above step S4 is stored in the sending response cache of chip B and waits for scheduling. The scheduled response message enters the retransmission buffer module of chip B for backup. The response message coming out of the retransmission buffer module is sent to the receiving end of chip A through the sending end of chip B.

[0077] S6. After receiving the response message, the receiving end of chip A stores the received response message in the receiving response buffer of chip A and waits for scheduling. The receiving response buffer identifies the type of the response message.

[0078] S7. When the response message in the response buffer received in chip A is a retransmission response message, chip A calls out the request message corresponding to the retransmission response message from the retransmission buffer module, and resends the request message to the receiving end of chip B through the sending end of chip A until the request message in the request buffer received in chip B is correct.

[0079] When the response message in the receiving response cache of chip A is not a retransmitted response message, the corresponding response message is retrieved from the receiving response cache and sent to the upper-layer application. The upper-layer application receives the response. At this time, a complete data transmission is completed between chip A and chip B.

[0080] The retransmission mechanism in the data transmission link between chip A and chip B in the above steps S4-S7 is specifically explained:

[0081] ① When chip A sends a request message to chip B, the request message received by the receiving end of chip B is wrong, and this situation is notified to the control unit of chip B, and chip B makes a retransmission response message;

[0082] ② The control unit of chip B configures the ctr l field of the retransmission response message and sets the reTran field in the ctr l field. Then the retransmission response message enters the retransmission buffer module of chip B for backup. At this time, the trc field in the ctr l field of the retransmission response message is increased by 1. After coming out of the retransmission buffer module of chip B, the control unit performs layer 2 frame encapsulation on the retransmission response message and sends it to chip A through the transmitter of chip B.

[0083] ③ After receiving the retransmission response message, the receiving end of chip A informs the control unit of chip A. Chip A calls out the request message corresponding to the retransmission response message from the retransmission buffer module. At this time, the rwc field in the ctr l field of the request message is increased by 1, and the sending end of chip A is informed of this situation;

[0084] ④ The control unit of chip A encapsulates the request message that needs to be retransmitted into a layer 2 frame and resends the request message to chip B.

[0085] In this scheme, the order of sending requests and responses between chip A and chip B is not unique. The order here is determined according to the requirements of the upper-level application with which the two communicate. That is, it is possible that chip B sends a request to chip A, or it is possible that chip A and chip B send requests at the same time. However, whether it is chip A or chip B, after receiving the request, it needs to send a response to the other end in a timely manner.

[0086] like Figure 8 As shown, in this solution, a positive feedback system is formed on the data link formed between chip A and chip B, and the clockwise direction of the positive feedback system is the time vector;

[0087] When chip A and chip B are making requests and responses normally, the rwc pointer in the system acts as a read pointer, chasing the trc pointer as a write pointer on the time vector, and the read pointer is always chasing the write pointer and will never catch up.

[0088] When data retransmission is required between chip A and chip B, the write pointer needs to be returned to the read pointer that needs to be retransmitted, and the data at the read pointer is rewritten and sent to the other end.

[0089] In this scheme, by adding and subtracting the number of messages entering and leaving the retransmission buffer modules in chip A and chip B, the data flowing on the data link formed between chip A and chip B can be flow controlled, which is convenient for controlling the frequency of upper-layer application sending requests and responses, and then waiting for the data in the link to be less or the data transmission is completed before sending new requests and responses.

[0090] Compared with traditional methods, this solution operates based on transaction-level transmission of read requests, write requests, read responses and write responses within the Ethernet link, and sets up a rigorous error correction and retransmission mechanism to ensure the correctness and smoothness of data within the link. This solution is easy to implement and can be easily expanded to a variety of similar communication scenarios based on this method. High-speed, error-free data transmission within the local area network can be carried out between communication nodes through multiple switches.

[0091] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0092] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.

Claims

1. An error-free transmission method based on an Ethernet link, used for transmitting data between chips at opposite ends, wherein the chips at opposite ends are defined as chip A and chip B, and characterized in that: The following steps are involved: S1. First, define five message encapsulation types; Write request; Read request; Write response; Read Response; Control message when there is no request or response; In the above five types of messages, there is a ctrl field, which is used to mark the corresponding message when retransmitting data, where: The reTran field is set to indicate that a retransmission event has occurred; The rwc field indicates the write count of valid messages in the buffer at the receiving end; The trc field indicates the sender request or response count; The crc checksum field indicates the checksum coverage of the ctrl field domain; S2. Chip A receives the request sent by the upper-layer application, and encapsulates it into a corresponding request message according to the request type to be sent, and then stores the request message to be sent in the sending request buffer of chip A to wait for scheduling. The scheduled request message enters the retransmission buffer module of chip A for backup. The request message coming out of the retransmission buffer module is sent to the receiving end of chip B through the sending end of chip A; S3. After receiving the request message sent by chip A, the receiving end of chip B stores the received request message in the receiving request buffer of chip B and waits for scheduling. The receiving request buffer identifies the type and correctness of the request message. S4. When the request message in the receiving request buffer in chip B is correct, the correct request message is retrieved from the receiving request buffer and sent to the upper layer application. After the upper layer application processes the request, it sends a response to chip B. Chip B encapsulates the response into a response message of the corresponding type according to the response type to be sent. When the request message in the request buffer received by chip B is wrong, chip B generates a corresponding retransmission response message; S5. The response message to be sent is stored in the sending response buffer of chip B and waits for scheduling. The scheduled response message enters the retransmission buffer module of chip B for backup. The response message coming out of the retransmission buffer module is sent to the receiving end of chip A through the sending end of chip B. S6. After receiving the response message, the receiving end of chip A stores the received response message in the receiving response buffer of chip A and waits for scheduling. The receiving response buffer identifies the type of the response message. S7. When the response message in the response buffer received in chip A is a retransmission response message, chip A calls out the request message corresponding to the retransmission response message from the retransmission buffer module, and resends the request message to the receiving end of chip B through the sending end of chip A until the request message in the request buffer received in chip B is correct. When the response message in the receiving response buffer in chip A is not a retransmitted response message, the corresponding response message is retrieved from the receiving response buffer and sent to the upper layer application, and the upper layer application receives the response. At this time, a complete data transmission is completed between chip A and chip B. Whether it is a request or a response, it will be encapsulated in a Layer 2 frame before being sent through the transmitter of chip A or chip B; When encountering the following three situations, it is determined that the message received by the receiving end of chip A or chip B is wrong and needs to be retransmitted: In the message format, the crc checksum field in the ctrl field is wrong; In the message format, the trc field in the ctrl field domain is not the expected value; The Layer 2 frame encapsulation format of the message is incorrect; The retransmission mechanism in the data transmission link between chip A and chip B includes the following steps: When chip A sends a request message to chip B, the request message received by the receiving end of chip B is wrong, and this situation is notified to the control unit of chip B, and chip B makes a retransmission response message; The control unit of chip B configures the ctrl field of the retransmission response message, sets the reTran field in the ctrl field, and then the retransmission response message enters the retransmission buffer module of chip B for backup. At this time, the trc field in the ctrl field of the retransmission response message is increased by 1. After coming out of the retransmission buffer module of chip B, the control unit performs a layer 2 frame encapsulation on the retransmission response message and sends it to chip A through the transmitter of chip B. After receiving the retransmission response message, the receiving end of chip A informs the control unit of chip A of this situation. Chip A calls out the request message corresponding to the retransmission response message from the retransmission buffer module. At this time, the rwc field in the ctrl field of the request message is increased by 1, and the sending end of chip A is informed of this situation. The control unit of chip A performs layer 2 frame encapsulation on the request message to be retransmitted, and resends the request message to chip B.

2. The error-free transmission method based on Ethernet link according to claim 1, characterized in that: When there is no request and response interaction between chip A and chip B, control messages for detecting the status of the data transmission link are periodically sent between the two to ensure that the link is unobstructed.

3. The error-free transmission method based on Ethernet link according to claim 1, characterized in that: The transmission frequency of the control message between chip A and chip B is time-matched by a timer.

4. The error-free transmission method based on Ethernet link according to claim 1, characterized in that: The request message sent by chip A is a write request message or a read request message, and according to different types of the received request messages, chip B sends a write response message or a read response message accordingly.

5. The error-free transmission method based on Ethernet link according to claim 1, characterized in that: The order of sending requests and responses between chip A and chip B is not unique. The order here is determined according to the requirements of the upper-layer application with which the two communicate.

6. The error-free transmission method based on Ethernet link according to claim 1, characterized in that: On the data link formed between chip A and chip B, a positive feedback system is formed, and the clockwise direction of the positive feedback system is the time vector; When chip A and chip B are making requests and responses normally, the rwc pointer in the system acts as a read pointer, chasing the trc pointer as a write pointer on the time vector, and the read pointer is always chasing the write pointer and will never catch up. When data retransmission is required between chip A and chip B, the write pointer needs to be returned to the read pointer that needs to be retransmitted, and the data at the read pointer is rewritten and sent to the other end.

7. The error-free transmission method based on Ethernet link according to claim 1, characterized in that: By adding and subtracting the number of messages entering and leaving the retransmission buffer modules in chip A and chip B, flow control is performed on the data flowing on the data link formed between chip A and chip B.