WO2022042543A1 - Retransmission method for ethernet error frame and related apparatus - Google Patents

Retransmission method for ethernet error frame and related apparatus Download PDF

Info

Publication number
WO2022042543A1
WO2022042543A1 PCT/CN2021/114293 CN2021114293W WO2022042543A1 WO 2022042543 A1 WO2022042543 A1 WO 2022042543A1 CN 2021114293 W CN2021114293 W CN 2021114293W WO 2022042543 A1 WO2022042543 A1 WO 2022042543A1
Authority
WO
WIPO (PCT)
Prior art keywords
ethernet frame
ethernet
retransmitted
identifier
frame
Prior art date
Application number
PCT/CN2021/114293
Other languages
French (fr)
Chinese (zh)
Inventor
孙德胜
牛乐宏
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022042543A1 publication Critical patent/WO2022042543A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0078Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
    • H04L1/0083Formatting with frames or packets; Protocol or part of protocol for error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1812Hybrid protocols; Hybrid automatic repeat request [HARQ]
    • H04L1/1816Hybrid protocols; Hybrid automatic repeat request [HARQ] with retransmission of the same, encoded, message

Definitions

  • the present application relates to the field of computer technologies, and in particular, to a method and related apparatus for retransmission of Ethernet error frames.
  • the store and forward mode is a commonly used transmission mode in the Ethernet system.
  • the node device first buffers the incoming data packets from the ingress side to check the correctness of the frame (for example, based on cyclic redundancy check technology); after confirming that the packet is correct, according to the frame header
  • the destination address carried is checked in the table to find the output port address that needs to be sent, and then the data packet is sent out. Because the node device needs to buffer the entire frame on the ingress side, the buffering delay is long, which affects the transmission efficiency.
  • CUT-Through cut-through switching
  • the node device detects a data packet on the ingress side, it buffers a part of the Ethernet frame (for example, the part used for addressing), and then looks up the table according to the destination address contained in this part to find the The output port address you want to send, and then send the packet out.
  • the CUT-Through method can greatly reduce the transmission delay.
  • the node device since the CUT-Through method does not cache the complete data packet, in the case of an error in the data packet, the node device cannot discard the erroneous data packet after detecting the data packet error (because the data packet starts to search after a part of the data packet is buffered. address forwarded). Therefore, in the case of using the CUT-Through method, in order to ensure the reliability of the data, it is necessary to rely on the verification mechanism of the upper layer of the receiving end to verify the received data packets, such as cyclic redundancy check (CRC) . When the receiver detects that it has received an erroneous packet, it needs to send a retransmission request to the initiator. Then, the transmission delay of this packet will be 3 times the transmission delay when no error occurs. How to improve the retransmission efficiency of Ethernet error frames is an urgent problem to be solved by those skilled in the art.
  • CRC cyclic redundancy check
  • Embodiments of the present application provide a method and a related device for retransmission of Ethernet error frames, which can improve the retransmission efficiency of Ethernet error frames.
  • an embodiment of the present application provides a method for retransmitting an Ethernet error frame, the method comprising: receiving an Ethernet frame; verifying the Ethernet frame; when the Ethernet frame verification fails , modifying the Ethernet frame, where the modified Ethernet frame includes a first identifier, where the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted; and the modified Ethernet frame is sent.
  • the first identifier can indicate whether the erroneous Ethernet frame will be recovered by local retransmission
  • the destination device receiving the erroneous Ethernet frame can choose whether to initiate a global retransmission request according to the first identifier, which can save
  • the transmission time of error frames improves the retransmission efficiency of Ethernet error frames.
  • the modified Ethernet frame further includes a second identifier, where the second identifier is used to indicate that the modified Ethernet frame is invalid.
  • whether the Ethernet frame is valid can be determined through the second identifier.
  • the retransmitted Ethernet frame is obtained; the retransmitted Ethernet frame is checked; When the retransmitted Ethernet frame is successfully verified, the retransmitted Ethernet frame is sent.
  • the node device in the transmission process can obtain the retransmitted Ethernet frame. Then, the destination device receiving the Ethernet frame does not need to send a global retransmission request to the sending device of the Ethernet frame, which saves the transmission time of the error frame and improves the retransmission efficiency of the Ethernet error frame.
  • the obtaining the retransmitted Ethernet frame includes: sending a partial retransmission request for the Ethernet frame; receiving a partial retransmission request sent in response to the partial retransmission request Retransmitted Ethernet frame.
  • the obtaining the retransmitted Ethernet frame includes: performing recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
  • the Ethernet frame is sent.
  • the Ethernet frame check fails and is invalid, it indicates that the Ethernet frame has been modified; then the Ethernet frame does not need to be modified this time.
  • the method before the modification of the Ethernet frame, the method further includes: determining whether the Ethernet frame has been modified, and if not, performing modification The step of the Ethernet frame; if it has been modified, the Ethernet frame is not modified, and the Ethernet frame is directly sent.
  • the first identifier is located after the payload field of the Ethernet frame.
  • the manner in which the first identifier is located after the payload field can facilitate the modification of the Ethernet frame.
  • the checking the Ethernet frame includes: checking the Ethernet frame and sending some bits in the Ethernet frame; the Sending the modified Ethernet frame includes: continuing to send bits in the modified Ethernet frame after the partial bits are removed.
  • the embodiments of the present application provide another method for retransmitting an Ethernet error frame, the method includes: receiving an Ethernet frame, and verifying the Ethernet frame; when the Ethernet frame verification is successful If the Ethernet frame is invalid, check whether the Ethernet frame will be partially retransmitted; when it is detected that the Ethernet frame will be partially retransmitted, wait for receiving Retransmitted Ethernet frame.
  • the destination device waits to receive the retransmitted Ethernet frame, and does not need to send any further messages to the Ethernet frame.
  • the sending device sends a global retransmission request, which can save the transmission time of error frames and improve the retransmission efficiency of Ethernet error frames.
  • the second identifier is used to indicate that the Ethernet frame is invalid, and the detecting whether the Ethernet frame is valid includes: detecting whether the Ethernet frame contains the second If it is included, it is determined that the Ethernet frame is invalid; if it is not included, it is determined that the Ethernet frame is valid. In this implementation manner, whether the Ethernet frame is valid can be determined by using the second identifier.
  • the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the detecting whether the Ethernet frame is valid , including: determining whether the Ethernet frame is valid according to the second identifier; if the second identifier is in the first state, determining that the Ethernet frame is invalid; if the second identifier is in the second state, then It is determined that the Ethernet frame is valid.
  • whether the Ethernet frame is valid can be determined by using the second identifier.
  • the Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame is to be partially retransmitted, and the detecting the Ethernet frame Whether the network frame will be partially retransmitted includes: determining whether the Ethernet frame will be partially retransmitted according to the first identifier; if the first identifier is in the fourth state, determining that the Ethernet frame will be partially retransmitted transmission; if the first identifier is in the fifth state, it is determined that the Ethernet frame will not be partially retransmitted. In this implementation manner, whether the Ethernet frame will be partially retransmitted may be determined by the first identifier.
  • the method further includes: when it is detected that the Ethernet frame will not be locally retransmitted, sending a global retransmission request for the Ethernet frame.
  • the method further includes: when the Ethernet frame check fails, determining whether the Ethernet frame can be recovered locally; when determining whether the Ethernet frame can be recovered locally; Local recovery is performed on the Ethernet frame when it can be recovered locally.
  • the method further includes: when it is detected that the Ethernet frame cannot be recovered locally, sending a global retransmission request for the Ethernet frame.
  • the method further includes: when the Ethernet frame check fails, determining whether the Ethernet frame can be recovered locally, including: when the Ethernet frame fails When the frame check fails, it is detected whether the Ethernet frame is valid; if the Ethernet frame is valid, it is determined whether the Ethernet frame can be recovered locally.
  • the Ethernet frame check fails and is valid, indicating that an error occurs in the transmission of the Ethernet frame on the Ethernet link between the destination device and the previous node device, and the Ethernet frame is in the Ethernet link. If no errors occurred during the previous transmission, the destination device attempts to recover the Ethernet frame. Therefore, the destination device does not need to send a global retransmission request to the sending device of the Ethernet frame, which saves the transmission time of the erroneous frame and improves the retransmission efficiency of the Ethernet erroneous frame.
  • the method further includes: if the Ethernet frame is invalid, waiting to receive a retransmitted Ethernet frame.
  • the Ethernet frame check fails and is invalid, indicating that the Ethernet frame has an error in the transmission of the Ethernet link between the destination device and the previous node device, and the Ethernet frame has been transmitted before the Ethernet link. If an error occurs and the Ethernet frame has been modified, the destination device can wait for the retransmitted Ethernet frame obtained by the receiving node device. Therefore, the destination device does not need to send a global retransmission request to the sending device of the Ethernet frame, which saves the transmission time of the erroneous frame and improves the retransmission efficiency of the Ethernet erroneous frame.
  • the method further includes: if the current time is more than a preset time period from the time when the Ethernet frame is received , a global retransmission request for the Ethernet frame is sent.
  • the destination device in order to ensure that the correct Ethernet frame can be obtained, the destination device will send a global retransmission request for the Ethernet frame when it is detected that the waiting duration exceeds the preset duration.
  • an embodiment of the present application provides a communication device, the communication device includes a receiving unit, a checking unit, a modifying unit, and a sending unit, wherein: the receiving unit is configured to receive an Ethernet frame; The verification unit is used to verify the Ethernet frame; the modification unit is used to modify the Ethernet frame when the Ethernet frame verification fails, and the modified Ethernet frame includes the first identifier , the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted; the sending unit is used to send the modified Ethernet frame.
  • the modified Ethernet frame further includes the second identifier, where the second identifier is used to indicate that the modified Ethernet frame is invalid.
  • the communication device further includes an acquisition unit, the acquisition unit is configured to acquire the retransmitted Ethernet frame in the case that the Ethernet frame will be partially retransmitted network frame; the verification unit is further configured to verify the retransmitted Ethernet frame; the sending unit is further configured to send the retransmitted Ethernet frame when the verification of the retransmitted Ethernet frame is successful Retransmitted Ethernet frame.
  • the obtaining unit is specifically configured to: send a partial retransmission request for the Ethernet frame; receive a retransmitted Ethernet frame sent in response to the partial retransmission request web frame.
  • the obtaining unit is specifically configured to: perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
  • the first identifier is located after the payload field of the Ethernet frame.
  • the check unit is specifically configured to: check the Ethernet frame and send some bits in the Ethernet frame; the sending unit is specifically configured to: To: continue to send bits in the modified Ethernet frame after the partial bits are removed.
  • an embodiment of the present application provides a communication device, the communication device includes a verification unit, a first detection unit, a second detection unit, and a receiving unit, wherein: the verification unit is configured to receive Ethernet frame, to verify the Ethernet frame; the first detection unit is used to detect whether the Ethernet frame is valid when the Ethernet frame verification is successful; the second detection unit is used to If the Ethernet frame is invalid, detect whether the Ethernet frame will be partially retransmitted; the receiving unit is configured to wait for receiving the retransmitted Ethernet frame when it is detected that the Ethernet frame will be partially retransmitted web frame.
  • the second identifier is used to indicate that the Ethernet frame is invalid
  • the first detection unit is specifically configured to: detect whether the Ethernet frame contains the second identifier; if If it is included, it is determined that the Ethernet frame is invalid; if it is not included, it is determined that the Ethernet frame is valid.
  • the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the first detection unit is specifically configured to: Determine whether the Ethernet frame is valid according to the second identifier; if the second identifier is in the first state, determine that the Ethernet frame is invalid; if the second identifier is in the second state, determine the Ethernet frames are valid.
  • the Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted, and the second detection unit It is specifically used to: determine whether the Ethernet frame will be partially retransmitted according to the first identifier; if the first identifier is in the fourth state, determine that the Ethernet frame will be partially retransmitted; If it is identified as the fifth state, it is determined that the Ethernet frame will not be partially retransmitted.
  • the communication apparatus further includes a first sending unit, where the first sending unit is configured to: when it is detected that the Ethernet frame will not be partially retransmitted, A global retransmission request for the Ethernet frame is sent.
  • the communication device further includes a determination unit and a recovery unit, and the determination unit is configured to determine the Ethernet frame when the Ethernet frame check fails Whether it can be recovered locally; the recovery unit is configured to perform local recovery on the Ethernet frame when it is determined that the Ethernet frame can be recovered locally.
  • the determining unit is specifically configured to: when the Ethernet frame check fails, detect whether the Ethernet frame is valid; if the Ethernet frame is valid, It is then determined whether the Ethernet frame can be recovered locally.
  • the receiving unit is further configured to: if the Ethernet frame is invalid, wait to receive the retransmitted Ethernet frame.
  • the communication device further includes a second sending unit, and the second sending unit is configured to: if the current time is more than a preset time from the time when the Ethernet frame is received duration, then send a global retransmission request for the Ethernet frame.
  • the present application provides yet another communication device, the communication device includes a processor, a memory, and a transceiver; the transceiver is used to receive Ethernet frames; the memory is used to store program codes; The processor is configured to call the program code from the memory to execute the method described in the first aspect or any possible implementation manner of the first aspect.
  • the present application provides yet another communication device, the communication device includes a processor, a memory, and a transceiver; the transceiver is used to receive Ethernet frames; the memory is used to store program codes; The processor is configured to call the program code from the memory to execute the method described in the second aspect or any possible implementation manner of the second aspect.
  • the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store instructions, and when the instructions are executed, the first aspect or any one of the first aspect may be possible.
  • the method described by the implementation is implemented.
  • the present application provides another computer-readable storage medium, where the computer-readable storage medium is used to store instructions, and when the instructions are executed, make the second aspect or any one of the second aspects described above. Possible implementations The described method is implemented.
  • the present application provides a chip system
  • the chip system includes at least one processor and an interface for supporting the first device to implement the functions involved in the first aspect, for example, receiving or processing the functions involved in the above method. at least one of the data and information.
  • the chip system further includes a memory for storing necessary program instructions and data of the site.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the present application provides another chip system
  • the chip system includes at least one processor and an interface for supporting the first device to implement the functions involved in the second aspect, for example, receiving or processing the functions involved in the above method. At least one of the data and information involved.
  • the chip system further includes a memory for storing necessary program instructions and data of the access point.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the first identifier may indicate whether the erroneous Ethernet frame will be recovered by local retransmission, and the destination device that receives the erroneous Ethernet frame may select whether to initiate a global retransmission request according to the first identifier, It can save the transmission time of error frames and improve the retransmission efficiency of Ethernet error frames.
  • FIG. 1 is a schematic diagram of a frame format of an Ethernet frame provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a system architecture of an Ethernet system provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a retransmission process of an Ethernet error frame provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for retransmitting an Ethernet error frame provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of a frame format of another Ethernet frame provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a frame format of another Ethernet frame provided by an embodiment of the present application.
  • 8A is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application.
  • FIG. 8B is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application
  • 9A is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application.
  • 9B is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application.
  • 11A is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application.
  • 11B is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of a communication device provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of another communication device provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another communication device provided by an embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • Ethernet is a computer local area network.
  • the application scenario of the present application may be an Ethernet based on the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard or the IEEE 802.1 standard, or an Ethernet based on the IEEE 802.3 next-generation standard.
  • IEEE Institute of Electrical and Electronics Engineers
  • FIG. 1 is a schematic diagram of a frame format of an Ethernet frame provided by an embodiment of the present application.
  • the Ethernet frame can contain the following fields:
  • the preamble field alternates between 1 and 0 of the preamble.
  • the adapter at the receiving end can adjust the clock frequency according to the preamble field when receiving a media access control (media access control, MAC) frame, so that it is synchronized with the frequency of the sending end.
  • the frame start delimiter (SFD) field includes 1 byte, in which the first six bits of the 8 bits are alternated with 1 and 0, and the last two bits are continuous 1, indicating that the subsequent content is frame information.
  • the destination address field including 6 bytes, is used to indicate the media access control (media access control, MAC) address of the receiving device of the Ethernet frame.
  • the source address field including 6 bytes, is used to indicate the MAC address of the sending device of the Ethernet frame.
  • the type field is used to mark the protocol used by the upper layer, so that the payload field of the received MAC frame can be handed over to the protocol of the upper layer.
  • IP Internet Protocol
  • ARP Address Resolution Protocol
  • RARP Reverse Address Resolution Protocol
  • the 2 bytes where the type field is located is the length field, which is used to indicate the length of the payload field.
  • the field can be determined according to the numerical value of this field.
  • the payload field also known as the payload field or the data field, includes the data that needs to be delivered to the upper layer. Among them, the minimum length of Ethernet frame data is 46 bytes, and the maximum is 1500 bytes (or 1504, 1982 bytes, different standards can have different regulations), if the data is less than 46 bytes, it will use Padding bytes are padded to the minimum length. The maximum value is also called the maximum transmission unit (MTU).
  • the Frame Check Sequence (FCS) field consisting of 4 bytes, is used to detect whether an error has occurred in the Ethernet frame.
  • the Ethernet frame may also include an extension field.
  • the node device verifies the received Ethernet frame. If the verification is successful, it indicates that there is no error in the transmission of the Ethernet frame between the node device and the previous node device; if the verification fails , indicating that the Ethernet frame has an error during the transmission of the Ethernet link between the node device and the previous node device.
  • the Ethernet frame can be checked by means of CRC check.
  • the principle of CRC check is: the sending device calculates the CRC value according to the preset calculation method according to the data to be sent, and sends it to the receiving device together with the data.
  • the FCS field contains a CRC value.
  • the receiving device calculates the CRC value according to the same calculation method for the received data, and then the receiving device compares the received CRC value with the calculated CRC value. Specifically, if the two CRC values are different, the Ethernet frame check fails; if the two CRC values are the same, the Ethernet frame check succeeds.
  • the node device cannot know whether an error occurred in the previous transmission process of the Ethernet frame through the check result. For example, if the Ethernet frame sent by the previous node device to the node device is originally a wrong Ethernet frame, and the wrong Ethernet frame is in the transmission process of the Ethernet link from the previous node device to the node device. If no error occurs, then the verification of the Ethernet frame by the node device is also successful.
  • the node device may also use other check methods for the Ethernet frame, for example, check sum (check sum), bit interleaved parity (bit interleaved parity, BIP), etc., and the embodiment of the present application does not limit the checksum The way.
  • check sum check sum
  • bit interleaved parity bit interleaved parity, BIP
  • the embodiment of the present application does not limit the checksum The way.
  • the following embodiments mainly take the CRC check as an example for introduction.
  • the destination device is the device that finally receives the Ethernet frame, and the MAC address of the destination device is the same as the MAC address contained in the destination address field in the Ethernet frame.
  • Ethernet frame if the Ethernet frame is valid, it means that there is no error in the transmission process of the Ethernet frame before the Ethernet link between the destination device and the previous node device; if the Ethernet frame is invalid, it means that the Ethernet frame is between the destination device and the previous node device. An error occurred during the previous transmission of the Ethernet link of the previous node device.
  • the method for determining whether the Ethernet frame is valid will be introduced in detail.
  • the node device can obtain the retransmitted Ethernet frame by means of partial retransmission.
  • the meaning of local retransmission is: the node device recovers the Ethernet frame through its own capabilities, and obtains the retransmitted Ethernet frame; The Ethernet link with the previous node device obtains the retransmitted Ethernet frame from the previous node device.
  • the retransmission request for the Ethernet frame sent by the node device to the previous node device may be referred to as a partial retransmission request.
  • the node device after acquiring the retransmitted Ethernet frame, the node device sends the retransmitted Ethernet frame to the next node device.
  • the meaning of global retransmission is: the destination device sends a retransmission request for the Ethernet frame to the source device, and obtains the retransmission from the source device through the Ethernet link between the destination device and the source device.
  • Ethernet frame The source device is a device that generates the Ethernet frame, and the MAC address of the source device is the same as the MAC address included in the source address field of the Ethernet frame.
  • the retransmission request for the Ethernet frame sent by the destination device to the source device may be called a global retransmission request.
  • the recovered Ethernet frame may be acquired in a local recovery manner.
  • the meaning of local recovery is: the destination device recovers the Ethernet frame through its own capabilities, and obtains the recovered Ethernet frame; An Ethernet link between node devices obtains recovered Ethernet frames from the previous node device. After acquiring the recovered Ethernet frame, the destination device verifies the recovered Ethernet frame again, and for the subsequent operations, please refer to the introduction in the subsequent content.
  • FIG. 2 it is a schematic diagram of a system architecture of an Ethernet system provided by an embodiment of the present application.
  • the Ethernet system includes computer equipment (for example, a first computer equipment, a second computer equipment) and switches (for example, a first switch, a second switch, and a third switch).
  • node devices are connected by Ethernet links to realize data transmission.
  • the Ethernet system includes at least two node devices, and may include more or less devices than those shown in FIG. 2 , which is not limited here, and only FIG. 2 is used as an example. in:
  • Computer equipment which can be used to realize functions such as data generation, reception, data transmission, and data processing.
  • the computer device may also be a network device such as a server (for example, a network management server, a device management server, an authentication server, and a positioning server).
  • a server for example, a network management server, a device management server, an authentication server, and a positioning server.
  • the switch can be used to realize functions such as data transmission. It can send the data to be transmitted to the destination address according to the information transmission requirements of both ends of the communication.
  • the switch may also be a network connection device such as a network card, a hub, and a router.
  • the first computer device generates an Ethernet frame and sends the Ethernet frame to the second computer device.
  • the Ethernet links "first computer device-first switch”, “first switch-second switch”, “second switch-third switch” and “third switch-first switch” Two Computer Devices”, and Ethernet Node Devices "First Switch”, “Second Switch” and “Third Switch”.
  • the method for retransmitting an Ethernet error frame provided by the embodiment of the present application is applicable to the transmission process of the Ethernet frame in the Ethernet system.
  • Ethernet transmits Ethernet frames in a store-and-forward manner.
  • the node device first buffers the incoming data packets from the ingress side, and checks the correctness of the frame (for example, checking based on the cyclic redundancy check technology). If the detected Ethernet frame is correct, the node device will look up the table according to the destination address carried in the frame header, find the output port address to be sent, and then send the Ethernet frame. If an error is detected in the Ethernet frame, the node device discards the Ethernet frame.
  • FIG. 3 it is a schematic diagram of a retransmission process of an Ethernet error frame provided by an embodiment of the present application.
  • H is a frame header (head) part
  • P is a payload (or called a payload) (Payload) part
  • F is a frame check sequence (frame check sequence, FCS) part.
  • F is F 1 and F 2 , in order to distinguish two different frame check sequences.
  • the F part may include a CRC-32 field for checking the correctness of the Ethernet frame. Among them, two cases of correct transmission of Ethernet frames and errors in transmission are illustrated.
  • the first switch receives the Ethernet frame sent by the first computer device, and the first switch performs CRC check on the Ethernet frame.
  • the CRC value calculated by the receiving device is the same as the CRC value contained in the received Ethernet frame (F 1 in the example).
  • the first switch After the first switch successfully checks the Ethernet frame, it sends the Ethernet frame to the second switch. According to a similar process, the Ethernet frame is transmitted through the second switch and the third switch, and finally reaches the destination receiving device, that is, the second computer device.
  • the first switch receives the Ethernet frame sent by the first computer device, and the first switch pairs Ethernet frames are CRC checked. Due to an error occurred during the transmission of the Ethernet frame, the CRC value calculated by the first switch (F 2 in the example) is different from the received CRC value (F 1 in the example), then it is determined that the Ethernet frame is in error, then Drop the Ethernet frame.
  • the second computer device detects the packet loss (for example, uses a timeout mechanism to determine the packet loss and determines that the next Ethernet frame is received), and then sends a retransmission request (for example, Negative Acknowledgment, NAK) to the first computer device.
  • a retransmission request for example, Negative Acknowledgment, NAK
  • the first computer device sends the retransmitted Ethernet frame to the second computer device according to the retransmission request. It can be seen that, by adopting this method of retransmission of the erroneous frame, the delay in receiving the retransmitted Ethernet frame will be at least three times that of the case where no error occurs in the transmission of the Ethernet frame.
  • CUT-Through a transmission way of cut-through switching
  • the node device detects a data packet on the ingress side, it buffers a part of the Ethernet frame (for example, the part used for addressing, such as the frame header), and then according to the destination address contained in this part Look up the table, find the output port address you want to send, and then send the packet.
  • the CUT-Through method can greatly reduce the transmission delay.
  • the node device since the CUT-Through method does not cache the complete data packet, in the case of an error in the data packet, the node device cannot discard the erroneous data packet after detecting the data packet error (because the data packet starts to search after a part of the data packet is buffered. address forwarded). Therefore, in the case of using the CUT-Through method, in order to ensure the reliability of the data, it is necessary to rely on the verification mechanism of the upper layer of the receiving end (the upper layer of the MAC layer, that is, the IP layer, the application layer, etc.) to verify the received data packets. Check, such as cyclic redundancy check (cyclic redundancy check, CRC). When the receiver detects that it has received an erroneous packet, it needs to send a retransmission request to the initiator.
  • CRC cyclic redundancy check
  • FIG. 4 it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application.
  • the Ethernet system architecture of FIG. 4 is similar to that of FIG. 2.
  • the first computer device generates an Ethernet frame and sends the Ethernet frame to the second computer device.
  • H is the head part
  • P is the payload part
  • F is the FCS part
  • f is the check part (for example, it can be a CRC-16 field).
  • the second computer device may, according to f, rely on the application layer verification mechanism to determine whether the received Ethernet frame is in error.
  • the first switch receives the Ethernet frame sent by the first computer device, and the first switch performs CRC check on the Ethernet frame. After the first switch successfully checks the Ethernet frame, it sends the Ethernet frame to the second switch. According to a similar process, the Ethernet frame is transmitted through the second switch and the third switch, and finally reaches the destination receiving device, that is, the second computer device.
  • the second computer device may, according to f, rely on the application layer verification mechanism to determine that the received Ethernet frame is correct.
  • the first switch When there is an error in transmission (take the Ethernet frame error code in the Ethernet link "the first computer device - the first switch" as an example): the first switch first buffers the head part of the Ethernet frame, and then according to the purpose contained in the head part Check the address table, find the output port address to be sent, and then send the Ethernet frame to the second switch. An error occurs in the f part due to a bit error, and an example of this part after the error occurs is the f' part. The first switch sends the erroneous Ethernet frame to the second switch.
  • the second switch Since the Ethernet frame received by the second switch is already an Ethernet frame with errors, the CRC value of the Ethernet frame received by the second switch (F 2 in the example) is the same as the calculated CRC value (F 2 in the example) , the second switch successfully checks the wrong Ethernet frame. Afterwards, the second switch sends the errored Ethernet frame to the third switch, and the third switch sends the errored Ethernet frame to the second computer device. The second computer device verifies the received Ethernet frame successfully, and then the second computer device determines that the received Ethernet frame is an erroneous Ethernet frame by relying on the upper-layer verification mechanism according to f'.
  • the second computer device sends a retransmission request to the first computer device, and correspondingly, the first computer device sends the retransmitted Ethernet frame to the second computer device according to the retransmission request. It can be seen that, by adopting the retransmission method of the erroneous frame, the delay in receiving the retransmitted Ethernet frame will be at least three times that of the case where no error occurs in the transmission of the Ethernet frame.
  • a method for retransmitting an Ethernet error frame is provided.
  • a node device checks the Ethernet frame after receiving the Ethernet frame sent by the previous node device; when the Ethernet frame check fails
  • the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted; next, the node device retransmits The modified Ethernet frame is sent to the next node. In this way, the first identification can indicate whether the Ethernet frame in which the error occurred will be recovered by partial retransmission.
  • the destination device receiving the erroneous Ethernet frame can select whether to initiate a global retransmission request according to the first identifier, which can save the transmission time of the erroneous frame and improve the retransmission efficiency of the Ethernet erroneous frame.
  • FIG. 5 is a flowchart of a method for retransmitting an Ethernet error frame provided by an embodiment of the present application.
  • the method may be implemented based on the Ethernet system shown in FIG. 1 , and the second node device described below may be the first switch, the second switch or the third switch shown in FIG. 1 .
  • the first node device is the previous node device of the second node device
  • the third node device is the next node device of the second node device.
  • the previous node device and the next node device are determined according to the transmission direction of the Ethernet frame.
  • the second node device is a first switch
  • the first node device is a first computer device
  • the third node device is a second switch.
  • the second node device is the second switch, then the first node device is the first switch, and the third node device is the third switch.
  • the second node device is a third switch, then the first node device is a second switch, and the third node device is a second computer device. The method includes but is not limited to the following steps.
  • the first node device sends an Ethernet frame to the second node device.
  • the second node device After the second node device receives the Ethernet frame, the second node device checks the Ethernet frame.
  • the second node device may perform CRC check on the Ethernet frame.
  • the FCS field of the Ethernet frame includes the CRC-32 field.
  • the second node device may calculate the CRC value according to the payload field of the Ethernet frame according to the calculation method negotiated with the first node device. After that, compare the FCS field of the Ethernet frame with the calculated CRC value. If the calculated CRC value is different from the FCS field, the Ethernet frame verification fails; if the calculated CRC value is the same as the FCS field, the Ethernet frame verification succeeds.
  • the second node device can determine whether an error occurs during the transmission of the Ethernet frame from the first node device (ie, the previous node device) to the Ethernet link of the second node device.
  • the second node device cannot pass the verification result to know whether an error occurred in the previous transmission process of the Ethernet frame. For example, if the Ethernet frame sent by the first node device to the second node device is originally a wrong Ethernet frame, and the wrong Ethernet frame is transmitted in the Ethernet link from the first node device to the second node device. If no error occurs during the process, then the verification of the Ethernet frame by the second node device is also successful. Exemplarily, referring to the embodiment shown in FIG.
  • the second switch is the first node device
  • the third switch is the second node device.
  • the Ethernet frame received by the second switch has been erroneous (containing the F2 field). Then, the original Ethernet frame sent by the second switch to the third switch is the wrong Ethernet frame, the CRC value calculated by the third switch according to the payload field is the same as the F2 field, and the third switch successfully checks the Ethernet frame.
  • the second node device sends the Ethernet frame to the third node device.
  • the second node device modifies the Ethernet frame.
  • the failure to check the Ethernet frame indicates that an error occurs in the Ethernet frame during the transmission process of the Ethernet link from the first node device to the second node device.
  • the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted.
  • the first identifier is in the fourth state, it indicates that the Ethernet frame will be partially retransmitted; if the first identifier is in the fifth state, it indicates that the Ethernet frame will not be partially retransmitted.
  • the first identifier in the modified Ethernet frame is the fourth state; if the second node device determines that the Ethernet frame cannot be partially retransmitted transmission, the first identifier in the modified Ethernet frame is the fifth state.
  • the Ethernet frame may always include the first identifier, and in the previous transmission process, the first identifier is the initial state.
  • the second node device If the second node device fails to verify the Ethernet frame, in the case that the Ethernet frame can be partially retransmitted, the second node device modifies the first identifier from the initial state to the fourth state; when the Ethernet frame cannot be partially retransmitted In the case of transmission, the second node device modifies the first identifier from the initial state to the fifth state. In other embodiments, if the second node device fails to verify the Ethernet frame, in the case that the Ethernet frame can be partially retransmitted, the second node device adds the first identifier of the fourth state to the Ethernet frame; In the case that the Ethernet frame cannot be partially retransmitted, the second node device adds the first identifier of the fifth state to the Ethernet frame.
  • the value of the first identifier is 1, which indicates a fourth state, indicating that the Ethernet frame will be partially retransmitted.
  • the value of the first identifier is 0, indicating a fifth state, indicating that the Ethernet frame will not be partially retransmitted.
  • the value of the first identifier can also be other values, for example, 11 (represented as the fourth state, indicating that partial retransmission will be performed), 00 (represented as the fifth state, indicating that partial retransmission will not be performed) ),etc.
  • the first identifier may also be a preset sequence. Exemplarily, when the first identifier is the first preset sequence, it represents a fourth state, indicating that the Ethernet frame will be partially retransmitted. When the value of the first indication field is the second preset sequence, it indicates a fifth state, indicating that the Ethernet frame will not be partially retransmitted.
  • the first identification may include an indication byte repeated multiple times.
  • the indication byte when the indication byte is 11, it indicates the fourth state, indicating that partial retransmission will be performed; when the indication byte is 00, it indicates the fifth state, indicating that partial retransmission will not be performed.
  • the first identification includes an indication byte repeated 4 times. In this case, when the first identifier is 11111111, it represents the fourth state, indicating that the partial retransmission will be performed, and when the first identifier is 00000000, it represents the fifth state, indicating that the partial retransmission will not be performed.
  • the first identifier is another value (for example, 11111010)
  • the first identifier in the sixth state is used to indicate the first identifier.
  • a logo is invalid. It can be understood that the first identifier of the fourth state and the first identifier of the fifth state may indicate that the first identifier is valid.
  • the first identifier can be considered valid when the correct rate of the indicated bytes is not less than a preset value (75% in an example).
  • the correct rate of the indication byte may be the ratio of the number of times of repeated indication bytes to the total number of times.
  • whether the first flag is the fourth state or the fifth state may be determined by the value of the indication byte repeated more times.
  • the first identifier is 11111110, wherein the indication byte with a larger number of repetitions is 11, the number of repetitions is 3, and the total number of repetitions in the indication byte is 4. If the correct rate of the indicated bytes is 3/4, that is, 75%, then the first identification is deemed to be valid. If the indication byte repeated more times is 11, the first identifier is the fourth state, indicating that the Ethernet frame will be partially retransmitted.
  • the first identifier is located at a preset position of the Ethernet frame.
  • the first identification is located after the payload field of the Ethernet frame.
  • 6 is a schematic diagram of a frame format of an Ethernet frame provided by an embodiment of the present application.
  • the first identifier is located before the FCS field and after the payload field (or called the data field).
  • the second node device first buffers the frame header part of the Ethernet frame (refer to FIG. 5 , the frame header part includes the destination address field, the source address field and the type/length field), and then checks the frame header part according to the destination address contained in the frame header.
  • the second node device has at least the time for buffering the frame header part to check the Ethernet frame. Since the Ethernet frame is sent in sequence according to the order of byte arrangement, the manner in which the first identifier is located after the payload field can facilitate the second node device to modify the Ethernet frame.
  • the second node device fails to verify the Ethernet frame, it needs to modify the Ethernet frame, indicating that the modified Ethernet frame is invalid.
  • the meaning of the invalid Ethernet frame is that an error occurred in the transmission process of the Ethernet frame; the meaning of the Ethernet frame being valid is that there is no error in the transmission process of the Ethernet frame. In this way, the destination device receiving the Ethernet frame can be informed whether an error has occurred in the Ethernet frame.
  • the modified Ethernet frame further includes the second identifier, and the second identifier is used to indicate that the modified Ethernet frame is invalid.
  • the second node device after the second node device fails to verify the Ethernet frame, the second node device adds the second identifier to the Ethernet frame. That is to say, if the Ethernet frame contains the second identifier, it means that the Ethernet frame is invalid; if the Ethernet frame does not contain the second identifier, it means that the Ethernet frame is valid.
  • the Ethernet frame always includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid. Specifically, if the second identifier is in the first state, it indicates that the Ethernet frame is invalid; if the second identifier is in the second state, it indicates that the Ethernet frame is valid.
  • the second node device modifies the second identifier of the Ethernet frame from the second state to the first state, and the modified The second identification (ie the second identification of the first state) indicates that the modified Ethernet frame is invalid.
  • the value of the second identifier is 1, which indicates the first state and indicates that the Ethernet frame is invalid.
  • the value of the second identifier is 0, indicating a second state, indicating that the Ethernet frame is valid.
  • the value of the second identifier may also be other values, for example, 11 (represented as the first state, indicating invalid), 00 (represented as the second state, indicating valid), and so on.
  • the second identifier may also be a preset sequence. Exemplarily, when the second identifier is the first preset sequence, it indicates the first state, indicating that the Ethernet frame is invalid. When the second identifier is the second preset sequence, it indicates the second state, indicating that the Ethernet frame is valid.
  • the second identifier may be located at a preset position of the Ethernet frame.
  • the second identification is located after the payload field (or called the data field) of the Ethernet frame.
  • 7 is a schematic diagram of another frame format of an Ethernet frame provided by an embodiment of the present application. In FIG. 7, the second identifier is located before the FCS field and after the payload field.
  • the relative positions of the first mark and the second mark are not limited, and the first mark may be located in front of the second mark, or the first mark may also be located behind the second mark.
  • the second node device may indicate that the Ethernet frame is invalid by inverting the FCS field of the Ethernet frame.
  • the FCS field includes a CRC value
  • the CRC value calculated by the second node device is 11110000, which is different from the CRC value included in the Ethernet frame.
  • the second node device inverts the FCS field of the Ethernet frame, and the CRC value of the FCS field of the modified Ethernet frame is 00001111.
  • the second node device sends the modified Ethernet frame to the third node device.
  • the manner in which the second node device transmits the Ethernet frame is the CUT-Through manner.
  • the second node device first buffers the frame header part of the Ethernet frame, and then looks up the table according to the destination address contained in the frame header part to find the output port to be sent, and then The Ethernet frame is sent out.
  • the manner in which the second node device checks the Ethernet frame includes: checking the Ethernet frame and sending some bits in the Ethernet frame.
  • the manner in which the second node device sends the modified Ethernet frame includes: continuing to send bits in the modified Ethernet frame except for the partial bits. It can be understood that the partial bits of the Ethernet frame and the modified Ethernet frame are the same.
  • the sending the modified Ethernet frame includes: continuing to send the Ethernet frame bits in the modified Ethernet frame except for the partial bits.
  • the sending the modified Ethernet frame includes: in the verification process, sending some bits in the modified Ethernet frame; After that, the bits in the modified Ethernet frame after the partial bits are continued to be sent.
  • the first identifier may indicate whether the Ethernet frame in which the error occurs will be recovered by partial retransmission.
  • the destination device receiving the erroneous Ethernet frame can select whether to initiate a global retransmission request according to the first identifier, which can save the transmission time of the erroneous frame and improve the retransmission efficiency of the Ethernet erroneous frame.
  • the following describes the manner in which the second node device determines whether the Ethernet frame can be partially retransmitted.
  • the second node device determines whether the Ethernet link between itself and the previous node device (ie, the first node device) has retransmission capability.
  • the Ethernet link adopts an ACK/NAK (Acknowledgment/Negative Acknowledgment) error retransmission mechanism
  • the Ethernet link has a retransmission capability.
  • ACK/NAK is an automatic transmission mechanism implemented by hardware, whose purpose is to ensure the effective and reliable transmission of transaction layer packets (Transaction Layer Packet, TLP). Specifically, in the process of TLP transmission, the sending device will back up each TLP to be sent in the replay buffer area (Replay Buffer).
  • the receiving device verifies the received TLP and feeds back the receiving result to the sending device.
  • the ACK data link layer packet (DLLP) is used to indicate that the TLP is successfully received
  • the NAK DLLP is used to indicate that an error has occurred in the TLP transmission. If the sending device receives the ACK DLLP sent by the receiving device and confirms that the TLP has been successfully accepted, the backup in the Replay Buffer will be deleted. If the sending device receives the NAK DLLP sent by the receiving device and confirms that there is an error in the transmission of the TLP, the sending device will take out the data from the Replay Buffer and resend the TLP.
  • the second node device determines that it has the ability to restore the Ethernet frame.
  • the second node device may perform recovery processing on the Ethernet frame by using a forward error correction (forward error correction, FEC) algorithm or other redundant frame processing methods.
  • FEC forward error correction
  • the manner in which the second node device performs recovery processing on the Ethernet frame is not limited.
  • FIG. 8A it is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application.
  • the method may be implemented based on the Ethernet system shown in FIG. 1 , and the second node device described below may be the first switch, the second switch or the third switch shown in FIG. 1 .
  • the first node device is the previous node device of the second node device
  • the third node device is the next node device of the second node device.
  • the previous node device and the next node device are determined according to the transmission direction of the Ethernet frame.
  • the second node device is the first switch, then the first node device is the first computer device, and the third node device is the second switch.
  • the second node device is the second switch, then the first node device is the first switch, and the third node device is the third switch.
  • the second node device is a third switch, then the first node device is a second switch, and the third node device is a second computer device. The method includes but is not limited to the following steps.
  • the first node device sends an Ethernet frame to the second node device.
  • step S101 for the specific implementation of this step, reference may be made to the introduction of step S101 in the above content, and details are not repeated here.
  • the second node device After the second node device receives the Ethernet frame, the second node device checks the Ethernet frame.
  • step S102 for the specific implementation of this step, reference may be made to the introduction of step S102 in the above content, which will not be repeated here.
  • the second node device sends the Ethernet frame to the third node device.
  • the second node device modifies the Ethernet frame.
  • step S104 for the specific implementation of this step, reference may be made to the introduction of step S104 in the above content, which will not be repeated here.
  • a second identifier is always included in the Ethernet frame, and the second identifier is used to indicate whether the Ethernet frame is valid.
  • the second identification may include an indication byte repeated multiple times. Exemplarily, when the indication byte is 10, it means that the Ethernet frame is invalid; when the indication byte is 01, it means that the Ethernet frame is valid; and the second identifier includes the indication byte repeated 4 times. In this case, when the second identifier is 10101010, it represents the first state, indicating that the Ethernet frame is invalid, and when the second identifier is 01010101, it represents the second state, indicating that the Ethernet frame is valid.
  • the second identifier can be regarded as the third state, and the second identifier in the third state is used to indicate the first The second sign is invalid. It can be understood that the second identifier of the first state and the second identifier of the second state may indicate that the second identifier is valid.
  • the second identifier can be considered valid when the correct rate of the indicated bytes is not less than a preset value (75% in an example).
  • the correct rate of the indicated byte may be the ratio of the number of times of repeated indicated bytes to the total number of times.
  • whether the second flag is the first state or the second state may be determined by the value of the indication byte repeated more times.
  • the second identifier is 10101011, wherein the indication byte with a larger number of repetitions is 10, the number of repetitions is 3, and the total number of repetitions in the indication byte is 4. If the correct rate of the indicated byte is 3/4, that is, 75%, then the second identification is deemed to be valid. If the indication byte repeated more times is 10, the second state is the first state, indicating that the Ethernet frame is invalid.
  • the first identifier and the second identifier contained in the Ethernet frame may be combined into one indication identifier.
  • this indicator includes two indicator bytes, the first indicator byte and the first indicator have similar functions, and can be used to indicate whether the Ethernet frame will be partially retransmitted; the second indicator byte Sections and second flags have a similar effect. Can be used to indicate whether the Ethernet frame is valid.
  • the indicator may include an indicator byte repeated multiple times.
  • the second node device before modifying the Ethernet frame, the second node device needs to determine that the Ethernet frame is not modified. Corresponding to the manner of modifying the Ethernet frame described in the foregoing content, the second node device may determine whether the received Ethernet frame has been modified. For example, if the method of modifying the Ethernet frame is: after the node device fails to detect the Ethernet frame, modify the first identification in the Ethernet frame from the initial state to the fourth or fifth state; and modify the second identification to change from the second state to the first state. Then, the second node device can detect whether the first identifier included in the Ethernet frame is in the fourth state or the fifth state, and whether the second identifier is in the first state.
  • the second node device does not need to modify the Ethernet frame frame, and the operation of obtaining the retransmitted Ethernet frame, directly sending the Ethernet frame to the third node device.
  • the currently received Ethernet frame has been modified, which means that an error has occurred in the Ethernet frame in the previous transmission process, and the Ethernet frame is already an erroneous Ethernet frame at the first node device.
  • the second node device cannot obtain the correct retransmitted Ethernet frame through its own capability or from the first node device.
  • the second node device modifies the Ethernet frame and performs the operations described later. This is because the currently received Ethernet frame has not been modified, which means that no error has occurred in the Ethernet frame in the previous transmission process, and the Ethernet link between the first node device and the second node device is transmitted. The first error occurred in the process.
  • the second node device can obtain the correct retransmitted Ethernet frame through its own capability or from the first node device. Exemplarily, for this method, reference may be made to the method flowchart shown in FIG. 8B .
  • the method of determining whether the Ethernet frame has been modified is only an example, and corresponding to different methods of modifying the Ethernet frame, the methods of determining whether the Ethernet frame has been modified are different.
  • the way of modifying the Ethernet frame is: after the node device detects the failure of the Ethernet frame, the first identifier in the Ethernet frame is modified from the initial state to the fourth state or the fifth state; A second logo is added to the frame. Then, the second node device can detect whether the first identifier included in the Ethernet frame is in the fourth state or the fifth state, and whether the Ethernet frame includes the second identifier.
  • the second node device sends the modified Ethernet frame to the second node device.
  • the second node device acquires the retransmitted Ethernet frame.
  • the second node device determines that the Ethernet frame can be partially retransmitted, the second node device obtains the retransmitted Ethernet frame.
  • the Ethernet link between the second node device and the previous node device has a retransmission capability.
  • the process of acquiring the retransmitted Ethernet frame by the second node device may be as follows:
  • the second node device sends a partial retransmission request for the Ethernet frame to the first node device.
  • the second node device may send a NAK packet (or referred to as NAK DLLP) to the first node device.
  • NAK DLLP NAK DLLP
  • the second node device receives the retransmitted Ethernet frame sent by the first node device in response to the partial retransmission request.
  • the first node device receives the NAK message and confirms that an error occurs in the transmission of the Ethernet frame.
  • the first node device takes out the backup Ethernet frame from the Replay Buffer, and resends the Ethernet frame to the second node device.
  • the second node device itself has the ability to restore the Ethernet frame.
  • the process of acquiring the retransmitted Ethernet frame by the second node device may be as follows: the second node device performs recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
  • the second node device may perform recovery processing on the Ethernet frame by using a forward error correction (forward error correction, FEC) algorithm or other redundant frame processing methods.
  • FEC forward error correction
  • the manner in which the second node device performs recovery processing on the Ethernet frame is not limited.
  • the second node device may first perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame. If the retransmitted Ethernet frame fails to be checked, the second node device sends a partial retransmission request for the Ethernet frame to the first node device to obtain the retransmitted Ethernet frame sent by the first node device.
  • the second node device checks the retransmitted Ethernet frame.
  • the second node device sends the retransmitted Ethernet frame to the second node device.
  • the second node device modifies the retransmitted Ethernet frame.
  • the modified retransmitted Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the retransmitted Ethernet frame will be partially retransmitted.
  • the modified retransmitted Ethernet frame further includes a second identifier, and the second identifier is used to indicate that the modified retransmitted Ethernet frame is invalid.
  • the second node device obtains a retransmitted Ethernet frame, then, in the case that the retransmitted Ethernet frame fails to check, the modified retransmitted Ethernet frame includes The first identifier is used to indicate that the retransmitted Ethernet frame will not be partially retransmitted.
  • the second node device may try to acquire the retransmitted Ethernet frame for a preset number of times at most. Taking 3 times as an example, then, in the case that the retransmitted Ethernet frame obtained for the first and second times fails to check, the modified first identifier included in the retransmitted Ethernet frame is used. Ethernet frames that indicate retransmission will be partially retransmitted. In the case that the retransmitted Ethernet frame obtained for the third time fails to check, the modified first identifier included in the retransmitted Ethernet frame is used to indicate that the retransmitted Ethernet frame will not Retransmitted locally. In addition, it should be noted that, if the retransmitted Ethernet frame obtained in one of the multiple times is successfully verified, the second node device may not continue to obtain the retransmitted Ethernet frame.
  • FIG. 9A it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application.
  • This process can be implemented based on the Ethernet architecture shown in FIG. 2 .
  • the first computer device generates an Ethernet frame and sends the Ethernet frame to the second computer device.
  • the initial Ethernet frame contains a second identifier and a first identifier, wherein the second identifier is 00 (second state), which is used to indicate that the Ethernet frame is valid; the first identifier is 00 (initial state).
  • the first switch receives the Ethernet frame sent by the first computer device, and the first switch performs CRC check on the Ethernet frame. After the first switch successfully checks the Ethernet frame, it sends the Ethernet frame to the second switch. According to a similar process, the Ethernet frame is transmitted through the second switch and the third switch, and finally reaches the destination receiving device, that is, the second computer device. During the entire transmission process, no errors occurred in the Ethernet frame, and each node device did not modify the Ethernet frame. The second computer device may determine that the Ethernet frame is valid according to the second identifier.
  • the first switch When there is an error in transmission (take the Ethernet frame error code in the Ethernet link "the first computer device - the first switch” as an example): the first switch first buffers the head part of the Ethernet frame, and then according to the purpose contained in the head part Check the address table, find the output port address to be sent, and then send the Ethernet frame to the second switch. Due to a bit error, the first switch fails to verify the Ethernet frame, and the first switch determines that the Ethernet link "the first computer device - the first switch" has the retransmission capability, then the first switch modifies the first switch of the Ethernet frame. One flag is the fourth state (10, indicating that it will be partially retransmitted), and the second flag is modified to be the first state (11, indicating that it is invalid).
  • the first switch sends a partial retransmission request (NAK message) to the first computer device to obtain the retransmitted Ethernet frame.
  • NAK message a partial retransmission request
  • the first computer device sends the retransmitted Ethernet frame to the first switch, and the first switch verifies that the retransmitted Ethernet frame is successful, and sends it to the next node device (ie, the second switch) The retransmitted Ethernet frame.
  • FIG. 9A the content shown in FIG. 9A is described by taking the example of "bit error occurs in the Ethernet frame in the Ethernet link "the first computer device - the first switch", but it is not limited to these two node devices.
  • a bit error occurs on the road.
  • the second computer device may determine that the Ethernet frame is invalid according to the second identifier in the modified Ethernet frame, and determine that the existing node device has performed partial retransmission according to the first identifier, so there is no need for the second computer device to report to the first computer.
  • the device sends a global retransmission request.
  • the second computer device discards the modified Ethernet frame without uploading to the upper layer.
  • the second computer device waits to receive the retransmitted Ethernet frame. After receiving the retransmitted Ethernet frame, the second computer device verifies that the retransmitted Ethernet frame is successful, and determines that the retransmitted Ethernet frame is valid according to the second identifier. Next, the second computer device can upload the retransmitted Ethernet frame to the upper layer for processing.
  • FIG. 9B it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application. This process can be implemented based on the Ethernet architecture shown in FIG. 2 . Different from the retransmission process shown in FIG. 9A , the first switch obtains the retransmitted Ethernet frame by performing recovery processing on the Ethernet frame. For other processes, reference may be made to the introduction in the above content, which will not be repeated here.
  • FIG. 9B the content shown in FIG. 9B is described by taking “bit error occurs in the Ethernet frame in the Ethernet link “first computer device-first switch”” as an example, but it is not limited to these two node devices.
  • a bit error occurs on the road. For other cases where bit errors occur, reference may be made to the description of the above example, and details are not repeated here.
  • a case where a transmission error occurs again in the subsequent transmission process is illustrated by an example.
  • the third switch first caches the head part of the Ethernet frame, then looks up the table according to the destination address contained in the head part, finds the address of the output port to be sent, and sends the Ethernet frame to the second computer device. Due to a bit error, the third switch fails to verify the Ethernet frame.
  • the first switch determines that the Ethernet frame has been modified according to the first identifier (10) and the second identifier (11). Then, the third switch does not accept the Ethernet frame. Modification is performed, and the Ethernet frame is not retransmitted locally, and the Ethernet frame is directly sent to the second computer device.
  • the rate of each Ethernet link is 10G bits per second (bits per second, bps)
  • the transceiver unit of each Ethernet link and the propagation delay T link of the link are 500ns
  • the CUT-Through only The 20 bytes of the Ethernet frame header need to be buffered, and the exchange delay needs to add a fixed delay of 100ns in addition to the delay of storing the Ethernet frame or the Ethernet frame header.
  • the size of the retransmission request packet (NAK packet) is 64 bytes.
  • the payload field carrying user messages in an Ethernet frame is 1500 bytes.
  • T error2 T4+T5+T6
  • T4 is the time required for the second computer device to detect an erroneous Ethernet frame
  • T5 is the required transmission time of the retransmission request packet
  • the total time delay T error3 T7 + T8 , where T7 is an erroneous Ethernet frame transmitted to the first switch, and the first switch then sends a retransmission request
  • T8 is the transmission time required to retransmit the Ethernet frame
  • the delay of the embodiment of the present application is reduced by 76.5%-81.2%; compared with the second prior art, the delay of the embodiment of the present application is reduced by 52.5%.
  • the retransmission efficiency of the Ethernet error frame can be improved.
  • FIG. 10 it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application.
  • the transmission process of FIG. 10 is similar to that of FIGS. 9A and 9B, except that the Ethernet frame cannot be partially retransmitted at the first switch.
  • the first switch modifies the first flag of the Ethernet frame to the fifth state (01, indicating that it will not be partially retransmitted), and modifies the second flag to the first state (11, indicating that it is invalid).
  • FIG. 10 the content in FIG. 10 is described by taking “bit error occurs in the Ethernet frame in the Ethernet link “the first computer device - the first switch”” as an example, but it is not limited to one of the two node devices.
  • the Ethernet frames are in the Ethernet links "first switch-second switch”, “second switch-third switch”, and "third switch-second computer device”.
  • a bit error occurs on the road. For other cases where bit errors occur, reference may be made to the description of the above example, and details are not repeated here.
  • the modified Ethernet frame is sent to the second computer device.
  • the second computer device may determine that the Ethernet frame is invalid according to the second identifier in the modified Ethernet frame, and determine that the Ethernet frame is not partially retransmitted according to the first identifier, then the second computer device may report to the first computer
  • the device sends a global retransmission request.
  • the second computer device discards the modified Ethernet frame without uploading to the upper layer.
  • the second computer device waits to receive the retransmitted Ethernet frame. After receiving the retransmitted Ethernet frame, the second computer device verifies that the retransmitted Ethernet frame is successful, and determines that the retransmitted Ethernet frame is valid according to the second identifier in the retransmitted Ethernet frame. Next, the second computer device can upload the retransmitted Ethernet frame to the upper layer for processing.
  • the total time delay T error4 T9+T10+T11, where T9 is the time required for the second computer device to detect the erroneous Ethernet frame, and this time is the shortest to transmit the Ethernet frame.
  • T10 is the required transmission time for the retransmission request packet,
  • T11 is the transmission time required to retransmit the Ethernet frame,
  • the total delay of prior art one is between 14253.6 ns and 17853.6 ns.
  • the total time delay is comparable to that of the embodiment of the present application.
  • the delay of the embodiment of the present application is reduced by 50.6%-60.5%; compared with the second prior art, the delay of the embodiment of the present application is comparable.
  • the retransmission efficiency of the Ethernet error frame can be improved.
  • the above describes how each node device processes the Ethernet frame during the transmission of the Ethernet frame.
  • the destination device handles Ethernet frames.
  • the MAC address of the destination device is the same as the MAC address contained in the destination address field in the Ethernet frame.
  • FIG. 11A it is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application.
  • the method may be implemented based on the Ethernet system shown in FIG. 1 , and the destination device described below may be the second computer device shown in FIG. 1 .
  • the method includes but is not limited to the following steps.
  • a destination device receives an Ethernet frame, and checks the Ethernet frame.
  • the destination device detects whether the Ethernet frame is valid.
  • whether the Ethernet frame is valid can be understood as whether an error has occurred in the Ethernet frame during the transmission process before the Ethernet link between the destination device and the previous node device. Specifically, if the Ethernet frame is valid, it means that no error has occurred in the Ethernet frame in the previous transmission process; if the Ethernet frame is invalid, it means that the Ethernet frame has encountered an error in the previous transmission process.
  • the node device after the node device fails to verify the Ethernet frame, the node device adds the second identifier to the Ethernet frame. Then, the method for the destination device to detect whether the Ethernet frame is valid may be: detecting whether the Ethernet frame contains the second identifier. Specifically, if the Ethernet frame contains the second identifier, it is determined that the Ethernet frame is invalid; if the Ethernet frame does not contain the second identifier, it is determined that the Ethernet frame is valid.
  • the destination device can determine the length of the payload field according to the length field in the Ethernet frame. If the actually detected number of bytes of the payload field is greater than the number of bytes indicated by the length field, it can be determined that the Ethernet frame contains the The second identifier; if the actually detected number of bytes in the payload field is equal to the number of bytes indicated by the length field, it can be determined that the Ethernet frame does not contain the second identifier.
  • the Ethernet frame always includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid.
  • the method for the destination device to detect whether the Ethernet frame is valid may be: determining whether the Ethernet frame is valid according to the second identifier. Specifically, if the second identifier is in the first state, it is determined that the Ethernet frame is invalid; if the second identifier is in the second state, it is determined that the Ethernet frame is valid.
  • the second identifier in the third state is used to indicate that the second identifier is invalid. Then, it indicates that an error occurred in the previous transmission process, and the destination device determines that the Ethernet frame is invalid.
  • the node device may indicate that the Ethernet frame is invalid by inverting the FCS field of the Ethernet frame. Then, if the destination device successfully checks the Ethernet frame, it indicates that the Ethernet frame is valid.
  • the destination device may determine that the Ethernet frame is invalid. If the verification of the Ethernet frame fails, and the reversed CRC value is not the same as the CRC value contained in the Ethernet frame, it indicates that the Ethernet frame is in the Ethernet link between the destination device and the previous node device. An error occurred during transfer.
  • the Ethernet frame check is successful, indicating that there is no error in the transmission process of the Ethernet link "third switch-second computer device"; the Ethernet frame is valid, indicating that the Ethernet frame is in the Ethernet link. There were no errors in the respective transmissions up to the "Third Switch - Second Computer Device”. Therefore, it can be determined that the Ethernet frame is correctly transmitted, and the second computer device can deliver the Ethernet frame to the upper layer for data processing.
  • Ethernet frame is invalid, the destination device detects whether the Ethernet frame will be partially retransmitted.
  • the Ethernet frame includes a first identification for indicating whether the Ethernet frame is to be partially retransmitted.
  • the manner in which the destination device detects whether the Ethernet frame will be partially retransmitted is: determining whether the Ethernet frame will be partially retransmitted according to the first identifier. Specifically, if the first identifier is in the fourth state, it is determined that the Ethernet frame will be partially retransmitted; if the first identifier is in the fifth state, it is determined that the Ethernet frame will not be partially retransmitted. It should be noted that, for the related introduction of the first identifier, reference may be made to the introduction of the first identifier in the foregoing step S104.
  • the destination device may send a global retransmission request for the Ethernet frame to the first computer device.
  • the first computer device is a device that generates the Ethernet frame.
  • the MAC address of the first computer device is the same as the MAC address contained in the source address field of the Ethernet frame.
  • the global retransmission request refers to a retransmission request sent by the destination device of the Ethernet frame to the source device of the Ethernet frame.
  • the destination device waits for receiving the retransmitted Ethernet frame.
  • the Ethernet frame will be partially retransmitted, indicating that in the previous transmission process, the node device that received the erroneous Ethernet frame has the ability to obtain the retransmitted Ethernet frame, and the node device has tried the erroneous Ethernet frame.
  • the network frame is partially retransmitted. In this case, the destination device does not need to rely on itself to obtain the retransmitted Ethernet frame, and can wait to receive the retransmitted Ethernet frame. For example, reference may be made to the description in the embodiment shown in FIG. 9A or FIG. 9B .
  • the destination device if the current time is longer than the time when the Ethernet frame is received, the destination device sends a global retransmission request for the Ethernet frame to the first computer device.
  • the preset duration may be set manually, or may be the transmission duration required to transmit one Ethernet frame calculated by the destination device. In this way, when the node device fails to retransmit the Ethernet frame locally, the destination device can initiate a global retransmission request for the Ethernet frame, so as to improve the reliability of the transmission of the Ethernet frame.
  • the destination device When detecting that the Ethernet frame will not be partially retransmitted, the destination device sends a global retransmission request for the Ethernet frame to the first computer device.
  • Ethernet frame check fails, the destination device determines whether the Ethernet frame can be recovered locally.
  • the failure to check the Ethernet frame indicates that an error has occurred in the Ethernet frame during the transmission process of the Ethernet link between the destination device and the previous node device.
  • the destination device first attempts to recover the Ethernet frame.
  • the manner in which the destination device determines whether the Ethernet frame can be recovered locally may be: the destination device determines whether the Ethernet link between itself and the previous node device has the retransmission capability; or, the destination device determines whether it has the ability to recover the Ethernet frame. Ability.
  • the destination device recovers the Ethernet frame locally.
  • the Ethernet link between the destination device and the previous node device has a retransmission capability.
  • the destination device can obtain the recovered Ethernet frame by sending a partial retransmission request to the previous node device. Afterwards, the destination device performs verification on the recovered Ethernet frame, and for subsequent operations, refer to the description of step S302 and its subsequent steps.
  • the destination device itself has the ability to restore the Ethernet frame.
  • the second node device restores the Ethernet frame to obtain the restored Ethernet frame. After that, the destination device performs verification on the recovered Ethernet frame, and for subsequent operations, refer to the description of step S302 and its subsequent steps.
  • the destination device may send a global retransmission request for the Ethernet frame to the first computer device.
  • the destination device sends a global retransmission request for the Ethernet frame to the first computer device.
  • the destination device may also detect whether the Ethernet frame is valid before determining whether the Ethernet frame can be recovered locally. Exemplarily, for this embodiment, reference may be made to the method flowchart shown in FIG. 11B .
  • the destination device determines that the Ethernet frame Whether it can be restored locally, the steps to be executed afterward can refer to the descriptions in the above-mentioned steps S308-S310.
  • Ethernet frame has an error during the transmission process of the Ethernet link between the destination device and the previous node device, and an error also occurred during the previous transmission process, then the destination device waits to receive retransmission. Ethernet frame.
  • the communication apparatus 120 may be the second node device introduced in the foregoing method embodiments.
  • the communication device 120 may be any form of computer, server, switch, router, or network card, etc.; or a device in any form of computer, server, switch, router, or network card.
  • the communication device 120 includes a receiving unit 1201 , a checking unit 1202 , a modifying unit 1203 and a sending unit 1204 .
  • the receiving unit 1201 , the checking unit 1202 , the modifying unit 1203 and the sending unit 1204 will be introduced below.
  • the receiving unit 1201 is used for receiving Ethernet frames.
  • the verification unit 1202 is configured to verify the Ethernet frame.
  • the modifying unit 1203 is configured to modify the Ethernet frame when the Ethernet frame check fails, and the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate the Ethernet frame Whether it will be retransmitted locally.
  • the sending unit 1204 is configured to send the modified Ethernet frame.
  • the modified Ethernet frame further includes the second identifier, and the second identifier is used to indicate that the modified Ethernet frame is invalid.
  • the communication device further includes an acquisition unit, the acquiring unit is configured to acquire the Ethernet frame in the case that the Ethernet frame is to be partially retransmitted the retransmitted Ethernet frame; the verification unit 1202 is further configured to verify the retransmitted Ethernet frame; the sending unit 1204 is further configured to verify the retransmitted Ethernet frame On success, the retransmitted Ethernet frame is sent.
  • the obtaining unit is specifically configured to: send a partial retransmission request for the Ethernet frame; and receive the retransmitted Ethernet frame sent in response to the partial retransmission request.
  • the obtaining unit is specifically configured to: perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
  • the first identification is located after a payload field of the Ethernet frame.
  • the checking unit is specifically configured to: check the Ethernet frame and send some bits in the Ethernet frame; the sending unit is specifically configured to: continue to send the modified bits in the Ethernet frame except the partial bits.
  • each unit of the communication apparatus shown in FIG. 12 may be related to the foregoing method embodiments. It will not be described in detail here.
  • the above-mentioned units may be implemented in hardware, software or a combination of software and hardware.
  • the first identifier can indicate whether the erroneous Ethernet frame will be recovered by local retransmission, and the destination device receiving the erroneous Ethernet frame can choose whether to initiate global retransmission according to the first identifier
  • the request can save the transmission time of error frames and improve the retransmission efficiency of Ethernet error frames.
  • the communication apparatus 130 may be the destination device introduced in the foregoing method embodiments.
  • the communication device 130 may be any form of computer, server, switch, router, or network card, or the like; or a device in any form of computer, server, switch, router, or network card.
  • the communication device 130 includes a checking unit 1301 , a first detecting unit 1302 , a second detecting unit 1303 and a receiving unit 1304 .
  • the verification unit 1301 , the first detection unit 1302 , the second detection unit 1303 and the receiving unit 1304 are introduced below.
  • the verification unit 1301 is configured to receive an Ethernet frame and perform verification on the Ethernet frame.
  • the first detection unit 1302 is configured to detect whether the Ethernet frame is valid when the Ethernet frame is successfully checked.
  • the second detection unit 1303 is configured to detect whether the Ethernet frame will be partially retransmitted if the Ethernet frame is invalid.
  • the receiving unit 1304 is configured to wait for receiving the retransmitted Ethernet frame when it is detected that the Ethernet frame will be partially retransmitted.
  • the second identifier is used to indicate that the Ethernet frame is invalid
  • the first detection unit 1302 is specifically configured to: detect whether the Ethernet frame contains the second identifier; if so, determine the Ethernet frame The network frame is invalid; if not included, it is determined that the Ethernet frame is valid.
  • the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the first detection unit 1302 is specifically configured to: determine according to the second identifier Whether the Ethernet frame is valid; if the second identifier is in the first state, it is determined that the Ethernet frame is invalid; if the second identifier is in the second state, it is determined that the Ethernet frame is valid.
  • the Ethernet frame includes a first identifier, where the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted, and the second detection unit 1303 is specifically configured to: according to the The first identifier determines whether the Ethernet frame will be partially retransmitted; if the first identifier is in the fourth state, it is determined that the Ethernet frame will be partially retransmitted; if the first identifier is in the fifth state, then Make sure that Ethernet frames are not partially retransmitted.
  • the communication device further includes a first sending unit, and the first sending unit is configured to: when it is detected that the Ethernet frame will not be partially retransmitted, send a message for the Ethernet frame Global retransmission request.
  • the communication device further includes a determination unit and a recovery unit, the determination unit is configured to determine whether the Ethernet frame can be recovered locally when the Ethernet frame check fails; the The recovery unit is configured to perform local recovery on the Ethernet frame when it is determined that the Ethernet frame can be recovered locally.
  • the determining unit is specifically configured to: when the Ethernet frame check fails, detect whether the Ethernet frame is valid; if the Ethernet frame is valid, determine whether the Ethernet frame is valid Can be restored locally.
  • the receiving unit 1304 is further configured to: if the Ethernet frame is invalid, wait to receive the retransmitted Ethernet frame.
  • the communication device further includes a second sending unit, the second sending unit is configured to: if the current time is more than a preset time period from the time when the Ethernet frame is received, send data for the Ethernet frame Global retransmission request for network frames.
  • each unit of the communication apparatus shown in FIG. 13 may be related to the foregoing method embodiments. It will not be described in detail here.
  • the above-mentioned units may be implemented in hardware, software or a combination of software and hardware.
  • the Ethernet frame is detected to be invalid, it can be detected whether the Ethernet frame will be partially retransmitted. frame. It can be seen that after receiving an erroneous Ethernet frame, if it is detected that the erroneous Ethernet frame will be retransmitted locally, the destination device does not need to send a global retransmission request to the sending device of the Ethernet frame, which can save The transmission time of error frames improves the retransmission efficiency of Ethernet error frames.
  • Communication device 140 may include one or more processors 1401 .
  • the processor 1401 may be a general-purpose processor or a special-purpose processor or the like.
  • the processor 1401 can be used to control communication devices (computers, servers, switches, routers, network cards, etc. in any form), execute software programs, and process data of the software programs.
  • the communication device 140 may include one or more memories 1402, and instructions 1404 may be stored thereon, and the instructions may be executed on the processor 1401, so that the communication device 140 executes the above method methods described in the examples.
  • the memory 1402 may also store data.
  • the processor 1401 and the memory 1402 can be set independently or integrated together.
  • the communication device 140 may further include a transceiver 1405 and an antenna 1406 .
  • the transceiver 1405 may be referred to as a transceiver unit, a transceiver, or a transceiver circuit, etc., for implementing a transceiver function.
  • the transceiver 1405 may include a receiver and a transmitter, the receiver may be called a receiver or a receiving circuit, etc., for implementing a receiving function; the transmitter may be called a transmitter or a transmitting circuit, etc., for implementing a transmitting function.
  • the processor 1401 is configured to receive Ethernet frames through the transceiver 1405 .
  • the processor 1401 is further configured to verify the Ethernet frame; when the Ethernet frame verification fails, modify the Ethernet frame, and the modified Ethernet frame includes a first identifier, and the first identifier Used to indicate whether the Ethernet frame will be partially retransmitted.
  • the processor 1401 is further configured to transmit the modified Ethernet frame through the transceiver 1405 .
  • the communication apparatus 140 may be used to implement the method performed by the second node device in the foregoing method embodiment.
  • the operations performed by the processor 1401 may be related to the foregoing method embodiments. It will not be described in detail here.
  • the processor 1401 is configured to receive Ethernet frames through the transceiver 1405 .
  • the processor 1401 is further configured to verify the Ethernet frame; when the Ethernet frame verification is successful, detect whether the Ethernet frame is valid; if the Ethernet frame is invalid, detect the Ethernet frame Whether the frame will be partially retransmitted; when it is detected that the Ethernet frame will be partially retransmitted, wait to receive the retransmitted Ethernet frame.
  • the communication apparatus 140 can be used to implement the method performed by the destination device in the above method embodiments.
  • the operations performed by the processor 1401 may be related to the foregoing method embodiments. It will not be described in detail here.
  • the transceiver may be a transceiver circuit, or an interface, or an interface circuit.
  • Transceiver circuits, interfaces or interface circuits used to implement receiving and transmitting functions may be separate or integrated.
  • the above-mentioned transceiver circuit, interface or interface circuit can be used for reading and writing code/data, or the above-mentioned transceiver circuit, interface or interface circuit can be used for signal transmission or transmission.
  • the processor 1401 may store instructions 1403, and the instructions 1403 run on the processor 1401, so that the communication apparatus 140 can execute the methods described in the above method embodiments.
  • the instructions 1403 may be hardened in the processor 1401, in which case the processor 1401 may be implemented by hardware.
  • the communication apparatus 140 may include a circuit, and the circuit may implement the functions of sending or receiving or communicating in the foregoing method embodiments.
  • processors and transceivers described in this application can be implemented in integrated circuits (ICs), analog ICs, radio frequency integrated circuits (RFICs), mixed-signal ICs, application specific integrated circuits (ASICs), printed circuit boards ( printed circuit board, PCB), electronic equipment, etc.
  • ICs integrated circuits
  • RFICs radio frequency integrated circuits
  • ASICs application specific integrated circuits
  • PCB printed circuit board
  • electronic equipment etc.
  • the communication device described in the above embodiments may be an access point or a station, but the scope of the communication device described in this application is not limited thereto, and the structure of the communication device may not be limited by FIG. 14 .
  • the communication apparatus may be a stand-alone device or may be part of a larger device.
  • the communication means may be:
  • a set with one or more ICs may also include a storage component for storing data and instructions;
  • ASIC such as modem (Modem);
  • Receivers smart terminals, wireless devices, handsets, mobile units, vehicle-mounted devices, cloud devices, artificial intelligence devices, etc.;
  • the communication device may be a chip or a chip system
  • the chip 1500 shown in FIG. 15 includes a processor 1501 and an interface 1502 .
  • the number of processors 1501 may be one or more, and the number of interfaces 1502 may be multiple.
  • the interface 1502 is used for receiving Ethernet frames.
  • the processor 1501 verifies the Ethernet frame; when the Ethernet frame verification fails, modifies the Ethernet frame, and the modified Ethernet frame includes a first identifier, and the first identifier Used to indicate whether the Ethernet frame will be partially retransmitted.
  • the interface 1502 is further configured to send the modified Ethernet frame.
  • the interface 1502 is used for receiving Ethernet frames.
  • the processor 1501 is configured to verify the Ethernet frame; when the Ethernet frame is successfully verified, detect whether the Ethernet frame is valid; if the Ethernet frame is invalid, detect the Ethernet frame Whether the Ethernet frame will be partially retransmitted; when it is detected that the Ethernet frame will be partially retransmitted, wait to receive the retransmitted Ethernet frame.
  • the chip further includes a memory 1503, and the memory 1503 is used to store necessary programs and data of the terminal device.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a computer, the functions of any of the foregoing method embodiments are implemented.
  • the above-mentioned computer-readable storage medium includes, but is not limited to, flash memory, hard disk, and solid-state disk.
  • the present application also provides a computer program product, which implements the functions of any of the above method embodiments when the computer program product is executed by a computer.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer program may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, high-density digital video discs (DVDs)), or semiconductor media (eg, solid state disks, SSD)) etc.
  • At least one in this application may also be described as one or more, and the multiple may be two, three, four or more, which is not limited in this application.
  • the technical features are distinguished by “first”, “second”, “third”, “A”, “B”, “C” and “D”, etc.
  • the technical features in the “first”, “second”, “third”, “A”, “B”, “C” and “D” described technical features in no order or order of magnitude.
  • the corresponding relationships shown in each table in this application may be configured or predefined.
  • the values of the information in each table are only examples, and can be configured with other values, which are not limited in this application.
  • the corresponding relationships shown in some rows may not be configured.
  • appropriate deformation adjustments can be made based on the above table, for example, splitting, merging, and so on.
  • the names of the parameters shown in the headings in the above tables may also adopt other names that can be understood by the communication device, and the values or representations of the parameters may also be other values or representations that the communication device can understand.
  • other data structures can also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables, or hash tables. Wait.
  • Predefined in this application may be understood as defining, predefining, storing, pre-storing, pre-negotiating, pre-configuring, curing, or pre-firing.

Abstract

Disclosed in the embodiments of the present application are a retransmission method for an Ethernet error frame and a related apparatus. The method comprises: receiving an Ethernet frame; checking the Ethernet frame; when the check on the Ethernet frame fails, modifying the Ethernet frame, the modified Ethernet frame comprising a first identification which is used to indicate whether the Ethernet frame will be partially retransmitted; and then sending the modified Ethernet frame. By means of the method of the embodiments of the present application, the first identification can indicate whether an Ethernet frame in which an error occurs will be recovered by partial retransmission, and a destination device receiving the erroneous Ethernet frame can choose, according to the first identification, whether to initiate a global retransmission request, thus saving the transmission time of the error frame and improving the retransmission efficiency of the Ethernet error frame.

Description

一种以太网错误帧的重传方法及相关装置A method and related device for retransmission of Ethernet error frame
本申请要求于2020年8月24日提交中国国家知识产权局、申请号为202010862001.2、申请名称为“一种以太网错误帧的重传方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010862001.2 and the application title "A method and related device for retransmission of Ethernet error frames", which was submitted to the State Intellectual Property Office of China on August 24, 2020, all of which are The contents are incorporated herein by reference.
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种以太网错误帧的重传方法及相关装置。The present application relates to the field of computer technologies, and in particular, to a method and related apparatus for retransmission of Ethernet error frames.
背景技术Background technique
存储转发(store and forward)方式是以太网系统中常用的传输方式。在这种传输方式中,节点设备先将入口(ingress)侧到来的数据包缓存起来,检查帧的正确性(例如,基于循环冗余校验技术进行检查);确定包正确后,根据帧头携带的目的地址进行查表,找到需要发送的输出端口地址,然后将该数据包发送出去。由于节点设备在ingress侧需要缓存整个帧,缓存时延较长,影响传输效率。The store and forward mode is a commonly used transmission mode in the Ethernet system. In this transmission method, the node device first buffers the incoming data packets from the ingress side to check the correctness of the frame (for example, based on cyclic redundancy check technology); after confirming that the packet is correct, according to the frame header The destination address carried is checked in the table to find the output port address that needs to be sent, and then the data packet is sent out. Because the node device needs to buffer the entire frame on the ingress side, the buffering delay is long, which affects the transmission efficiency.
为了提升传输效率,本领域技术人员提出了直通交换(CUT-Through)方式。在这种传输方式中,节点设备在ingress侧检测到一个数据包时,缓存以太网帧的一部分(例如,缓存用于寻址的部分),之后根据这部分包含的目的地址进行查表,找到想要发送的输出端口地址,再将该数据包发送出去。与存储转发方式相比,CUT-Through方式可以大大降低传输时延。In order to improve the transmission efficiency, those skilled in the art propose a cut-through switching (CUT-Through) method. In this transmission method, when the node device detects a data packet on the ingress side, it buffers a part of the Ethernet frame (for example, the part used for addressing), and then looks up the table according to the destination address contained in this part to find the The output port address you want to send, and then send the packet out. Compared with the store-and-forward method, the CUT-Through method can greatly reduce the transmission delay.
但由于CUT-Through方式并未缓存完整的数据包,在数据包发生错误的情况下,节点设备不能在检测到数据包出错后丢弃错误的数据包(因为数据包在缓存到一部分之后就开始寻址转发了)。所以,在采用CUT-Through方式的情况下,为了保障数据可靠性,需要依赖接收端上层的校验机制对接收到的数据包进行校验,例如循环冗余校验(cyclic redundancy check,CRC)。当接收端检测到自身接收到的是错误的报文,则需要向发起端发送重传请求。那么,这个数据包的传输时延将是未发生错误时的传输时延的3倍。如何提升以太网错误帧的重传效率,是本领域技术人员亟待解决的问题。However, since the CUT-Through method does not cache the complete data packet, in the case of an error in the data packet, the node device cannot discard the erroneous data packet after detecting the data packet error (because the data packet starts to search after a part of the data packet is buffered. address forwarded). Therefore, in the case of using the CUT-Through method, in order to ensure the reliability of the data, it is necessary to rely on the verification mechanism of the upper layer of the receiving end to verify the received data packets, such as cyclic redundancy check (CRC) . When the receiver detects that it has received an erroneous packet, it needs to send a retransmission request to the initiator. Then, the transmission delay of this packet will be 3 times the transmission delay when no error occurs. How to improve the retransmission efficiency of Ethernet error frames is an urgent problem to be solved by those skilled in the art.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种以太网错误帧的重传方法及相关装置,可以提升以太网错误帧的重传效率。Embodiments of the present application provide a method and a related device for retransmission of Ethernet error frames, which can improve the retransmission efficiency of Ethernet error frames.
第一方面,本申请实施例提供了一种以太网错误帧的重传方法,该方法包括:接收以太网帧;对所述以太网帧进行校验;当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传;发送所述修改后的以太网帧。通过这种方式,第一标识可以表示发生错误的以太网帧是否将被局部重传恢复,接收该错误的以太网帧的目的设备可以根据该第一标识选择是否发起全局重传请求,能够节省错误帧的传输时间,提升以太网错误帧的重传效率。In a first aspect, an embodiment of the present application provides a method for retransmitting an Ethernet error frame, the method comprising: receiving an Ethernet frame; verifying the Ethernet frame; when the Ethernet frame verification fails , modifying the Ethernet frame, where the modified Ethernet frame includes a first identifier, where the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted; and the modified Ethernet frame is sent. In this way, the first identifier can indicate whether the erroneous Ethernet frame will be recovered by local retransmission, and the destination device receiving the erroneous Ethernet frame can choose whether to initiate a global retransmission request according to the first identifier, which can save The transmission time of error frames improves the retransmission efficiency of Ethernet error frames.
结合第一方面,在一种可能的实现方式中,所述修改后的以太网帧还包括第二标识,所述第二标识用于指示所述修改后的以太网帧无效。在本实现方式中,可以通过第二标识确定 以太网帧是否有效。With reference to the first aspect, in a possible implementation manner, the modified Ethernet frame further includes a second identifier, where the second identifier is used to indicate that the modified Ethernet frame is invalid. In this implementation manner, whether the Ethernet frame is valid can be determined through the second identifier.
结合第一方面,在一种可能的实现方式中,若所述以太网帧将被局部重传,则获取重传的以太网帧;对所述重传的以太网帧进行校验;在所述重传的以太网帧校验成功时,发送所述重传的以太网帧。在本实现方式中,在检测到以太网帧出现错误的情况下,传输过程中的节点设备可以获取重传的以太网帧。那么,接收该以太网帧的目的设备无需再向该以太网帧的发送设备发送全局重传请求,节省错误帧的传输时间,提升以太网错误帧的重传效率。With reference to the first aspect, in a possible implementation manner, if the Ethernet frame is to be partially retransmitted, the retransmitted Ethernet frame is obtained; the retransmitted Ethernet frame is checked; When the retransmitted Ethernet frame is successfully verified, the retransmitted Ethernet frame is sent. In this implementation manner, in the case of detecting that an error occurs in the Ethernet frame, the node device in the transmission process can obtain the retransmitted Ethernet frame. Then, the destination device receiving the Ethernet frame does not need to send a global retransmission request to the sending device of the Ethernet frame, which saves the transmission time of the error frame and improves the retransmission efficiency of the Ethernet error frame.
结合第一方面,在一种可能的实现方式中,所述获取重传的以太网帧,包括:发送针对所述以太网帧的局部重传请求;接收响应于所述局部重传请求发送的重传的以太网帧。With reference to the first aspect, in a possible implementation manner, the obtaining the retransmitted Ethernet frame includes: sending a partial retransmission request for the Ethernet frame; receiving a partial retransmission request sent in response to the partial retransmission request Retransmitted Ethernet frame.
结合第一方面,在一种可能的实现方式中,所述获取重传的以太网帧,包括:对所述以太网帧进行恢复处理,得到所述重传的以太网帧。With reference to the first aspect, in a possible implementation manner, the obtaining the retransmitted Ethernet frame includes: performing recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
结合第一方面,在一种可能的实现方式中,若检测到所述以太网帧无效,则发送所述以太网帧。在本实现方式中,以太网帧校验失败且无效,表明该以太网帧已被修改;则本次无需再对以太网帧进行修改。With reference to the first aspect, in a possible implementation manner, if it is detected that the Ethernet frame is invalid, the Ethernet frame is sent. In this implementation manner, if the Ethernet frame check fails and is invalid, it indicates that the Ethernet frame has been modified; then the Ethernet frame does not need to be modified this time.
结合第一方面,在一种可能的实现方式中,在所述修改所述以太网帧之前,所述方法还包括:确定所述以太网帧是否已被修改,若未被修改,则执行修改所述以太网帧的步骤;若已被修改,则不修改所述以太网帧,并直接发送所述以太网帧。With reference to the first aspect, in a possible implementation manner, before the modification of the Ethernet frame, the method further includes: determining whether the Ethernet frame has been modified, and if not, performing modification The step of the Ethernet frame; if it has been modified, the Ethernet frame is not modified, and the Ethernet frame is directly sent.
结合第一方面,在一种可能的实现方式中,所述第一标识位于所述以太网帧的净荷字段之后。在本实现方式中,由于以太网帧的发送是按照字节排布顺序依次发送,第一标识位于净荷字段之后的方式,可以便于修改以太网帧。With reference to the first aspect, in a possible implementation manner, the first identifier is located after the payload field of the Ethernet frame. In this implementation manner, since the Ethernet frames are sent in sequence according to the order of byte arrangement, the manner in which the first identifier is located after the payload field can facilitate the modification of the Ethernet frame.
结合第一方面,在一种可能的实现方式中,所述对所述以太网帧进行校验包括:对所述以太网帧进行校验并发送所述以太网帧中的部分比特;所述发送所述修改后的以太网帧包括:继续发送所述修改后的以太网帧中除所述部分比特之后的比特。With reference to the first aspect, in a possible implementation manner, the checking the Ethernet frame includes: checking the Ethernet frame and sending some bits in the Ethernet frame; the Sending the modified Ethernet frame includes: continuing to send bits in the modified Ethernet frame after the partial bits are removed.
第二方面,本申请实施例提供了又一种以太网错误帧的重传方法,该方法包括:接收以太网帧,对所述以太网帧进行校验;当所述以太网帧校验成功时,检测所述以太网帧是否有效;若所述以太网帧无效,则检测所述以太网帧是否将被局部重传;当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。通过这种方法,在接收到错误的以太网帧后,若检测到该错误的以太网帧将被局部重传,则目的设备等待接收重传的以太网帧,无需再向该以太网帧的发送设备发送全局重传请求,可以节省错误帧的传输时间,提升以太网错误帧的重传效率。In a second aspect, the embodiments of the present application provide another method for retransmitting an Ethernet error frame, the method includes: receiving an Ethernet frame, and verifying the Ethernet frame; when the Ethernet frame verification is successful If the Ethernet frame is invalid, check whether the Ethernet frame will be partially retransmitted; when it is detected that the Ethernet frame will be partially retransmitted, wait for receiving Retransmitted Ethernet frame. In this way, after receiving an erroneous Ethernet frame, if it is detected that the erroneous Ethernet frame will be partially retransmitted, the destination device waits to receive the retransmitted Ethernet frame, and does not need to send any further messages to the Ethernet frame. The sending device sends a global retransmission request, which can save the transmission time of error frames and improve the retransmission efficiency of Ethernet error frames.
结合第二方面,在一种可能的实现方式中,第二标识用于指示所述以太网帧无效,所述检测所述以太网帧是否有效,包括:检测所述以太网帧是否包含第二标识;若包含,则确定所述以太网帧无效;若不包含,则确定所述以太网帧有效。在本实现方式中,可以通过第二标识确定以太网帧是否有效。With reference to the second aspect, in a possible implementation manner, the second identifier is used to indicate that the Ethernet frame is invalid, and the detecting whether the Ethernet frame is valid includes: detecting whether the Ethernet frame contains the second If it is included, it is determined that the Ethernet frame is invalid; if it is not included, it is determined that the Ethernet frame is valid. In this implementation manner, whether the Ethernet frame is valid can be determined by using the second identifier.
结合第二方面,在一种可能的实现方式中,所述以太网帧包括第二标识,所述第二标识用于指示所述以太网帧是否有效,所述检测所述以太网帧是否有效,包括:根据所述第二标识确定所述以太网帧是否有效;若所述第二标识为第一状态,则确定所述以太网帧无效;若所述第二标识为第二状态,则确定所述以太网帧有效。在本实现方式中,可以通过第二标识确定以太网帧是否有效。With reference to the second aspect, in a possible implementation manner, the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the detecting whether the Ethernet frame is valid , including: determining whether the Ethernet frame is valid according to the second identifier; if the second identifier is in the first state, determining that the Ethernet frame is invalid; if the second identifier is in the second state, then It is determined that the Ethernet frame is valid. In this implementation manner, whether the Ethernet frame is valid can be determined by using the second identifier.
结合第二方面,在一种可能的实现方式中,所述以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传,所述检测所述以太网帧是否将被局部重传,包括:根据所述第一标识确定所述以太网帧是否将被局部重传;若所述第一标识为第四状态,则确 定以太网帧将被局部重传;若所述第一标识为第五状态,则确定以太网帧不会被局部重传。在本实现方式中,可以通过第一标识确定以太网帧是否将被局部重传。With reference to the second aspect, in a possible implementation manner, the Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame is to be partially retransmitted, and the detecting the Ethernet frame Whether the network frame will be partially retransmitted includes: determining whether the Ethernet frame will be partially retransmitted according to the first identifier; if the first identifier is in the fourth state, determining that the Ethernet frame will be partially retransmitted transmission; if the first identifier is in the fifth state, it is determined that the Ethernet frame will not be partially retransmitted. In this implementation manner, whether the Ethernet frame will be partially retransmitted may be determined by the first identifier.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当检测到所述以太网帧不会被局部重传时,发送针对所述以太网帧的全局重传请求。With reference to the second aspect, in a possible implementation manner, the method further includes: when it is detected that the Ethernet frame will not be locally retransmitted, sending a global retransmission request for the Ethernet frame.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复;当确定所述以太网帧可被本地恢复时,对以太网帧进行本地恢复。With reference to the second aspect, in a possible implementation manner, the method further includes: when the Ethernet frame check fails, determining whether the Ethernet frame can be recovered locally; when determining whether the Ethernet frame can be recovered locally; Local recovery is performed on the Ethernet frame when it can be recovered locally.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当检测到所述以太网帧不可被本地恢复时,发送针对所述以太网帧的全局重传请求。With reference to the second aspect, in a possible implementation manner, the method further includes: when it is detected that the Ethernet frame cannot be recovered locally, sending a global retransmission request for the Ethernet frame.
结合第二方面,在一种可能的实现方式中,所述方法还包括:当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复,包括:当所述以太网帧校验失败时,检测所述以太网帧是否有效;若所述以太网帧有效,则确定所述以太网帧是否可被本地恢复。在本实现方式中,以太网帧校验失败且有效,表明以太网帧在目的设备与上一个节点设备之前的以太网链路的传输中出现了错误,且以太网帧在该以太网链路之前的传输过程中未发生错误,则目的设备尝试对以太网帧进行恢复。因此,目的设备无需向该以太网帧的发送设备发送全局重传请求,节省错误帧的传输时间,提升以太网错误帧的重传效率。With reference to the second aspect, in a possible implementation manner, the method further includes: when the Ethernet frame check fails, determining whether the Ethernet frame can be recovered locally, including: when the Ethernet frame fails When the frame check fails, it is detected whether the Ethernet frame is valid; if the Ethernet frame is valid, it is determined whether the Ethernet frame can be recovered locally. In this implementation manner, the Ethernet frame check fails and is valid, indicating that an error occurs in the transmission of the Ethernet frame on the Ethernet link between the destination device and the previous node device, and the Ethernet frame is in the Ethernet link. If no errors occurred during the previous transmission, the destination device attempts to recover the Ethernet frame. Therefore, the destination device does not need to send a global retransmission request to the sending device of the Ethernet frame, which saves the transmission time of the erroneous frame and improves the retransmission efficiency of the Ethernet erroneous frame.
结合第二方面,在一种可能的实现方式中,所述方法还包括:若所述以太网帧无效,则等待接收重传的以太网帧。以太网帧校验失败且无效,表明以太网帧在目的设备与上一个节点设备之前的以太网链路的传输中出现了错误,且以太网帧在该以太网链路之前的传输过程中已发生错误,以太网帧已被修改,那么,目的设备可以等待接收节点设备获取的重传的以太网帧。因此,目的设备无需向该以太网帧的发送设备发送全局重传请求,节省错误帧的传输时间,提升以太网错误帧的重传效率。With reference to the second aspect, in a possible implementation manner, the method further includes: if the Ethernet frame is invalid, waiting to receive a retransmitted Ethernet frame. The Ethernet frame check fails and is invalid, indicating that the Ethernet frame has an error in the transmission of the Ethernet link between the destination device and the previous node device, and the Ethernet frame has been transmitted before the Ethernet link. If an error occurs and the Ethernet frame has been modified, the destination device can wait for the retransmitted Ethernet frame obtained by the receiving node device. Therefore, the destination device does not need to send a global retransmission request to the sending device of the Ethernet frame, which saves the transmission time of the erroneous frame and improves the retransmission efficiency of the Ethernet erroneous frame.
结合第二方面,在一种可能的实现方式中,在所述等待接收重传的以太网帧之后,所述方法还包括:若当前时刻距离接收到所述以太网帧的时刻超过预设时长,则发送针对所述以太网帧的全局重传请求。在本实现方式中,为了确保能够获取到正确的以太网帧,在检测到等待时长超过预设时长的情况下,目的设备将发送针对所述以太网帧的全局重传请求。With reference to the second aspect, in a possible implementation manner, after the waiting for receiving the retransmitted Ethernet frame, the method further includes: if the current time is more than a preset time period from the time when the Ethernet frame is received , a global retransmission request for the Ethernet frame is sent. In this implementation manner, in order to ensure that the correct Ethernet frame can be obtained, the destination device will send a global retransmission request for the Ethernet frame when it is detected that the waiting duration exceeds the preset duration.
第三方面,本申请实施例提供了一种通信装置,所述通信装置包括接收单元、校验单元、修改单元和发送单元,其中:所述接收单元,用于接收以太网帧;所述校验单元,用于对所述以太网帧进行校验;所述修改单元,用于当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传;所述发送单元,用于发送所述修改后的以太网帧。In a third aspect, an embodiment of the present application provides a communication device, the communication device includes a receiving unit, a checking unit, a modifying unit, and a sending unit, wherein: the receiving unit is configured to receive an Ethernet frame; The verification unit is used to verify the Ethernet frame; the modification unit is used to modify the Ethernet frame when the Ethernet frame verification fails, and the modified Ethernet frame includes the first identifier , the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted; the sending unit is used to send the modified Ethernet frame.
结合第三方面,在一种可能的实现方式中,所述修改后的以太网帧还包括所述第二标识,所述第二标识用于指示所述修改后的以太网帧无效。With reference to the third aspect, in a possible implementation manner, the modified Ethernet frame further includes the second identifier, where the second identifier is used to indicate that the modified Ethernet frame is invalid.
结合第三方面,在一种可能的实现方式中,所述通信装置还包括获取单元,所述获取单元,用于在所述以太网帧将被局部重传的情况下,获取重传的以太网帧;所述校验单元,还用于对所述重传的以太网帧进行校验;所述发送单元,还用于在所述重传的以太网帧校验成功时,发送所述重传的以太网帧。With reference to the third aspect, in a possible implementation manner, the communication device further includes an acquisition unit, the acquisition unit is configured to acquire the retransmitted Ethernet frame in the case that the Ethernet frame will be partially retransmitted network frame; the verification unit is further configured to verify the retransmitted Ethernet frame; the sending unit is further configured to send the retransmitted Ethernet frame when the verification of the retransmitted Ethernet frame is successful Retransmitted Ethernet frame.
结合第三方面,在一种可能的实现方式中,所述获取单元具体用于:发送针对所述以太网帧的局部重传请求;接收响应于所述局部重传请求发送的重传的以太网帧。With reference to the third aspect, in a possible implementation manner, the obtaining unit is specifically configured to: send a partial retransmission request for the Ethernet frame; receive a retransmitted Ethernet frame sent in response to the partial retransmission request web frame.
结合第三方面,在一种可能的实现方式中,所述获取单元具体用于:对所述以太网帧进行恢复处理,得到所述重传的以太网帧。With reference to the third aspect, in a possible implementation manner, the obtaining unit is specifically configured to: perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
结合第三方面,在一种可能的实现方式中,所述第一标识位于所述以太网帧的净荷字段之后。With reference to the third aspect, in a possible implementation manner, the first identifier is located after the payload field of the Ethernet frame.
结合第三方面,在一种可能的实现方式中,所述校验单元具体用于:对所述以太网帧进行校验并发送所述以太网帧中的部分比特;所述发送单元具体用于:继续发送所述修改后的以太网帧中除所述部分比特之后的比特。With reference to the third aspect, in a possible implementation manner, the check unit is specifically configured to: check the Ethernet frame and send some bits in the Ethernet frame; the sending unit is specifically configured to: To: continue to send bits in the modified Ethernet frame after the partial bits are removed.
第四方面,本申请实施例提供了一种通信装置,所述通信装置包括校验单元、第一检测单元、第二检测单元和接收单元,其中:所述校验单元,用于接收以太网帧,对所述以太网帧进行校验;所述第一检测单元,用于当所述以太网帧校验成功时,检测所述以太网帧是否有效;所述第二检测单元,用于若所述以太网帧无效,则检测所述以太网帧是否将被局部重传;所述接收单元,用于当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。In a fourth aspect, an embodiment of the present application provides a communication device, the communication device includes a verification unit, a first detection unit, a second detection unit, and a receiving unit, wherein: the verification unit is configured to receive Ethernet frame, to verify the Ethernet frame; the first detection unit is used to detect whether the Ethernet frame is valid when the Ethernet frame verification is successful; the second detection unit is used to If the Ethernet frame is invalid, detect whether the Ethernet frame will be partially retransmitted; the receiving unit is configured to wait for receiving the retransmitted Ethernet frame when it is detected that the Ethernet frame will be partially retransmitted web frame.
结合第四方面,在一种可能的实现方式中,第二标识用于指示所述以太网帧无效,所述第一检测单元具体用于:检测所述以太网帧是否包含第二标识;若包含,则确定所述以太网帧无效;若不包含,则确定所述以太网帧有效。With reference to the fourth aspect, in a possible implementation manner, the second identifier is used to indicate that the Ethernet frame is invalid, and the first detection unit is specifically configured to: detect whether the Ethernet frame contains the second identifier; if If it is included, it is determined that the Ethernet frame is invalid; if it is not included, it is determined that the Ethernet frame is valid.
结合第四方面,在一种可能的实现方式中,所述以太网帧包括第二标识,所述第二标识用于指示所述以太网帧是否有效,所述第一检测单元具体用于:根据所述第二标识确定所述以太网帧是否有效;若所述第二标识为第一状态,则确定所述以太网帧无效;若所述第二标识为第二状态,则确定所述以太网帧有效。With reference to the fourth aspect, in a possible implementation manner, the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the first detection unit is specifically configured to: Determine whether the Ethernet frame is valid according to the second identifier; if the second identifier is in the first state, determine that the Ethernet frame is invalid; if the second identifier is in the second state, determine the Ethernet frames are valid.
结合第四方面,在一种可能的实现方式中,所述以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传,所述第二检测单元具体用于:根据所述第一标识确定所述以太网帧是否将被局部重传;若所述第一标识为第四状态,则确定以太网帧将被局部重传;若所述第一标识为第五状态,则确定以太网帧不会被局部重传。With reference to the fourth aspect, in a possible implementation manner, the Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted, and the second detection unit It is specifically used to: determine whether the Ethernet frame will be partially retransmitted according to the first identifier; if the first identifier is in the fourth state, determine that the Ethernet frame will be partially retransmitted; If it is identified as the fifth state, it is determined that the Ethernet frame will not be partially retransmitted.
结合第四方面,在一种可能的实现方式中,所述通信装置还包括第一发送单元,所述第一发送单元用于:当检测到所述以太网帧不会被局部重传时,发送针对所述以太网帧的全局重传请求。With reference to the fourth aspect, in a possible implementation manner, the communication apparatus further includes a first sending unit, where the first sending unit is configured to: when it is detected that the Ethernet frame will not be partially retransmitted, A global retransmission request for the Ethernet frame is sent.
结合第四方面,在一种可能的实现方式中,所述通信装置还包括确定单元和恢复单元,所述确定单元,用于当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复;所述恢复单元,用于当确定所述以太网帧可被本地恢复时,对以太网帧进行本地恢复。With reference to the fourth aspect, in a possible implementation manner, the communication device further includes a determination unit and a recovery unit, and the determination unit is configured to determine the Ethernet frame when the Ethernet frame check fails Whether it can be recovered locally; the recovery unit is configured to perform local recovery on the Ethernet frame when it is determined that the Ethernet frame can be recovered locally.
结合第四方面,在一种可能的实现方式中,所述确定单元具体用于:当所述以太网帧校验失败时,检测所述以太网帧是否有效;若所述以太网帧有效,则确定所述以太网帧是否可被本地恢复。With reference to the fourth aspect, in a possible implementation manner, the determining unit is specifically configured to: when the Ethernet frame check fails, detect whether the Ethernet frame is valid; if the Ethernet frame is valid, It is then determined whether the Ethernet frame can be recovered locally.
结合第四方面,在一种可能的实现方式中,所述接收单元还用于:若所述以太网帧无效,则等待接收重传的以太网帧。With reference to the fourth aspect, in a possible implementation manner, the receiving unit is further configured to: if the Ethernet frame is invalid, wait to receive the retransmitted Ethernet frame.
结合第四方面,在一种可能的实现方式中,所述通信装置还包括第二发送单元,所述第二发送单元用于:若当前时刻距离接收到所述以太网帧的时刻超过预设时长,则发送针对所述以太网帧的全局重传请求。With reference to the fourth aspect, in a possible implementation manner, the communication device further includes a second sending unit, and the second sending unit is configured to: if the current time is more than a preset time from the time when the Ethernet frame is received duration, then send a global retransmission request for the Ethernet frame.
第五方面,本申请提供了又一种通信装置,所述通信装置包括处理器、存储器和收发器;所述收发器,用于接收以太网帧;所述存储器,用于存储程序代码;所述处理器,用于从所述存储器中调用所述程序代码执行如上述第一方面或者第一方面的任一可能的实现方式所描述的方法。In a fifth aspect, the present application provides yet another communication device, the communication device includes a processor, a memory, and a transceiver; the transceiver is used to receive Ethernet frames; the memory is used to store program codes; The processor is configured to call the program code from the memory to execute the method described in the first aspect or any possible implementation manner of the first aspect.
第六方面,本申请提供了又一种通信装置,所述通信装置包括处理器、存储器和收发器;所述收发器,用于接收以太网帧;所述存储器,用于存储程序代码;所述处理器,用于从所 述存储器中调用所述程序代码执行如上述第二方面或者第二方面的任一可能的实现方式所描述的方法。In a sixth aspect, the present application provides yet another communication device, the communication device includes a processor, a memory, and a transceiver; the transceiver is used to receive Ethernet frames; the memory is used to store program codes; The processor is configured to call the program code from the memory to execute the method described in the second aspect or any possible implementation manner of the second aspect.
第七方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储指令,当所述指令被执行时,使得如上述第一方面或者第一方面的任一可能的实现方式所描述的方法被实现。In a seventh aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store instructions, and when the instructions are executed, the first aspect or any one of the first aspect may be possible. The method described by the implementation is implemented.
第八方面,本申请提供了另一种计算机可读存储介质,所述计算机可读存储介质用于存储指令,当所述指令被执行时,使得如上述第二方面或者第二方面的任一可能的实现方式所描述的方法被实现。In an eighth aspect, the present application provides another computer-readable storage medium, where the computer-readable storage medium is used to store instructions, and when the instructions are executed, make the second aspect or any one of the second aspects described above. Possible implementations The described method is implemented.
第九方面,本申请提供了一种芯片系统,所述芯片系统包括至少一个处理器和接口,用于支持第一设备实现第一方面所涉及的功能,例如,接收或处理上述方法中所涉及的数据和信息中的至少一种。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存站点必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。In a ninth aspect, the present application provides a chip system, the chip system includes at least one processor and an interface for supporting the first device to implement the functions involved in the first aspect, for example, receiving or processing the functions involved in the above method. at least one of the data and information. In a possible design, the chip system further includes a memory for storing necessary program instructions and data of the site. The chip system may be composed of chips, or may include chips and other discrete devices.
第十方面,本申请提供了另一种芯片系统,所述芯片系统包括至少一个处理器和接口,用于支持第一设备实现第二方面所涉及的功能,例如,接收或处理上述方法中所涉及的数据和信息中的至少一种。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存接入点必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。In a tenth aspect, the present application provides another chip system, the chip system includes at least one processor and an interface for supporting the first device to implement the functions involved in the second aspect, for example, receiving or processing the functions involved in the above method. At least one of the data and information involved. In a possible design, the chip system further includes a memory for storing necessary program instructions and data of the access point. The chip system may be composed of chips, or may include chips and other discrete devices.
在本申请实施例中,第一标识可以表示发生错误的以太网帧是否将被局部重传恢复,接收该错误的以太网帧的目的设备可以根据该第一标识选择是否发起全局重传请求,能够节省错误帧的传输时间,提升以太网错误帧的重传效率。In this embodiment of the present application, the first identifier may indicate whether the erroneous Ethernet frame will be recovered by local retransmission, and the destination device that receives the erroneous Ethernet frame may select whether to initiate a global retransmission request according to the first identifier, It can save the transmission time of error frames and improve the retransmission efficiency of Ethernet error frames.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings that are required to be used in the description of the embodiments or the prior art.
图1是本申请实施例提供的一种以太网帧的帧格式的示意图;1 is a schematic diagram of a frame format of an Ethernet frame provided by an embodiment of the present application;
图2是本申请实施例提供的一种以太网系统的系统架构的示意图;2 is a schematic diagram of a system architecture of an Ethernet system provided by an embodiment of the present application;
图3是本申请实施例提供的一种以太网错误帧的重传流程的示意图;3 is a schematic diagram of a retransmission process of an Ethernet error frame provided by an embodiment of the present application;
图4是本申请实施例提供的又一种以太网错误帧的重传流程的示意图;4 is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application;
图5是本申请实施例提供的一种以太网错误帧的重传方法的流程图;5 is a flowchart of a method for retransmitting an Ethernet error frame provided by an embodiment of the present application;
图6是本申请实施例提供的又一种以太网帧的帧格式的示意图;6 is a schematic diagram of a frame format of another Ethernet frame provided by an embodiment of the present application;
图7是本申请实施例提供的又一种以太网帧的帧格式的示意图;7 is a schematic diagram of a frame format of another Ethernet frame provided by an embodiment of the present application;
图8A是本申请实施例提供的又一种以太网错误帧的重传方法的流程图;8A is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application;
图8B是本申请实施例提供的又一种以太网错误帧的重传方法的流程图FIG. 8B is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application
图9A是本申请实施例提供的又一种以太网错误帧的重传流程的示意图;9A is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application;
图9B是本申请实施例提供的又一种以太网错误帧的重传流程的示意图;9B is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application;
图10是本申请实施例提供的又一种以太网错误帧的重传流程的示意图;10 is a schematic diagram of a retransmission process of another Ethernet error frame provided by an embodiment of the present application;
图11A是本申请实施例提供的又一种以太网错误帧的重传方法的流程图;11A is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application;
图11B是本申请实施例提供的又一种以太网错误帧的重传方法的流程图;11B is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application;
图12是本申请实施例提供的一种通信装置的示意图;FIG. 12 is a schematic diagram of a communication device provided by an embodiment of the present application;
图13是本申请实施例提供的又一种通信装置的示意图;FIG. 13 is a schematic diagram of another communication device provided by an embodiment of the present application;
图14是本申请实施例提供的又一种通信装置的示意图;FIG. 14 is a schematic diagram of another communication device provided by an embodiment of the present application;
图15是本申请实施例提供的一种芯片的结构示意图。FIG. 15 is a schematic structural diagram of a chip provided by an embodiment of the present application.
具体实施方式detailed description
下面对本申请实施例中的技术方案进行更详细地描述。The technical solutions in the embodiments of the present application are described in more detail below.
本申请的技术方案可以应用于以太网(Ethernet),它是一种计算机局域网。举例来说,本申请的应用场景可以是基于电气和电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)802.3标准或者IEEE 802.1标准的以太网,或者是基于IEEE 802.3下一代标准的以太网。The technical solution of the present application can be applied to Ethernet (Ethernet), which is a computer local area network. For example, the application scenario of the present application may be an Ethernet based on the Institute of Electrical and Electronics Engineers (IEEE) 802.3 standard or the IEEE 802.1 standard, or an Ethernet based on the IEEE 802.3 next-generation standard.
以下对本申请实施例涉及到的一些概念进行介绍。Some concepts involved in the embodiments of the present application are introduced below.
1、以太网帧1. Ethernet frame
以太网帧是在以太网链路上传输的数据包。参见图1,图1是本申请实施例提供的一种以太网帧的帧格式的示意图。该以太网帧可以包含如下字段:Ethernet frames are packets of data transmitted over an Ethernet link. Referring to FIG. 1, FIG. 1 is a schematic diagram of a frame format of an Ethernet frame provided by an embodiment of the present application. The Ethernet frame can contain the following fields:
前导码(preamble)字段,包括7个字节,该前同步码1和0交替。接收端的适配器在接收媒体接入控制(media access control,MAC)帧时能够根据该前同步码字段调整时钟频率,使它和发送端的频率同步。帧开始定界符(SFD)字段,包括1个字节,其中8位中前六位1和0交替,最后两位为连续1,表示后续内容为帧信息。目的地址(destination address)字段,包括6字节,用于指示该以太网帧的接收设备的媒体接入控制(media access control,MAC)地址。源地址(source address)字段,包括6字节,用于指示该以太网帧的发送设备的MAC地址。类型(type)字段,包括2字节,用来标记上一层使用的是什么协议,以便把收到的MAC帧的净荷字段上交给上一层的这个协议。例如,该字段为0x0800时,表示净荷(或称为有效载荷、数据)交付给网际互连协议(Internet Protocol,IP);该字段为0x0806时,表示将净荷交付给地址解析协议(Address Resolution Protocol,ARP);该字段为0X8035时,表示将净荷交付给反向地址转换协议(Reverse Address Resolution Protocol,RARP)。在一些标准中,类型字段所在的位置处的2个字节为长度字段,长度字段用于指示净荷字段的长度。示例性的,可以根据这个字段的数值大小来判断是什么字段,若小于或等于1536(0x600),则这个字段是长度字段;若大于1536,则这个字段是类型字段。净荷(payload)字段,也可以称为有效载荷字段或者数据字段,它包括需要交付给上层的数据。其中,以太网帧数据长度规定最小为46字节,最大为1500字节(或者为1504、1982字节,不同的标准中可以有不同的规定),如果数据不到46字节时,会用填充字节填充到最小长度。最大值也叫最大传输单元(MTU)。帧检验序列(FCS)字段,包括4字节,用于检测该以太网帧是否发生错误。在一些实施例中,该以太网帧还可以包括扩展(extension)字段。The preamble field, including 7 bytes, alternates between 1 and 0 of the preamble. The adapter at the receiving end can adjust the clock frequency according to the preamble field when receiving a media access control (media access control, MAC) frame, so that it is synchronized with the frequency of the sending end. The frame start delimiter (SFD) field includes 1 byte, in which the first six bits of the 8 bits are alternated with 1 and 0, and the last two bits are continuous 1, indicating that the subsequent content is frame information. The destination address field, including 6 bytes, is used to indicate the media access control (media access control, MAC) address of the receiving device of the Ethernet frame. The source address field, including 6 bytes, is used to indicate the MAC address of the sending device of the Ethernet frame. The type field, including 2 bytes, is used to mark the protocol used by the upper layer, so that the payload field of the received MAC frame can be handed over to the protocol of the upper layer. For example, when the field is 0x0800, it means that the payload (or payload, data) is delivered to the Internet Protocol (IP); when the field is 0x0806, it means that the payload is delivered to the Address Resolution Protocol (Address). Resolution Protocol, ARP); when this field is 0X8035, it indicates that the payload is delivered to the Reverse Address Resolution Protocol (RARP). In some standards, the 2 bytes where the type field is located is the length field, which is used to indicate the length of the payload field. Exemplarily, the field can be determined according to the numerical value of this field. If it is less than or equal to 1536 (0x600), this field is a length field; if it is greater than 1536, this field is a type field. The payload field, also known as the payload field or the data field, includes the data that needs to be delivered to the upper layer. Among them, the minimum length of Ethernet frame data is 46 bytes, and the maximum is 1500 bytes (or 1504, 1982 bytes, different standards can have different regulations), if the data is less than 46 bytes, it will use Padding bytes are padded to the minimum length. The maximum value is also called the maximum transmission unit (MTU). The Frame Check Sequence (FCS) field, consisting of 4 bytes, is used to detect whether an error has occurred in the Ethernet frame. In some embodiments, the Ethernet frame may also include an extension field.
2、以太网帧校验2. Ethernet frame check
节点设备对接收到的以太网帧进行校验,若校验成功,表明该以太网帧在节点设备与上一个节点设备之间的以太网链路的传输过程中未出现错误;若校验失败,表明该以太网帧在节点设备与上一个节点设备之间的以太网链路的传输过程中出现了错误。The node device verifies the received Ethernet frame. If the verification is successful, it indicates that there is no error in the transmission of the Ethernet frame between the node device and the previous node device; if the verification fails , indicating that the Ethernet frame has an error during the transmission of the Ethernet link between the node device and the previous node device.
在一些实现方式中,可以通过CRC校验的方式对以太网帧进行校验。In some implementations, the Ethernet frame can be checked by means of CRC check.
CRC校验的原理是:发送设备根据要发送的数据按照预设计算方式计算出CRC值,并随着数据一同发送给接收设备。示例性的,参见图1,FCS字段中包含CRC值。接收设备对 收到的数据按照相同的计算方式计算出CRC值,之后,接收设备比较接收到的CRC值与计算出的CRC值。具体的,若两个CRC值不相同,则以太网帧校验失败;若两个CRC值相同,则以太网帧校验成功。The principle of CRC check is: the sending device calculates the CRC value according to the preset calculation method according to the data to be sent, and sends it to the receiving device together with the data. Exemplarily, referring to FIG. 1 , the FCS field contains a CRC value. The receiving device calculates the CRC value according to the same calculation method for the received data, and then the receiving device compares the received CRC value with the calculated CRC value. Specifically, if the two CRC values are different, the Ethernet frame check fails; if the two CRC values are the same, the Ethernet frame check succeeds.
但需要说明的是,节点设备不能通过校验结果知晓以太网帧在之前的传输过程中是否发生了错误。举例而言,若上一个节点设备发送给该节点设备的以太网帧原本就是错误的以太网帧,且错误的以太网帧在上一个节点设备到该节点设备的以太网链路的传输过程中并未出现错误,那么,节点设备对该以太网帧的校验也是成功的。However, it should be noted that the node device cannot know whether an error occurred in the previous transmission process of the Ethernet frame through the check result. For example, if the Ethernet frame sent by the previous node device to the node device is originally a wrong Ethernet frame, and the wrong Ethernet frame is in the transmission process of the Ethernet link from the previous node device to the node device. If no error occurs, then the verification of the Ethernet frame by the node device is also successful.
另外,节点设备也可以对以太网帧采用其他的校验方式,例如,检验和(check sum)、比特交织奇偶校验(bit interleaved parity,BIP),等等,本申请实施例不限定校验的方式。以下实施例主要以CRC校验为例进行介绍。In addition, the node device may also use other check methods for the Ethernet frame, for example, check sum (check sum), bit interleaved parity (bit interleaved parity, BIP), etc., and the embodiment of the present application does not limit the checksum The way. The following embodiments mainly take the CRC check as an example for introduction.
3、以太网帧有效3. Ethernet frame is valid
由于以太网帧的校验结果只能表明以太网帧在节点设备与上一个节点设备之间的以太网链路的传输过程中是否发生错误,目的设备对接收到的以太网帧校验成功之后,还需要对以太网帧的有效性进行判断。其中,目的设备是最终接收该以太网帧的设备,目的设备的MAC地址与该以太网帧中的目的地址字段包含的MAC地址相同。Since the verification result of the Ethernet frame can only indicate whether an error occurs during the transmission of the Ethernet frame between the node device and the previous node device, after the destination device successfully checks the received Ethernet frame , it is also necessary to judge the validity of the Ethernet frame. The destination device is the device that finally receives the Ethernet frame, and the MAC address of the destination device is the same as the MAC address contained in the destination address field in the Ethernet frame.
具体的,以太网帧有效,表示该以太网帧在目的设备与上一个节点设备的以太网链路之前的传输过程中未出现过错误;以太网帧无效,表示该以太网帧在目的设备与上一个节点设备的以太网链路之前的传输过程中出现过错误。后续内容中,将对判定以太网帧是否有效的方式进行具体的介绍。Specifically, if the Ethernet frame is valid, it means that there is no error in the transmission process of the Ethernet frame before the Ethernet link between the destination device and the previous node device; if the Ethernet frame is invalid, it means that the Ethernet frame is between the destination device and the previous node device. An error occurred during the previous transmission of the Ethernet link of the previous node device. In the following content, the method for determining whether the Ethernet frame is valid will be introduced in detail.
4、局部重传4. Local retransmission
在本申请实施例中,若节点设备校验以太网帧失败之后,节点设备可以通过局部重传的方式来获取重传的以太网帧。局部重传的含义为:节点设备通过自身能力对以太网帧进行恢复处理,得到重传的以太网帧;或者,节点设备向上一个节点设备发送针对以太网帧的重传请求,通过本节点设备与上一个节点设备之间的以太网链路,从上一个节点设备处获取重传的以太网帧。其中,节点设备向上一个节点设备发送的针对以太网帧的重传请求,可以称为局部重传请求。另外,在获取了重传的以太网帧之后,节点设备向下一个节点设备发送该重传的以太网帧。In this embodiment of the present application, if the node device fails to verify the Ethernet frame, the node device can obtain the retransmitted Ethernet frame by means of partial retransmission. The meaning of local retransmission is: the node device recovers the Ethernet frame through its own capabilities, and obtains the retransmitted Ethernet frame; The Ethernet link with the previous node device obtains the retransmitted Ethernet frame from the previous node device. The retransmission request for the Ethernet frame sent by the node device to the previous node device may be referred to as a partial retransmission request. In addition, after acquiring the retransmitted Ethernet frame, the node device sends the retransmitted Ethernet frame to the next node device.
5、全局重传5. Global retransmission
在本申请实施例中,全局重传的含义是:目的设备向源设备发送针对以太网帧的重传请求,通过目的设备与源设备之间的以太网链路,从源设备处获取重传的以太网帧。其中,源设备是生成所述以太网帧的设备,源设备的MAC地址与所述以太网帧的源地址字段中包含的MAC地址相同。目的设备向源设备发送的针对以太网帧的重传请求,可以称为全局重传请求。In the embodiment of the present application, the meaning of global retransmission is: the destination device sends a retransmission request for the Ethernet frame to the source device, and obtains the retransmission from the source device through the Ethernet link between the destination device and the source device. Ethernet frame. The source device is a device that generates the Ethernet frame, and the MAC address of the source device is the same as the MAC address included in the source address field of the Ethernet frame. The retransmission request for the Ethernet frame sent by the destination device to the source device may be called a global retransmission request.
6、本地恢复6. Local recovery
在本申请实施例中,在目的设备对接收到的以太网帧校验失败之后,可以通过本地恢复的方式来获取恢复的以太网帧。本地恢复的含义为:目的设备通过自身能力对以太网帧进行恢复处理,得到恢复的以太网帧;或者,目的设备向上一个节点设备发送针对以太网帧的重传请求,通过本目的设备与上一个节点设备之间的以太网链路,从上一个节点设备处获取恢复的以太网帧。在获取了恢复的以太网帧之后,目的设备再次对恢复的以太网帧进行校验,以及后续的操作,可参照后续内容中的介绍。In this embodiment of the present application, after the destination device fails to verify the received Ethernet frame, the recovered Ethernet frame may be acquired in a local recovery manner. The meaning of local recovery is: the destination device recovers the Ethernet frame through its own capabilities, and obtains the recovered Ethernet frame; An Ethernet link between node devices obtains recovered Ethernet frames from the previous node device. After acquiring the recovered Ethernet frame, the destination device verifies the recovered Ethernet frame again, and for the subsequent operations, please refer to the introduction in the subsequent content.
参见图2,是本申请实施例提供的一种以太网系统的系统架构的示意图。如图2所示,该以太网系统包括计算机设备(示例为第一计算机设备、第二计算机设备)以及交换机(示例为第一交换机、第二交换机和第三交换机)。在该以太网系统中,节点设备两两之间通过以太网链路连接,以实现数据传输。需要说明的是,该以太网系统中至少包括两个节点设备,可以包含相比于图2更多或者更少的设备,此处不作限制,仅以图2作为示例。其中:Referring to FIG. 2 , it is a schematic diagram of a system architecture of an Ethernet system provided by an embodiment of the present application. As shown in FIG. 2 , the Ethernet system includes computer equipment (for example, a first computer equipment, a second computer equipment) and switches (for example, a first switch, a second switch, and a third switch). In this Ethernet system, node devices are connected by Ethernet links to realize data transmission. It should be noted that the Ethernet system includes at least two node devices, and may include more or less devices than those shown in FIG. 2 , which is not limited here, and only FIG. 2 is used as an example. in:
计算机设备,可以用于实现数据生成、接收,数据传输,数据处理等功能。可选的,该计算机设备还可以为服务器(例如,网络管理服务器,设备管理服务器,认证服务器,定位服务器)等网络设备。Computer equipment, which can be used to realize functions such as data generation, reception, data transmission, and data processing. Optionally, the computer device may also be a network device such as a server (for example, a network management server, a device management server, an authentication server, and a positioning server).
交换机,可以用于实现数据传输等功能。它可以按照通信两端的信息传输需求,把需要传输的数据向目的地址发送。可选的,该交换机还可以为网卡、集线器、路由器等网络连接设备。The switch can be used to realize functions such as data transmission. It can send the data to be transmitted to the destination address according to the information transmission requirements of both ends of the communication. Optionally, the switch may also be a network connection device such as a network card, a hub, and a router.
示例性的,第一计算机设备生成以太网帧,向第二计算机设备发送该以太网帧。在该以太网帧的传输过程中,经过以太网链路“第一计算机设备-第一交换机”“第一交换机-第二交换机”“第二交换机-第三交换机”和“第三交换机-第二计算机设备”,以及以太网节点设备“第一交换机”“第二交换机”和“第三交换机”。本申请实施例提供的以太网错误帧的重传方法,适用于以太网系统中以太网帧的传输过程。Exemplarily, the first computer device generates an Ethernet frame and sends the Ethernet frame to the second computer device. During the transmission of the Ethernet frame, through the Ethernet links "first computer device-first switch", "first switch-second switch", "second switch-third switch" and "third switch-first switch" Two Computer Devices", and Ethernet Node Devices "First Switch", "Second Switch" and "Third Switch". The method for retransmitting an Ethernet error frame provided by the embodiment of the present application is applicable to the transmission process of the Ethernet frame in the Ethernet system.
首先,对现有技术中的一些以太网错误帧的重传方法进行介绍,以第一计算机设备生成以太网帧,向第二计算机设备发送该以太网帧为例。First, some methods for retransmitting Ethernet error frames in the prior art are introduced, taking the first computer device generating the Ethernet frame and sending the Ethernet frame to the second computer device as an example.
在一种方式中,以太网采用存储转发(store and forward)的方式传输以太网帧。在这种传输方式中,节点设备先将入口(ingress)侧到来的数据包缓存起来,检查帧的正确性(例如,基于循环冗余校验技术进行检查)。若检测以太网帧正确,则节点设备根据帧头携带的目的地址进行查表,找到需要发送的输出端口地址,然后将该以太网帧发送出去。若检测到以太网帧出现错误,则节点设备丢弃这个以太网帧。In one approach, Ethernet transmits Ethernet frames in a store-and-forward manner. In this transmission mode, the node device first buffers the incoming data packets from the ingress side, and checks the correctness of the frame (for example, checking based on the cyclic redundancy check technology). If the detected Ethernet frame is correct, the node device will look up the table according to the destination address carried in the frame header, find the output port address to be sent, and then send the Ethernet frame. If an error is detected in the Ethernet frame, the node device discards the Ethernet frame.
参见图3,是本申请实施例提供的一种以太网错误帧的重传流程的示意图。对于一个以太网帧而言,H为帧头(head)部分,P为净荷(或称为有效载荷)(Payload)部分,F为帧检验序列(frame check sequence,FCS)部分。需要说明的是,F部分图中示例为F 1、F 2,是为了区分不同的两个帧校验序列。示例性的,F部分可以包括CRC-32字段,用于校验以太网帧的正确性。其中,示例了以太网帧传输正确和传输出现错误两种情况。 Referring to FIG. 3 , it is a schematic diagram of a retransmission process of an Ethernet error frame provided by an embodiment of the present application. For an Ethernet frame, H is a frame header (head) part, P is a payload (or called a payload) (Payload) part, and F is a frame check sequence (frame check sequence, FCS) part. It should be noted that the examples in the figure in part F are F 1 and F 2 , in order to distinguish two different frame check sequences. Exemplarily, the F part may include a CRC-32 field for checking the correctness of the Ethernet frame. Among them, two cases of correct transmission of Ethernet frames and errors in transmission are illustrated.
传输正确的情况:第一交换机接收第一计算机设备发送的以太网帧,第一交换机对以太网帧进行CRC校验。在传输正确的情况下,接收设备计算出的CRC值(示例为F 1)与接收到的以太网帧中包含的CRC值(示例为F 1)相同。 The case of correct transmission: the first switch receives the Ethernet frame sent by the first computer device, and the first switch performs CRC check on the Ethernet frame. In the case of correct transmission, the CRC value calculated by the receiving device (F 1 in the example) is the same as the CRC value contained in the received Ethernet frame (F 1 in the example).
第一交换机校验以太网帧成功之后,向第二交换机发送该以太网帧。按照相似的流程,该以太网帧经过第二交换机、第三交换机的传输,最终达到目的接收设备,即第二计算机设备。After the first switch successfully checks the Ethernet frame, it sends the Ethernet frame to the second switch. According to a similar process, the Ethernet frame is transmitted through the second switch and the third switch, and finally reaches the destination receiving device, that is, the second computer device.
传输出现错误的情况(以以太网帧在以太网链路“第一计算机设备-第一交换机”发生误码为例):第一交换机接收第一计算机设备发送的以太网帧,第一交换机对以太网帧进行CRC校验。由于以太网帧传输过程中出现误码,第一交换机计算出的CRC值(示例为F 2)与接收到的CRC值(示例为F 1)不相同,则判定该以太网帧有误,则丢弃该以太网帧。第二计算机设备检测到丢包(例如,采用超时机制判定丢包、判定接收到下一个以太网帧),则向第一计算机设备发送重传请求(示例为否定应答(Negative Acknowledgment,NAK)报文)。接下来,第一计算机设备根据该重传请求向该第二计算机设备发送重传的以太网帧。可以看出,采用 这种错误帧的重传方式,接收到重传的以太网帧的时延,会是以太网帧传输未发生错误的情况下的至少三倍。 In the case of an error in transmission (taking the Ethernet frame error code on the Ethernet link "the first computer device - the first switch" as an example): the first switch receives the Ethernet frame sent by the first computer device, and the first switch pairs Ethernet frames are CRC checked. Due to an error occurred during the transmission of the Ethernet frame, the CRC value calculated by the first switch (F 2 in the example) is different from the received CRC value (F 1 in the example), then it is determined that the Ethernet frame is in error, then Drop the Ethernet frame. The second computer device detects the packet loss (for example, uses a timeout mechanism to determine the packet loss and determines that the next Ethernet frame is received), and then sends a retransmission request (for example, Negative Acknowledgment, NAK) to the first computer device. Arts). Next, the first computer device sends the retransmitted Ethernet frame to the second computer device according to the retransmission request. It can be seen that, by adopting this method of retransmission of the erroneous frame, the delay in receiving the retransmitted Ethernet frame will be at least three times that of the case where no error occurs in the transmission of the Ethernet frame.
在另一种方式中,为了提升传输效率,本领域技术人员提出了直通交换(CUT-Through)的传输方式。在这种传输方式中,节点设备在ingress侧检测到一个数据包时,缓存以太网帧的一部分(例如,缓存用于寻址的部分,示例为帧头),之后根据这部分包含的目的地址进行查表,找到想要发送的输出端口地址,再将该数据包发送出去。与存储转发方式相比,CUT-Through方式可以大大降低传输时延。但由于CUT-Through方式并未缓存完整的数据包,在数据包发生错误的情况下,节点设备不能在检测到数据包出错后丢弃错误的数据包(因为数据包在缓存到一部分之后就开始寻址转发了)。所以,在采用CUT-Through方式的情况下,为了保障数据可靠性,需要依赖接收端上层(MAC层的上层,即IP层、应用层等等)的校验机制对接收到的数据包进行校验,例如循环冗余校验(cyclic redundancy check,CRC)。当接收端检测到自身接收到的是错误的报文,则需要向发起端发送重传请求。In another way, in order to improve the transmission efficiency, those skilled in the art propose a transmission way of cut-through switching (CUT-Through). In this transmission mode, when the node device detects a data packet on the ingress side, it buffers a part of the Ethernet frame (for example, the part used for addressing, such as the frame header), and then according to the destination address contained in this part Look up the table, find the output port address you want to send, and then send the packet. Compared with the store-and-forward method, the CUT-Through method can greatly reduce the transmission delay. However, since the CUT-Through method does not cache the complete data packet, in the case of an error in the data packet, the node device cannot discard the erroneous data packet after detecting the data packet error (because the data packet starts to search after a part of the data packet is buffered. address forwarded). Therefore, in the case of using the CUT-Through method, in order to ensure the reliability of the data, it is necessary to rely on the verification mechanism of the upper layer of the receiving end (the upper layer of the MAC layer, that is, the IP layer, the application layer, etc.) to verify the received data packets. Check, such as cyclic redundancy check (cyclic redundancy check, CRC). When the receiver detects that it has received an erroneous packet, it needs to send a retransmission request to the initiator.
参见图4,是本申请实施例提供的又一种以太网错误帧的重传流程的示意图。图4的以太网系统架构与图2相似,第一计算机设备生成以太网帧,向第二计算机设备发送该以太网帧。该以太网的传输过程可参照上述介绍,此处不再赘述。在该以太网帧中,H为head部分,P为Payload部分,F为FCS部分,f为检验部分(例如,可以是CRC-16字段)。第二计算机设备可以根据f,依赖应用层校验机制,判断接收到的以太网帧是否有误。Referring to FIG. 4 , it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application. The Ethernet system architecture of FIG. 4 is similar to that of FIG. 2. The first computer device generates an Ethernet frame and sends the Ethernet frame to the second computer device. For the transmission process of the Ethernet, reference may be made to the above introduction, and details are not repeated here. In the Ethernet frame, H is the head part, P is the payload part, F is the FCS part, and f is the check part (for example, it can be a CRC-16 field). The second computer device may, according to f, rely on the application layer verification mechanism to determine whether the received Ethernet frame is in error.
传输正确的情况:第一交换机接收第一计算机设备发送的以太网帧,第一交换机对以太网帧进行CRC校验。第一交换机校验以太网帧成功之后,向第二交换机发送该以太网帧。按照相似的流程,该以太网帧经过第二交换机、第三交换机的传输,最终达到目的接收设备,即第二计算机设备。第二计算机设备可以根据f,依赖应用层校验机制,判断接收到的以太网帧无误。The case of correct transmission: the first switch receives the Ethernet frame sent by the first computer device, and the first switch performs CRC check on the Ethernet frame. After the first switch successfully checks the Ethernet frame, it sends the Ethernet frame to the second switch. According to a similar process, the Ethernet frame is transmitted through the second switch and the third switch, and finally reaches the destination receiving device, that is, the second computer device. The second computer device may, according to f, rely on the application layer verification mechanism to determine that the received Ethernet frame is correct.
传输出现错误的情况(以以太网帧在以太网链路“第一计算机设备-第一交换机”发生误码为例):第一交换机首先缓存以太网帧head部分,之后根据head部分包含的目的地址进行查表,找到想要发送的输出端口地址,再将以太网帧发送给第二交换机。由于发生误码,f部分发生错误,发生错误后的这部分示例为f’部分。第一交换机向发生错误的以太网帧发送给第二交换机。由于第二交换机接收到以太网帧已经是发生了错误的以太网帧,第二交换机接收到的以太网帧的CRC值(示例为F 2)与计算出的CRC值(示例为F 2)相同,第二交换机校验该错误的以太网帧成功。之后,第二交换机将发生错误的以太网帧发送给第三交换机,第三交换机将发生错误的以太网帧发送给第二计算机设备。第二计算机设备校验该接收到的以太网帧成功,之后第二计算机设备根据f’,依赖上层校验机制,判定接收到的以太网帧为错误的以太网帧。接下来,第二计算机设备向第一计算机设备发送重传请求,对应的,第一计算机设备根据该重传请求向该第二计算机设备发送重传的以太网帧。可以看出,采用这错误帧的重传方式,接收到重传的以太网帧的时延,会是以太网帧传输未发生错误的情况下的至少三倍。 When there is an error in transmission (take the Ethernet frame error code in the Ethernet link "the first computer device - the first switch" as an example): the first switch first buffers the head part of the Ethernet frame, and then according to the purpose contained in the head part Check the address table, find the output port address to be sent, and then send the Ethernet frame to the second switch. An error occurs in the f part due to a bit error, and an example of this part after the error occurs is the f' part. The first switch sends the erroneous Ethernet frame to the second switch. Since the Ethernet frame received by the second switch is already an Ethernet frame with errors, the CRC value of the Ethernet frame received by the second switch (F 2 in the example) is the same as the calculated CRC value (F 2 in the example) , the second switch successfully checks the wrong Ethernet frame. Afterwards, the second switch sends the errored Ethernet frame to the third switch, and the third switch sends the errored Ethernet frame to the second computer device. The second computer device verifies the received Ethernet frame successfully, and then the second computer device determines that the received Ethernet frame is an erroneous Ethernet frame by relying on the upper-layer verification mechanism according to f'. Next, the second computer device sends a retransmission request to the first computer device, and correspondingly, the first computer device sends the retransmitted Ethernet frame to the second computer device according to the retransmission request. It can be seen that, by adopting the retransmission method of the erroneous frame, the delay in receiving the retransmitted Ethernet frame will be at least three times that of the case where no error occurs in the transmission of the Ethernet frame.
鉴于此,提供本申请实施例的以太网错误帧的重传方法。在本申请实施例中,在以太网帧的传输过程中,一个节点设备接收上一个节点设备发送的以太网帧之后,对所述以太网帧进行校验;在所述以太网帧校验失败时,这个节点设备修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传;接下来,这个节点设备再向下一节点发送所述修改后的以太网帧。通过这种方式,第一标识可以表示发生错 误的以太网帧是否将被局部重传恢复。接收该错误的以太网帧的目的设备可以根据该第一标识选择是否发起全局重传请求,能够节省错误帧的传输时间,提升以太网错误帧的重传效率。In view of this, a method for retransmitting an Ethernet error frame according to an embodiment of the present application is provided. In the embodiment of the present application, during the transmission of the Ethernet frame, a node device checks the Ethernet frame after receiving the Ethernet frame sent by the previous node device; when the Ethernet frame check fails When the node device modifies the Ethernet frame, the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted; next, the node device retransmits The modified Ethernet frame is sent to the next node. In this way, the first identification can indicate whether the Ethernet frame in which the error occurred will be recovered by partial retransmission. The destination device receiving the erroneous Ethernet frame can select whether to initiate a global retransmission request according to the first identifier, which can save the transmission time of the erroneous frame and improve the retransmission efficiency of the Ethernet erroneous frame.
参见图5,图5是本申请实施例提供的一种以太网错误帧的重传方法的流程图。该方法可以基于图1所示的以太网系统来实现,下面描述的第二节点设备可以是图1所示的第一交换机、第二交换机或者第三交换机。第一节点设备是第二节点设备的上一个节点设备,第三节点设备是第二节点设备的下一个节点设备。其中,上一个节点设备、下一个节点设备是根据以太网帧的传输方向来决定的。示例性的,在一种实施例中,该第二节点设备是第一交换机,那么,第一节点设备为第一计算机设备,第三节点设备为第二交换机。在又一种实施例中,该第二节点设备是第二交换机,那么,第一节点设备为第一交换机,第三节点设备为第三交换机。在又一种实施例中,该第二节点设备是第三交换机,那么,第一节点设备为第二交换机,第三节点设备为第二计算机设备。该方法包括但不限于如下步骤。Referring to FIG. 5, FIG. 5 is a flowchart of a method for retransmitting an Ethernet error frame provided by an embodiment of the present application. The method may be implemented based on the Ethernet system shown in FIG. 1 , and the second node device described below may be the first switch, the second switch or the third switch shown in FIG. 1 . The first node device is the previous node device of the second node device, and the third node device is the next node device of the second node device. The previous node device and the next node device are determined according to the transmission direction of the Ethernet frame. Exemplarily, in an embodiment, the second node device is a first switch, then the first node device is a first computer device, and the third node device is a second switch. In yet another embodiment, the second node device is the second switch, then the first node device is the first switch, and the third node device is the third switch. In yet another embodiment, the second node device is a third switch, then the first node device is a second switch, and the third node device is a second computer device. The method includes but is not limited to the following steps.
S101、第一节点设备向第二节点设备发送以太网帧。S101. The first node device sends an Ethernet frame to the second node device.
S102、在第二节点设备接收了该以太网帧之后,第二节点设备对该以太网帧进行校验。S102. After the second node device receives the Ethernet frame, the second node device checks the Ethernet frame.
示例性的,第二节点设备可以对以太网帧进行CRC校验。以太网帧的FCS字段包括CRC-32字段。第二节点设备可以根据以太网帧的净荷字段,按照与第一节点设备已协商好的计算方式计算CRC值。之后,再比较以太网帧的FCS字段和计算出的CRC值。若计算出的CRC值与FCS字段不相同,则以太网帧校验失败;若计算出的CRC值与FCS字段相同,则以太网帧校验成功。Exemplarily, the second node device may perform CRC check on the Ethernet frame. The FCS field of the Ethernet frame includes the CRC-32 field. The second node device may calculate the CRC value according to the payload field of the Ethernet frame according to the calculation method negotiated with the first node device. After that, compare the FCS field of the Ethernet frame with the calculated CRC value. If the calculated CRC value is different from the FCS field, the Ethernet frame verification fails; if the calculated CRC value is the same as the FCS field, the Ethernet frame verification succeeds.
通过校验的方式,第二节点设备可以明确以太网帧在第一节点设备(即上一个节点设备)到第二节点设备的以太网链路的传输过程中是否出现了错误。但需要说明的是,第二节点设备不能通过校验结果,知晓以太网帧在之前的传输过程中是否发生错误。举例而言,若第一节点设备发送给第二节点设备的以太网帧原本就是错误的以太网帧,且错误的以太网帧在第一节点设备到第二节点设备的以太网链路的传输过程中并未出现错误,那么,第二节点设备对该以太网帧的校验也是成功的。示例性的,可参见图4所示的实施例,第二交换机为第一节点设备,第三交换机为第二节点设备。第二交换机接收到的以太网帧已经发生了错误(包含F 2字段)。那么,第二交换机向第三交换机发送的原本就是错误的以太网帧,第三交换机根据净荷字段计算出的CRC值与F 2字段相同,第三交换机校验该以太网帧成功。 By means of verification, the second node device can determine whether an error occurs during the transmission of the Ethernet frame from the first node device (ie, the previous node device) to the Ethernet link of the second node device. However, it should be noted that the second node device cannot pass the verification result to know whether an error occurred in the previous transmission process of the Ethernet frame. For example, if the Ethernet frame sent by the first node device to the second node device is originally a wrong Ethernet frame, and the wrong Ethernet frame is transmitted in the Ethernet link from the first node device to the second node device. If no error occurs during the process, then the verification of the Ethernet frame by the second node device is also successful. Exemplarily, referring to the embodiment shown in FIG. 4 , the second switch is the first node device, and the third switch is the second node device. The Ethernet frame received by the second switch has been erroneous (containing the F2 field). Then, the original Ethernet frame sent by the second switch to the third switch is the wrong Ethernet frame, the CRC value calculated by the third switch according to the payload field is the same as the F2 field, and the third switch successfully checks the Ethernet frame.
S103、当所述以太网帧校验成功时,第二节点设备向第三节点设备发送所述以太网帧。S103. When the Ethernet frame verification is successful, the second node device sends the Ethernet frame to the third node device.
S104、当所述以太网帧校验失败时,第二节点设备修改所述以太网帧。S104. When the Ethernet frame check fails, the second node device modifies the Ethernet frame.
具体的,以太网帧校验失败,表明该以太网帧在第一节点设备到第二节点设备的以太网链路的传输过程中出现了错误。Specifically, the failure to check the Ethernet frame indicates that an error occurs in the Ethernet frame during the transmission process of the Ethernet link from the first node device to the second node device.
其中,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传。可选的,若所述第一标识为第四状态,则指示以太网帧将被局部重传;若所述第一标识为第五状态,则指示以太网帧不会被局部重传。Wherein, the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted. Optionally, if the first identifier is in the fourth state, it indicates that the Ethernet frame will be partially retransmitted; if the first identifier is in the fifth state, it indicates that the Ethernet frame will not be partially retransmitted.
具体的,若第二节点设备确定该以太网帧可被局部重传,则修改后的以太网帧中的第一标识为第四状态;若第二节点设备确定该以太网帧不可被局部重传,则修改后的以太网帧中的第一标识为第五状态。在一些实施例中,以太网帧中可以一直包括第一标识,在之前的传输过程中,该第一标识为初始状态。若第二节点设备校验以太网帧失败,在以太网帧可被局部重传的情况下,第二节点设备将第一标识从初始状态修改为第四状态;在以太网帧不可被局部重传的情况下,第二节点设备将第一标识从初始状态修改为第五状态。在另一些实施例中,若第二节点设备校验以太网帧失败,在以太网帧可被局部重传的情况下,第二节点设备 在以太网帧中添加第四状态的第一标识;在以太网帧不可被局部重传的情况下,第二节点设备在以太网帧中添加第五状态的第一标识。Specifically, if the second node device determines that the Ethernet frame can be partially retransmitted, the first identifier in the modified Ethernet frame is the fourth state; if the second node device determines that the Ethernet frame cannot be partially retransmitted transmission, the first identifier in the modified Ethernet frame is the fifth state. In some embodiments, the Ethernet frame may always include the first identifier, and in the previous transmission process, the first identifier is the initial state. If the second node device fails to verify the Ethernet frame, in the case that the Ethernet frame can be partially retransmitted, the second node device modifies the first identifier from the initial state to the fourth state; when the Ethernet frame cannot be partially retransmitted In the case of transmission, the second node device modifies the first identifier from the initial state to the fifth state. In other embodiments, if the second node device fails to verify the Ethernet frame, in the case that the Ethernet frame can be partially retransmitted, the second node device adds the first identifier of the fourth state to the Ethernet frame; In the case that the Ethernet frame cannot be partially retransmitted, the second node device adds the first identifier of the fifth state to the Ethernet frame.
示例性的,该第一标识的值为1,表示为第四状态,指示所述以太网帧将被局部重传。该第一标识的值为0,表示为第五状态,指示所述以太网帧不会被局部重传。可选的,该第一标识的值还可以为其他取值,例如,11(表示为第四状态,指示将被局部重传)、00(表示为第五状态,指示不会被局部重传),等等。可选的,该第一标识还可以为预设的序列。示例性的,当该第一标识为第一预设序列时,表示为第四状态,指示所述以太网帧将被局部重传。当该第一指示字段的值为第二预设序列时,表示为第五状态,指示所述以太网帧不会被局部重传。Exemplarily, the value of the first identifier is 1, which indicates a fourth state, indicating that the Ethernet frame will be partially retransmitted. The value of the first identifier is 0, indicating a fifth state, indicating that the Ethernet frame will not be partially retransmitted. Optionally, the value of the first identifier can also be other values, for example, 11 (represented as the fourth state, indicating that partial retransmission will be performed), 00 (represented as the fifth state, indicating that partial retransmission will not be performed) ),etc. Optionally, the first identifier may also be a preset sequence. Exemplarily, when the first identifier is the first preset sequence, it represents a fourth state, indicating that the Ethernet frame will be partially retransmitted. When the value of the first indication field is the second preset sequence, it indicates a fifth state, indicating that the Ethernet frame will not be partially retransmitted.
另外,针对所述以太网帧中一直包括第一标识的这种情况。为了提升第一标识的可靠性,第一标识可以包括重复多次的指示字节。示例性的,指示字节为11时,表示为第四状态,指示将被局部重传;指示字节为00时,表示为第五状态,指示不会被局部重传。第一标识包括重复4次的指示字节。在这种情况下,第一标识为11111111时,表示为第四状态,指示将被局部重传,第一标识为00000000时,表示为第五状态,指示不会被局部重传。若在传输过程中,第一标识出现了误码,第一标识为其他值(例如,11111010),可视为第一标识为第六状态,第六状态的第一标识用于指示所述第一标识失效。可以理解的是,第四状态的第一标识以及第五状态的第一标识可以指示所述第一标识有效。In addition, for the case that the first identification is always included in the Ethernet frame. In order to improve the reliability of the first identification, the first identification may include an indication byte repeated multiple times. Exemplarily, when the indication byte is 11, it indicates the fourth state, indicating that partial retransmission will be performed; when the indication byte is 00, it indicates the fifth state, indicating that partial retransmission will not be performed. The first identification includes an indication byte repeated 4 times. In this case, when the first identifier is 11111111, it represents the fourth state, indicating that the partial retransmission will be performed, and when the first identifier is 00000000, it represents the fifth state, indicating that the partial retransmission will not be performed. If an error occurs in the first identifier during the transmission process, and the first identifier is another value (for example, 11111010), it can be considered that the first identifier is in the sixth state, and the first identifier in the sixth state is used to indicate the first identifier. A logo is invalid. It can be understood that the first identifier of the fourth state and the first identifier of the fifth state may indicate that the first identifier is valid.
进一步的,在保证可靠性的前提下,为了提升第一标识的容错率,在指示字节的正确率不小于预设值(示例为75%)的情况下,可视为第一标识有效。其中,指示字节的正确率可以为重复较多次的指示字节的次数与总次数的比值。进而,第一标识为第四状态还是第五状态可以由重复较多次的指示字节的值来判定。举例而言,第一标识为11111110,其中重复次数较多次的指示字节为11,重复次数为3,指示字节中总的重复次数为4。指示字节的正确率为3/4,即75%,那么视为第一标识有效。重复较多次的指示字节为11,则该第一标识为第四状态,指示以太网帧将被局部重传。Further, under the premise of ensuring reliability, in order to improve the error tolerance rate of the first identifier, the first identifier can be considered valid when the correct rate of the indicated bytes is not less than a preset value (75% in an example). Wherein, the correct rate of the indication byte may be the ratio of the number of times of repeated indication bytes to the total number of times. Furthermore, whether the first flag is the fourth state or the fifth state may be determined by the value of the indication byte repeated more times. For example, the first identifier is 11111110, wherein the indication byte with a larger number of repetitions is 11, the number of repetitions is 3, and the total number of repetitions in the indication byte is 4. If the correct rate of the indicated bytes is 3/4, that is, 75%, then the first identification is deemed to be valid. If the indication byte repeated more times is 11, the first identifier is the fourth state, indicating that the Ethernet frame will be partially retransmitted.
在一些实施例中,该第一标识位于该以太网帧的预设位置。例如,该第一标识位于所述以太网帧净荷字段之后。示例性的,参见图6,图6是本申请实施例提供的一种以太网帧的帧格式的示意图。在图6中,第一标识位于FCS字段之前,净荷字段(或称为数据字段)之后。需要说明的是,以太网帧的传输方式可以参照上述内容中介绍的CUT-Through方式。第二节点设备首先缓存以太网帧的帧头部分(可参照图5,该帧头部分包括目的地址字段、源地址字段和类型/长度字段),之后,根据帧头部分包含的目的地址进行查表,找到想要发送的输出端口地址(即,第三节点设备的MAC地址),再将该以太网帧发送出去。第二节点设备至少有缓存帧头部分的时间可以对以太网帧进行校验。由于以太网帧的发送是按照字节排布顺序依次发送,第一标识位于净荷字段之后的方式,可以便于第二节点设备修改以太网帧。In some embodiments, the first identifier is located at a preset position of the Ethernet frame. For example, the first identification is located after the payload field of the Ethernet frame. 6 is a schematic diagram of a frame format of an Ethernet frame provided by an embodiment of the present application. In FIG. 6, the first identifier is located before the FCS field and after the payload field (or called the data field). It should be noted that, for the transmission mode of the Ethernet frame, reference may be made to the CUT-Through mode introduced in the above content. The second node device first buffers the frame header part of the Ethernet frame (refer to FIG. 5 , the frame header part includes the destination address field, the source address field and the type/length field), and then checks the frame header part according to the destination address contained in the frame header. table, find the output port address (that is, the MAC address of the third node device) to be sent, and then send the Ethernet frame. The second node device has at least the time for buffering the frame header part to check the Ethernet frame. Since the Ethernet frame is sent in sequence according to the order of byte arrangement, the manner in which the first identifier is located after the payload field can facilitate the second node device to modify the Ethernet frame.
另外,第二节点设备校验以太网帧的失败之后,还需要修改该以太网帧,表明该修改后的以太网帧无效。其中,该以太网帧无效的含义是,该以太网帧在传输过程中出现了错误;该以太网帧有效的含义是,该以太网帧在传输过程中未出现错误。通过这种方式,可以告知接收该以太网帧的目的设备该以太网帧是否已经发生错误。在一些实施例中,所述修改后的以太网帧还包括所述第二标识,所述第二标识用于指示所述修改后的以太网帧无效。In addition, after the second node device fails to verify the Ethernet frame, it needs to modify the Ethernet frame, indicating that the modified Ethernet frame is invalid. Wherein, the meaning of the invalid Ethernet frame is that an error occurred in the transmission process of the Ethernet frame; the meaning of the Ethernet frame being valid is that there is no error in the transmission process of the Ethernet frame. In this way, the destination device receiving the Ethernet frame can be informed whether an error has occurred in the Ethernet frame. In some embodiments, the modified Ethernet frame further includes the second identifier, and the second identifier is used to indicate that the modified Ethernet frame is invalid.
在一种可能的实现方式中,第二节点设备校验以太网帧的失败之后,第二节点设备在以太网帧中添加第二标识。也即是说,以太网帧中包含所述第二标识,则表明该以太网帧无效;若以太网帧中不包含所述第二标识,则表明该以太网帧有效。In a possible implementation manner, after the second node device fails to verify the Ethernet frame, the second node device adds the second identifier to the Ethernet frame. That is to say, if the Ethernet frame contains the second identifier, it means that the Ethernet frame is invalid; if the Ethernet frame does not contain the second identifier, it means that the Ethernet frame is valid.
在另一种可能的实现方式中,所述以太网帧中一直包括第二标识,所述第二标识用于指示所述以太网帧是否有效。具体的,若所述第二标识为第一状态,则表明所述以太网帧无效;若所述第二标识为第二状态,则表明所述以太网帧有效。In another possible implementation manner, the Ethernet frame always includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid. Specifically, if the second identifier is in the first state, it indicates that the Ethernet frame is invalid; if the second identifier is in the second state, it indicates that the Ethernet frame is valid.
在这种方式中,第二节点设备校验以太网帧的失败之后,第二节点设备将所述以太网帧的第二标识从第二状态修改为所述第一状态,所述修改后的第二标识(即第一状态的第二标识)指示所述修改后的以太网帧无效。In this manner, after the second node device fails to verify the Ethernet frame, the second node device modifies the second identifier of the Ethernet frame from the second state to the first state, and the modified The second identification (ie the second identification of the first state) indicates that the modified Ethernet frame is invalid.
示例性的,该第二标识的值为1,表示为第一状态,指示所述以太网帧无效。该第二标识的值为0,表示为第二状态,指示所述以太网帧有效。可选的,该第二标识的值还可以为其他取值,例如,11(表示为第一状态,指示无效)、00(表示为第二状态,指示有效),等等。可选的,该第二标识还可以为预设的序列。示例性的,当该第二标识为第一预设序列时,表示为第一状态,指示所述以太网帧无效。当该第二标识为第二预设序列时,表示为第二状态,指示所述以太网帧有效。Exemplarily, the value of the second identifier is 1, which indicates the first state and indicates that the Ethernet frame is invalid. The value of the second identifier is 0, indicating a second state, indicating that the Ethernet frame is valid. Optionally, the value of the second identifier may also be other values, for example, 11 (represented as the first state, indicating invalid), 00 (represented as the second state, indicating valid), and so on. Optionally, the second identifier may also be a preset sequence. Exemplarily, when the second identifier is the first preset sequence, it indicates the first state, indicating that the Ethernet frame is invalid. When the second identifier is the second preset sequence, it indicates the second state, indicating that the Ethernet frame is valid.
可选的,该第二标识可以位于该以太网帧的预设位置。例如,该第二标识位于所述以太网帧的净荷字段(或称为数据字段)之后。示例性的,参见图7,图7是本申请实施例提供的又一种以太网帧的帧格式的示意图。在图7中,第二标识位于FCS字段之前,净荷字段之后。另外,在这种实施例中,第一标识与第二标识的相对位置不作限定,第一标识可以位于第二标识的前方,或者,第一标识也可以位于第二标识的后方。Optionally, the second identifier may be located at a preset position of the Ethernet frame. For example, the second identification is located after the payload field (or called the data field) of the Ethernet frame. 7 is a schematic diagram of another frame format of an Ethernet frame provided by an embodiment of the present application. In FIG. 7, the second identifier is located before the FCS field and after the payload field. In addition, in this embodiment, the relative positions of the first mark and the second mark are not limited, and the first mark may be located in front of the second mark, or the first mark may also be located behind the second mark.
在另一些实施例中,第二节点设备可以通过反转以太网帧的FCS字段来表示以太网帧无效。示例性的,FCS字段中包括CRC值,第二节点设备计算出的CRC值为11110000,与以太网帧包含的CRC值不同。为了表示以太网帧无效,第二节点设备将以太网帧的FCS字段反转,修改后的以太网帧的FCS字段的CRC值为00001111。In other embodiments, the second node device may indicate that the Ethernet frame is invalid by inverting the FCS field of the Ethernet frame. Exemplarily, the FCS field includes a CRC value, and the CRC value calculated by the second node device is 11110000, which is different from the CRC value included in the Ethernet frame. In order to indicate that the Ethernet frame is invalid, the second node device inverts the FCS field of the Ethernet frame, and the CRC value of the FCS field of the modified Ethernet frame is 00001111.
S105、第二节点设备向第三节点设备发送所述修改后的以太网帧。S105. The second node device sends the modified Ethernet frame to the third node device.
在一种可能的实现方式中,第二节点设备传输该以太网帧的方式为CUT-Through方式。在这种方式中,第二节点设备接收到以太网帧之后,首先缓存以太网帧的帧头部分,之后,根据帧头部分包含的目的地址进行查表,找到要发送的输出端口,再将该以太网帧发送出去。其中,第二节点设备对所述以太网帧进行校验的方式包括:对所述以太网帧进行校验并发送所述以太网帧中的部分比特。第二节点设备发送所述修改后的以太网帧的方式包括:继续发送所述修改后的以太网帧中除所述部分比特之后的比特。可以理解为,该以太网帧和该修改后的以太网帧的所述部分比特是相同的。In a possible implementation manner, the manner in which the second node device transmits the Ethernet frame is the CUT-Through manner. In this way, after receiving the Ethernet frame, the second node device first buffers the frame header part of the Ethernet frame, and then looks up the table according to the destination address contained in the frame header part to find the output port to be sent, and then The Ethernet frame is sent out. The manner in which the second node device checks the Ethernet frame includes: checking the Ethernet frame and sending some bits in the Ethernet frame. The manner in which the second node device sends the modified Ethernet frame includes: continuing to send bits in the modified Ethernet frame except for the partial bits. It can be understood that the partial bits of the Ethernet frame and the modified Ethernet frame are the same.
在又一种可能的实现方式中,在所述修改所述以太网帧之前,所述以太网帧的部分比特已被发送;所述发送所述修改后的以太网帧包括:继续发送所述修改后的以太网帧中除所述部分比特之后的比特。In another possible implementation manner, before the modifying the Ethernet frame, some bits of the Ethernet frame have been sent; the sending the modified Ethernet frame includes: continuing to send the Ethernet frame bits in the modified Ethernet frame except for the partial bits.
在又一种可能的实现方式中,所述发送所述修改后的以太网帧包括:在所述校验的过程中,发送所述修改后的以太网帧中的部分比特;在所述修改后,继续发送所述修改后的以太网帧中除所述部分比特之后的比特。In another possible implementation manner, the sending the modified Ethernet frame includes: in the verification process, sending some bits in the modified Ethernet frame; After that, the bits in the modified Ethernet frame after the partial bits are continued to be sent.
通过本申请实施例的方式,第一标识可以表示发生错误的以太网帧是否将被局部重传恢复。接收该错误的以太网帧的目的设备可以根据该第一标识选择是否发起全局重传请求,能够节省错误帧的传输时间,提升以太网错误帧的重传效率。By means of the embodiments of the present application, the first identifier may indicate whether the Ethernet frame in which the error occurs will be recovered by partial retransmission. The destination device receiving the erroneous Ethernet frame can select whether to initiate a global retransmission request according to the first identifier, which can save the transmission time of the erroneous frame and improve the retransmission efficiency of the Ethernet erroneous frame.
以下对第二节点设备确定以太网帧是否可以被局部重传的方式进行介绍。The following describes the manner in which the second node device determines whether the Ethernet frame can be partially retransmitted.
在一种可能的实现方式中,第二节点设备确定自身与上一个节点设备(即第一节点设备) 之间的以太网链路是否具有重传能力。示例性的,若该以太网链路采用ACK/NAK(Acknowledgment/Negative Acknowledgment)的错误重传机制,则该以太网链路具有重传能力。其中,ACK/NAK是一种由硬件实现的,自动的传输机制,目的是保证事务层数据包(Transaction Layer Packet,TLP)有效可靠地传输。具体的,在TLP的传输过程中,发送设备会对每一个需要发送的TLP在重传缓存区(Replay Buffer)中做备份。接收设备会对接收到的TLP进行校验,并向发送设备反馈接收结果。其中,ACK数据链路层包(DLLP)用于指示TLP被成功接收,NAK DLLP则用于指示TLP传输中出现了错误。若发送设备接收到接收设备发送的ACK DLLP,确认该TLP已经成功的被接受,会删除Replay Buffer中的备份。若发送设备接收到接收设备发送的NAK DLLP,确认该TLP的传输出现了错误,则发送设备会从Replay Buffer中取出数据,重新发送该TLP。In a possible implementation manner, the second node device determines whether the Ethernet link between itself and the previous node device (ie, the first node device) has retransmission capability. Exemplarily, if the Ethernet link adopts an ACK/NAK (Acknowledgment/Negative Acknowledgment) error retransmission mechanism, the Ethernet link has a retransmission capability. Among them, ACK/NAK is an automatic transmission mechanism implemented by hardware, whose purpose is to ensure the effective and reliable transmission of transaction layer packets (Transaction Layer Packet, TLP). Specifically, in the process of TLP transmission, the sending device will back up each TLP to be sent in the replay buffer area (Replay Buffer). The receiving device verifies the received TLP and feeds back the receiving result to the sending device. Among them, the ACK data link layer packet (DLLP) is used to indicate that the TLP is successfully received, and the NAK DLLP is used to indicate that an error has occurred in the TLP transmission. If the sending device receives the ACK DLLP sent by the receiving device and confirms that the TLP has been successfully accepted, the backup in the Replay Buffer will be deleted. If the sending device receives the NAK DLLP sent by the receiving device and confirms that there is an error in the transmission of the TLP, the sending device will take out the data from the Replay Buffer and resend the TLP.
在另一种可能的实现方式中,第二节点设备确定自身具有恢复以太网帧的能力。示例性的,第二节点设备可以通过前向纠错(forward error correction,FEC)算法或者其他冗余帧处理方式对以太网帧进行恢复处理。第二节点设备对所述以太网帧进行恢复处理的方式不作限定。In another possible implementation manner, the second node device determines that it has the ability to restore the Ethernet frame. Exemplarily, the second node device may perform recovery processing on the Ethernet frame by using a forward error correction (forward error correction, FEC) algorithm or other redundant frame processing methods. The manner in which the second node device performs recovery processing on the Ethernet frame is not limited.
参见图8A,是本申请实施例提供的又一种以太网错误帧的重传方法的流程图。该方法可以基于图1所示的以太网系统来实现,下面描述的第二节点设备可以是图1所示的第一交换机、第二交换机或者第三交换机。第一节点设备是第二节点设备的上一个节点设备,第三节点设备是第二节点设备的下一个节点设备。其中,上一个节点设备、下一个节点设备是根据以太网帧的传输方向来决定的。在一种实施例中,该第二节点设备是第一交换机,那么,第一节点设备为第一计算机设备,第三节点设备为第二交换机。在又一种实施例中,该第二节点设备是第二交换机,那么,第一节点设备为第一交换机,第三节点设备为第三交换机。在又一种实施例中,该第二节点设备是第三交换机,那么,第一节点设备为第二交换机,第三节点设备为第二计算机设备。该方法包括但不限于如下步骤。Referring to FIG. 8A , it is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application. The method may be implemented based on the Ethernet system shown in FIG. 1 , and the second node device described below may be the first switch, the second switch or the third switch shown in FIG. 1 . The first node device is the previous node device of the second node device, and the third node device is the next node device of the second node device. The previous node device and the next node device are determined according to the transmission direction of the Ethernet frame. In an embodiment, the second node device is the first switch, then the first node device is the first computer device, and the third node device is the second switch. In yet another embodiment, the second node device is the second switch, then the first node device is the first switch, and the third node device is the third switch. In yet another embodiment, the second node device is a third switch, then the first node device is a second switch, and the third node device is a second computer device. The method includes but is not limited to the following steps.
S201、第一节点设备向第二节点设备发送以太网帧。S201. The first node device sends an Ethernet frame to the second node device.
该步骤的具体实施方式可参照上述内容中步骤S101的介绍,此处不再赘述。For the specific implementation of this step, reference may be made to the introduction of step S101 in the above content, and details are not repeated here.
S202、在第二节点设备接收了该以太网帧之后,第二节点设备对该以太网帧进行校验。S202. After the second node device receives the Ethernet frame, the second node device checks the Ethernet frame.
该步骤的具体实施方式可参照上述内容中步骤S102的介绍,此处不再赘述。For the specific implementation of this step, reference may be made to the introduction of step S102 in the above content, which will not be repeated here.
S203、当所述以太网帧校验成功时,第二节点设备向第三节点设备发送所述以太网帧。S203. When the Ethernet frame verification is successful, the second node device sends the Ethernet frame to the third node device.
S204、当所述以太网帧校验失败时,第二节点设备修改所述以太网帧。S204. When the Ethernet frame check fails, the second node device modifies the Ethernet frame.
该步骤的具体实施方式可参照上述内容中步骤S104的介绍,此处不再赘述。For the specific implementation of this step, reference may be made to the introduction of step S104 in the above content, which will not be repeated here.
另外,针对所述以太网帧中一直包括第二标识,所述第二标识用于指示所述以太网帧是否有效的这种情况。为了提升第二标识的可靠性,第二标识可以包括重复多次的指示字节。示例性的,指示字节为10时,表示以太网帧无效;指示字节为01时,表示以太网帧有效;第二标识包括重复4次的指示字节。在这种情况下,第二标识为10101010时,表示为第一状态,指示以太网帧无效,第二标识为01010101时,表示为第二状态,指示以太网帧有效。若在传输过程中,第二标识出现了误码,第二标识为其他值(例如,11111010),可视为第二标识为第三状态,第三状态的第二标识用于指示所述第二标识失效。可以理解的是,第一状态的第二标识以及第二状态的第二标识可以指示所述第二标识有效。In addition, a second identifier is always included in the Ethernet frame, and the second identifier is used to indicate whether the Ethernet frame is valid. In order to improve the reliability of the second identification, the second identification may include an indication byte repeated multiple times. Exemplarily, when the indication byte is 10, it means that the Ethernet frame is invalid; when the indication byte is 01, it means that the Ethernet frame is valid; and the second identifier includes the indication byte repeated 4 times. In this case, when the second identifier is 10101010, it represents the first state, indicating that the Ethernet frame is invalid, and when the second identifier is 01010101, it represents the second state, indicating that the Ethernet frame is valid. If an error occurs in the second identifier during transmission, and the second identifier is other values (for example, 11111010), the second identifier can be regarded as the third state, and the second identifier in the third state is used to indicate the first The second sign is invalid. It can be understood that the second identifier of the first state and the second identifier of the second state may indicate that the second identifier is valid.
进一步的,在保证可靠性的前提下,为了提升第二标识的容错率,在指示字节的正确率不小于预设值(示例为75%)的情况下,可视为第二标识有效。其中,指示字节的正确率可 以为重复较多次的指示字节的次数与总次数的比值。进而,第二标识为第一状态还是第二状态可以由重复较多次的指示字节的值来判定。举例而言,第二标识为10101011,其中重复次数较多次的指示字节为10,重复次数为3,指示字节中总的重复次数为4。指示字节的正确率为3/4,即75%,那么视为第二标识有效。重复较多次的指示字节为10,则该第二状态为第一状态,指示以太网帧无效。Further, under the premise of ensuring reliability, in order to improve the error tolerance rate of the second identifier, the second identifier can be considered valid when the correct rate of the indicated bytes is not less than a preset value (75% in an example). Wherein, the correct rate of the indicated byte may be the ratio of the number of times of repeated indicated bytes to the total number of times. Furthermore, whether the second flag is the first state or the second state may be determined by the value of the indication byte repeated more times. For example, the second identifier is 10101011, wherein the indication byte with a larger number of repetitions is 10, the number of repetitions is 3, and the total number of repetitions in the indication byte is 4. If the correct rate of the indicated byte is 3/4, that is, 75%, then the second identification is deemed to be valid. If the indication byte repeated more times is 10, the second state is the first state, indicating that the Ethernet frame is invalid.
可选的,以太网帧中包含的第一标识和第二标识可以合并为一个指示标识。示例性的,这个指示标识包括两个指示字节,第一个指示字节和第一标识具有相似的作用,可以用于指示所述以太网帧是否将被局部重传;第二个指示字节和第二标识具有相似的作用。可以用于指示所述以太网帧是否有效。可选的,为了提升指示标识的可靠性,指示标识中可以包括重复多次的指示字节。Optionally, the first identifier and the second identifier contained in the Ethernet frame may be combined into one indication identifier. Exemplarily, this indicator includes two indicator bytes, the first indicator byte and the first indicator have similar functions, and can be used to indicate whether the Ethernet frame will be partially retransmitted; the second indicator byte Sections and second flags have a similar effect. Can be used to indicate whether the Ethernet frame is valid. Optionally, in order to improve the reliability of the indicator, the indicator may include an indicator byte repeated multiple times.
在一些实施例中,第二节点设备在修改所述以太网帧之前,需要确定所述以太网帧未被修改。对应于前述内容中介绍的修改所述以太网帧的方式,第二节点设备可以判定接收到的以太网帧是否已被修改。举例而言,若修改以太网帧的方式为:节点设备检测以太网帧失败之后,将以太网帧中的第一标识从初始状态修改为第四状态或者第五状态;且将第二标识修改为从第二状态修改为第一状态。那么,第二节点设备可以检测以太网帧中包含的第一标识是否为第四状态或者第五状态,第二标识是否为第一状态。In some embodiments, before modifying the Ethernet frame, the second node device needs to determine that the Ethernet frame is not modified. Corresponding to the manner of modifying the Ethernet frame described in the foregoing content, the second node device may determine whether the received Ethernet frame has been modified. For example, if the method of modifying the Ethernet frame is: after the node device fails to detect the Ethernet frame, modify the first identification in the Ethernet frame from the initial state to the fourth or fifth state; and modify the second identification to change from the second state to the first state. Then, the second node device can detect whether the first identifier included in the Ethernet frame is in the fourth state or the fifth state, and whether the second identifier is in the first state.
若是,表明当前接收到的以太网帧已被修改(也即是说,该以太网帧是之前传输过程中的节点设备修改之后的以太网帧),那么,第二节点设备无需执行修改以太网帧,以及获取重传的以太网帧的操作,直接向第三节点设备发送该以太网帧。这是因为,当前接收到的以太网帧已被修改,代表该以太网帧在之前的传输过程中已经发生过错误,该以太网帧在第一节点设备处已是错误的以太网帧。第二节点设备无法通过自身能力或者从第一节点设备处获取到正确的重传的以太网帧。If so, it indicates that the currently received Ethernet frame has been modified (that is, the Ethernet frame is an Ethernet frame modified by the node device in the previous transmission process), then the second node device does not need to modify the Ethernet frame frame, and the operation of obtaining the retransmitted Ethernet frame, directly sending the Ethernet frame to the third node device. This is because the currently received Ethernet frame has been modified, which means that an error has occurred in the Ethernet frame in the previous transmission process, and the Ethernet frame is already an erroneous Ethernet frame at the first node device. The second node device cannot obtain the correct retransmitted Ethernet frame through its own capability or from the first node device.
若不是,表明当前接收到的以太网帧未被修改,那么,第二节点设备修改所述以太网帧,并执行后续介绍的操作。这是因为,当前接收到的以太网帧未被修改,代表该以太网帧在之前的传输过程中都没有发生过错误,在第一节点设备与第二节点设备之间的以太网链路传输过程中第一次发生错误。第二节点设备可以通过自身能力或者从第一节点设备处获取到正确的重传的以太网帧。示例性的,这种方式可参照图8B所示的方法流程图。If not, it indicates that the currently received Ethernet frame is not modified, then the second node device modifies the Ethernet frame and performs the operations described later. This is because the currently received Ethernet frame has not been modified, which means that no error has occurred in the Ethernet frame in the previous transmission process, and the Ethernet link between the first node device and the second node device is transmitted. The first error occurred in the process. The second node device can obtain the correct retransmitted Ethernet frame through its own capability or from the first node device. Exemplarily, for this method, reference may be made to the method flowchart shown in FIG. 8B .
需要说明的是,此处判定以太网帧是否已被修改的方式仅为示例,对应于不同的修改所述以太网帧的方式,判定以太网帧是否已被修改的方式不同。在又一示例中,若修改以太网帧的方式为:节点设备检测以太网帧失败之后,将以太网帧中的第一标识从初始状态修改为第四状态或者第五状态;且在以太网帧中添加第二标识。那么,第二节点设备可以检测以太网帧中包含的第一标识是否为第四状态或者第五状态,以太网帧中是否包含第二标识。It should be noted that the method of determining whether the Ethernet frame has been modified here is only an example, and corresponding to different methods of modifying the Ethernet frame, the methods of determining whether the Ethernet frame has been modified are different. In yet another example, if the way of modifying the Ethernet frame is: after the node device detects the failure of the Ethernet frame, the first identifier in the Ethernet frame is modified from the initial state to the fourth state or the fifth state; A second logo is added to the frame. Then, the second node device can detect whether the first identifier included in the Ethernet frame is in the fourth state or the fifth state, and whether the Ethernet frame includes the second identifier.
S205、第二节点设备向第二节点设备发送所述修改后的以太网帧。S205. The second node device sends the modified Ethernet frame to the second node device.
S206、第二节点设备获取重传的以太网帧。S206. The second node device acquires the retransmitted Ethernet frame.
需要说明的是,第二节点设备确定以太网帧可被局部重传,则第二节点设备获取重传的以太网帧。It should be noted that, if the second node device determines that the Ethernet frame can be partially retransmitted, the second node device obtains the retransmitted Ethernet frame.
在一种可能的实现方式中,第二节点设备与上一个节点设备(即第一节点设备)之间的以太网链路具有重传能力。第二节点设备获取重传的以太网帧的过程可以为:In a possible implementation manner, the Ethernet link between the second node device and the previous node device (ie, the first node device) has a retransmission capability. The process of acquiring the retransmitted Ethernet frame by the second node device may be as follows:
S2061、第二节点设备向第一节点设备发送针对所述以太网帧的局部重传请求。S2061. The second node device sends a partial retransmission request for the Ethernet frame to the first node device.
示例性的,第二节点设备可以向第一节点设备发送NAK报文(或称为NAK DLLP)。Exemplarily, the second node device may send a NAK packet (or referred to as NAK DLLP) to the first node device.
S2062、第二节点设备接收该第一节点设备响应于所述局部重传请求发送的重传的以太网 帧。S2062. The second node device receives the retransmitted Ethernet frame sent by the first node device in response to the partial retransmission request.
结合上述内容中的介绍,第一节点设备接收到NAK报文,确认该以太网帧的传输中出现了错误。第一节点设备从Replay Buffer中取出备份的以太网帧,重新向第二节点设备发送以太网帧。In combination with the introduction in the above content, the first node device receives the NAK message and confirms that an error occurs in the transmission of the Ethernet frame. The first node device takes out the backup Ethernet frame from the Replay Buffer, and resends the Ethernet frame to the second node device.
在另一种可能的实现方式中,第二节点设备自身具有恢复以太网帧的能力。第二节点设备获取重传的以太网帧的过程可以为:第二节点设备对所述以太网帧进行恢复处理,得到所述重传的以太网帧。示例性的,第二节点设备可以通过前向纠错(forward error correction,FEC)算法或者其他冗余帧处理方式对以太网帧进行恢复处理。第二节点设备对所述以太网帧进行恢复处理的方式不作限定。In another possible implementation manner, the second node device itself has the ability to restore the Ethernet frame. The process of acquiring the retransmitted Ethernet frame by the second node device may be as follows: the second node device performs recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame. Exemplarily, the second node device may perform recovery processing on the Ethernet frame by using a forward error correction (forward error correction, FEC) algorithm or other redundant frame processing methods. The manner in which the second node device performs recovery processing on the Ethernet frame is not limited.
在一些实施例中,第二节点设备可以先对以太网帧进行恢复处理,得到重传的以太网帧。若该重传的以太网帧校验失败,第二节点设备再向第一节点设备发送针对所述以太网帧的局部重传请求,以获取第一节点设备发送的重传的以太网帧。In some embodiments, the second node device may first perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame. If the retransmitted Ethernet frame fails to be checked, the second node device sends a partial retransmission request for the Ethernet frame to the first node device to obtain the retransmitted Ethernet frame sent by the first node device.
S207、第二节点设备对所述重传的以太网帧进行校验。S207. The second node device checks the retransmitted Ethernet frame.
S208、在所述重传的以太网帧校验成功时,第二节点设备向第二节点设备发送所述重传的以太网帧。S208. When the retransmitted Ethernet frame is successfully checked, the second node device sends the retransmitted Ethernet frame to the second node device.
S210、在所述重传的以太网帧校验失败时,第二节点设备修改所述重传的以太网帧。S210. When the retransmitted Ethernet frame fails to be checked, the second node device modifies the retransmitted Ethernet frame.
需要说明的是,第二节点设备修改所述重传的以太网帧的方式,可以参照上述内容中的介绍。也即是说,修改后的所述重传的以太网帧中包括第一标识,所述第一标识用于指示所述重传的以太网帧是否将被局部重传。该修改后的所述重传的以太网帧中还包括第二标识,第二标识用于指示所述修改后的所述重传的以太网帧无效。It should be noted that, for the manner in which the second node device modifies the retransmitted Ethernet frame, reference may be made to the introduction in the above content. That is to say, the modified retransmitted Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the retransmitted Ethernet frame will be partially retransmitted. The modified retransmitted Ethernet frame further includes a second identifier, and the second identifier is used to indicate that the modified retransmitted Ethernet frame is invalid.
在一些实施例中,第二节点设备获取一次重传的以太网帧,那么,在所述重传的以太网帧校验失败的情况下,修改后的所述重传的以太网帧中包括的第一标识,用于指示所述重传的以太网帧不会被局部重传。In some embodiments, the second node device obtains a retransmitted Ethernet frame, then, in the case that the retransmitted Ethernet frame fails to check, the modified retransmitted Ethernet frame includes The first identifier is used to indicate that the retransmitted Ethernet frame will not be partially retransmitted.
在另一些实施例中,第二节点设备可以尝试最多获取预设次数的重传的以太网帧。以3次作为示例,那么,在第1次、第2次获取的重传的以太网帧校验失败的情况下,修改后的所述重传的以太网帧中包括的第一标识,用于指示重传的以太网帧将被局部重传。在第3次获取的重传的以太网帧校验失败的情况下,修改后的所述重传的以太网帧中包括的第一标识,用于指示所述重传的以太网帧不会被局部重传。另外,需要说明的是,若多次中的一次获取的重传的以太网帧校验成功,第二节点设备可以不再继续获取重传的以太网帧。In other embodiments, the second node device may try to acquire the retransmitted Ethernet frame for a preset number of times at most. Taking 3 times as an example, then, in the case that the retransmitted Ethernet frame obtained for the first and second times fails to check, the modified first identifier included in the retransmitted Ethernet frame is used. Ethernet frames that indicate retransmission will be partially retransmitted. In the case that the retransmitted Ethernet frame obtained for the third time fails to check, the modified first identifier included in the retransmitted Ethernet frame is used to indicate that the retransmitted Ethernet frame will not Retransmitted locally. In addition, it should be noted that, if the retransmitted Ethernet frame obtained in one of the multiple times is successfully verified, the second node device may not continue to obtain the retransmitted Ethernet frame.
参见图9A,是本申请实施例提供的又一种以太网错误帧的重传流程的示意图。该流程可以基于图2所示的以太网架构来实现。第一计算机设备生成以太网帧,向第二计算机设备发送该以太网帧。该以太网的传输过程可参照上述介绍,此处不再赘述。其中,最初的以太网帧中包含第二标识和第一标识,其中,第二标识为00(第二状态),用于指示以太网帧有效;第一标识为00(初始状态)。Referring to FIG. 9A , it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application. This process can be implemented based on the Ethernet architecture shown in FIG. 2 . The first computer device generates an Ethernet frame and sends the Ethernet frame to the second computer device. For the transmission process of the Ethernet, reference may be made to the above introduction, and details are not repeated here. Wherein, the initial Ethernet frame contains a second identifier and a first identifier, wherein the second identifier is 00 (second state), which is used to indicate that the Ethernet frame is valid; the first identifier is 00 (initial state).
传输正确的情况:第一交换机接收第一计算机设备发送的以太网帧,第一交换机对以太网帧进行CRC校验。第一交换机校验以太网帧成功之后,向第二交换机发送该以太网帧。按照相似的流程,该以太网帧经过第二交换机、第三交换机的传输,最终达到目的接收设备,即第二计算机设备。在整个传输过程中,以太网帧未发生错误,各个节点设备均未修改以太网帧。第二计算机设备可以根据第二标识判定以太网帧有效。The case of correct transmission: the first switch receives the Ethernet frame sent by the first computer device, and the first switch performs CRC check on the Ethernet frame. After the first switch successfully checks the Ethernet frame, it sends the Ethernet frame to the second switch. According to a similar process, the Ethernet frame is transmitted through the second switch and the third switch, and finally reaches the destination receiving device, that is, the second computer device. During the entire transmission process, no errors occurred in the Ethernet frame, and each node device did not modify the Ethernet frame. The second computer device may determine that the Ethernet frame is valid according to the second identifier.
传输出现错误的情况(以以太网帧在以太网链路“第一计算机设备-第一交换机”发生误码 为例):第一交换机首先缓存以太网帧head部分,之后根据head部分包含的目的地址进行查表,找到想要发送的输出端口地址,再将以太网帧发送给第二交换机。由于发生误码,第一交换机校验以太网帧失败,且第一交换机确定以太网链路“第一计算机设备-第一交换机”具有重传能力,那么,第一交换机修改以太网帧的第一标识为第四状态(10,指示将被局部重传),修改第二标识为第一状态(11,指示无效)。另外,第一交换机向第一计算机设备发送局部重传请求(NAK报文)以获取重传的以太网帧。响应于该局部重传请求,第一计算机设备向第一交换机发送重传的以太网帧,第一交换机校验该重传的以太网帧成功,向下一个节点设备(即第二交换机)发送该重传的以太网帧。When there is an error in transmission (take the Ethernet frame error code in the Ethernet link "the first computer device - the first switch" as an example): the first switch first buffers the head part of the Ethernet frame, and then according to the purpose contained in the head part Check the address table, find the output port address to be sent, and then send the Ethernet frame to the second switch. Due to a bit error, the first switch fails to verify the Ethernet frame, and the first switch determines that the Ethernet link "the first computer device - the first switch" has the retransmission capability, then the first switch modifies the first switch of the Ethernet frame. One flag is the fourth state (10, indicating that it will be partially retransmitted), and the second flag is modified to be the first state (11, indicating that it is invalid). In addition, the first switch sends a partial retransmission request (NAK message) to the first computer device to obtain the retransmitted Ethernet frame. In response to the partial retransmission request, the first computer device sends the retransmitted Ethernet frame to the first switch, and the first switch verifies that the retransmitted Ethernet frame is successful, and sends it to the next node device (ie, the second switch) The retransmitted Ethernet frame.
需要说明的是,图9A所示的内容以“以太网帧在以太网链路“第一计算机设备-第一交换机”发生误码”为例进行了介绍,但不局限于这两个节点设备之间的以太网链路发生误码的实施方式。示例性的,还可以存在,以太网帧在以太网链路“第一交换机-第二交换机”、“第二交换机-第三交换机”、“第三交换机-第二计算机设备”这些以太网链路发生误码的情况。其他的发生误码的情况,可以参照上述示例的说明,此处不再赘述。假设后续的传输过程均不发生错误,那么,修改后的以太网帧和重传的以太网帧会先后发送到第二计算机设备处。第二计算机设备可以根据修改后的以太网帧中的第二标识确定该以太网帧无效,并且根据第一标识判定已有节点设备进行了局部重传,则无需第二计算机设备向第一计算机设备发送全局重传请求。第二计算机设备丢弃修改后的以太网帧,无需上传给上层。第二计算机设备等待接收重传的以太网帧。在接收了重传的以太网帧之后,第二计算机设备校验该重传的以太网帧成功,并且根据第二标识确定该重传的以太网帧有效。接下来,第二计算机设备则可将该重传的以太网帧上传给上层进行处理。It should be noted that, the content shown in FIG. 9A is described by taking the example of "bit error occurs in the Ethernet frame in the Ethernet link "the first computer device - the first switch", but it is not limited to these two node devices. The implementation of the error occurred in the Ethernet link between. Exemplarily, it may also exist that the Ethernet frames are in the Ethernet links "first switch-second switch", "second switch-third switch", and "third switch-second computer device". A bit error occurs on the road. For other cases where bit errors occur, reference may be made to the description of the above example, and details are not repeated here. Assuming that no error occurs in the subsequent transmission process, the modified Ethernet frame and the retransmitted Ethernet frame will be sent to the second computer device in succession. The second computer device may determine that the Ethernet frame is invalid according to the second identifier in the modified Ethernet frame, and determine that the existing node device has performed partial retransmission according to the first identifier, so there is no need for the second computer device to report to the first computer. The device sends a global retransmission request. The second computer device discards the modified Ethernet frame without uploading to the upper layer. The second computer device waits to receive the retransmitted Ethernet frame. After receiving the retransmitted Ethernet frame, the second computer device verifies that the retransmitted Ethernet frame is successful, and determines that the retransmitted Ethernet frame is valid according to the second identifier. Next, the second computer device can upload the retransmitted Ethernet frame to the upper layer for processing.
参见图9B,是本申请实施例提供的又一种以太网错误帧的重传流程的示意图。该流程可以基于图2所示的以太网架构来实现。与图9A所示的重传流程不同的是,第一交换机通过对以太网帧进行恢复处理,来获取重传的以太网帧。其他流程可参照上述内容中的介绍,此处不再赘述。Referring to FIG. 9B , it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application. This process can be implemented based on the Ethernet architecture shown in FIG. 2 . Different from the retransmission process shown in FIG. 9A , the first switch obtains the retransmitted Ethernet frame by performing recovery processing on the Ethernet frame. For other processes, reference may be made to the introduction in the above content, which will not be repeated here.
需要说明的是,图9B所示的内容以“以太网帧在以太网链路“第一计算机设备-第一交换机”发生误码”为例进行了介绍,但不局限于这两个节点设备之间的以太网链路发生误码的实施方式。示例性的,还可以存在,以太网帧在以太网链路“第一交换机-第二交换机”、“第二交换机-第三交换机”、“第三交换机-第二计算机设备”这些以太网链路发生误码的情况。其他的发生误码的情况,可以参照上述示例的说明,此处不再赘述。It should be noted that, the content shown in FIG. 9B is described by taking “bit error occurs in the Ethernet frame in the Ethernet link “first computer device-first switch”” as an example, but it is not limited to these two node devices. The implementation of the error occurred in the Ethernet link between. Exemplarily, it may also exist that the Ethernet frames are in the Ethernet links "first switch-second switch", "second switch-third switch", and "third switch-second computer device". A bit error occurs on the road. For other cases where bit errors occur, reference may be made to the description of the above example, and details are not repeated here.
另外,对在后续的传输过程中,又出现传输错误的情况进行举例说明。以以太网链路“第二交换机-第三交换机”为例。第三交换机首先缓存以太网帧head部分,之后根据head部分包含的目的地址进行查表,找到想要发送的输出端口地址,再将以太网帧发送给第二计算机设备。由于发生误码,第三交换机校验以太网帧失败,第一交换机根据第一标识(10)以及第二标识(11)判定该以太网帧已被修改,那么,第三交换机不对以太网帧进行修改,且不对该以太网帧进行局部重传,直接向第二计算机设备发送该以太网帧。In addition, a case where a transmission error occurs again in the subsequent transmission process is illustrated by an example. Take the Ethernet link "second switch-third switch" as an example. The third switch first caches the head part of the Ethernet frame, then looks up the table according to the destination address contained in the head part, finds the address of the output port to be sent, and sends the Ethernet frame to the second computer device. Due to a bit error, the third switch fails to verify the Ethernet frame. The first switch determines that the Ethernet frame has been modified according to the first identifier (10) and the second identifier (11). Then, the third switch does not accept the Ethernet frame. Modification is performed, and the Ethernet frame is not retransmitted locally, and the Ethernet frame is directly sent to the second computer device.
以下通过示例,比较在传输出现错误的情况下,本申请实施例和现有技术中正确传输一个以太网帧所需的时间。示例性的,每条以太网链路的速率为10G比特/秒(bits per second,bps),每条以太网链路的收发单元以及链路的传播时延T link为500ns,CUT-Through只需缓存以太网帧帧头的20个字节,交换时延除存储以太网帧或以太网帧帧头时延外还需要增加100ns的固定时延。重传请求包(NAK报文)的大小为64字节。以太网帧中承载用户消息的净荷字段为1500字节。 In the following, an example is used to compare the time required to correctly transmit an Ethernet frame in the embodiment of the present application and the prior art when an error occurs in transmission. Exemplarily, the rate of each Ethernet link is 10G bits per second (bits per second, bps), the transceiver unit of each Ethernet link and the propagation delay T link of the link are 500ns, and the CUT-Through only The 20 bytes of the Ethernet frame header need to be buffered, and the exchange delay needs to add a fixed delay of 100ns in addition to the delay of storing the Ethernet frame or the Ethernet frame header. The size of the retransmission request packet (NAK packet) is 64 bytes. The payload field carrying user messages in an Ethernet frame is 1500 bytes.
采用现有技术一(可参考图3对应实施例的介绍),总时延T error1=T1+T2+T3,其中,T1为第二计算机设备检测到以太网帧丢包所需的时间,这个时间最短为传输该以太网帧所需的传输时间,即T1=4*500+3*(1500*8/10+100)=5900ns;T2为重传请求包的所需的传输时间,T2=4*500+3*(64*8/10+100)=2453.6ns;T3为重传该以太网帧所需的传输时间,T3=4*500+3*(1500*8/10+100)=5900ns。那么,总时延T error1=5900+2453.6+5900=14253.6ns。 Using prior art one (refer to the introduction of the corresponding embodiment in FIG. 3 ), the total time delay T error1 =T1+T2+T3, where T1 is the time required for the second computer device to detect the Ethernet frame packet loss, this The shortest time is the transmission time required to transmit the Ethernet frame, that is, T1=4*500+3*(1500*8/10+100)=5900ns; T2 is the required transmission time of the retransmission request packet, T2= 4*500+3*(64*8/10+100)=2453.6ns; T3 is the transmission time required to retransmit the Ethernet frame, T3=4*500+3*(1500*8/10+100) =5900ns. Then, the total time delay T error1 =5900+2453.6+5900=14253.6ns.
若考虑在一个节点设备传输的内部阻塞情况,比如第一交换机正在发送上一个长度为1500字节的以太网帧,那么需要最多等待约1500*8/10=1200ns才能发送当前需要发送的以太网帧。一共考虑3个节点设备的内部阻塞,阻塞总时长T12=1200*3=3600ns。在这种情况下,总时延T error1=T1+T2+T3+T12=5900+3600+2453.6+5900=17853.6ns。可视为,现有技术一的总时延在14253.6ns-17853.6ns之间。 If the internal blocking of transmission in a node device is considered, for example, the first switch is sending the last Ethernet frame with a length of 1500 bytes, it needs to wait at most about 1500*8/10=1200ns to send the Ethernet frame that needs to be sent currently. frame. A total of three node devices are considered for internal blocking, and the total blocking duration is T12=1200*3=3600ns. In this case, the total delay T error1 = T1 + T2 + T3 + T12 = 5900 + 3600 + 2453.6 + 5900 = 17853.6 ns. It can be considered that the total delay of the prior art one is between 14253.6ns and 17853.6ns.
采用现有技术二(可参考图4对应实施例的介绍),总时延T error2=T4+T5+T6,其中,T4为第二计算机设备检测到错误的以太网帧所需的时间,这个时间最短传输该以太网帧所需的传输时间,即T4=4*500+3*(20*8/10+100)=2348ns;T5为重传请求包的所需的传输时间,T5=4*500+3*(20*8/10+100)=2348ns;T6为重传该以太网帧所需的传输时间,T6=4*500+3*(20*8/10+100)=2348ns。T error2=2348+2348+2348=7044ns。 Using the second prior art (refer to the introduction of the corresponding embodiment in FIG. 4 ), the total time delay T error2 =T4+T5+T6, where T4 is the time required for the second computer device to detect an erroneous Ethernet frame, this The transmission time required to transmit the Ethernet frame with the shortest time, namely T4=4*500+3*(20*8/10+100)=2348ns; T5 is the required transmission time of the retransmission request packet, T5=4 *500+3*(20*8/10+100)=2348ns; T6 is the transmission time required to retransmit the Ethernet frame, T6=4*500+3*(20*8/10+100)=2348ns . T error2 =2348+2348+2348=7044ns.
采用本发明技术(可参考图9A对应实施例的介绍),则总时延T error3=T7+T8,其中,T7为错误的以太网帧传输到第一交换机,第一交换机再发送重传请求包所需的时间,T7=500+500=1000ns;T8为重传该以太网帧所需的传输时间,T8=4*500+3*(20*8/10+100)=2348ns。T error3=1000+2348=3348ns。 Using the technology of the present invention (refer to the introduction of the corresponding embodiment in FIG. 9A ), the total time delay T error3 = T7 + T8 , where T7 is an erroneous Ethernet frame transmitted to the first switch, and the first switch then sends a retransmission request The time required for the packet, T7=500+500=1000ns; T8 is the transmission time required to retransmit the Ethernet frame, T8=4*500+3*(20*8/10+100)=2348ns. T error3 =1000+2348=3348ns.
可以看出,与现有技术一比较,本申请实施例的时延降低了76.5%-81.2%;与现有技术二比较,本申请实施例的时延降低了52.5%。通过本申请实施例的方法,可以提升以太网错误帧的重传效率。It can be seen that, compared with the first prior art, the delay of the embodiment of the present application is reduced by 76.5%-81.2%; compared with the second prior art, the delay of the embodiment of the present application is reduced by 52.5%. Through the method of the embodiment of the present application, the retransmission efficiency of the Ethernet error frame can be improved.
参见图10,是本申请实施例提供的又一种以太网错误帧的重传流程的示意图。图10传输过程与图9A和图9B相似,不同之处在于以太网帧在第一交换机处不可被局部重传。那么,在第一交换机修改以太网帧的第一标识为第五状态(01,指示不会被局部重传),修改第二标识为第一状态(11,指示无效)。Referring to FIG. 10 , it is a schematic diagram of another retransmission process of an Ethernet error frame provided by an embodiment of the present application. The transmission process of FIG. 10 is similar to that of FIGS. 9A and 9B, except that the Ethernet frame cannot be partially retransmitted at the first switch. Then, the first switch modifies the first flag of the Ethernet frame to the fifth state (01, indicating that it will not be partially retransmitted), and modifies the second flag to the first state (11, indicating that it is invalid).
需要说明的是,图10中的内容以“以太网帧在以太网链路“第一计算机设备-第一交换机”发生误码”为例进行了介绍,但不局限于这两个节点设备之间的以太网链路发生误码的实施方式。示例性的,还可以存在,以太网帧在以太网链路“第一交换机-第二交换机”、“第二交换机-第三交换机”、“第三交换机-第二计算机设备”这些以太网链路发生误码的情况。其他的发生误码的情况,可以参照上述示例的说明,此处不再赘述。It should be noted that the content in FIG. 10 is described by taking “bit error occurs in the Ethernet frame in the Ethernet link “the first computer device - the first switch”” as an example, but it is not limited to one of the two node devices. The implementation of the error occurred in the Ethernet link between the two. Exemplarily, it may also exist that the Ethernet frames are in the Ethernet links "first switch-second switch", "second switch-third switch", and "third switch-second computer device". A bit error occurs on the road. For other cases where bit errors occur, reference may be made to the description of the above example, and details are not repeated here.
假设后续的传输过程均不发生错误,那么,修改后的以太网帧发送到第二计算机设备处。第二计算机设备可以根据修改后的以太网帧中的第二标识确定该以太网帧无效,并且根据第一标识判定以太网帧并未进行局部重传,则第二计算机设备可以向第一计算机设备发送全局重传请求。第二计算机设备丢弃修改后的以太网帧,无需上传给上层。第二计算机设备等待接收重传的以太网帧。在接收了重传的以太网帧之后,第二计算机设备校验该重传的以太网帧成功,并且根据重传的以太网帧中的第二标识确定该重传的以太网帧有效。接下来,第二计算机设备则可将该重传的以太网帧上传给上层进行处理。Assuming that no error occurs in the subsequent transmission process, the modified Ethernet frame is sent to the second computer device. The second computer device may determine that the Ethernet frame is invalid according to the second identifier in the modified Ethernet frame, and determine that the Ethernet frame is not partially retransmitted according to the first identifier, then the second computer device may report to the first computer The device sends a global retransmission request. The second computer device discards the modified Ethernet frame without uploading to the upper layer. The second computer device waits to receive the retransmitted Ethernet frame. After receiving the retransmitted Ethernet frame, the second computer device verifies that the retransmitted Ethernet frame is successful, and determines that the retransmitted Ethernet frame is valid according to the second identifier in the retransmitted Ethernet frame. Next, the second computer device can upload the retransmitted Ethernet frame to the upper layer for processing.
在这种情况下,采用本发明技术,则总时延T error4=T9+T10+T11,其中,T9为第二计算机设备检测到错误的以太网帧所需的时间,这个时间最短传输该以太网帧所需的传输时间,即T4=4*500+3*(20*8/10+100)=2348ns;T10为重传请求包的所需的传输时间, T5=4*500+3*(20*8/10+100)=2348ns;T11为重传该以太网帧所需的传输时间,T6=4*500+3*(20*8/10+100)=2348ns。T error4=2348+2348+2348=7044ns。 In this case, using the technology of the present invention, the total time delay T error4 =T9+T10+T11, where T9 is the time required for the second computer device to detect the erroneous Ethernet frame, and this time is the shortest to transmit the Ethernet frame. The transmission time required for the network frame, namely T4=4*500+3*(20*8/10+100)=2348ns; T10 is the required transmission time for the retransmission request packet, T5=4*500+3* (20*8/10+100)=2348ns; T11 is the transmission time required to retransmit the Ethernet frame, T6=4*500+3*(20*8/10+100)=2348ns. T error4 =2348+2348+2348=7044ns.
采用现有技术一,可参照上述内容中的介绍,现有技术一的总时延在14253.6ns-17853.6ns之间。With the first prior art, referring to the introduction in the above content, the total delay of prior art one is between 14253.6 ns and 17853.6 ns.
采用现有技术二,总时延与本申请的实施方案相当。With the second prior art, the total time delay is comparable to that of the embodiment of the present application.
可以看出,与现有技术一比较,本申请实施例的时延降低了50.6%-60.5%;与现有技术二比较,本申请实施例的时延相当。通过本申请实施例的方法,可以提升以太网错误帧的重传效率。It can be seen that, compared with the first prior art, the delay of the embodiment of the present application is reduced by 50.6%-60.5%; compared with the second prior art, the delay of the embodiment of the present application is comparable. Through the method of the embodiment of the present application, the retransmission efficiency of the Ethernet error frame can be improved.
以上介绍了在以太网帧的传输过程中,各个节点设备对以太网帧的处理方式。接下来将介绍目的设备对以太网帧的处理方式。其中,目的设备的MAC地址与该以太网帧中的目的地址字段包含的MAC地址相同。The above describes how each node device processes the Ethernet frame during the transmission of the Ethernet frame. Next, we will introduce how the destination device handles Ethernet frames. The MAC address of the destination device is the same as the MAC address contained in the destination address field in the Ethernet frame.
参见图11A,是本申请实施例提供的又一种以太网错误帧的重传方法的流程图。该方法可以基于图1所示的以太网系统来实现,下面描述的目的设备可以是图1所示的第二计算机设备。该方法包括但不限于如下步骤。Referring to FIG. 11A , it is a flowchart of another method for retransmitting an Ethernet error frame provided by an embodiment of the present application. The method may be implemented based on the Ethernet system shown in FIG. 1 , and the destination device described below may be the second computer device shown in FIG. 1 . The method includes but is not limited to the following steps.
S301、目的设备接收以太网帧,对所述以太网帧进行校验。S301. A destination device receives an Ethernet frame, and checks the Ethernet frame.
S302、当所述以太网帧校验成功时,目的设备检测所述以太网帧是否有效。S302. When the Ethernet frame verification is successful, the destination device detects whether the Ethernet frame is valid.
其中,以太网帧是否有效可以理解为,在目的设备与上一个节点设备的以太网链路之前的传输过程中,该以太网帧的是否出现过错误。具体的,以太网帧有效,表示该以太网帧在之前的传输过程中未出现过错误;以太网帧无效,表示该以太网帧在之前的传输过程中出现过错误。Wherein, whether the Ethernet frame is valid can be understood as whether an error has occurred in the Ethernet frame during the transmission process before the Ethernet link between the destination device and the previous node device. Specifically, if the Ethernet frame is valid, it means that no error has occurred in the Ethernet frame in the previous transmission process; if the Ethernet frame is invalid, it means that the Ethernet frame has encountered an error in the previous transmission process.
对应于上述内容中介绍的修改以太网帧,以表明以太网帧无效的方式;以下对目的设备检测以太网帧是否有效的方式进行介绍。Corresponding to the method of modifying the Ethernet frame introduced in the above content to indicate that the Ethernet frame is invalid; the following describes the method for the destination device to detect whether the Ethernet frame is valid.
在一种可能的实现方式中,节点设备校验以太网帧的失败之后,节点设备在以太网帧中添加第二标识。那么,目的设备检测所述以太网帧是否有效的方法可以为:检测所述以太网帧是否包含所述第二标识。具体的,若以太网帧中包含所述第二标识,则确定所述以太网帧无效;若以太网帧中不包含所述第二标识,则确定所述以太网帧有效。In a possible implementation manner, after the node device fails to verify the Ethernet frame, the node device adds the second identifier to the Ethernet frame. Then, the method for the destination device to detect whether the Ethernet frame is valid may be: detecting whether the Ethernet frame contains the second identifier. Specifically, if the Ethernet frame contains the second identifier, it is determined that the Ethernet frame is invalid; if the Ethernet frame does not contain the second identifier, it is determined that the Ethernet frame is valid.
目的设备可以根据以太网帧中的长度字段确定净荷字段的长度,若实际检测出的净荷字段的字节数大于长度字段指示的字节数,可以确定所述以太网帧中包含所述第二标识;若实际检测出的净荷字段的字节数等于长度字段指示的字节数,可以确定所述以太网帧中不包含所述第二标识。The destination device can determine the length of the payload field according to the length field in the Ethernet frame. If the actually detected number of bytes of the payload field is greater than the number of bytes indicated by the length field, it can be determined that the Ethernet frame contains the The second identifier; if the actually detected number of bytes in the payload field is equal to the number of bytes indicated by the length field, it can be determined that the Ethernet frame does not contain the second identifier.
在另一种可能的实现方式中,所述以太网帧中一直包括第二标识,所述第二标识用于指示所述以太网帧是否有效。目的设备检测所述以太网帧是否有效的方法可以为:根据所述第二标识确定所述以太网帧是否有效。具体的,若所述第二标识为第一状态,则确定所述以太网帧无效;若所述第二标识为第二状态,则确定所述以太网帧有效。In another possible implementation manner, the Ethernet frame always includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid. The method for the destination device to detect whether the Ethernet frame is valid may be: determining whether the Ethernet frame is valid according to the second identifier. Specifically, if the second identifier is in the first state, it is determined that the Ethernet frame is invalid; if the second identifier is in the second state, it is determined that the Ethernet frame is valid.
可选的,若所述第二标识为第三状态,所述第三状态的第二标识用于指示所述第二标识失效。那么,表明标识在之前的传输过程中出现了错误,目的设备确定以太网帧无效。Optionally, if the second identifier is in a third state, the second identifier in the third state is used to indicate that the second identifier is invalid. Then, it indicates that an error occurred in the previous transmission process, and the destination device determines that the Ethernet frame is invalid.
在另一种可能的实现方式中,节点设备可以通过反转以太网帧的FCS字段来表示以太网帧无效。那么,目的设备校验以太网帧成功,则表明该以太网帧有效。In another possible implementation manner, the node device may indicate that the Ethernet frame is invalid by inverting the FCS field of the Ethernet frame. Then, if the destination device successfully checks the Ethernet frame, it indicates that the Ethernet frame is valid.
另外,若校验以太网帧失败,且反转后的CRC值与该以太网帧中包含的CRC值相同,则目的设备可以确定所述以太网帧无效。若校验以太网帧失败,且反转后的CRC值与该以太 网帧中包含的CRC值也不相同,则表明以太网帧在目的设备与上一个节点设备之间的以太网链路的传输过程中出现了错误。In addition, if the verification of the Ethernet frame fails, and the reversed CRC value is the same as the CRC value included in the Ethernet frame, the destination device may determine that the Ethernet frame is invalid. If the verification of the Ethernet frame fails, and the reversed CRC value is not the same as the CRC value contained in the Ethernet frame, it indicates that the Ethernet frame is in the Ethernet link between the destination device and the previous node device. An error occurred during transfer.
S303、若所述以太网帧有效,则将所述以太网帧上传给上层进行处理。S303. If the Ethernet frame is valid, upload the Ethernet frame to the upper layer for processing.
其中,以太网帧校验成功,表明以太网帧在以太网链路“第三交换机-第二计算机设备”的传输过程中没有出现错误;以太网帧有效,表明以太网帧在以太网链路“第三交换机-第二计算机设备”之前的各个传输过程中没有出现错误。因此,可确定以太网帧正确传输,第二计算机设备可以将该以太网帧交付给上层进行数据处理。Among them, the Ethernet frame check is successful, indicating that there is no error in the transmission process of the Ethernet link "third switch-second computer device"; the Ethernet frame is valid, indicating that the Ethernet frame is in the Ethernet link. There were no errors in the respective transmissions up to the "Third Switch - Second Computer Device". Therefore, it can be determined that the Ethernet frame is correctly transmitted, and the second computer device can deliver the Ethernet frame to the upper layer for data processing.
S304、若所述以太网帧无效,则目的设备检测所述以太网帧是否将被局部重传。S304. If the Ethernet frame is invalid, the destination device detects whether the Ethernet frame will be partially retransmitted.
在一些实施例中,所述以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传。目的设备检测所述以太网帧是否将被局部重传的方式为:根据所述第一标识确定所述以太网帧是否将被局部重传。具体的,若所述第一标识为第四状态,则确定以太网帧将被局部重传;若所述第一标识为第五状态,则确定以太网帧不会被局部重传。需要说明的是,第一标识的相关介绍可以参照上述步骤S104中对第一标识的介绍。In some embodiments, the Ethernet frame includes a first identification for indicating whether the Ethernet frame is to be partially retransmitted. The manner in which the destination device detects whether the Ethernet frame will be partially retransmitted is: determining whether the Ethernet frame will be partially retransmitted according to the first identifier. Specifically, if the first identifier is in the fourth state, it is determined that the Ethernet frame will be partially retransmitted; if the first identifier is in the fifth state, it is determined that the Ethernet frame will not be partially retransmitted. It should be noted that, for the related introduction of the first identifier, reference may be made to the introduction of the first identifier in the foregoing step S104.
在一些实施例中,若所述第一标识为第六状态,所述第六状态的第一标识用于指示所述第一标识失效。那么,表明第一标识在之前的传输过程中出现了错误,目的设备无法确定以太网帧是否可被重新恢复。可选的,目的设备可以向第一计算机设备发送针对所述以太网帧的全局重传请求。其中,第一计算机设备是生成该以太网帧的设备。第一计算机设备的MAC地址与所述以太网帧的源地址字段中包含的MAC地址相同。全局重传请求是指,以太网帧的目的设备向该以太网帧的源设备发送的重传请求。In some embodiments, if the first identifier is in a sixth state, the first identifier in the sixth state is used to indicate that the first identifier is invalid. Then, it indicates that an error occurred in the first identifier in the previous transmission process, and the destination device cannot determine whether the Ethernet frame can be recovered again. Optionally, the destination device may send a global retransmission request for the Ethernet frame to the first computer device. The first computer device is a device that generates the Ethernet frame. The MAC address of the first computer device is the same as the MAC address contained in the source address field of the Ethernet frame. The global retransmission request refers to a retransmission request sent by the destination device of the Ethernet frame to the source device of the Ethernet frame.
S305、当检测到所述以太网帧将被局部重传时,目的设备等待接收重传的以太网帧。S305. When detecting that the Ethernet frame will be partially retransmitted, the destination device waits for receiving the retransmitted Ethernet frame.
所述以太网帧将被局部重传,表明在之前的传输过程中,接收到错误的以太网帧的节点设备具备获取重传的以太网帧的能力,该节点设备已尝试对该错误的以太网帧进行了局部重传。在这种情况下,目的设备无需依靠自身去获取重传的以太网帧,可以等待接收重传的以太网帧。示例性的,可参照图9A或者图9B所示的实施例中的介绍。The Ethernet frame will be partially retransmitted, indicating that in the previous transmission process, the node device that received the erroneous Ethernet frame has the ability to obtain the retransmitted Ethernet frame, and the node device has tried the erroneous Ethernet frame. The network frame is partially retransmitted. In this case, the destination device does not need to rely on itself to obtain the retransmitted Ethernet frame, and can wait to receive the retransmitted Ethernet frame. For example, reference may be made to the description in the embodiment shown in FIG. 9A or FIG. 9B .
在一些实施例中,若当前时刻距离接收到以太网帧的时刻超过预设时长,则目的设备向第一计算机设备发送针对所述以太网帧的全局重传请求。该预设时长可以人为设定,也可以是目的设备统计出的传输一个以太网帧所需的传输时长。通过这种方式,在节点设备局部重传以太网帧失败的情况下,目的设备可以发起针对以太网帧的全局重传请求,以提升以太网帧传输的可靠性。In some embodiments, if the current time is longer than the time when the Ethernet frame is received, the destination device sends a global retransmission request for the Ethernet frame to the first computer device. The preset duration may be set manually, or may be the transmission duration required to transmit one Ethernet frame calculated by the destination device. In this way, when the node device fails to retransmit the Ethernet frame locally, the destination device can initiate a global retransmission request for the Ethernet frame, so as to improve the reliability of the transmission of the Ethernet frame.
S306、当检测到所述以太网帧不会被局部重传时,目的设备向第一计算机设备发送针对所述以太网帧的全局重传请求。S306. When detecting that the Ethernet frame will not be partially retransmitted, the destination device sends a global retransmission request for the Ethernet frame to the first computer device.
示例性的,可参照图10所对应的实施例中的介绍。Exemplarily, reference may be made to the description in the embodiment corresponding to FIG. 10 .
S307、当所述以太网帧校验失败时,目的设备确定以太网帧是否可被本地恢复。S307. When the Ethernet frame check fails, the destination device determines whether the Ethernet frame can be recovered locally.
具体的,所述以太网帧校验失败,表明以太网帧在目的设备与上一个节点设备之间的以太网链路的传输过程中出现了错误。目的设备首先尝试恢复该以太网帧。Specifically, the failure to check the Ethernet frame indicates that an error has occurred in the Ethernet frame during the transmission process of the Ethernet link between the destination device and the previous node device. The destination device first attempts to recover the Ethernet frame.
目的设备确定以太网帧是否可被本地恢复的方式可以为:目的设备确定自身与上一个节点设备之间的以太网链路是否具有重传能力;或者,目的设备确定自身是否具有恢复以太网帧的能力。The manner in which the destination device determines whether the Ethernet frame can be recovered locally may be: the destination device determines whether the Ethernet link between itself and the previous node device has the retransmission capability; or, the destination device determines whether it has the ability to recover the Ethernet frame. Ability.
S308、若所述以太网帧可被本地恢复,则目的设备对以太网帧进行本地恢复。S308. If the Ethernet frame can be recovered locally, the destination device recovers the Ethernet frame locally.
在一种可能的实现方式中,目的设备与上一个节点设备之间的以太网链路具有重传能力。目的设备可以通过向上一个节点设备发送局部重传请求,以获取恢复的以太网帧。之后,目 的设备再对恢复的以太网帧执行校验,后续的操作可参照步骤S302及其后续步骤的介绍。In a possible implementation manner, the Ethernet link between the destination device and the previous node device has a retransmission capability. The destination device can obtain the recovered Ethernet frame by sending a partial retransmission request to the previous node device. Afterwards, the destination device performs verification on the recovered Ethernet frame, and for subsequent operations, refer to the description of step S302 and its subsequent steps.
在另一种可能的实现方式中,目的设备自身具有恢复以太网帧的能力。第二节点设备对所述以太网帧进行恢复处理,得到恢复后的以太网帧。之后,目的设备再对恢复的以太网帧执行校验,后续的操作可参照步骤S302及其后续步骤的介绍。In another possible implementation manner, the destination device itself has the ability to restore the Ethernet frame. The second node device restores the Ethernet frame to obtain the restored Ethernet frame. After that, the destination device performs verification on the recovered Ethernet frame, and for subsequent operations, refer to the description of step S302 and its subsequent steps.
若获取的恢复的以太网帧校验失败的次数超过预设次数,则目的设备可以向第一计算机设备发送针对所述以太网帧的全局重传请求。If the acquired number of failed Ethernet frame verification exceeds a preset number of times, the destination device may send a global retransmission request for the Ethernet frame to the first computer device.
S309、若以太网帧不可被本地恢复,则目的设备向第一计算机设备发送针对所述以太网帧的全局重传请求。S309. If the Ethernet frame cannot be recovered locally, the destination device sends a global retransmission request for the Ethernet frame to the first computer device.
在一些实施例中,在所述以太网帧校验失败的情况下,目的设备确定以太网帧是否可被本地恢复之前,该目的设备还可以检测所述以太网帧是否有效。示例性的,这种实施方式可以参照图11B所示的方法流程图。In some embodiments, in the event that the Ethernet frame check fails, the destination device may also detect whether the Ethernet frame is valid before determining whether the Ethernet frame can be recovered locally. Exemplarily, for this embodiment, reference may be made to the method flowchart shown in FIG. 11B .
若有效,则表明以太网帧在目的设备和上一个节点设备之间的以太网链路的传输过程中出现了错误,但在之前的传输过程中未出现错误,则目的设备确定该以太网帧是否可被本地恢复,之后执行的步骤可以参照上述内容步骤S308-步骤S310中的介绍。If it is valid, it means that the Ethernet frame has an error during the transmission process of the Ethernet link between the destination device and the previous node device, but there is no error in the previous transmission process, then the destination device determines that the Ethernet frame Whether it can be restored locally, the steps to be executed afterward can refer to the descriptions in the above-mentioned steps S308-S310.
若无效,则表明以太网帧在目的设备和上一个节点设备之间的以太网链路的传输过程中出现了错误,并且在之前的传输过程中也出现了错误,则目的设备等待接收重传的以太网帧。If it is invalid, it means that the Ethernet frame has an error during the transmission process of the Ethernet link between the destination device and the previous node device, and an error also occurred during the previous transmission process, then the destination device waits to receive retransmission. Ethernet frame.
以上描述了本申请的方法实施例,下面对相应的装置实施例进行介绍。The method embodiments of the present application are described above, and the corresponding apparatus embodiments are introduced below.
参见图12,是本申请实施例提供的一种通信装置的示意图。该通信装置120可以是上述方法实施例中介绍的第二节点设备。该通信装置120可以是任意形态的计算机、服务器、交换机、路由器或网卡等;或者是任意形态的计算机、服务器、交换机、路由器或网卡等中的装置。该通信装置120包括接收单元1201、校验单元1202、修改单元1203和发送单元1204。下面对该接收单元1201、校验单元1202、修改单元1203和发送单元1204进行介绍。Referring to FIG. 12 , it is a schematic diagram of a communication apparatus provided by an embodiment of the present application. The communication apparatus 120 may be the second node device introduced in the foregoing method embodiments. The communication device 120 may be any form of computer, server, switch, router, or network card, etc.; or a device in any form of computer, server, switch, router, or network card. The communication device 120 includes a receiving unit 1201 , a checking unit 1202 , a modifying unit 1203 and a sending unit 1204 . The receiving unit 1201 , the checking unit 1202 , the modifying unit 1203 and the sending unit 1204 will be introduced below.
所述接收单元1201,用于接收以太网帧。The receiving unit 1201 is used for receiving Ethernet frames.
所述校验单元1202,用于对所述以太网帧进行校验。The verification unit 1202 is configured to verify the Ethernet frame.
所述修改单元1203,用于当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传。The modifying unit 1203 is configured to modify the Ethernet frame when the Ethernet frame check fails, and the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate the Ethernet frame Whether it will be retransmitted locally.
所述发送单元1204,用于发送所述修改后的以太网帧。The sending unit 1204 is configured to send the modified Ethernet frame.
在一些实施例中,所述修改后的以太网帧还包括所述第二标识,所述第二标识用于指示所述修改后的以太网帧无效。In some embodiments, the modified Ethernet frame further includes the second identifier, and the second identifier is used to indicate that the modified Ethernet frame is invalid.
在一些实施例中,若所述以太网帧将被局部重传,所述通信装置还包括获取单元,所述获取单元,用于在所述以太网帧将被局部重传的情况下,获取重传的以太网帧;所述校验单元1202,还用于对所述重传的以太网帧进行校验;所述发送单元1204,还用于在所述重传的以太网帧校验成功时,发送所述重传的以太网帧。In some embodiments, if the Ethernet frame is to be partially retransmitted, the communication device further includes an acquisition unit, the acquiring unit is configured to acquire the Ethernet frame in the case that the Ethernet frame is to be partially retransmitted the retransmitted Ethernet frame; the verification unit 1202 is further configured to verify the retransmitted Ethernet frame; the sending unit 1204 is further configured to verify the retransmitted Ethernet frame On success, the retransmitted Ethernet frame is sent.
在一些实施例中,所述获取单元具体用于:发送针对所述以太网帧的局部重传请求;接收响应于所述局部重传请求发送的重传的以太网帧。In some embodiments, the obtaining unit is specifically configured to: send a partial retransmission request for the Ethernet frame; and receive the retransmitted Ethernet frame sent in response to the partial retransmission request.
在一些实施例中,所述获取单元具体用于:对所述以太网帧进行恢复处理,得到所述重传的以太网帧。In some embodiments, the obtaining unit is specifically configured to: perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
在一些实施例中,所述第一标识位于所述以太网帧的净荷字段之后。In some embodiments, the first identification is located after a payload field of the Ethernet frame.
在一些实施例中,所述校验单元具体用于:对所述以太网帧进行校验并发送所述以太网帧中的部分比特;所述发送单元具体用于:继续发送所述修改后的以太网帧中除所述部分比 特之后的比特。In some embodiments, the checking unit is specifically configured to: check the Ethernet frame and send some bits in the Ethernet frame; the sending unit is specifically configured to: continue to send the modified bits in the Ethernet frame except the partial bits.
需要说明的是,图12所示的通信装置的各个单元执行的操作可以上述方法实施例的相关内容。此处不再详述。上述各个单元可以以硬件,软件或者软硬件结合的方式来实现。It should be noted that, the operations performed by each unit of the communication apparatus shown in FIG. 12 may be related to the foregoing method embodiments. It will not be described in detail here. The above-mentioned units may be implemented in hardware, software or a combination of software and hardware.
通过图12所述的通信装置,第一标识可以表示发生错误的以太网帧是否将被局部重传恢复,接收该错误的以太网帧的目的设备可以根据该第一标识选择是否发起全局重传请求,能够节省错误帧的传输时间,提升以太网错误帧的重传效率。With the communication device shown in FIG. 12 , the first identifier can indicate whether the erroneous Ethernet frame will be recovered by local retransmission, and the destination device receiving the erroneous Ethernet frame can choose whether to initiate global retransmission according to the first identifier The request can save the transmission time of error frames and improve the retransmission efficiency of Ethernet error frames.
参见图13,是本申请实施例提供的又一种通信装置的示意图。该通信装置130可以是上述方法实施例中介绍的目的设备。该通信装置130可以是任意形态的计算机、服务器、交换机、路由器或网卡等;或者是任意形态的计算机、服务器、交换机、路由器或网卡等中的装置。该通信装置130包括校验单元1301、第一检测单元1302、第二检测单元1303和接收单元1304。下面对该校验单元1301、第一检测单元1302、第二检测单元1303和接收单元1304进行介绍。Referring to FIG. 13 , it is a schematic diagram of another communication apparatus provided by an embodiment of the present application. The communication apparatus 130 may be the destination device introduced in the foregoing method embodiments. The communication device 130 may be any form of computer, server, switch, router, or network card, or the like; or a device in any form of computer, server, switch, router, or network card. The communication device 130 includes a checking unit 1301 , a first detecting unit 1302 , a second detecting unit 1303 and a receiving unit 1304 . The verification unit 1301 , the first detection unit 1302 , the second detection unit 1303 and the receiving unit 1304 are introduced below.
所述校验单元1301,用于接收以太网帧,对所述以太网帧进行校验。The verification unit 1301 is configured to receive an Ethernet frame and perform verification on the Ethernet frame.
所述第一检测单元1302,用于当所述以太网帧校验成功时,检测所述以太网帧是否有效。The first detection unit 1302 is configured to detect whether the Ethernet frame is valid when the Ethernet frame is successfully checked.
所述第二检测单元1303,用于若所述以太网帧无效,则检测所述以太网帧是否将被局部重传。The second detection unit 1303 is configured to detect whether the Ethernet frame will be partially retransmitted if the Ethernet frame is invalid.
所述接收单元1304,用于当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。The receiving unit 1304 is configured to wait for receiving the retransmitted Ethernet frame when it is detected that the Ethernet frame will be partially retransmitted.
在一些实施例中,第二标识用于指示所述以太网帧无效,所述第一检测单元1302具体用于:检测所述以太网帧是否包含第二标识;若包含,则确定所述以太网帧无效;若不包含,则确定所述以太网帧有效。In some embodiments, the second identifier is used to indicate that the Ethernet frame is invalid, and the first detection unit 1302 is specifically configured to: detect whether the Ethernet frame contains the second identifier; if so, determine the Ethernet frame The network frame is invalid; if not included, it is determined that the Ethernet frame is valid.
在一些实施例中,所述以太网帧包括第二标识,所述第二标识用于指示所述以太网帧是否有效,所述第一检测单元1302具体用于:根据所述第二标识确定所述以太网帧是否有效;若所述第二标识为第一状态,则确定所述以太网帧无效;若所述第二标识为第二状态,则确定所述以太网帧有效。In some embodiments, the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the first detection unit 1302 is specifically configured to: determine according to the second identifier Whether the Ethernet frame is valid; if the second identifier is in the first state, it is determined that the Ethernet frame is invalid; if the second identifier is in the second state, it is determined that the Ethernet frame is valid.
在一些实施例中,所述以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传,所述第二检测单元1303具体用于:根据所述第一标识确定所述以太网帧是否将被局部重传;若所述第一标识为第四状态,则确定以太网帧将被局部重传;若所述第一标识为第五状态,则确定以太网帧不会被局部重传。In some embodiments, the Ethernet frame includes a first identifier, where the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted, and the second detection unit 1303 is specifically configured to: according to the The first identifier determines whether the Ethernet frame will be partially retransmitted; if the first identifier is in the fourth state, it is determined that the Ethernet frame will be partially retransmitted; if the first identifier is in the fifth state, then Make sure that Ethernet frames are not partially retransmitted.
在一些实施例中,所述通信装置还包括第一发送单元,所述第一发送单元用于:当检测到所述以太网帧不会被局部重传时,发送针对所述以太网帧的全局重传请求。In some embodiments, the communication device further includes a first sending unit, and the first sending unit is configured to: when it is detected that the Ethernet frame will not be partially retransmitted, send a message for the Ethernet frame Global retransmission request.
在一些实施例中,所述通信装置还包括确定单元和恢复单元,所述确定单元,用于当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复;所述恢复单元,用于当确定所述以太网帧可被本地恢复时,对以太网帧进行本地恢复。In some embodiments, the communication device further includes a determination unit and a recovery unit, the determination unit is configured to determine whether the Ethernet frame can be recovered locally when the Ethernet frame check fails; the The recovery unit is configured to perform local recovery on the Ethernet frame when it is determined that the Ethernet frame can be recovered locally.
在一些实施例中,所述确定单元具体用于:当所述以太网帧校验失败时,检测所述以太网帧是否有效;若所述以太网帧有效,则确定所述以太网帧是否可被本地恢复。In some embodiments, the determining unit is specifically configured to: when the Ethernet frame check fails, detect whether the Ethernet frame is valid; if the Ethernet frame is valid, determine whether the Ethernet frame is valid Can be restored locally.
在一些实施例中,所述接收单元1304还用于:若所述以太网帧无效,则等待接收重传的以太网帧。In some embodiments, the receiving unit 1304 is further configured to: if the Ethernet frame is invalid, wait to receive the retransmitted Ethernet frame.
在一些实施例中,所述通信装置还包括第二发送单元,所述第二发送单元用于:若当前时刻距离接收到所述以太网帧的时刻超过预设时长,则发送针对所述以太网帧的全局重传请 求。In some embodiments, the communication device further includes a second sending unit, the second sending unit is configured to: if the current time is more than a preset time period from the time when the Ethernet frame is received, send data for the Ethernet frame Global retransmission request for network frames.
需要说明的是,图13所示的通信装置的各个单元执行的操作可以上述方法实施例的相关内容。此处不再详述。上述各个单元可以以硬件,软件或者软硬件结合的方式来实现。It should be noted that, the operations performed by each unit of the communication apparatus shown in FIG. 13 may be related to the foregoing method embodiments. It will not be described in detail here. The above-mentioned units may be implemented in hardware, software or a combination of software and hardware.
通过图13所述的通信装置,在检测到以太网帧无效的情况下,可以检测以太网帧是否将被局部重传,若以太网帧将被局部重传,则等待接收重传的以太网帧。可以看出,在接收到错误的以太网帧后,若检测到该错误的以太网帧将被局部重传,则目的设备无需再向该以太网帧的发送设备发送全局重传请求,可以节省错误帧的传输时间,提升以太网错误帧的重传效率。Through the communication device shown in FIG. 13 , in the case that the Ethernet frame is detected to be invalid, it can be detected whether the Ethernet frame will be partially retransmitted. frame. It can be seen that after receiving an erroneous Ethernet frame, if it is detected that the erroneous Ethernet frame will be retransmitted locally, the destination device does not need to send a global retransmission request to the sending device of the Ethernet frame, which can save The transmission time of error frames improves the retransmission efficiency of Ethernet error frames.
参见图14,是本申请实施例提供的又一种通信装置的示意图。通信装置140可以包括一个或多个处理器1401。所述处理器1401可以是通用处理器或者专用处理器等。所述处理器1401可以用于对通信装置(任意形态的计算机、服务器、交换机、路由器或网卡等)进行控制,执行软件程序,处理软件程序的数据。Referring to FIG. 14 , it is a schematic diagram of another communication apparatus provided by an embodiment of the present application. Communication device 140 may include one or more processors 1401 . The processor 1401 may be a general-purpose processor or a special-purpose processor or the like. The processor 1401 can be used to control communication devices (computers, servers, switches, routers, network cards, etc. in any form), execute software programs, and process data of the software programs.
可选的,所述通信装置140中可以包括一个或多个存储器1402,其上可以存有指令1404,所述指令可在所述处理器1401上被运行,使得所述通信装置140执行上述方法实施例中描述的方法。可选的,所述存储器1402中还可以存储有数据。所述处理器1401和存储器1402可以单独设置,也可以集成在一起。Optionally, the communication device 140 may include one or more memories 1402, and instructions 1404 may be stored thereon, and the instructions may be executed on the processor 1401, so that the communication device 140 executes the above method methods described in the examples. Optionally, the memory 1402 may also store data. The processor 1401 and the memory 1402 can be set independently or integrated together.
可选的,所述通信装置140还可以包括收发器1405、天线1406。所述收发器1405可以称为收发单元、收发机、或收发电路等,用于实现收发功能。收发器1405可以包括接收器和发送器,接收器可以称为接收机或接收电路等,用于实现接收功能;发送器可以称为发送机或发送电路等,用于实现发送功能。Optionally, the communication device 140 may further include a transceiver 1405 and an antenna 1406 . The transceiver 1405 may be referred to as a transceiver unit, a transceiver, or a transceiver circuit, etc., for implementing a transceiver function. The transceiver 1405 may include a receiver and a transmitter, the receiver may be called a receiver or a receiving circuit, etc., for implementing a receiving function; the transmitter may be called a transmitter or a transmitting circuit, etc., for implementing a transmitting function.
在一种实现方式中:In one implementation:
处理器1401用于通过收发器1405接收以太网帧。The processor 1401 is configured to receive Ethernet frames through the transceiver 1405 .
处理器1401还用于对所述以太网帧进行校验;当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传。The processor 1401 is further configured to verify the Ethernet frame; when the Ethernet frame verification fails, modify the Ethernet frame, and the modified Ethernet frame includes a first identifier, and the first identifier Used to indicate whether the Ethernet frame will be partially retransmitted.
处理器1401还用于通过收发器1405发送所述修改后的以太网帧。The processor 1401 is further configured to transmit the modified Ethernet frame through the transceiver 1405 .
在这种实现方式中,该通信装置140可用于实现上述方法实施例中第二节点设备所执行的方法。处理器1401执行的操作可以上述方法实施例的相关内容。此处不再详述。In this implementation manner, the communication apparatus 140 may be used to implement the method performed by the second node device in the foregoing method embodiment. The operations performed by the processor 1401 may be related to the foregoing method embodiments. It will not be described in detail here.
在另一种实现方式中:In another implementation:
处理器1401用于通过收发器1405接收以太网帧。The processor 1401 is configured to receive Ethernet frames through the transceiver 1405 .
处理器1401还用于对所述以太网帧进行校验;当所述以太网帧校验成功时,检测所述以太网帧是否有效;若所述以太网帧无效,则检测所述以太网帧是否将被局部重传;当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。The processor 1401 is further configured to verify the Ethernet frame; when the Ethernet frame verification is successful, detect whether the Ethernet frame is valid; if the Ethernet frame is invalid, detect the Ethernet frame Whether the frame will be partially retransmitted; when it is detected that the Ethernet frame will be partially retransmitted, wait to receive the retransmitted Ethernet frame.
在这种实现方式中,该通信装置140可用于实现上述方法实施例中目的设备所执行的方法。处理器1401执行的操作可以上述方法实施例的相关内容。此处不再详述。In this implementation manner, the communication apparatus 140 can be used to implement the method performed by the destination device in the above method embodiments. The operations performed by the processor 1401 may be related to the foregoing method embodiments. It will not be described in detail here.
在另一种可能的设计中,该收发器可以是收发电路,或者是接口,或者是接口电路。用于实现接收和发送功能的收发电路、接口或接口电路可以是分开的,也可以集成在一起。上述收发电路、接口或接口电路可以用于代码/数据的读写,或者,上述收发电路、接口或接口电路可以用于信号的传输或传递。In another possible design, the transceiver may be a transceiver circuit, or an interface, or an interface circuit. Transceiver circuits, interfaces or interface circuits used to implement receiving and transmitting functions may be separate or integrated. The above-mentioned transceiver circuit, interface or interface circuit can be used for reading and writing code/data, or the above-mentioned transceiver circuit, interface or interface circuit can be used for signal transmission or transmission.
在又一种可能的设计中,可选的,处理器1401可以存有指令1403,指令1403在处理器 1401上运行,可使得所述通信装置140执行上述方法实施例中描述的方法。指令1403可能固化在处理器1401中,该种情况下,处理器1401可能由硬件实现。In another possible design, optionally, the processor 1401 may store instructions 1403, and the instructions 1403 run on the processor 1401, so that the communication apparatus 140 can execute the methods described in the above method embodiments. The instructions 1403 may be hardened in the processor 1401, in which case the processor 1401 may be implemented by hardware.
在又一种可能的设计中,通信装置140可以包括电路,所述电路可以实现前述方法实施例中发送或接收或者通信的功能。In yet another possible design, the communication apparatus 140 may include a circuit, and the circuit may implement the functions of sending or receiving or communicating in the foregoing method embodiments.
本申请中描述的处理器和收发器可实现在集成电路(integrated circuit,IC)、模拟IC、射频集成电路RFIC、混合信号IC、专用集成电路(application specific integrated circuit,ASIC)、印刷电路板(printed circuit board,PCB)、电子设备等上。The processors and transceivers described in this application can be implemented in integrated circuits (ICs), analog ICs, radio frequency integrated circuits (RFICs), mixed-signal ICs, application specific integrated circuits (ASICs), printed circuit boards ( printed circuit board, PCB), electronic equipment, etc.
以上实施例描述中的通信装置可以是接入点或者站点,但本申请中描述的通信装置的范围并不限于此,而且通信装置的结构可以不受图14的限制。通信装置可以是独立的设备或者可以是较大设备的一部分。例如所述通信装置可以是:The communication device described in the above embodiments may be an access point or a station, but the scope of the communication device described in this application is not limited thereto, and the structure of the communication device may not be limited by FIG. 14 . The communication apparatus may be a stand-alone device or may be part of a larger device. For example, the communication means may be:
(1)独立的集成电路IC,或芯片,或,芯片系统或子系统;(1) Independent integrated circuit IC, or chip, or, chip system or subsystem;
(2)具有一个或多个IC的集合,可选的,该IC集合也可以包括用于存储数据,指令的存储部件;(2) A set with one or more ICs, optionally, the IC set may also include a storage component for storing data and instructions;
(3)ASIC,例如调制解调器(Modem);(3) ASIC, such as modem (Modem);
(4)可嵌入在其他设备内的模块;(4) Modules that can be embedded in other equipment;
(5)接收机、智能终端、无线设备、手持机、移动单元、车载设备、云设备、人工智能设备等等;(5) Receivers, smart terminals, wireless devices, handsets, mobile units, vehicle-mounted devices, cloud devices, artificial intelligence devices, etc.;
(6)其他等等。(6) Others, etc.
对于通信装置可以是芯片或芯片系统的情况,可参见图15所示的芯片的结构示意图。图15所示的芯片1500包括处理器1501和接口1502。其中,处理器1501的数量可以是一个或多个,接口1502的数量可以是多个。For the case that the communication device may be a chip or a chip system, reference may be made to the schematic structural diagram of the chip shown in FIG. 15 . The chip 1500 shown in FIG. 15 includes a processor 1501 and an interface 1502 . The number of processors 1501 may be one or more, and the number of interfaces 1502 may be multiple.
对于芯片用于实现本申请实施例中第二节点设备的功能的情况:For the case where the chip is used to implement the function of the second node device in the embodiment of the present application:
所述接口1502,用于接收以太网帧。所述处理器1501,对所述以太网帧进行校验;当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传。所述接口1502,还用于发送所述修改后的以太网帧。The interface 1502 is used for receiving Ethernet frames. The processor 1501 verifies the Ethernet frame; when the Ethernet frame verification fails, modifies the Ethernet frame, and the modified Ethernet frame includes a first identifier, and the first identifier Used to indicate whether the Ethernet frame will be partially retransmitted. The interface 1502 is further configured to send the modified Ethernet frame.
对于芯片用于实现本申请实施例中目的设备的功能的情况:For the case where the chip is used to implement the function of the target device in the embodiment of the present application:
所述接口1502,用于接收以太网帧。所述处理器1501,用于对所述以太网帧进行校验;当所述以太网帧校验成功时,检测所述以太网帧是否有效;若所述以太网帧无效,则检测所述以太网帧是否将被局部重传;当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。The interface 1502 is used for receiving Ethernet frames. The processor 1501 is configured to verify the Ethernet frame; when the Ethernet frame is successfully verified, detect whether the Ethernet frame is valid; if the Ethernet frame is invalid, detect the Ethernet frame Whether the Ethernet frame will be partially retransmitted; when it is detected that the Ethernet frame will be partially retransmitted, wait to receive the retransmitted Ethernet frame.
可选的,芯片还包括存储器1503,存储器1503用于存储终端设备必要的程序和数据。Optionally, the chip further includes a memory 1503, and the memory 1503 is used to store necessary programs and data of the terminal device.
本领域技术人员还可以了解到本申请实施例列出的各种说明性逻辑块(illustrative logical block)和步骤(step)可以通过电子硬件、电脑软件,或两者的结合进行实现。这样的功能是通过硬件还是软件来实现取决于特定的应用和整个系统的设计要求。本领域技术人员可以对于每种特定的应用,可以使用各种方法实现所述的功能,但这种实现不应被理解为超出本申请实施例保护的范围。Those skilled in the art can also understand that various illustrative logical blocks (illustrative logical blocks) and steps (steps) listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functionality is implemented in hardware or software depends on the specific application and overall system design requirements. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be construed as exceeding the protection scope of the embodiments of the present application.
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序包括程序指令,该程序指令被计算机执行时实现上述任一方法实施例的功能。The present application also provides a computer-readable storage medium on which a computer program is stored, where the computer program includes program instructions, and when the program instructions are executed by a computer, the functions of any of the foregoing method embodiments are implemented.
上述计算机可读存储介质包括但不限于快闪存储器、硬盘、固态硬盘。The above-mentioned computer-readable storage medium includes, but is not limited to, flash memory, hard disk, and solid-state disk.
本申请还提供了一种计算机程序产品,该计算机程序产品被计算机执行时实现上述任一 方法实施例的功能。The present application also provides a computer program product, which implements the functions of any of the above method embodiments when the computer program product is executed by a computer.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序。在计算机上加载和执行所述计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机程序可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer program may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, a data center, or the like that includes an integration of one or more available media. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, high-density digital video discs (DVDs)), or semiconductor media (eg, solid state disks, SSD)) etc.
本领域普通技术人员可以理解:本申请中涉及的第一、第二等各种数字编号仅为描述方便进行的区分,并不用来限制本申请实施例的范围,也表示先后顺序。Those of ordinary skill in the art can understand that the first, second, and other numerical numbers involved in the present application are only for the convenience of description, and are not used to limit the scope of the embodiments of the present application, but also indicate the sequence.
本申请中的至少一个还可以描述为一个或多个,多个可以是两个、三个、四个或者更多个,本申请不做限制。在本申请实施例中,对于一种技术特征,通过“第一”、“第二”、“第三”、“A”、“B”、“C”和“D”等区分该种技术特征中的技术特征,该“第一”、“第二”、“第三”、“A”、“B”、“C”和“D”描述的技术特征间无先后顺序或者大小顺序。At least one in this application may also be described as one or more, and the multiple may be two, three, four or more, which is not limited in this application. In the embodiments of the present application, for a technical feature, the technical features are distinguished by "first", "second", "third", "A", "B", "C" and "D", etc. The technical features in the "first", "second", "third", "A", "B", "C" and "D" described technical features in no order or order of magnitude.
本申请中各表所示的对应关系可以被配置,也可以是预定义的。各表中的信息的取值仅仅是举例,可以配置为其他值,本申请并不限定。在配置信息与各参数的对应关系时,并不一定要求必须配置各表中示意出的所有对应关系。例如,本申请中的表格中,某些行示出的对应关系也可以不配置。又例如,可以基于上述表格做适当的变形调整,例如,拆分,合并等等。上述各表中标题示出参数的名称也可以采用通信装置可理解的其他名称,其参数的取值或表示方式也可以通信装置可理解的其他取值或表示方式。上述各表在实现时,也可以采用其他的数据结构,例如可以采用数组、队列、容器、栈、线性表、指针、链表、树、图、结构体、类、堆、散列表或哈希表等。The corresponding relationships shown in each table in this application may be configured or predefined. The values of the information in each table are only examples, and can be configured with other values, which are not limited in this application. When configuring the corresponding relationship between the information and each parameter, it is not necessarily required to configure all the corresponding relationships indicated in each table. For example, in the tables in this application, the corresponding relationships shown in some rows may not be configured. For another example, appropriate deformation adjustments can be made based on the above table, for example, splitting, merging, and so on. The names of the parameters shown in the headings in the above tables may also adopt other names that can be understood by the communication device, and the values or representations of the parameters may also be other values or representations that the communication device can understand. When the above tables are implemented, other data structures can also be used, such as arrays, queues, containers, stacks, linear lists, pointers, linked lists, trees, graphs, structures, classes, heaps, hash tables, or hash tables. Wait.
本申请中的预定义可以理解为定义、预先定义、存储、预存储、预协商、预配置、固化、或预烧制。Predefined in this application may be understood as defining, predefining, storing, pre-storing, pre-negotiating, pre-configuring, curing, or pre-firing.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of the present application, but the protection scope of the present application is not limited to this. should be covered within the scope of protection of this application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (42)

  1. 一种以太网错误帧的重传方法,其特征在于,所述方法包括:A method for retransmission of Ethernet error frames, characterized in that the method comprises:
    接收以太网帧;receive ethernet frames;
    对所述以太网帧进行校验;verifying the Ethernet frame;
    当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传;When the Ethernet frame check fails, modify the Ethernet frame, and the modified Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame will be partially retransmitted;
    发送所述修改后的以太网帧。The modified Ethernet frame is sent.
  2. 根据权利要求1所述的方法,其特征在于,所述修改后的以太网帧还包括第二标识,所述第二标识用于指示所述修改后的以太网帧无效。The method according to claim 1, wherein the modified Ethernet frame further includes a second identifier, and the second identifier is used to indicate that the modified Ethernet frame is invalid.
  3. 根据权利要求1或2所述方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    若所述以太网帧将被局部重传,则获取重传的以太网帧;If the Ethernet frame is to be partially retransmitted, obtaining the retransmitted Ethernet frame;
    对所述重传的以太网帧进行校验;Checking the retransmitted Ethernet frame;
    在所述重传的以太网帧校验成功时,发送所述重传的以太网帧。When the retransmitted Ethernet frame is successfully checked, the retransmitted Ethernet frame is sent.
  4. 根据权利要求3所述的方法,其特征在于,所述获取重传的以太网帧,包括:The method according to claim 3, wherein the obtaining the retransmitted Ethernet frame comprises:
    发送针对所述以太网帧的局部重传请求;sending a partial retransmission request for the Ethernet frame;
    接收响应于所述局部重传请求发送的重传的以太网帧。A retransmitted Ethernet frame sent in response to the partial retransmission request is received.
  5. 根据权利要求3所述的方法,其特征在于,所述获取重传的以太网帧,包括:The method according to claim 3, wherein the obtaining the retransmitted Ethernet frame comprises:
    对所述以太网帧进行恢复处理,得到所述重传的以太网帧。Perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
  6. 根据权利要求1-5任一项所述的方法,其特征在于,所述第一标识位于所述以太网帧的净荷字段之后。The method according to any one of claims 1-5, wherein the first identifier is located after a payload field of the Ethernet frame.
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述对所述以太网帧进行校验包括:对所述以太网帧进行校验并发送所述以太网帧中的部分比特;The method according to any one of claims 1-6, wherein the checking the Ethernet frame comprises: checking the Ethernet frame and sending a part of the Ethernet frame bit;
    所述发送所述修改后的以太网帧包括:继续发送所述修改后的以太网帧中除所述部分比特之后的比特。The sending the modified Ethernet frame includes: continuing to send bits in the modified Ethernet frame after the partial bits are removed.
  8. 一种以太网错误帧的重传方法,其特征在于,所述方法包括:A method for retransmission of Ethernet error frames, characterized in that the method comprises:
    接收以太网帧,对所述以太网帧进行校验;receiving an Ethernet frame, and verifying the Ethernet frame;
    当所述以太网帧校验成功时,检测所述以太网帧是否有效;When the Ethernet frame check is successful, detecting whether the Ethernet frame is valid;
    若所述以太网帧无效,则检测所述以太网帧是否将被局部重传;If the Ethernet frame is invalid, detecting whether the Ethernet frame will be partially retransmitted;
    当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。When it is detected that the Ethernet frame will be partially retransmitted, it waits to receive the retransmitted Ethernet frame.
  9. 根据权利要求8所述的方法,第二标识用于指示所述以太网帧无效,所述检测所述以太网帧是否有效,包括:The method according to claim 8, wherein the second identifier is used to indicate that the Ethernet frame is invalid, and the detecting whether the Ethernet frame is valid comprises:
    检测所述以太网帧是否包含第二标识;detecting whether the Ethernet frame contains a second identifier;
    若包含,则确定所述以太网帧无效;If included, determining that the Ethernet frame is invalid;
    若不包含,则确定所述以太网帧有效。If not included, it is determined that the Ethernet frame is valid.
  10. 根据权利要求8所述的方法,其特征在于,所述以太网帧包括第二标识,所述第二标识用于指示所述以太网帧是否有效,所述检测所述以太网帧是否有效,包括:The method according to claim 8, wherein the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the detecting whether the Ethernet frame is valid, include:
    根据所述第二标识确定所述以太网帧是否有效;Determine whether the Ethernet frame is valid according to the second identifier;
    若所述第二标识为第一状态,则确定所述以太网帧无效;If the second identifier is in the first state, determining that the Ethernet frame is invalid;
    若所述第二标识为第二状态,则确定所述以太网帧有效。If the second identifier is in the second state, it is determined that the Ethernet frame is valid.
  11. 根据权利要求8-10任一项所述的方法,其特征在于,所述以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传,所述检测所述以太网帧是否将被局部重传,包括:The method according to any one of claims 8-10, wherein the Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame is to be partially retransmitted, and the Detecting whether the Ethernet frame will be partially retransmitted, including:
    根据所述第一标识确定所述以太网帧是否将被局部重传;determining whether the Ethernet frame will be partially retransmitted according to the first identifier;
    若所述第一标识为第四状态,则确定以太网帧将被局部重传;If the first identifier is the fourth state, it is determined that the Ethernet frame will be partially retransmitted;
    若所述第一标识为第五状态,则确定以太网帧不会被局部重传。If the first identifier is in the fifth state, it is determined that the Ethernet frame will not be partially retransmitted.
  12. 根据权利要求8-11任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8-11, wherein the method further comprises:
    当检测到所述以太网帧不会被局部重传时,发送针对所述以太网帧的全局重传请求。When it is detected that the Ethernet frame will not be locally retransmitted, a global retransmission request for the Ethernet frame is sent.
  13. 根据权利要求8-12任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8-12, wherein the method further comprises:
    当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复;When the Ethernet frame check fails, determining whether the Ethernet frame can be recovered locally;
    当确定所述以太网帧可被本地恢复时,对以太网帧进行本地恢复。When it is determined that the Ethernet frame can be recovered locally, the Ethernet frame is recovered locally.
  14. 根据权利要求13所述的方法,其特征在于,所述方法还包括:The method of claim 13, wherein the method further comprises:
    当确定所述以太网帧不可被本地恢复时,发送针对所述以太网帧的全局重传请求。When it is determined that the Ethernet frame cannot be recovered locally, a global retransmission request for the Ethernet frame is sent.
  15. 根据权利要求13所述的方法,其特征在于,当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复,包括:The method according to claim 13, wherein when the Ethernet frame check fails, determining whether the Ethernet frame can be recovered locally comprises:
    当所述以太网帧校验失败时,检测所述以太网帧是否有效;When the Ethernet frame check fails, detecting whether the Ethernet frame is valid;
    若所述以太网帧有效,则确定所述以太网帧是否可被本地恢复。If the Ethernet frame is valid, it is determined whether the Ethernet frame can be recovered locally.
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:The method of claim 15, wherein the method further comprises:
    若所述以太网帧无效,则等待接收重传的以太网帧。If the Ethernet frame is invalid, waiting to receive the retransmitted Ethernet frame.
  17. 根据权利要求8-16任一项所述的方法,其特征在于,在所述等待接收重传的以太网帧之后,所述方法还包括:The method according to any one of claims 8-16, characterized in that after the waiting to receive the retransmitted Ethernet frame, the method further comprises:
    若当前时刻距离接收到所述以太网帧的时刻超过预设时长,则发送针对所述以太网帧的全局重传请求。If the current time is more than a preset time period from the time when the Ethernet frame is received, a global retransmission request for the Ethernet frame is sent.
  18. 一种通信装置,其特征在于,所述通信装置包括接收单元、校验单元、修改单元和发送单元,其中:A communication device, characterized in that the communication device comprises a receiving unit, a checking unit, a modifying unit and a sending unit, wherein:
    所述接收单元,用于接收以太网帧;the receiving unit for receiving Ethernet frames;
    所述校验单元,用于对所述以太网帧进行校验;the verification unit, configured to verify the Ethernet frame;
    所述修改单元,用于当所述以太网帧校验失败时,修改所述以太网帧,修改后的以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传;The modification unit is configured to modify the Ethernet frame when the Ethernet frame check fails, and the modified Ethernet frame includes a first identification, and the first identification is used to indicate whether the Ethernet frame is will be partially retransmitted;
    所述发送单元,用于发送所述修改后的以太网帧。The sending unit is configured to send the modified Ethernet frame.
  19. 根据权利要求18所述的通信装置,其特征在于,所述修改后的以太网帧还包括第二标识,所述第二标识用于指示所述修改后的以太网帧无效。The communication device according to claim 18, wherein the modified Ethernet frame further comprises a second identification, and the second identification is used to indicate that the modified Ethernet frame is invalid.
  20. 根据权利要求18或19所述通信装置,其特征在于,所述通信装置还包括获取单元,The communication device according to claim 18 or 19, characterized in that, the communication device further comprises an acquisition unit,
    所述获取单元,用于在所述以太网帧将被局部重传的情况下,获取重传的以太网帧;The obtaining unit is configured to obtain the retransmitted Ethernet frame when the Ethernet frame will be partially retransmitted;
    所述校验单元,还用于对所述重传的以太网帧进行校验;The verification unit is further configured to verify the retransmitted Ethernet frame;
    所述发送单元,还用于在所述重传的以太网帧校验成功时,发送所述重传的以太网帧。The sending unit is further configured to send the retransmitted Ethernet frame when the retransmitted Ethernet frame is successfully checked.
  21. 根据权利要求20所述的通信装置,其特征在于,所述获取单元具体用于:The communication device according to claim 20, wherein the obtaining unit is specifically configured to:
    发送针对所述以太网帧的局部重传请求;sending a partial retransmission request for the Ethernet frame;
    接收响应于所述局部重传请求发送的重传的以太网帧。A retransmitted Ethernet frame sent in response to the partial retransmission request is received.
  22. 根据权利要求20所述的通信装置,其特征在于,所述获取单元具体用于:The communication device according to claim 20, wherein the obtaining unit is specifically configured to:
    对所述以太网帧进行恢复处理,得到所述重传的以太网帧。Perform recovery processing on the Ethernet frame to obtain the retransmitted Ethernet frame.
  23. 根据权利要求18-22任一项所述的通信装置,其特征在于,所述第一标识位于所述以太网帧的净荷字段之后。The communication device according to any one of claims 18-22, wherein the first identifier is located after a payload field of the Ethernet frame.
  24. 根据权利要求18-23任一项所述的通信装置,其特征在于,所述校验单元具体用于:对所述以太网帧进行校验并发送所述以太网帧中的部分比特;The communication device according to any one of claims 18-23, wherein the check unit is specifically configured to: check the Ethernet frame and send some bits in the Ethernet frame;
    所述发送单元具体用于:继续发送所述修改后的以太网帧中除所述部分比特之后的比特。The sending unit is specifically configured to: continue to send bits in the modified Ethernet frame after the partial bits are removed.
  25. 一种通信装置,其特征在于,所述通信装置包括校验单元、第一检测单元、第二检测单元和接收单元,其中:A communication device, characterized in that the communication device comprises a verification unit, a first detection unit, a second detection unit and a receiving unit, wherein:
    所述校验单元,用于接收以太网帧,对所述以太网帧进行校验;The verification unit is configured to receive an Ethernet frame and verify the Ethernet frame;
    所述第一检测单元,用于当所述以太网帧校验成功时,检测所述以太网帧是否有效;the first detection unit, configured to detect whether the Ethernet frame is valid when the Ethernet frame verification is successful;
    所述第二检测单元,用于若所述以太网帧无效,则检测所述以太网帧是否将被局部重传;the second detection unit, configured to detect whether the Ethernet frame will be partially retransmitted if the Ethernet frame is invalid;
    所述接收单元,用于当检测到所述以太网帧将被局部重传时,等待接收重传的以太网帧。The receiving unit is configured to wait to receive the retransmitted Ethernet frame when it is detected that the Ethernet frame will be partially retransmitted.
  26. 根据权利要求25所述的通信装置,第二标识用于指示所述以太网帧无效,所述第一检测单元具体用于:The communication device according to claim 25, wherein the second identifier is used to indicate that the Ethernet frame is invalid, and the first detection unit is specifically configured to:
    检测所述以太网帧是否包含第二标识;detecting whether the Ethernet frame contains a second identifier;
    若包含,则确定所述以太网帧无效;If included, determining that the Ethernet frame is invalid;
    若不包含,则确定所述以太网帧有效。If not included, it is determined that the Ethernet frame is valid.
  27. 根据权利要求25所述的通信装置,其特征在于,所述以太网帧包括第二标识,所述第二标识用于指示所述以太网帧是否有效,所述第一检测单元具体用于:The communication device according to claim 25, wherein the Ethernet frame includes a second identifier, and the second identifier is used to indicate whether the Ethernet frame is valid, and the first detection unit is specifically configured to:
    根据所述第二标识确定所述以太网帧是否有效;Determine whether the Ethernet frame is valid according to the second identifier;
    若所述第二标识为第一状态,则确定所述以太网帧无效;If the second identifier is in the first state, determining that the Ethernet frame is invalid;
    若所述第二标识为第二状态,则确定所述以太网帧有效。If the second identifier is in the second state, it is determined that the Ethernet frame is valid.
  28. 根据权利要求25-27任一项所述的通信装置,其特征在于,所述以太网帧包括第一标识,所述第一标识用于指示所述以太网帧是否将被局部重传,所述第二检测单元具体用于:The communication device according to any one of claims 25-27, wherein the Ethernet frame includes a first identifier, and the first identifier is used to indicate whether the Ethernet frame is to be partially retransmitted, so The second detection unit is specifically used for:
    根据所述第一标识确定所述以太网帧是否将被局部重传;determining whether the Ethernet frame will be partially retransmitted according to the first identifier;
    若所述第一标识为第四状态,则确定以太网帧将被局部重传;If the first identifier is the fourth state, it is determined that the Ethernet frame will be partially retransmitted;
    若所述第一标识为第五状态,则确定以太网帧不会被局部重传。If the first identifier is in the fifth state, it is determined that the Ethernet frame will not be partially retransmitted.
  29. 根据权利要求25-28任一项所述的通信装置,其特征在于,所述通信装置还包括第一发送单元,所述第一发送单元用于:The communication device according to any one of claims 25-28, wherein the communication device further comprises a first sending unit, and the first sending unit is configured to:
    当检测到所述以太网帧不会被局部重传时,发送针对所述以太网帧的全局重传请求。When it is detected that the Ethernet frame will not be locally retransmitted, a global retransmission request for the Ethernet frame is sent.
  30. 根据权利要求25-29任一项所述的通信装置,其特征在于,所述通信装置还包括确定单元和恢复单元,The communication device according to any one of claims 25-29, wherein the communication device further comprises a determination unit and a recovery unit,
    所述确定单元,用于当所述以太网帧校验失败时,确定所述以太网帧是否可被本地恢复;The determining unit is configured to determine whether the Ethernet frame can be recovered locally when the Ethernet frame check fails;
    所述恢复单元,用于当确定所述以太网帧可被本地恢复时,对以太网帧进行本地恢复。The recovery unit is configured to perform local recovery on the Ethernet frame when it is determined that the Ethernet frame can be recovered locally.
  31. 根据权利要求30所述的通信装置,其特征在于,所述确定单元具体用于:The communication device according to claim 30, wherein the determining unit is specifically configured to:
    当所述以太网帧校验失败时,检测所述以太网帧是否有效;When the Ethernet frame check fails, detecting whether the Ethernet frame is valid;
    若所述以太网帧有效,则确定所述以太网帧是否可被本地恢复。If the Ethernet frame is valid, it is determined whether the Ethernet frame can be recovered locally.
  32. 根据权利要求31所述的通信装置,其特征在于,所述接收单元还用于:The communication device according to claim 31, wherein the receiving unit is further configured to:
    若所述以太网帧无效,则等待接收重传的以太网帧。If the Ethernet frame is invalid, waiting to receive the retransmitted Ethernet frame.
  33. 根据权利要求25-32任一项所述的通信装置,其特征在于,所述通信装置还包括第二发送单元,所述第二发送单元用于:The communication device according to any one of claims 25-32, wherein the communication device further comprises a second sending unit, and the second sending unit is configured to:
    若当前时刻距离接收到所述以太网帧的时刻超过预设时长,则发送针对所述以太网帧的全局重传请求。If the current time is more than a preset time period from the time when the Ethernet frame is received, a global retransmission request for the Ethernet frame is sent.
  34. 一种通信装置,其特征在于,包括处理器、存储器和收发器;A communication device, comprising a processor, a memory and a transceiver;
    所述收发器,用于接收以太网帧;the transceiver for receiving Ethernet frames;
    所述存储器,用于存储程序代码;the memory for storing program codes;
    所述处理器,用于从所述存储器中调用所述程序代码执行如权利要求1-7任一项所述的方法。The processor is configured to call the program code from the memory to execute the method according to any one of claims 1-7.
  35. 一种通信装置,其特征在于,包括处理器、存储器和收发器;A communication device, comprising a processor, a memory and a transceiver;
    所述收发器,用于接收以太网帧;the transceiver for receiving Ethernet frames;
    所述存储器,用于存储程序代码;the memory for storing program codes;
    所述处理器,用于从所述存储器中调用所述程序代码执行如权利要求8-17任一项所述的方法。The processor is configured to call the program code from the memory to execute the method according to any one of claims 8-17.
  36. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储指令,当所述指令被执行时,使得如权利要求1-7任一项所述的方法被实现。A computer-readable storage medium, characterized in that, the computer-readable storage medium is used for storing instructions, and when the instructions are executed, the method according to any one of claims 1-7 is implemented.
  37. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储指令,当所述指令被执行时,使得如权利要求8-17任一项所述的方法被实现。A computer-readable storage medium, characterized in that, the computer-readable storage medium is used for storing instructions, which, when executed, enable the method according to any one of claims 8 to 17 to be implemented.
  38. 一种通信装置,用于执行权利要求1-7任一项所述的方法。A communication device for performing the method of any one of claims 1-7.
  39. 一种通信装置,用于执行权利要求8-17任一项所述的方法。A communication device for performing the method of any one of claims 8-17.
  40. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得如权利要求1-7任一项所述的方法被实现;或者如权利要求8-17任一项所述的方法被实现。A computer program product comprising instructions which, when run on a computer, cause the method of any of claims 1-7 to be implemented; or the method of any of claims 8-17 to be implemented .
  41. 一种计算机程序,当其在计算机上运行时,使得权利要求1-7任一项所述的方法被实现;或者权利要求8-17任一项所述的方法被实现。A computer program which, when run on a computer, causes the method of any one of claims 1-7 to be implemented; or the method of any one of claims 8-17 to be implemented.
  42. 一种通信系统,包括权利要求18-24任一项所述的通信装置和权利要求25-33任一项所述的通信装置。A communication system, comprising the communication device according to any one of claims 18-24 and the communication device according to any one of claims 25-33.
PCT/CN2021/114293 2020-08-24 2021-08-24 Retransmission method for ethernet error frame and related apparatus WO2022042543A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010862001.2 2020-08-24
CN202010862001.2A CN114095117A (en) 2020-08-24 2020-08-24 Retransmission method and related device for Ethernet error frame

Publications (1)

Publication Number Publication Date
WO2022042543A1 true WO2022042543A1 (en) 2022-03-03

Family

ID=80295745

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/114293 WO2022042543A1 (en) 2020-08-24 2021-08-24 Retransmission method for ethernet error frame and related apparatus

Country Status (2)

Country Link
CN (1) CN114095117A (en)
WO (1) WO2022042543A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115173990A (en) * 2022-06-15 2022-10-11 杭州海康机器人技术有限公司 Data packet transmission method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1816006A (en) * 2005-02-03 2006-08-09 华为技术有限公司 Method for treating non-standard frame by T.38 network gate
EP2200228A1 (en) * 2008-12-22 2010-06-23 Nokia Siemens Network Oy Method and system for forwarding of data packets
US7983278B1 (en) * 2002-01-18 2011-07-19 Juniper Networks, Inc. Redirect checking in a network device
CN107370674A (en) * 2016-05-13 2017-11-21 华为技术有限公司 A kind of method, apparatus and system of data transfer
CN110391992A (en) * 2019-07-11 2019-10-29 清华大学 Jamming control method and device based on interchanger active queue management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7983278B1 (en) * 2002-01-18 2011-07-19 Juniper Networks, Inc. Redirect checking in a network device
CN1816006A (en) * 2005-02-03 2006-08-09 华为技术有限公司 Method for treating non-standard frame by T.38 network gate
EP2200228A1 (en) * 2008-12-22 2010-06-23 Nokia Siemens Network Oy Method and system for forwarding of data packets
CN107370674A (en) * 2016-05-13 2017-11-21 华为技术有限公司 A kind of method, apparatus and system of data transfer
CN110391992A (en) * 2019-07-11 2019-10-29 清华大学 Jamming control method and device based on interchanger active queue management

Also Published As

Publication number Publication date
CN114095117A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
JP3634800B2 (en) System and method for implementing hybrid automatic repeat request using parity check combination
JP4703310B2 (en) Communication method and communication system
US20080195912A1 (en) Method of communicatoin
US8897193B2 (en) Multicast packet transmitting method over wireless communication network and wireless communication network system using the method
US7733914B2 (en) Method of, and system for, communicating data, and a station for transmitting data
JP5215413B2 (en) Status report for retransmission protocol
US20070259665A1 (en) Error detection and retransmission methods and devices for communication systems
JP2011517162A (en) Adding hybrid ARQ to the WLAN protocol using MAC-based feedback
WO2003055122A1 (en) Method and system for reduced memory hybrid automatic repeat request
CN111030785A (en) Method, system and wireless receiver for data retransmission in wireless network
WO2011075973A1 (en) Method and apparatus for requesting retransmission of data message in physical layer
US8427951B2 (en) Method, system, and apparatus for reliable data packet recovery in a link layer of a data center ethernet network
WO2022042543A1 (en) Retransmission method for ethernet error frame and related apparatus
CA2333628A1 (en) Communication terminal apparatus, base station apparatus and radio communication method
WO2021208694A1 (en) Data transmission method and network device
ZA200110464B (en) System and method for implementing hybrid automatic repeat request using parity check combining.
JP3406513B2 (en) Wireless receiving device and wireless transmitting device
US10205562B1 (en) Method and apparatus for error correction
JP7318033B2 (en) Wireless communication device and wireless communication method
US11451331B2 (en) Bit error correction for Bluetooth low energy
WO2024016242A1 (en) Hybrid automatic repeat request (harq) process processing method and device
CN115412197A (en) Data transmission method and equipment
CN116260553A (en) Method, device and system for retransmitting data
Yadav et al. PERFORMANCE ANALYSIS OF SLIDING WINDOW PROTOCOL USING NETz-2.0 SIMULATOR FOR CONNECTED NODE
Lin et al. Improving wireless packet throughput using hybrid-II ARQ and physical layer side information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21860378

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21860378

Country of ref document: EP

Kind code of ref document: A1