WO2022193767A1 - Ethernet packet processing method and related device - Google Patents

Ethernet packet processing method and related device Download PDF

Info

Publication number
WO2022193767A1
WO2022193767A1 PCT/CN2021/140402 CN2021140402W WO2022193767A1 WO 2022193767 A1 WO2022193767 A1 WO 2022193767A1 CN 2021140402 W CN2021140402 W CN 2021140402W WO 2022193767 A1 WO2022193767 A1 WO 2022193767A1
Authority
WO
WIPO (PCT)
Prior art keywords
ethernet
packet
ethernet packet
processing
type
Prior art date
Application number
PCT/CN2021/140402
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 WO2022193767A1 publication Critical patent/WO2022193767A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present application relates to the field of communications, and in particular, to a method for processing an Ethernet packet and related equipment.
  • Ethernet network has also expanded from the traditional carrier network to the server-based cloud data center network, and even to the current data-centric, big data analysis, artificial intelligence (AI) A high-performance and low-latency data center network with applications and high-performance computing services as the axis.
  • AI artificial intelligence
  • HPC high performance computing
  • AI applications such as AI
  • the current forwarding limit of Ethernet packets is: for Ethernet packets smaller than 64 bytes, it needs to be padded to 64 bytes before sending, or for Ethernet packets larger than 1518 bytes, it needs to be truncated to 1518 bytes and then sent. Filling Ethernet packets in this way will waste effective bandwidth and limit the amount of message forwarding; truncating Ethernet packets will increase the overhead of a single Ethernet packet.
  • Embodiments of the present application provide an Ethernet packet processing method and related equipment, which are used to support the sending and processing of Ethernet packets whose frame length is less than 64 bytes.
  • an embodiment of the present application provides a method for processing an Ethernet packet, which specifically includes: after the first device receives the first Ethernet packet sent by the second device, detecting whether the first Ethernet packet carries the first Ethernet packet. identification information, wherein the first identification information is used to indicate that the second device supports processing a first Ethernet type packet, wherein the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes; if the If the first Ethernet packet carries the first identification information, the first device processes the first Ethernet packet according to the first identification information.
  • the first Ethernet type packet when the first Ethernet type packet includes Ethernet packets with multiple frame lengths, it may be referred to as a flexible Ethernet (Flex Frame or Flex Ethernet Frame) type packet or a computing Ethernet (Computing Ethernet) type packet ; and for Ethernet packets with different frame lengths, other names can also be given.
  • the first Ethernet type packet may also be referred to as a mini frame/mini frame (Mini Frame) type packet.
  • the first device when the first device supports processing of the first Ethernet type packet, when the first device receives an Ethernet packet whose frame length is less than 64 bytes, the first device processes the Ethernet packet according to the identification information, so that the The Ethernet protocol stack can support the receiving and processing of Ethernet packets whose frame length is less than 64 bytes, which improves the packet throughput rate of the Ethernet network.
  • the first device may also perform the following steps before processing the first Ethernet packet:
  • the first device determines the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports processing the Ethernet packet whose frame length is less than 64 bytes, and the If the frame length of an Ethernet packet is less than 64 bytes, the first device will perform an operation of processing the first Ethernet packet according to the first identification information.
  • the first device discards the first Ethernet packet.
  • the first Ethernet type packet includes an Ethernet packet with a frame length less than 64 bytes and an Ethernet packet with a frame length greater than 1518 bytes, so that the first device can simultaneously process small packets (frame length). Ethernet packets less than 64 bytes), large packets (Ether packets with a frame length greater than 1518 bytes), and existing Ethernet Ethernet packets.
  • the first device may also send a second Ethernet packet to other devices.
  • the specific methods are as follows:
  • the first device carries second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing the first Ethernet type packet, and the first Ethernet type packet includes the frame length Ethernet packet less than 64 bytes; finally, the first device sends the second Ethernet packet.
  • the first Ethernet type packet when the first Ethernet type packet includes Ethernet packets with multiple frame lengths, it may be referred to as a flexible Ethernet (Flex Frame or Flex Ethernet Frame) type packet or a computing Ethernet (Computing Ethernet) type packet ; and for Ethernet packets with different frame lengths, other names can also be given.
  • the first Ethernet type packet may also be referred to as a mini frame/mini frame (Mini Frame) type packet.
  • the identification information is carried for the Ethernet packet whose frame length is less than 64 bytes, so that other devices in the Ethernet protocol stack that support processing the first Ethernet type packet It can receive and process Ethernet packets whose frame length is less than 64 bytes, thereby improving the packet throughput rate of the Ethernet network. Since the Ethernet packets whose frame length is less than 64 bytes no longer need to be filled, the packet overhead is reduced. , thereby improving the transmission efficiency of the first device.
  • the first device may further perform the following steps before sending the second Ethernet packet:
  • the first device determines whether it supports processing the first ether type packet, and if the first device supports processing the first ether type packet, the first device executes the execution in the second ether type packet.
  • the operation of carrying the second identification information in the packet That is, as long as the first device enables itself to support processing the first Ethernet type message, it does not need to judge the frame length of the second Ethernet message, and can directly carry the second identification information in the second Ethernet message.
  • the first device determines the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports processing the first Ethernet type packet , and the frame length of the second Ethernet packet is less than 64 bytes, the first device will perform the operation of carrying the second identification information in the second Ethernet packet. That is, when the first device enables itself to support the processing of the first Ethernet type packet, it also needs to judge the frame length of the second Ethernet packet. The second identification information is carried in the Ethernet packet.
  • the first device may implement the solution that supports the first Ethernet type message and the solution that does not support the first Ethernet type message. as follows:
  • the first device can execute the above solution; if the first device enables itself to not support processing the first ether type packet, the first device A device can perform the following schemes:
  • the first device If the first device does not support processing the first Ethernet packet, and the frame length of the second Ethernet packet is less than 64 bytes, the first device fills the frame length of the second Ethernet packet to 64 bytes section, and then the first device sends the filled second Ethernet packet; if the first device does not support processing the first Ethernet type packet, and the frame length of the second Ethernet packet is greater than 1518 bytes , the first device truncates the frame length of the second Ethernet packet to 1518 bytes, and then sends the truncated Ethernet packet with a frame length of 1518 bytes, while the Ethernet packet exceeding 1518 bytes is sent. It will be judged again before sending.
  • the part of the second Ethernet packet exceeding 1518 bytes is sent as the next Ethernet packet. If the frame length of the part exceeding 1518 bytes is less than 64 bytes, it will be padded to 64 bytes before sending; if the frame length of the part exceeding 1518 bytes will be greater than 1518 bytes, it will be truncated to 1518 bytes later send. Regardless of whether the first device supports processing the first Ethernet type packet, but the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the first device can directly send the first Ethernet packet. Two Ethernet packets. In this way, small packets (Ethernet packets with a frame length of less than 64 bytes), large packets (Ethernet packets with a frame length greater than 1518 bytes) and existing Ethernet packets can be compatible at the same time.
  • the first device can read the identification information in its own register to enable itself whether it supports processing the first ether type message.
  • the first device can be implemented to support processing the first Ethernet through hardware upgrades at the physical layer (such as applying a new chip, or flashing a new field programmable gate array (FPGA code)) Type of message function.
  • FPGA code field programmable gate array
  • the first Ethernet type packet further includes an Ethernet packet with a frame length greater than or equal to 64 bytes and less than or equal to 1518 bytes. That is, the first device identifies an Ethernet packet with any frame length.
  • the specific method of processing the first Ethernet packet by the first device according to the first identification information may be implemented in the following possible ways:
  • the first device detects the preamble that the first Ethernet message generates at the media access control layer (media access control, MAC), and the frame head delimiter (start frame delimiter, SFD) location information as the first identification information; then the first device processes the first Ethernet packet according to the first identification information. That is, in the preamble, the position information of the frame header delimiter which is different from the existing Ethernet packet can be used as the first identification information.
  • media access control layer media access control, MAC
  • start frame delimiter start frame delimiter
  • the first device detects a preamble generated by the first Ethernet packet at the MAC layer, and the target identification field in the preamble is used as the first identification information;
  • An identification information processes the first Ethernet packet. That is, in the preamble, a specific identification field can be used as the first identification information.
  • the target identification field may be located at any position after the SFD and before the cyclic redundancy check (cyclic redundancy check, CRC). It can be understood that the position information of the frame head delimiter and the target identification field can be used as the first identification information at the same time, as long as the frame length of the first Ethernet packet can be correctly indicated.
  • the target identification field may also be referred to as a computing Ethernet identification (Computing Ethernet), a computing identification (Computing) or a mini frame (Mini Frame) identification, a flexible Ethernet identification (Flex Ethernet), and the like. Specifically, it can be other unused fields such as 0x5F.
  • the first device detects the encoding of the first Ethernet packet generated by a physical coding sublayer (PCS), wherein the encoded block type is used as the first identification information; then The first device processes the first Ethernet packet according to the first identification information.
  • PCS physical coding sublayer
  • the encoding of the block type may be different from the encoding of the existing block type. For example, 0x00; or you can select codes that are not selected in the IEEE 802.3-2018 table, but you need to ensure that the Hamming distance from other codes is at least 4, such as 0xE1.
  • the encoded block type may include the block type of at least one block generated during the encoding process of the first Ethernet packet.
  • two blocks (blocks) are generated in the first Ethernet packet during the encoding process, and the block type of the start block of the first Ethernet packet can be used to indicate the first identification information; the first Ethernet packet can be used to indicate the first identification information.
  • the block type of the second block indicates the first identification information; the first identification information can be indicated by the block type of the start block of the first Ethernet packet and the block type of the second block at the same time.
  • the specific method is not limited here.
  • the first devices can be used separately or simultaneously. That is, the first device can independently detect the first identification information carried in the MAC layer, can detect the first identification information carried in the PCS layer alone, or can simultaneously detect the first identification information carried in the MAC layer and the PCS layer.
  • the above describes the method for the first device to detect the first identification information carried in the first Ethernet packet.
  • the first device carries the second identification information in the second Ethernet packet, the above-mentioned manner may also be used. The details are not repeated here.
  • the first device can also detect the first Ethernet packet carried in the first Ethernet packet for indicating The service type identifier of the frame length type of the first Ethernet packet.
  • the frame length type of the first Ethernet packet may be a small packet (that is, an Ethernet packet with a frame length of less than 64 bytes), a large packet (that is, an Ethernet packet with a frame length greater than 1518 bytes), and a frame Ethernet packets whose length is less than or equal to 64 bytes and less than or equal to 1518 bytes. Therefore, the specific manner in which the first device detects the service type identifier carried in the first Ethernet packet may be as follows:
  • the first device detects the service type identifier carried in the preamble of the first Ethernet packet.
  • the second device may use different identification fields to identify the frame length type of the Ethernet packet.
  • the service type identifier may be located after the above target identifier field and before the CRC.
  • the service type identifier carried in at least one byte after the block type of the first Ethernet packet .
  • the first Ethernet type packet may also include an Ethernet packet with a frame length greater than 1518 bytes.
  • the processing method of the Ethernet packet whose frame length is greater than 1518 bytes is the same as that of the Ethernet packet whose frame length is less than 64 bytes, and details are not described herein again.
  • the first device may further negotiate with the second device to determine whether both parties support processing the first Ethernet type packet.
  • the first device is switch A
  • the second device is switch B that is on the same link with switch A, and data transmission is performed between switch A and switch B.
  • the first device and the second device may negotiate in the following possible implementation manners:
  • the first device and the second device negotiate whether to support processing the first Ethernet packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, and the negotiation information is used for Instructing the first device or the second device to support processing of the first Ethernet type packet.
  • the bits that have not been used in the link code word base page of the self-negotiation pulse indicate the negotiation information; or the message code value (that is, the Message Code value in the link code word extension page of the self-negotiation pulse) value) indicates the negotiation information.
  • the first device and the second device negotiate whether to support processing the first Ethernet type packet by sending and sending a link layer discovery protocol (LLDP). Carrying the negotiation information, where the negotiation information is used to indicate that the first device or the second device supports processing the first Ethernet type packet.
  • LLDP link layer discovery protocol
  • an elastic Ethernet TLV type is generated in the LLDP, and the TLV type indicates the negotiation information.
  • an embodiment of the present application provides a method for processing an Ethernet packet, which specifically includes: when a first device sends a second Ethernet packet, carrying second identification information in the second Ethernet packet, and the first device carries second identification information in the second Ethernet packet.
  • the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet, and the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes; then the first device sends the second Ethernet packet message.
  • the first Ethernet type packet When the first Ethernet type packet includes Ethernet packets with multiple frame lengths, it may be called a Flex Frame (Flex Frame or Flex Ethernet Frame) type packet or a Computing Ethernet (Computing Ethernet) type packet; and for different frames Long Ethernet packets, which may have other names.
  • Flex Frame Flexible Frame or Flex Ethernet Frame
  • Computing Ethernet Computing Ethernet
  • Long Ethernet packets Long Ethernet packets, which may have other names.
  • the first Ethernet type packet may also be referred to as a mini frame/mini frame (Mini Frame) type packet.
  • the identification information is carried for the Ethernet packet whose frame length is less than 64 bytes, so that other devices in the Ethernet protocol stack that support processing the first Ethernet type packet It can receive and process Ethernet packets whose frame length is less than 64 bytes, thereby improving the packet throughput rate of the Ethernet network. Since the Ethernet packets whose frame length is less than 64 bytes no longer need to be filled, the packet overhead is reduced. , thereby improving the transmission efficiency of the first device.
  • the first device may further perform the following steps before sending the second Ethernet packet:
  • the first device determines whether it supports processing the first ether type packet, and if the first device supports processing the first ether type packet, the first device executes the execution in the second ether type packet.
  • the operation of carrying the second identification information in the packet That is, as long as the first device enables itself to support processing the first Ethernet type message, it does not need to judge the frame length of the second Ethernet message, and can directly carry the second identification information in the second Ethernet message.
  • the first device determines the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports processing the first Ethernet type packet , and the frame length of the second Ethernet packet is less than 64 bytes, the first device will perform the operation of carrying the second identification information in the second Ethernet packet. That is, when the first device enables itself to support the processing of the first Ethernet type packet, it also needs to judge the frame length of the second Ethernet packet. The second identification information is carried in the Ethernet packet.
  • the first device may implement the solution that supports the first Ethernet type message and the solution that does not support the first Ethernet type message. as follows:
  • the first device can execute the above solution; if the first device enables itself to not support processing the first ether type packet, the first device A device can perform the following schemes:
  • the first device If the first device does not support processing the first Ethernet packet, and the frame length of the second Ethernet packet is less than 64 bytes, the first device fills the frame length of the second Ethernet packet to 64 bytes section, and then the first device sends the filled second Ethernet packet; if the first device does not support processing the first Ethernet type packet, and the frame length of the second Ethernet packet is greater than 1518 bytes , the first device truncates the frame length of the second Ethernet packet to 1518 bytes, and then sends the truncated Ethernet packet with a frame length of 1518 bytes, while the Ethernet packet exceeding 1518 bytes is sent. It will be judged again before sending.
  • the part of the second Ethernet packet exceeding 1518 bytes is sent as the next Ethernet packet. If the frame length of the part exceeding 1518 bytes is less than 64 bytes, it will be padded to 64 bytes before sending; if the frame length of the part exceeding 1518 bytes will be greater than 1518 bytes, it will be truncated to 1518 bytes later send. Regardless of whether the first device supports processing the first Ethernet type packet, but the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the first device can directly send the first Ethernet packet. Two Ethernet packets. In this way, small packets (Ethernet packets with a frame length of less than 64 bytes), large packets (Ethernet packets with a frame length greater than 1518 bytes) and existing Ethernet packets can be compatible at the same time.
  • the first device can read the identification information in its own register to enable itself whether it supports processing the first ether type message.
  • the first device can be implemented to support processing the first Ethernet through hardware upgrades at the physical layer (such as applying a new chip, or flashing a new field programmable gate array (FPGA code)) Type of message function.
  • FPGA code field programmable gate array
  • the first device may also receive a first Ethernet packet, where the first Ethernet packet carries first identification information, and the first Ethernet packet carries first identification information.
  • the identification information is used to indicate that the second device supports processing of the first Ethernet type packet, the first Ethernet type packet includes an Ethernet packet with a frame length of less than 64 bytes, and the second device and the first device are in the same two ends of the link; then the first device processes the first Ethernet packet according to the first identification information.
  • the first device when receiving an Ethernet packet with a frame length of less than 64 bytes, processes the Ethernet packet according to the identification information, so that the Ethernet protocol stack can support the Ethernet packet with a frame length of less than 64 bytes. Sending and processing improves the packet throughput of the Ethernet network.
  • the first device may further perform the following steps before processing the first Ethernet packet:
  • the first device determines the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports forwarding the Ethernet packet whose frame length is less than 64 bytes, and the If the frame length of an Ethernet packet is less than 64 bytes or the frame length of the first Ethernet packet is greater than 1518 bytes, the first device will perform an operation of processing the first Ethernet packet.
  • the first device does not support processing Ethernet packets whose frame length is less than 64 bytes or whose frame length is greater than 1518 bytes, and the frame length of the first Ethernet packet is less than 64 bytes or the first Ethernet packet If the frame length of the packet is greater than 1518 bytes, the first device discards the first Ethernet packet. In this way, small packets (Ethernet packets with a frame length of less than 64 bytes), large packets (Ethernet packets with a frame length greater than 1518 bytes) and existing Ethernet packets can be compatible at the same time.
  • the first identification information may further indicate that the frame length of the first Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes of Ethernet packets. That is, the first device identifies an Ethernet packet with any frame length.
  • the specific method for the first device to carry the second identification information in the second Ethernet packet may be implemented in the following possible ways:
  • the first device generates a preamble at the media access control layer (media access control, MAC), and the frame head delimiter (start frame delimiter, SFD) position information of the preamble is used as the second. identification information. That is, in the preamble, the position information of the frame header delimiter that is different from the existing Ethernet packet can be used as the second identification information.
  • media access control layer media access control, MAC
  • start frame delimiter, SFD start frame delimiter
  • the first device generates a preamble at the MAC layer, and a target identification field in the preamble is used as the second identification information. That is, in the preamble, a specific identification field can be used as the second identification information.
  • the target identification field may be located at any position after the SFD and before the cyclic redundancy check (cyclic redundancy check, CRC). It can be understood that the frame head delimiter position information and the target identification field can be used as the second identification information at the same time, as long as the frame length of the second Ethernet packet can be correctly indicated.
  • the target identification field may also be referred to as a computing Ethernet identification (Computing Ethernet), a computing identification (Computing) or a mini frame (Mini Frame) identification, a flexible Ethernet identification (Flex Ethernet), and the like. Specifically, it can be other unused fields such as 0x5F.
  • the first device generates a code of the second Ethernet packet in a physical coding sublayer (physical coding sublayer, PCS), where the block type of the code is used as the second identification information.
  • PCS physical coding sublayer
  • the encoding of the block type may be different from the encoding of the existing block type. For example, 0x00; or you can select codes that are not selected in the IEEE802.3-2018 version table, but you need to ensure that the Hamming distance from other codes is at least 4, such as 0xE1.
  • the encoded block type may include the block type of at least one block generated during the encoding process of the second Ethernet packet.
  • the block type of the start block of the second Ethernet packet can be used to indicate the second identification information; the second Ethernet packet can be used to indicate the second identification information.
  • the block type of the second block of the second block indicates the second identification information; the block type of the start block of the second Ethernet packet and the block type of the second block can be used to indicate the second identification information.
  • the specific method is not limited here.
  • the first devices can be used separately or simultaneously. That is, the first device may carry the second identification information at the MAC layer alone, may carry the second identification information at the PCS layer alone, or may simultaneously carry the second identification information at the MAC layer and the PCS layer.
  • the above describes the method for the first device to carry the second identification information in the second Ethernet packet, and the second Ethernet packet may also be carried by other devices in the above-mentioned manner. The details are not repeated here.
  • the first device may also carry in the second Ethernet packet to indicate the The service type identifier of the frame length type of the second Ethernet packet.
  • the frame length type of the second Ethernet packet may be a small packet (that is, an Ethernet packet with a frame length of less than 64 bytes), a large packet (that is, an Ethernet packet with a frame length greater than 1518 bytes), and a frame Ethernet packets whose length is less than or equal to 64 bytes and less than or equal to 1518 bytes. Therefore, the specific manner in which the first device carries the service type identifier in the second Ethernet packet may be as follows:
  • the service type identifier is carried in the preamble of the second Ethernet packet.
  • the first device may use different identification fields to identify the frame length type of the Ethernet packet.
  • the service type identifier may be located after the above target identifier field and before the CRC.
  • the service type identifier is carried in at least one byte after the block type of the second Ethernet packet.
  • the first Ethernet type packet may also include an Ethernet packet with a frame length greater than 1518 bytes.
  • the processing method of the Ethernet packet whose frame length is greater than 1518 bytes is the same as that of the Ethernet packet whose frame length is less than 64 bytes, and details are not described herein again.
  • the first device may further negotiate with the second device to determine whether both parties support processing the first Ethernet type packet.
  • the first device and the second device are devices at two ends of the same link.
  • the first device is switch A
  • the second device is switch B that is on the same link with switch A
  • data transmission is performed between switch A and switch B.
  • the first device and the second device may negotiate in the following possible implementation manners:
  • the first device and the second device negotiate whether to support processing the first Ethernet packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, and the negotiation information is used for Instructing the first device or the second device to support processing of the first Ethernet type packet.
  • the bits that have not been used in the link code word base page of the self-negotiation pulse indicate the negotiation information; or the message code value (that is, the Message Code value in the link code word extension page of the self-negotiation pulse) value) indicates the negotiation information.
  • the first device and the second device negotiate whether to support processing the first Ethernet type packet by sending and sending a link layer discovery protocol (LLDP). Carrying the negotiation information, where the negotiation information is used to indicate that the first device or the second device supports processing the first Ethernet type packet.
  • LLDP link layer discovery protocol
  • an elastic Ethernet TLV type is generated in the LLDP, and the TLV type indicates the negotiation information.
  • the present application provides an Ethernet packet processing device having a function of implementing the behavior of the first device in the first aspect above.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the Ethernet packet processing device includes a unit or module for executing each step of the above first aspect.
  • the device includes: a transceiver module configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet packet.
  • an ether type module configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet packet.
  • an ether type module the first ether type message includes an ether message whose frame length is less than 64 bytes;
  • the processing module processes the first Ethernet packet according to the first identification information.
  • it also includes a storage module for storing necessary program instructions and data of the first device.
  • the apparatus includes: a processor and a transceiver, where the processor is configured to support the first device to perform corresponding functions in the method provided in the first aspect.
  • the transceiver is used to instruct the communication between the first device and the second device, and send the Ethernet packet involved in the above method to the second device.
  • the apparatus may further include a memory, which is used for coupling with the processor, and which stores necessary program instructions and data of the first device.
  • the chip when the device is a chip in the first device, the chip includes: a processing module and a transceiver module.
  • the transceiver module which can be, for example, an input/output interface, a pin or a circuit on the chip, receives a signal received by the antenna, such as receiving the first Ethernet packet sent by the second device, and transmits the first Ethernet packet to the second device.
  • An Ethernet packet is transmitted to other chips or modules coupled to this chip, wherein the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the first device supports processing the first An Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes.
  • the processing module may be a processor, and the processor is configured to process the first Ethernet packet according to the first identification information.
  • the processing module can execute the computer-executed instructions stored in the storage unit, so as to support the first device to execute the method provided in the first aspect.
  • the storage unit can be a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip, such as a read-only memory (read-only memory, ROM) or a memory unit.
  • RAM random access memory
  • the apparatus includes: a processor, a baseband circuit, a radio frequency circuit and an antenna.
  • the processor is used to control the functions of each circuit part, and the baseband circuit is used to generate the Ethernet message, which is sent to the second device through the antenna after analog conversion, filtering, amplification and frequency up-conversion processing by the radio frequency circuit.
  • the apparatus further includes a memory, which stores necessary program instructions and data of the first device.
  • the apparatus includes a communication interface and logic circuitry.
  • the communication interface is used to receive a first Ethernet packet sent by the second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the first device supports processing the first Ethernet packet.
  • An Ethernet type packet where the first Ethernet type packet includes an Ethernet packet with a frame length of less than 64 bytes; the logic circuit is configured to process the first Ethernet packet according to the first identification information.
  • processors mentioned in any of the above may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more An integrated circuit for controlling program execution of the data transmission methods of the above aspects.
  • CPU Central Processing Unit
  • ASIC application-specific integrated circuit
  • the present application provides an Ethernet packet processing device, the Ethernet packet processing device having a function of implementing the behavior of the first device in the above-mentioned first aspect.
  • This function can be implemented by hardware or by executing corresponding software by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the Ethernet packet processing device includes a unit or module for executing each step of the above first aspect.
  • the device includes: a processing module configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet, the first Ethernet packet
  • An Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes;
  • a transceiver module configured to send the second Ethernet message.
  • it also includes a storage module for storing necessary program instructions and data of the first device.
  • the apparatus includes: a processor and a transceiver, where the processor is configured to support the first device to perform corresponding functions in the method provided in the first aspect.
  • the transceiver is used to instruct the communication between the first device and the second device, and send the Ethernet packet involved in the above method to the second device.
  • the apparatus may further include a memory, which is used for coupling with the processor, and which stores necessary program instructions and data of the first device.
  • the chip when the device is a chip in the first device, the chip includes: a processing module and a transceiver module. carries second identification information, where the second identification information is used to indicate that the first device supports processing a first Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet with a frame length of less than 64 bytes.
  • the transceiver module may be, for example, an input/output interface, a pin or a circuit on the chip, and transmits the Ethernet packet generated by the processor to other chips or modules coupled to the chip.
  • the processing module can execute the computer-executed instructions stored in the storage unit, so as to support the first device to execute the method provided in the first aspect.
  • the storage unit can be a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip, such as a read-only memory (read-only memory, ROM) or a memory unit.
  • ROM read-only memory
  • RAM random access memory
  • the apparatus includes: a processor, a baseband circuit, a radio frequency circuit and an antenna.
  • the processor is used to control the functions of each circuit part, and the baseband circuit is used to generate the Ethernet message, which is sent to the second device through the antenna after analog conversion, filtering, amplification and frequency up-conversion processing by the radio frequency circuit.
  • the apparatus further includes a memory, which stores necessary program instructions and data of the first device.
  • the apparatus includes a communication interface and logic circuitry.
  • the logic circuit is configured to carry second identification information in a second Ethernet packet, where the second identification information is used to indicate that the first device supports processing a first Ethernet type packet, and the first Ethernet type packet It includes an Ethernet packet whose frame length is less than 64 bytes; the communication interface is also used for sending the second Ethernet packet.
  • processors mentioned in any of the above may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more An integrated circuit for controlling program execution of the data transmission methods of the above aspects.
  • CPU Central Processing Unit
  • ASIC application-specific integrated circuit
  • an embodiment of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer storage medium, and the computer instructions are used to execute the method in any possible implementation manner of any one of the foregoing aspects.
  • the embodiments of the present application provide a computer program product including instructions, which, when executed on a computer, cause the computer to execute the method in any one of the foregoing aspects.
  • the present application provides a chip system
  • the chip system includes a processor for supporting an Ethernet packet processing device to implement the functions involved in the above aspects, such as generating or processing the data involved in the above method and/or or information.
  • the chip system further includes a memory, which is used for storing necessary program instructions and data of the device to realize the function of any one of the above aspects.
  • the chip system can be composed of chips, and can also include chips and other discrete devices.
  • an embodiment of the present application provides a communication system, where the system includes the Ethernet packet processing device of the above aspect.
  • FIG. 1 is a schematic diagram of the frame format of an IEEE 802.3 Ethernet message
  • Figure 2 is a schematic diagram of the frame length constraint of the IEEE 802.3 MAC Frame
  • FIG. 3 is a combined schematic diagram of an Ethernet packet processing device in an embodiment of the application.
  • 4a is a schematic flowchart of an Ethernet message sending side in an embodiment of the application.
  • FIG. 4b is another schematic flowchart of the sending side of the Ethernet message in the embodiment of the application.
  • FIG. 4c is a schematic flowchart of an Ethernet message receiving side in an embodiment of the present application.
  • 5a is a schematic diagram of a system architecture in which the MAC layer carries identification information in an embodiment of the present application
  • 5b is a schematic diagram of a system architecture in which the PCS layer carries identification information in an embodiment of the application;
  • FIG. 6 is a schematic diagram of an embodiment of a method for processing an Ethernet packet in an embodiment of the present application
  • FIG. 7 is a schematic diagram of a code block generated in 64b/66b encoding in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a block format in 64b/66b encoding in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the PCS layer utilizing the block type identification information in the embodiment of the application.
  • FIG. 10 is a schematic diagram of using the block type identification information by the PCS layer in the embodiment of the application
  • FIG. 11 is a schematic diagram of the PCS layer utilizing block type identification information in the implementation of the application.
  • FIG. 12 is a schematic diagram of the PCS layer utilizing the block type identification information in the embodiment of the application.
  • FIG. 13 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application.
  • 15 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application.
  • 16 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application.
  • 17 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application.
  • FIG. 18 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application.
  • FIG. 19 is a schematic diagram of an embodiment in which a first device and a second device negotiate and determine to support a first Ethernet type packet in an embodiment of the present application;
  • Fig. 20a is the format schematic diagram of LCW Base Page
  • Figure 20b is a schematic diagram of selecting a bit that has not been used at present in the LCW Base Page to identify the support for the first ether type message;
  • Figure 20c is a schematic diagram of the format of the Message Next page in the LCW extended page
  • Figure 20d is a schematic diagram of the format of the Unformatted Next page in the LCW extended page
  • FIG. 21 is a schematic diagram of another embodiment in which the first device and the second device negotiate and determine to support the first ether type packet in the embodiment of the application;
  • 22 is a schematic diagram of the format of LLDP carrying negotiation information in an embodiment of the present application.
  • FIG. 23 is a schematic structural diagram of an Ethernet packet processing device in an embodiment of the application.
  • FIG. 24 is a schematic structural diagram of an Ethernet packet processing device in an embodiment of the present application.
  • the naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering, and the named or numbered process steps can be implemented according to the The technical purpose is to change the execution order, as long as the same or similar technical effects can be achieved.
  • the division of units in this application is a logical division. In practical applications, there may be other division methods. For example, multiple units may be combined or integrated into another system, or some features may be ignored. , or not implemented, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms. There are no restrictions in the application.
  • units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units, and some or all of them may be selected according to actual needs. unit to achieve the purpose of the scheme of this application.
  • At least one item(s) below or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s).
  • at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • the MAC frame format is shown in Figure 1, that is, an IEEE 802.3 Ethernet packet consists of a 7-byte preamble, a 1-byte start frame delimiter (SFD), and a 2-byte frame delimiter (SFD).
  • SFD start frame delimiter
  • SFD 2-byte frame delimiter
  • Type/length length/type
  • 6-byte source address field source address
  • 6-byte destination address field destination address
  • payload Payload
  • 4-byte frame check code sequence Frame Check Sequence, FCS
  • FCS 4-byte frame check code sequence
  • IPG 12-byte frame interval
  • the MAC frame contains, type length, address, payload and FCS fields.
  • Ethernet packet At the sending end, the minimum frame length of the Ethernet packet must meet 64 bytes, otherwise it needs to be filled to 64 bytes for transmission; the maximum length of the Ethernet basic frame It cannot exceed 1518 bytes, otherwise it needs to be truncated to 1518 bytes and sent; at the receiving end, when receiving an Ethernet packet with a frame length less than 64 bytes or an Ethernet packet with a frame length greater than 1518 bytes, the Ethernet packet is discarded. This will result in insufficient forwarding performance of Ethernet in applications with many small packets, while in applications with many large packets, Ethernet has a large overhead.
  • the embodiments of the present application provide the following technical solutions: when the first device sends the first Ethernet packet, the first identification information is carried in the first Ethernet packet, and the first identification information is used to indicate the The first device supports processing a first Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes; and then the first device sends the first Ethernet packet.
  • GSM global system of mobile communication
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • LTE frequency division duplex frequency division duplex
  • TDD time division duplex
  • Universal Mobile Communication system Universal Mobile Communication system
  • 5G communication system and future wireless communication system, etc.
  • the first device may be user equipment or network equipment.
  • User Equipment may also refer to terminal equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile equipment, user terminal, terminal, wireless communication equipment, user agent or user device.
  • the access terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a wireless communication Functional handheld devices, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks or in future evolved PLMN networks, etc.
  • SIP Session Initiation Protocol
  • WLL Wireless Local Loop
  • PDA Personal Digital Assistant
  • the network device may be a device used to communicate with user equipment, for example, it may be a base station (base transceiver station, BTS) in a GSM system or CDMA, or a base station (nodeB, NB) in a WCDMA system, or It is an evolved base station (evolutional node B, eNB or eNodeB) in the LTE system, or the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, and a network-side device in a 5G network or a public land that evolves in the future Network equipment in a mobile network (public land mobile network, PLMN) network, etc.
  • BTS base transceiver station
  • NodeB nodeB
  • NB base station
  • eNodeB evolved base station
  • the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, and a network-side device in a 5G network or a public land that
  • FIG. 3 is a schematic diagram of a hardware structure of an Ethernet packet processing device in an embodiment of the present application.
  • the Ethernet packet processing device may be a possible implementation manner of the first device in the embodiment of the present application.
  • the Ethernet packet processing device includes at least a processor 304 , a memory 303 , and a transceiver 302 , and the memory 303 is further configured to store instructions 3031 and data 3032 .
  • the Ethernet packet processing device may further include an antenna 306 , an I/O (input/output, Input/Output) interface 310 and a bus 312 .
  • the transceiver 302 further includes a transmitter 3021 and a receiver 3022.
  • the processor 304 , the transceiver 302 , the memory 303 and the I/O interface 310 are communicatively connected to each other through the bus 312 , and the antenna 306 is connected to the transceiver 302 .
  • the processor 304 may be a general-purpose processor, such as, but not limited to, a central processing unit (CPU), or a special-purpose processor, such as, but not limited to, a digital signal processor (DSP), an application Application specific integrated circuit (ASIC) and field programmable gate array (FPGA), etc.
  • the processor 304 may also be a neural network processing unit (NPU).
  • the processor 304 may also be a combination of multiple processors.
  • the processor 304 may be configured to execute relevant steps of the method for generating an Ethernet packet in the subsequent method embodiments.
  • the processor 304 may be a processor specially designed to perform the above steps and/or operations, or may be a processor that performs the above steps and/or operations by reading and executing the instructions 3031 stored in the memory 303, the processor 304 Data 3032 may be required in performing the steps and/or operations described above.
  • the transceiver 302 includes a transmitter 3021 and a receiver 3022 , and in an optional implementation manner, the transmitter 3021 is used to transmit signals through the antenna 306 .
  • the receiver 3022 is used to receive signals through at least one of the antennas 306 .
  • the transmitter 3021 may be specifically configured to be executed by at least one antenna among the antennas 306. For example, the method for processing an Ethernet packet in the subsequent method embodiments is applied to the Ethernet packet. The operation performed by the receiving module or the sending module in the Ethernet packet processing device.
  • the transceiver 302 is configured to support the Ethernet packet processing device to perform the aforementioned receiving function and sending function.
  • a processor with processing capabilities is considered processor 304 .
  • the receiver 3022 may also be referred to as an input port, a receiving circuit, and the like, and the transmitter 3021 may be referred to as a transmitter or a transmitting circuit, or the like.
  • the processor 304 may be configured to execute the instructions stored in the memory 303 to control the transceiver 302 to receive messages and/or send messages, so as to complete the function of the Ethernet packet processing device in the method embodiment of the present application.
  • the function of the transceiver 302 may be implemented by a transceiver circuit or a dedicated chip for transceiver.
  • receiving a message by the transceiver 302 may be understood as an input message by the transceiver 302
  • sending a message by the transceiver 302 may be understood as an output message by the transceiver 302 .
  • the memory 303 may be various types of storage media, such as random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), non-volatile RAM (Non-Volatile RAM, NVRAM), or Programmable ROM (Programmable ROM, PROM), Erasable PROM (Erasable PROM, EPROM), Electrically Erasable PROM (Electrically Erasable PROM, EEPROM), Flash memory, optical memory and registers, etc.
  • the memory 303 is specifically used to store the instructions 3031 and the data 3032, and the processor 304 can perform the steps and/or operations described in the method embodiments of the present application by reading and executing the instructions 3031 stored in the memory 303. Data 3032 may be required during the operations and/or steps of a method embodiment.
  • the Ethernet packet processing device may further include an I/O interface 310, where the I/O interface 310 is configured to receive instructions and/or data from peripheral devices, and output instructions and/or data to peripheral devices.
  • I/O interface 310 is configured to receive instructions and/or data from peripheral devices, and output instructions and/or data to peripheral devices.
  • the transmission process of the Ethernet message mainly includes the sending process and the receiving process of the Ethernet message.
  • FIG. 4a is an exemplary process flow of sending an Ethernet packet by the sender.
  • the Ethernet packet processing device determines whether the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes; if so, the Ethernet packet processing device Determine whether it supports processing the first Ethernet type packet; if not, the Ethernet packet processing device directly processes and sends according to the existing Ethernet packet sending process; if the Ethernet packet processing device enables itself to support processing the first Ethernet packet Ethernet type packet, the Ethernet packet processing device carries the identification information in the Ethernet packet for identifying that the Ethernet packet processing device supports processing the first Ethernet type packet, and then processes and sends it.
  • the Ethernet packet processing device fills the frame length of the Ethernet packet to 64 bytes according to the existing Ethernet packet processing flow or adds The frame length of the Ethernet packet is truncated to 1518 bytes before being processed and sent.
  • FIG. 4b is another exemplary process flow of sending an Ethernet packet by the sender.
  • the Ethernet packet processing device determines whether it supports processing the first Ethernet type packet, and if so, the Ethernet packet processing device carries the Ethernet packet Identification information used to identify that the Ethernet packet processing device supports processing the first Ethernet type packet, and then processes and sends it; if the Ethernet packet processing device is enabled to not support processing the first Ethernet type packet, the Ethernet packet The packet processing device determines whether the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes; if the frame length of the Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the Ethernet packet processing device directly Processing and sending according to the existing Ethernet packet sending process; if the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes, the Ethernet packet processing device sends the Ethernet packet according to the existing Ethernet packet processing process.
  • the frame length of the message is padded to 64 bytes or
  • FIG. 4c is an exemplary process flow of receiving an Ethernet packet by a receiving end.
  • the Ethernet packet processing device determines whether it supports processing the first Ethernet type packet; if so, the Ethernet packet processing device determines whether the Ethernet packet contains Carrying identification information for identifying the first Ethernet type packet, if the Ethernet packet processing device determines that the Ethernet packet carries identification information for identifying the first Ethernet type packet, it directly processes and forwards it; If the packet processing device determines that it does not support processing the first Ethernet type packet or the Ethernet packet processing device determines that the Ethernet packet does not carry identification information for identifying the first Ethernet type packet, the Ethernet packet processing device will The Ethernet packet is subjected to MAC layer frame length detection; it is judged whether the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes; if not, the Ethernet packet processing device processes the Ethernet packet according to the existing Ethernet packet receiving and processing flow Forward the Ethernet packet, and if so, discard the Ethernet packet.
  • the embodiments of the present application provide system architecture diagrams of the following methods for processing Ethernet packets.
  • the Ethernet message processing device is below the existing MAC layer and above the reconciliation sublayer (RS), and the Ethernet message processing device is identified by a preamble to support Process the first ether type packet.
  • the Ethernet message processing device is below the RS layer and above the PCS layer, and the Ethernet message processing device supports the first Ethernet type message by using the encoded block type to identify.
  • the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes. It can be understood that, when the Ethernet packet processing device enables all Ethernet packets to carry identification information, the first Ethernet type packet may also include an Ethernet packet whose frame length is greater than or equal to 64 bytes and less than or equal to 1518 bytes. Ethernet packets with a frame length greater than 1518 bytes. When it includes a plurality of frame length type Ethernet packets, the first Ethernet type packet may be referred to as a flexible Ethernet (Flex Frame or Flex Ethernet Frame) type packet or a computing Ethernet (Computing Ethernet) type packet. It can be understood that, for packets of different frame length types, the first Ethernet type packet may also have corresponding names. For example, an Ethernet packet whose frame length is less than 64 bytes can be called a mini frame/mini frame (Mini Frame) type packet.
  • a mini frame/mini frame Mini Frame
  • Target identification field or called Computing Ethernet, Computing, Flex Ethernet, or Mini Frame when the frame length of the Ethernet packet is less than 64 bytes Logo (Mini Frame), etc. It is specifically used to identify that the Ethernet packet processing device supports processing the first Ethernet type packet.
  • the target identification field can be located anywhere between the SFD and the CRC.
  • the target identification field may specifically be other unused fields such as 0x5F.
  • the frame length used to identify the Ethernet packet is less than 64 bytes or the frame length used to identify the Ethernet packet is greater than 1518 bytes. It can be understood that, when the Ethernet packet processing device enables all Ethernet packets to carry identification information, the service type identification can also identify that the frame length of the Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes.
  • FIG. 6 is a schematic diagram of an embodiment of an Ethernet packet processing method proposed by an embodiment of the present application, which specifically includes:
  • the first device carries first identification information in the first Ethernet packet, where the first identification information is used to indicate that the first device supports processing a first Ethernet type packet, and the first Ethernet type packet includes a frame Ethernet packets less than 64 bytes long.
  • the first device can generate a preamble at the MAC layer, and the preamble carries the first identification information.
  • the preamble together with the start marker contains a total of 8 bytes, and for different frames, there are differences in its format.
  • the preamble includes 7 0x55 and 1 byte of 0xD5.
  • the 0xD5 represents the SFD, and the SFD is located in the last byte of 8 bytes.
  • the Ethernet Passive Optical Network (EPON) frame As shown in Table 2, the Ethernet Passive Optical Network (EPON) frame, the first byte and the second byte of the preamble are 0x55, and the third byte is 0xD5, as a logical chain Road identification (Logical Link identity, LLID) header delimiter (Start of LLID Delimiter, SLD), the sixth and seventh bytes are LLID, and the last byte is the CRC check code.
  • EON Ethernet Passive Optical Network
  • the first byte and the second byte of the preamble are 0x55
  • the third byte is 0xD5
  • LLID Logical Link identity
  • SLD Start of LLID Delimiter
  • the sixth and seventh bytes are LLID
  • the last byte is the CRC check code.
  • the preemptive sent Ethernet identifier includes two definitions of preamble identifiers.
  • the header delimiter (Start mPacket Delimiter, SMD) of the combined MAC packet has two meanings.
  • Table 3 indicates that the Ethernet packet is a fragment of a complete packet, and is marked with a fragment count;
  • Table 4 indicates that the Ethernet packet is an Express packet, or a complete packet that can be preempted , or the first fragment of a packet.
  • the first device when the first device carries the first identification information in the preamble of the MAC layer, the following possible implementations can be adopted:
  • the first device generates a preamble at the MAC layer, and the position information of the frame header delimiter of the preamble is used as the first identification information. That is, as long as the location information of the SFD in the preamble is different from the location information of the SFD in the existing frame, the first identification information can be indicated. As shown in Table 5, the SFD of the preamble provided in this embodiment is located in the fourth byte, which means that the preamble carries the first identification information.
  • the first device generates a preamble at the MAC layer, and a target identification field in the preamble is used as the first identification information. That is, a new identification field in the preamble is used to represent the first identification information.
  • the FE field of the fourth byte in the preamble provided by this embodiment (for example, 0x5F is used) represents the first identification information.
  • the target identification field may be located at any position between the SFD and the eighth byte (CRC), as long as the information of the first Ethernet packet can be completely identified.
  • the preamble may further include a service type identifier for identifying the service type of the first Ethernet packet. As shown in Table 7, the SID is used to identify the service type.
  • the service type identifier may be used in the preamble to identify the service type of the first Ethernet packet, or other manners may be used to identify the service type.
  • the target identification field selects different fields for identification.
  • the setting fields A, B, and C are used to indicate that the first device supports processing the first Ethernet type packet, but the field A is also used to identify the Ethernet packet as A small packet with a frame length of less than 64 bytes.
  • This field B is used to identify an Ethernet packet as a large packet with a frame length greater than 1518 bytes.
  • This field C is used to identify an Ethernet packet whose frame length is greater than or equal to 64 bytes. and less than or equal to 1518 bytes.
  • the SFD location information when used to indicate that the first device supports processing of the first Ethernet type packet, different location information may also identify different service types.
  • the set position A, position B and position C are all used to indicate that the first device supports processing the first Ethernet type packet, but the position A is also used to identify the Ethernet packet as a small packet with a frame length of less than 64 bytes
  • the position B is used to identify the Ethernet packet as a large packet with a frame length greater than 1518 bytes
  • the position C is used to identify the Ethernet packet as a packet with a frame length greater than or equal to 64 bytes and less than or equal to 1518 bytes .
  • the first device can generate a code at the PCS layer, and the first identification information is indicated by the block type of the code.
  • the PCS layer mainly performs coding (8b/10b or 64b/66b, etc., which are not limited here), scrambling code, and optionally forward error correction code (Forward Error Correction, FEC), and then distributed.
  • 64b/66b encoding is used for description.
  • the encoding method of 64b/66b can be shown in Figure 7, that is, every 64 bits (bit) forms a block (block), and then adds a 2-bit header to form a 66-bit block.
  • For each 66-bit block it is classified into two types, namely, pure data blocks (with the sync header marked with 01) and control/control data blocks (with the sync header marked with 10).
  • the first byte (8-bit) after the sync header of the latter is the block Type field, which identifies the data/control structure of the subsequent 7 bytes.
  • the following takes the 64b/66b encoding of 40/100/200/400GBASE-R as an example to give the definition of the 64b/66b block format.
  • the left control block format (control block format) identifies the input of the media interface (xGMII), and the right side is the corresponding 66bit code block after 64b/66b encoding.
  • C represents the control signal
  • /S/ represents the start of the packet (Start of Packet, SOP)
  • /T/ represents the end of the packet (End of Packet, EOP).
  • /O/ represents ordered sets, which are used to send remote/local failure status on the link.
  • 0x1E indicates that the following 7 bytes are all control information;
  • 0x78 indicates the start block of a data packet.
  • T0 to T7 identify the possible ending positions of 8 packets. It can be seen that through different block type types, we can obtain the beginning and end of a message, and complete the delimitation of a message.
  • the first device when the first device carries the first identification information through encoding at the PCS layer, the following possible implementations may be adopted:
  • the first device encodes the first Ethernet packet at the PCS layer, and uses the encoded block type as the first identification information. As shown in Figure 9, the first device uses the block type 0x00 to identify the first identification information. It can be understood that the first Ethernet packet may be encoded to generate multiple code blocks during the encoding process, and for each code block, there is a block type identification field. When the first device uses the block type to identify the first identification information, the first device may use the block type of at least one code block for identification. As shown in Figure 9, the first Ethernet packet generates three code blocks during the encoding process, which are the first code block (also called the start block of the Ethernet packet), the second code block and the third code block. code block.
  • this first Ethernet message can use the block type of the start block to identify the first identification information as shown in Figure 9; also can use the block type of the second code block to identify the first identification information as shown in Figure 10 ; Also as shown in Figure 11, use the block type of the 3rd code block to identify the first identification information; also as shown in Figure 12, use the start block, the second code block and the 3rd code
  • the block type of the block identifies the first identification information.
  • the code of the block type may be 0x00, or it may be a code not selected in the IEEE 802.3-2018 version-5 table, and it is only necessary to ensure that the Hamming distance with other codes is at least 4, such as 0xE1.
  • the encoded code block may further include a service type identifier for identifying the service type of the first Ethernet packet.
  • the P1 is used to identify the service type.
  • the size of the P1 can be less than 1 byte, or greater than 1 byte (then it will occupy the space of the following D2). It can be understood that the encoded block type may also identify the service type of the first Ethernet packet.
  • the block type A, block type B and block type C are all set to indicate that the first device supports processing the first Ethernet type packet, but the block type A is also used to identify the Ethernet packet as having a frame length of less than 64 words
  • the block type B is used to identify the Ethernet packet as a large packet with a frame length greater than 1518 bytes
  • the block type C is used to identify the Ethernet packet as a frame length greater than or equal to 64 bytes and less than or equal to 1518-byte message.
  • the MAC layer sends the indication information of the first Ethernet type packet to the xGMII interface, and then the xGMII interface generates a corresponding control word.
  • the xGMII interface The control word generated by the interface is used to identify the first Ether type message; finally, when the PCS layer receives the data or control word sent by the xGMII interface, it performs corresponding encoding and converts the control word into a block type.
  • xGMII is used to indicate a GMII interface of a certain rate. The name of the MII port for each rate is different. For example, at a rate of 400G, the corresponding GMII interface is a 200GMII interface or a 400GMII interface.
  • the first device may carry the first identification information in the MAC layer and the PCS at the same time.
  • the specific implementation is as described in the above solution, and details are not repeated here.
  • the first device sends the first Ethernet packet.
  • the processing method of the Ethernet packet may also be as shown in Figure 13, which specifically includes:
  • the first device determines whether the frame length of the first Ethernet packet is less than 64 bytes, and if so, executes step 1302, and if not, executes step 1306.
  • the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
  • the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is less than 64 bytes.
  • the first device determines whether it supports processing the first ether type packet, and if so, executes steps 1303 to 1304, and if not, executes step 1305.
  • the first device reads the identification information in its own register, and determines whether it supports processing the first Ether type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
  • the first device carries the first identification information in the first Ethernet packet.
  • the first device may use the solution shown in step 601 to carry the first identification information in the first Ethernet packet.
  • the first device sends the first Ethernet packet.
  • the first device fills the frame length of the first Ethernet packet to 64 bytes, and sends it.
  • the first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
  • the processing method of the Ethernet packet can also be shown in Figure 14, which specifically includes:
  • the first device determines whether it supports processing the first ether type packet, if so, executes steps 1402 to 1403, and if not, executes step 1404.
  • the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
  • the first device carries the first identification information in the first Ethernet packet.
  • the first device carries the first identification information for any Ethernet packet.
  • the first device sends the first Ethernet packet.
  • the first device determines whether the frame length of the first Ethernet packet is less than 64 bytes, and if so, executes step 1405, and if not, executes step 1406.
  • the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
  • the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is less than 64 bytes.
  • the first device fills the frame length of the first Ethernet packet to 64 bytes, and sends it.
  • the first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
  • the first Ether type packet also includes a large packet with a frame length greater than 1518 bytes.
  • the first Ethernet packet is an Ethernet packet with a frame length greater than 1518 bytes
  • the first device may also carry the first identification information in the first Ethernet packet in the above manner.
  • the processing method of the Ethernet packet may also be as shown in Figure 15, which specifically includes:
  • the first device determines whether the frame length of the first Ethernet packet is greater than 1518 bytes, and if so, executes step 1502, and if not, executes step 1506.
  • the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
  • the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is greater than 1518 bytes.
  • the first device determines whether it supports processing of the first ether type packet, and if so, executes steps 1503 to 1504, and if not, executes step 1505.
  • the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
  • the first device carries the first identification information in the first Ethernet packet.
  • the first device may use the solution shown in step 601 to carry the first identification information in the first Ethernet packet.
  • the first device sends the first Ethernet packet.
  • the first device truncates the frame length of the first Ethernet packet to 1518 bytes, and sends it.
  • the first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
  • the processing method of the Ethernet packet can also be as shown in Figure 16, which specifically includes:
  • the first device determines whether it supports the processing of the first ether type packet, and if so, executes steps 1602 to 1603, and if not, executes step 1604.
  • the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
  • the first device carries the first identification information in the first Ethernet packet.
  • the first device carries the first identification information for any Ethernet packet.
  • the first device sends the first Ethernet packet.
  • the first device determines whether the frame length of the first Ethernet packet is greater than 1518 bytes, and if so, executes step 1605, and if not, executes step 1606.
  • the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
  • the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
  • the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is greater than 1518 bytes.
  • the first device truncates the frame length of the first Ethernet packet to 1518 bytes, and sends it.
  • the first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
  • the mentioned first Ethernet packet is substantially equivalent to the second Ethernet packet in the claims of this application.
  • the identification information is substantially equivalent to the second identification information in the claims of the present application.
  • FIG. 17 is a schematic diagram of an embodiment of an Ethernet packet processing method proposed by an embodiment of the present application, which specifically includes:
  • the first device receives a second Ethernet packet.
  • the first device receives the second Ethernet packet sent by the peer device through an antenna or other interface.
  • the first device determines whether it supports processing of the first ether type packet, and if so, executes step 1703, and if not, executes step 1705.
  • the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
  • the first device determines whether the second Ethernet packet carries second identification information, where the second identification information is used to indicate that the peer device supports processing of the first Ethernet type packet, and the first Ethernet type packet includes a frame For the Ethernet packet whose length is less than 64 bytes, if yes, go to step 1704; if not, go to step 1705.
  • the first device detects whether there is an identifier indicating the second identification information in the preamble of the second Ethernet packet or detects whether there is an identifier indicating the second identification information in the encoding, and if so, determines whether there is an identifier indicating the second identification information.
  • the second Ethernet packet carries the second identification information, and the second Ethernet packet is a first Ethernet type packet. 1704.
  • the first device processes the second Ethernet packet.
  • the first device directly decodes the second Ethernet packet or forwards the second Ethernet packet.
  • the first device determines whether the frame length of the second Ethernet packet is less than 64 bytes, and if so, executes step 1706, and if not, executes step 1704.
  • the first device may determine the frame length of the second Ethernet packet through the service type identifier in the second Ethernet packet;
  • the first device detects the MAC frame length of the second Ethernet packet, so as to determine the frame length of the second Ethernet packet.
  • the first device discards the second Ethernet packet.
  • the processing method of the Ethernet packet may also be as shown in FIG. 18 , which is implemented in this application.
  • a schematic diagram of an embodiment of an Ethernet packet processing method proposed in this example which specifically includes:
  • the first device receives a second Ethernet packet sent by the second device.
  • the first device receives the second Ethernet packet sent by the second device through an antenna or other interface.
  • the first device determines whether it supports processing of the first ether type packet, and if so, executes step 1803, and if not, executes step 1805.
  • the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
  • the first device determines whether the second Ethernet packet carries second identification information, where the second identification information is used to indicate that the second device supports processing a first Ethernet type packet, and the first Ethernet type packet includes a frame For an Ethernet packet longer than 1518 bytes, if yes, go to step 1804; if not, go to step 1805.
  • the first device detects whether there is an identifier indicating the second identification information in the preamble of the second Ethernet packet or detects whether there is an identifier indicating the second identification information in the encoding, and if so, determines whether there is an identifier indicating the second identification information.
  • the second Ethernet packet carries the second identification information, and the second Ethernet packet is a first Ethernet type packet.
  • the first device processes the second Ethernet packet.
  • the first device directly decodes the second Ethernet packet or forwards the second Ethernet packet.
  • the first device determines whether the frame length of the second Ethernet packet is greater than 1518 bytes, and if so, executes step 1806, and if not, executes step 1804.
  • the first device may determine the frame length of the second Ethernet packet through the service type identifier in the second Ethernet packet;
  • the first device detects the MAC frame length of the second Ethernet packet, so as to determine the frame length of the second Ethernet packet.
  • the first device discards the second Ethernet packet.
  • the mentioned second Ethernet packet is substantially equivalent to the first Ethernet packet in the claims of this application
  • the first The second identification information is substantially equivalent to the first identification information in the claims of this application.
  • the first device can be understood as only to determine whether it supports the first Ethernet type message, and does not determine whether the peer device also supports processing the first Ethernet type message.
  • the first device and the second device at both ends of the same link may further negotiate to determine whether both parties support processing the first Ether-type packet.
  • an exemplary process for negotiating between the first device and the second device to determine whether to support processing of the first Ethernet type packet includes:
  • the first device sends a first auto-negotiation pulse to the second device, where the first auto-negotiation pulse carries negotiation information, where the negotiation information is used to indicate that the first device supports processing of the first ether type packet.
  • the first device and the second device may negotiate whether the two parties are in a link layer auto-negotiation (AN) manner. It has the ability to support the processing of the first Ethernet type message.
  • AN is an optional function provided by IEEE 802.3. Devices at both ends of the link negotiate two end capability.
  • the auto-negotiation pulse will carry negotiation information used to instruct the first device to support processing the first Ethernet type packet, and the negotiation information may be data information in the auto-negotiation pulse.
  • the data information in the auto-negotiation pulse is encoded through a differential Manchester (Differential Manchester Encoding, DME) page.
  • Each 48bit Data constitutes a DME page, that is, a link code word (LCW).
  • the entire negotiation information can be composed of LCW base page and extended page. Therefore, when the auto-negotiation pulse carries the negotiation information, the following possible implementations can be adopted:
  • unused bits are used in the LCW Base Page to identify the support for the first ether type message.
  • the format of the LCW Base Page shown in Figure 20a is known.
  • a bit that has not been used at present may be selected from the technical capability information indicated by A0 to A26 to identify the support for the first Ethernet type message.
  • A19, as shown in Figure 20b, is D40.
  • the message code value is used in the LCW extended page to identify the support of the first ether type message.
  • the LCW extended page has two encoding formats (Message Next page and Unformatted Next page), as shown in Figures 20c and 20d.
  • the encoding format of the Message Next page shown in Figure 20c carries the Message Code Field, which means that the specific Message Page format is defined.
  • the encoding format of the Unformatted Next page shown in Figure 20d is Unformatted page encoding, an unformatted page. These two formats are judged according to the setting of the Message Page (MP) bit. When MP is set to 1, it means Message page; when it is set to 0, it means unformatted page. According to the setting of Message Code Field, determine the meaning of subsequent D16 ⁇ D47 positions.
  • the first device can generate a message code value in the Message Code Field to identify support for the first ether type message.
  • the first device receives a second auto-negotiation pulse sent by the second device, where the second auto-negotiation pulse carries negotiation information, where the negotiation information is used to indicate that the second device supports processing of the first Ethernet type packet.
  • the manner in which the negotiation information is carried in the second auto-negotiation pulse sent by the second device is the same as the manner in which the negotiation information is carried in the first auto-negotiation pulse in step 1901, and details are not repeated here.
  • the first device determines, according to the second auto-negotiation pulse, that the second device supports processing of the first Ether-type packet, and enables itself to support the processing of the first Ether-type packet.
  • the first device After receiving the second auto-negotiation pulse, the first device detects whether there is negotiation information in the auto-negotiation pulse, so as to determine that the second device supports processing the first Ethernet type packet. If it is determined that the second device supports the processing of the first ether type packet, it enables itself to support processing the first ether type packet.
  • the second device determines, according to the first auto-negotiation pulse, that the first device supports the processing of the first Ether-type packet, and enables itself to support the processing of the first Ether-type packet.
  • the second device After receiving the first self-negotiation pulse, the second device detects whether there is negotiation information in the self-negotiation pulse, so as to determine that the first device supports processing of the first Ethernet type message. If it is determined that the first device supports the processing of the first Ether-type packet, it enables itself to support the processing of the first Ether-type packet.
  • steps 1901 to 1904 may be repeated between the first device and the second device for many times, so as to achieve a consensus. If the first device and the second device cannot reach an agreement through negotiation, neither the first device nor the second device is enabled to support the processing of the first ether type packet, and notify other neighbors.
  • an exemplary process for negotiating between the first device and the second device to determine whether to support processing of the first Ethernet type packet includes:
  • the first device sends a first link layer discovery protocol packet to the second device, where the first link layer discovery protocol carries negotiation information, and the negotiation information is used to indicate that the first device supports processing the first ether type message.
  • the first device and the second device may send a Link Layer Discovery Protocol (LLDP) message through the communication between the first device and the second device. way, negotiate to determine whether the two parties have the ability to support the first Ethernet type message.
  • LLDP Link Layer Discovery Protocol
  • the first device sends a first LLDP protocol packet to the second device.
  • an 802.3TLV type is generated in the LLDP protocol message to identify the negotiation information.
  • the first device receives a second link layer discovery protocol packet sent by the second device, where the second link layer discovery protocol packet carries negotiation information, and the negotiation information is used to instruct the second device to support processing the first link layer.
  • An Ethernet type packet An Ethernet type packet.
  • the manner in which the negotiation information is carried in the second link layer discovery protocol packet sent by the second device is the same as the manner in which the negotiation information is carried in the first link layer discovery protocol packet in step 2101. No longer.
  • the first device determines, according to the second link layer discovery protocol message, that the second device supports processing the first Ethernet type packet, and enables itself to support processing the first Ethernet type packet.
  • the first device After receiving the second link layer discovery protocol packet, the first device detects whether there is negotiation information in the second link layer discovery protocol packet, so as to determine that the second device supports processing the first ether type message. If it is determined that the second device supports the processing of the first ether type packet, it enables itself to support processing the first ether type packet.
  • the second device determines, according to the first link layer discovery protocol message, that the first device supports processing of the first ether type packet, and enables itself to support processing the first ether type packet.
  • the second device After receiving the first link layer discovery protocol packet, the second device detects whether there is negotiation information in the first link layer discovery protocol packet, so as to determine that the second device supports processing the first ether type message. If it is determined that the second device supports the processing of the first ether type packet, it enables itself to support processing the first ether type packet.
  • the negotiation based on the LLDP protocol can be run only after the port is enabled (UP). That is, in this negotiation mode, the first Ethernet type packet capability is initially disabled.
  • the first device sends an LLDP message carrying the Flex Eth capability flag to the second device, and performs negotiation to enable the sending and receiving of the first Ether-type message.
  • This LLDP negotiation can be triggered at any time while the port is running.
  • the first device and the second device may repeat the steps 2101 to 2104 for many times, so as to achieve the purpose of negotiation. If the first device and the second device cannot reach an agreement through negotiation, neither the first device nor the second device is enabled to support the processing of the first ether type packet, and notify other neighbors.
  • Ethernet packet processing method in the embodiments of the present application has been described above. It can be understood that, in order to implement the above functions, the Ethernet packet processing device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or in the form of a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware 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.
  • the Ethernet packet processing device can be divided into functional modules according to the foregoing method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 23 is a schematic diagram of an embodiment of the Ethernet packet processing device in the embodiment of the application.
  • the Ethernet packet processing device can be deployed in a switch (or router), and the Ethernet packet processing device 2300 includes:
  • a transceiver module 2301 configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet Type message, the first Ethernet type message includes an Ethernet message whose frame length is less than 64 bytes;
  • the processing module 2302 is configured to process the first Ethernet packet according to the first identification information.
  • the processing module 2302 is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
  • the processing module 2302 is further configured to discard the second Ethernet packet when processing the first Ethernet type packet is not supported and the first Ethernet packet is less than 64 bytes .
  • the processing module 2302 is further configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing the first Ethernet type message, the first Ethernet type message includes an Ethernet message with a frame length of less than 64 bytes;
  • the transceiver module 2301 is configured to send the second Ethernet packet.
  • the processing module 2302 is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes, and when processing the first Ethernet type packet is supported, the operation of carrying the second identification information in the second Ethernet packet is performed.
  • the processing module 2302 is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes.
  • the frame length of the Ethernet packet is padded to 64 bytes and sent; when the processing of the first Ethernet type packet is not supported and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, Send the second Ethernet packet, where the second Ethernet packet does not carry the second identification information.
  • the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
  • the processing module 2302 is specifically configured to detect the preamble of the first Ethernet packet, and the position information of the frame header delimiter of the preamble is used as the first identification information; The first identification information is used to process the first Ethernet packet.
  • the processing module 2302 is specifically configured to detect the preamble of the first Ethernet packet, and the target identification field in the preamble is used as the first identification information; according to the first The identification information processes the first Ethernet packet.
  • the processing module 2302 is further configured to detect the first service type identifier carried in the preamble of the first Ethernet packet, where the first service type identifier is used to indicate the first service type identifier. Type of Ethernet packet.
  • the processing module 2302 is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; Describe the first Ethernet packet.
  • the encoded block type is the block type of the start block of the first Ethernet packet.
  • the processing module 2302 is further configured to detect a second service type identifier carried in at least one byte after the encoded block type, where the second service type identifier is used to indicate the Type of the first Ethernet packet.
  • the processing module 2302 is further configured to negotiate with the second device to determine whether to support processing of the first Ethernet type packet.
  • the transceiver module 2301 is further configured to negotiate with the second device whether to support processing the first Ethertype packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information,
  • the negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet;
  • the transceiver module 2301 is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information,
  • the negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
  • the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information
  • the message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
  • an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
  • the Ethernet packet processing device in the foregoing embodiment may be a network device or user equipment, or may be a chip applied in the network device or other combined devices or components that can implement the functions of the foregoing network device.
  • the transceiver module may be a transceiver, and the transceiver may include an antenna and a radio frequency circuit, and the processing module may be a processor, such as a baseband chip.
  • the transceiver module may be a radio frequency unit, and the processing module may be a processor.
  • the receiving part of the transceiver module can be the input port of the chip system
  • the sending part of the transceiver module can be the output interface of the chip system
  • the processing module can be the chip system A processor, such as a central processing unit (CPU).
  • CPU central processing unit
  • the memory included in the Ethernet packet processing device is mainly used to store software programs and data, for example, to store the programs described in the foregoing embodiments.
  • the Ethernet packet processing device also has the following functions:
  • a transceiver configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet type message, the first Ethernet type message includes an Ethernet message with a frame length of less than 64 bytes;
  • a processor configured to process the first Ethernet packet according to the first identification information.
  • the processor is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
  • the processor is further configured to discard the second Ethernet packet when the processing of the first Ethernet packet is not supported and the first Ethernet packet is smaller than 64 bytes.
  • the processor is further configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet.
  • the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes;
  • the transceiver is configured to send the second Ethernet packet.
  • the processor is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of carrying the second identification information in the second Ethernet packet is performed.
  • the processor is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes.
  • the frame length of the packet is padded to 64 bytes and sent; when the first Ethernet type packet cannot be processed and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, send For the second Ethernet packet, the second Ethernet packet does not carry the second identification information.
  • the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
  • the processor is specifically configured to detect the preamble of the first Ethernet packet, and the position information of the frame header delimiter of the preamble is used as the first identification information; according to the The first identification information processes the first Ethernet packet.
  • the processor is specifically configured to detect the preamble of the first Ethernet packet, and the target identification field in the preamble is used as the first identification information; according to the first identification The information processes the first Ethernet packet.
  • the processor is further configured to detect the first service type identifier carried in the preamble of the first Ethernet packet, where the first service type identifier is used to indicate the first Ethernet packet. Type of message.
  • the processor is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; process the encoding according to the first identification information.
  • the first Ethernet packet is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; process the encoding according to the first identification information.
  • the first Ethernet packet is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; process the encoding according to the first identification information.
  • the first Ethernet packet is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; process the encoding according to the first identification information.
  • the encoded block type is the block type of the start block of the first Ethernet packet.
  • the processor is further configured to detect a second service type identifier carried in at least one byte after the encoded block type, where the second service type identifier is used to indicate the first An Ethernet packet type.
  • the processor is further configured to negotiate with the second device to determine whether to support processing of the first Ethernet type packet.
  • the transceiver is further configured to negotiate with the second device whether to support processing the first Ether-type packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, so the The negotiation information is used to instruct the first device or the second device to support processing the first ether type packet;
  • the transceiver is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, so The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
  • the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information
  • the message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
  • an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
  • the Ethernet packet processing device 2400 includes: a processing module 2401, configured to carry second identification information in the second Ethernet packet, where the second identification information is used for Instructing the first device to support processing of the first ether type packet, where the first ether type packet includes an ether packet with a frame length less than 64 bytes;
  • the transceiver module 2402 is configured to send the second Ethernet packet.
  • the processing module 2401 is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes, and the first device supports processing the first Ethernet type packet, the operation of carrying the second identification information in the second Ethernet packet is performed.
  • the processing module 2401 is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes.
  • the frame length of the Ethernet message is padded to 64 bytes and sent;
  • the second Ethernet packet When processing of the first Ethernet type packet is not supported and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the second Ethernet packet is sent, and the second Ethernet packet is sent.
  • the message does not carry the second identification information
  • the frame length of the second Ethernet packet is truncated to 1518 bytes and sent.
  • the transceiver module 2402 is configured to receive a first Ethernet packet, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate the first device support processing of the first ether type packet, the first ether type packet includes an ether packet whose frame length is less than 64 bytes;
  • the processing module 2401 is further configured to process the first Ethernet packet according to the first identification information.
  • the processing module 2401 is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
  • the processing module 2401 is further configured to discard the first Ethernet packet when the processing of the first Ethernet type packet is not supported and the first Ethernet packet is less than 64 bytes .
  • the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
  • the processing module 2401 is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the frame header delimiter position information of the preamble is used as the first code. 2. Identification information.
  • the processing module 2401 is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the target identification field in the preamble is used as the second identification information. .
  • the processing module 2401 is further configured to carry a first service type identifier in the preamble of the second Ethernet packet, and the first service type identifier is used to indicate the second Ethernet packet. Type of message.
  • the processing module 2401 is specifically configured to generate the encoding of the second Ethernet packet in the physical encoding sublayer PCS, and the encoded block type is used as the second identification information.
  • the encoded block type is the block type of the start block of the second Ethernet packet.
  • the processing module 2401 is further configured to carry a second service type identifier in at least one byte after the encoded block type, where the second service type identifier is used to indicate the first 2 Types of Ethernet packets.
  • the processing module 2401 is further configured to negotiate with a second device to determine whether to support processing the first Ethernet type packet, and the first device and the second device are on the same link. both ends.
  • the transceiver module 2402 is further configured to negotiate with the second device whether to support processing the first EtherType packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information,
  • the negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet;
  • the transceiver module 2402 is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
  • the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information
  • the message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
  • an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
  • the Ethernet packet processing device in the foregoing embodiment may be a network device or user equipment, or may be a chip applied in the network device or other combined devices or components that can implement the functions of the foregoing network device.
  • the transceiver module may be a transceiver, and the transceiver may include an antenna and a radio frequency circuit, and the processing module may be a processor, such as a baseband chip.
  • the transceiver module may be a radio frequency unit, and the processing module may be a processor.
  • the receiving part of the transceiver module can be the input port of the chip system
  • the sending part of the transceiver module can be the output interface of the chip system
  • the processing module can be the chip system A processor, such as a central processing unit (CPU).
  • CPU central processing unit
  • the memory included in the Ethernet packet processing device is mainly used to store software programs and data, for example, to store the programs described in the foregoing embodiments.
  • the Ethernet packet processing device also has the following functions:
  • a processor configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet, and the first Ethernet type packet includes Ethernet packets whose frame length is less than 64 bytes;
  • a transceiver configured to send the second Ethernet packet.
  • the processor is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes, and the first device supports processing the first Ethernet type packet, the operation of carrying the second identification information in the second Ethernet packet is performed.
  • the processor is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes.
  • the frame length of the message is padded to 64 bytes and sent;
  • the second Ethernet packet When processing of the first Ethernet type packet is not supported and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the second Ethernet packet is sent, and the second Ethernet packet is sent.
  • the message does not carry the second identification information
  • the frame length of the second Ethernet packet is truncated to 1518 bytes and sent.
  • the transceiver is configured to receive a first Ethernet packet, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the first device supports processing a first ether type packet, where the first ether type packet includes an ether packet whose frame length is less than 64 bytes;
  • the processor is further configured to process the first Ethernet packet according to the first identification information.
  • the processor is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
  • the processor is further configured to discard the first Ethernet packet when the processing of the first Ethernet type packet is not supported and the first Ethernet packet is smaller than 64 bytes.
  • the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
  • the processor is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the frame header delimiter position information of the preamble is used as the second Ethernet packet. identification information.
  • the processor is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the frame header delimiter position information of the preamble is used as the second Ethernet packet. identification information.
  • the processor is specifically configured to generate a preamble of the second Ethernet packet at a medium access control layer MAC, and a target identification field in the preamble is used as the second identification information.
  • the processor is further configured to carry a first service type identifier in the preamble of the second Ethernet packet, and the first service type identifier is used to indicate the second Ethernet packet. type of text.
  • the processor is specifically configured to generate an encoding of the second Ethernet packet at the physical encoding sublayer PCS, and the encoded block type is used as the second identification information.
  • the encoded block type is the block type of the start block of the second Ethernet packet.
  • the processor is further configured to carry a second service type identifier in at least one byte after the encoded block type, where the second service type identifier is used to indicate the second service type identifier.
  • Type of Ethernet packet is further configured to carry a second service type identifier in at least one byte after the encoded block type, where the second service type identifier is used to indicate the second service type identifier.
  • the processor is further configured to negotiate with a second device to determine whether to support processing of the first Ethernet type packet, and the first device and the second device are on two sides of the same link. end.
  • the transceiver is further configured to negotiate with the second device whether to support processing the first Ether-type packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, so the The negotiation information is used to instruct the first device or the second device to support processing the first ether type packet;
  • the transceiver is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, so The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
  • the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information
  • the message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
  • an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
  • the embodiment of the present application also provides a processing device.
  • the processing device includes a processor and an interface; the processor is configured to execute the method for processing an Ethernet packet according to any of the foregoing method embodiments.
  • the above-mentioned processing device may be a chip, and the processor may be implemented by hardware or software.
  • the processor When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, The processor may be a general-purpose processor, and is implemented by reading software codes stored in a memory, which may be integrated in the processor, or located outside the processor, and exists independently.
  • the hardware processing circuit can be composed of discrete hardware components or an integrated circuit. In order to reduce power consumption and reduce size, it is usually implemented in the form of integrated circuits.
  • the hardware processing circuit may include ASIC (application-specific integrated circuit, application-specific integrated circuit), or PLD (programmable logic device, programmable logic device); wherein, PLD may include FPGA (field programmable gate array, field programmable gate array) , CPLD (complex programmable logic device, complex programmable logic device) and so on.
  • These hardware processing circuits can be a single semiconductor chip packaged separately (such as packaged into an ASIC); they can also be integrated with other circuits (such as CPU, DSP) and packaged into a semiconductor chip, for example, can be formed on a silicon substrate
  • a variety of hardware circuits and CPUs are individually packaged into a chip, which is also called SoC, or circuits and CPUs for implementing FPGA functions can also be formed on a silicon substrate and individually enclosed into a single chip. Also known as SoPC (system on a programmable chip, programmable system on a chip).
  • Embodiments of the present application further provide a computer-readable storage medium, including instructions, which, when run on a computer, cause the computer to control an Ethernet packet processing device to execute any one of the implementations shown in the foregoing method embodiments.
  • An embodiment of the present application also provides a computer program product, the computer program product includes computer program code, and when the computer program code is run on a computer, causes the computer to execute any one of the implementations shown in the foregoing method embodiments.
  • An embodiment of the present application further provides a chip system, including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the chip executes any one of the implementations shown in the foregoing method embodiments. Way.
  • Embodiments of the present application further provide a chip system, including a processor, where the processor is configured to call and run a computer program, so that the chip executes any one of the implementations shown in the foregoing method embodiments.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be A physical unit, which can be located in one place or distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website site, a computer, a first network device or a second network device, computing device, or data center to another website site, computer, first, by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) A network device or a second network device, computing device or data center transmits.
  • the computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a first network device or a second network device, a data center, etc. that includes one or more available media integrated.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B according to A does not mean that B is only determined according to A, and B may also be determined according to A and/or other information.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiments of the present application provide an Ethernet packet processing method and a related device, which are used for supporting the sending and processing of an Ethernet packet where the frame length of which is less than 64 bytes. The Ethernet packet processing method provided in the embodiments of the present application specifically comprises: after receiving a first Ethernet packet sent by a second device, a first device detecting whether the first Ethernet packet carries first identification information, wherein the first identification information is used for indicating that the second device supports the processing of a first-Ethernet-type packet, and the first-Ethernet-type packet comprises an Ethernet packet where the frame length of which is less than 64 bytes; and if the first Ethernet packet carries the first identification information, the first device processing the first Ethernet packet according to the first identification information.

Description

一种以太报文的处理方法以及相关设备An Ethernet packet processing method and related equipment
本申请要求于2021年03月17日提交中国国家知识产权局、申请号为202110286473.2、发明名称为“一种以太报文的处理方法以及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on March 17, 2021 with the State Intellectual Property Office of China, the application number is 202110286473.2, and the invention name is "An Ethernet message processing method and related equipment", the entire content of which is approved by Reference is incorporated in this application.
技术领域technical field
本申请涉及通信领域,尤其涉及一种以太报文的处理方法以及相关设备。The present application relates to the field of communications, and in particular, to a method for processing an Ethernet packet and related equipment.
背景技术Background technique
随着以太网标准的不断发展,以太接口速率不断提升,无论是当前步入商用的400GE以太接口,还是不久即将立项的800GbE/1.6TbE以太接口规格,以太网标准一直在追求着接口带宽的不断提速。从业务方面来说,以太网络也从传统的运营商承载网络,拓展到以服务器为主的云数据中心网络,乃至到当前以数据为中心,以大数据分析、人工智能(artificial intelligence,AI)应用和高性能计算业务为轴心的高性能低时延数据中心网络。With the continuous development of Ethernet standards, the rate of Ethernet interfaces continues to increase. Whether it is the 400GE Ethernet interface that is currently entering commercial use, or the 800GbE/1.6TbE Ethernet interface specification that will soon be established, the Ethernet standard has been pursuing the continuous improvement of interface bandwidth. Speed up. In terms of business, the Ethernet network has also expanded from the traditional carrier network to the server-based cloud data center network, and even to the current data-centric, big data analysis, artificial intelligence (AI) A high-performance and low-latency data center network with applications and high-performance computing services as the axis.
对于上述应用来说,不同的应用对应不同的消息特征。比如,高性能计算(high performance computing,HPC)应用的小消息占比较高,而AI这类应用大消息占比较高这样在以太网内部。目前的以太报文的转发限制为:对于小于64字节的以太报文通需要填充至64字节然后再发送,或者对于大于1518字节的以太报文需要截断至1518字节然后再发送。这样填充以太报文将会浪费有效带宽,并且消息转发量也存在限制;而截断以太报文将会造成单个以太报文的开销增加。For the above applications, different applications correspond to different message characteristics. For example, high performance computing (HPC) applications have a high proportion of small messages, while applications such as AI have a high proportion of large messages, which are inside Ethernet. The current forwarding limit of Ethernet packets is: for Ethernet packets smaller than 64 bytes, it needs to be padded to 64 bytes before sending, or for Ethernet packets larger than 1518 bytes, it needs to be truncated to 1518 bytes and then sent. Filling Ethernet packets in this way will waste effective bandwidth and limit the amount of message forwarding; truncating Ethernet packets will increase the overhead of a single Ethernet packet.
因此目前亟待解决帧长小于64字节的以太报文以及帧长大于1518字节的以太报文的转发问题。Therefore, it is urgent to solve the forwarding problem of Ethernet packets with frame lengths less than 64 bytes and Ethernet packets with frame lengths greater than 1518 bytes.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种以太报文的处理方法和相关设备,用于支持帧长小于64字节的以太报文以太报文的发送和处理。Embodiments of the present application provide an Ethernet packet processing method and related equipment, which are used to support the sending and processing of Ethernet packets whose frame length is less than 64 bytes.
第一方面,本申请实施例提供一种以太报文的处理方法,具体包括:该第一设备在接收第二设备发送的第一以太报文之后,检测该第一以太报文中是否携带第一标识信息,其中,该第一标识信息用于指示该第二设备支持处理第一以太类型报文,其中,该第一以太类型报文包括帧长小于64字节的以太报文;若该第一以太报文中携带该第一标识信息,则该第一设备根据该第一标识信息处理该第一以太报文。In a first aspect, an embodiment of the present application provides a method for processing an Ethernet packet, which specifically includes: after the first device receives the first Ethernet packet sent by the second device, detecting whether the first Ethernet packet carries the first Ethernet packet. identification information, wherein the first identification information is used to indicate that the second device supports processing a first Ethernet type packet, wherein the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes; if the If the first Ethernet packet carries the first identification information, the first device processes the first Ethernet packet according to the first identification information.
本实施例中,该第一以太类型报文在包括多种帧长的以太报文时,可以称为弹性以太(Flex Frame或Flex Ethernet Frame)类型报文或者计算以太(Computing Ethernet)类型报文;而针对不同帧长的以太报文,也可以有其他名称。比如对于帧长小于64字节的以太报文,该第一以太类型报文也可以称为迷你帧/小帧(Mini Frame)类型报文。In this embodiment, when the first Ethernet type packet includes Ethernet packets with multiple frame lengths, it may be referred to as a flexible Ethernet (Flex Frame or Flex Ethernet Frame) type packet or a computing Ethernet (Computing Ethernet) type packet ; and for Ethernet packets with different frame lengths, other names can also be given. For example, for an Ethernet packet whose frame length is less than 64 bytes, the first Ethernet type packet may also be referred to as a mini frame/mini frame (Mini Frame) type packet.
本实施例中,该第一设备在支持处理第一以太类型报文时,该第一设备在接收帧长小于64字节的以太报文时,根据标识信息进行以太报文的处理,从而使得以太协议栈能够支持帧长小于64字节的以太报文的接收处理,提高了以太网络的报文吞吐率。In this embodiment, when the first device supports processing of the first Ethernet type packet, when the first device receives an Ethernet packet whose frame length is less than 64 bytes, the first device processes the Ethernet packet according to the identification information, so that the The Ethernet protocol stack can support the receiving and processing of Ethernet packets whose frame length is less than 64 bytes, which improves the packet throughput rate of the Ethernet network.
结合第一方面,一种可能实现方式中,该第一设备在处理该第一以太报文之前还可以 进行如下步骤:In conjunction with the first aspect, in a possible implementation manner, the first device may also perform the following steps before processing the first Ethernet packet:
该第一设备确定该第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;若该第一设备支持处理该帧长小于64字节的以太报文,且该第一以太报文的帧长小于64字节,则该第一设备将执行根据该第一标识信息处理该第一以太报文的操作。The first device determines the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports processing the Ethernet packet whose frame length is less than 64 bytes, and the If the frame length of an Ethernet packet is less than 64 bytes, the first device will perform an operation of processing the first Ethernet packet according to the first identification information.
可选的,若该第一设备不支持处理第一以太类型报文,且该第一以太报文的帧长小于64字节时,则该第一设备将该第一以太报文丢弃。Optionally, if the first device does not support processing the first Ethernet packet, and the frame length of the first Ethernet packet is less than 64 bytes, the first device discards the first Ethernet packet.
本实施例中,该第一以太类型报文包括帧长小于64字节的以太报文和帧长大于1518字节的以太报文,这样该第一设备可以同时兼容处理小报文(帧长小于64字节的以太报文)、大报文(帧长大于要1518字节的以太报文)和现有以太网的以太报文。In this embodiment, the first Ethernet type packet includes an Ethernet packet with a frame length less than 64 bytes and an Ethernet packet with a frame length greater than 1518 bytes, so that the first device can simultaneously process small packets (frame length). Ethernet packets less than 64 bytes), large packets (Ether packets with a frame length greater than 1518 bytes), and existing Ethernet Ethernet packets.
结合第一方面的一种可能实现方式中,该第一设备还可以向其他设备发送第二以太报文。具体方式如下:In a possible implementation manner in combination with the first aspect, the first device may also send a second Ethernet packet to other devices. The specific methods are as follows:
该第一设备在该第二以太报文中携带第二标识信息,该第二标识信息用于指示该第一设备支持处理该第一以太类型报文,该第一以太类型报文包括帧长小于64字节的以太报文;最后该第一设备发送该第二以太报文。The first device carries second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing the first Ethernet type packet, and the first Ethernet type packet includes the frame length Ethernet packet less than 64 bytes; finally, the first device sends the second Ethernet packet.
本实施例中,该第一以太类型报文在包括多种帧长的以太报文时,可以称为弹性以太(Flex Frame或Flex Ethernet Frame)类型报文或者计算以太(Computing Ethernet)类型报文;而针对不同帧长的以太报文,也可以有其他名称。比如对于帧长小于64字节的以太报文,该第一以太类型报文也可以称为迷你帧/小帧(Mini Frame)类型报文。In this embodiment, when the first Ethernet type packet includes Ethernet packets with multiple frame lengths, it may be referred to as a flexible Ethernet (Flex Frame or Flex Ethernet Frame) type packet or a computing Ethernet (Computing Ethernet) type packet ; and for Ethernet packets with different frame lengths, other names can also be given. For example, for an Ethernet packet whose frame length is less than 64 bytes, the first Ethernet type packet may also be referred to as a mini frame/mini frame (Mini Frame) type packet.
本实施例中,该第一设备在支持处理第一以太类型报文时,对于帧长小于64字节的以太报文携带标识信息,使得以太协议栈中其他支持处理第一以太类型报文设备可以接收处理该帧长小于64字节的以太报文,从而提高了以太网络的报文吞吐率,以及由于对于帧长小于64字节的以太报文不再需要进行填充处理,报文overhead降低,从而提高该第一设备的发送效率。In this embodiment, when the first device supports processing of the first Ethernet type packet, the identification information is carried for the Ethernet packet whose frame length is less than 64 bytes, so that other devices in the Ethernet protocol stack that support processing the first Ethernet type packet It can receive and process Ethernet packets whose frame length is less than 64 bytes, thereby improving the packet throughput rate of the Ethernet network. Since the Ethernet packets whose frame length is less than 64 bytes no longer need to be filled, the packet overhead is reduced. , thereby improving the transmission efficiency of the first device.
结合第一方面,一种可能实现方式中,该第一设备在发送该第二以太报文之前还可以进行如下步骤:With reference to the first aspect, in a possible implementation manner, the first device may further perform the following steps before sending the second Ethernet packet:
一种可能实现方式中,该第一设备确定自身是否支持处理该第一以太类型报文,若该第一设备支持处理该第一以太类型报文,则该第一设备执行在该第二以太报文中携带第二标识信息的操作。即该第一设备只要使能自身支持处理该第一以太类型报文,则无需要判断该第二以太报文的帧长,可以直接在该第二以太报文中携带该第二标识信息。In a possible implementation manner, the first device determines whether it supports processing the first ether type packet, and if the first device supports processing the first ether type packet, the first device executes the execution in the second ether type packet. The operation of carrying the second identification information in the packet. That is, as long as the first device enables itself to support processing the first Ethernet type message, it does not need to judge the frame length of the second Ethernet message, and can directly carry the second identification information in the second Ethernet message.
另一种可能实现方式中,该第一设备确定该第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;若该第一设备支持处理该第一以太类型报文,且该第二以太报文的帧长小于64字节,则该第一设备将执行在该第二以太报文中携带该第二标识信息的操作。即该第一设备在使能自身支持处理该第一以太类型报文时,还需要判断该第二以太报文的帧长,只有在两个条件都满足的情况下,才可以在该第二以太报文中携带该第二标识信息。In another possible implementation manner, the first device determines the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports processing the first Ethernet type packet , and the frame length of the second Ethernet packet is less than 64 bytes, the first device will perform the operation of carrying the second identification information in the second Ethernet packet. That is, when the first device enables itself to support the processing of the first Ethernet type packet, it also needs to judge the frame length of the second Ethernet packet. The second identification information is carried in the Ethernet packet.
可选的,结合上述方案,在现有以太网的处理过程中,该第一设备可以将支持该第一以太类型报文的方案与不支持第一以太类型报文的方案结合实施,具体可以如下:Optionally, in combination with the above solution, in the existing Ethernet processing process, the first device may implement the solution that supports the first Ethernet type message and the solution that does not support the first Ethernet type message. as follows:
在该第一设备使能自身支持处理该第一以太类型报文时,该第一设备可以执行上述方案;若该第一设备使能自身不支持处理该第一以太类型报文时,该第一设备可以执行如下方案:When the first device enables itself to support the processing of the first ether type packet, the first device can execute the above solution; if the first device enables itself to not support processing the first ether type packet, the first device A device can perform the following schemes:
若该第一设备不支持处理该第一以太类型报文,且该第二以太报文的帧长小于64字节,则该第一设备将该第二以太报文的帧长填充至64字节,然后该第一设备将填充后的第二以太报文进行发送;若该第一设备不支持处理该第一以太类型报文,且所述第二以太报文的帧长大于1518字节,则该第一设备将该第二以太报文的帧长截断至1518字节,然后将该截断后的帧长为1518字节的以太报文进行发送,而超出1518字节的以太报文将再次进行判断之后再发送。比如,将该第二以太报文截断至1518字节之后,该第二以太报文超出1518字节的部分作为下一个以太报文进行发送。若该超出1518字节的部分的帧长小于64字节,则填充至64字节之后再发送;若该超出1518字节的部分的帧长大于1518字节,则再次截断至1518字节之后发送。而无论该第一设备是否支持处理该第一以太类型报文,但是该第二以太报文的帧长大于等于64字节且小于等于1518字节时,该第一设备都可以直接发送该第二以太报文。这样小报文(帧长小于64字节的以太报文)、大报文(帧长大于要1518字节的以太报文)和现有以太网的以太报文可以同时兼容。If the first device does not support processing the first Ethernet packet, and the frame length of the second Ethernet packet is less than 64 bytes, the first device fills the frame length of the second Ethernet packet to 64 bytes section, and then the first device sends the filled second Ethernet packet; if the first device does not support processing the first Ethernet type packet, and the frame length of the second Ethernet packet is greater than 1518 bytes , the first device truncates the frame length of the second Ethernet packet to 1518 bytes, and then sends the truncated Ethernet packet with a frame length of 1518 bytes, while the Ethernet packet exceeding 1518 bytes is sent. It will be judged again before sending. For example, after truncating the second Ethernet packet to 1518 bytes, the part of the second Ethernet packet exceeding 1518 bytes is sent as the next Ethernet packet. If the frame length of the part exceeding 1518 bytes is less than 64 bytes, it will be padded to 64 bytes before sending; if the frame length of the part exceeding 1518 bytes will be greater than 1518 bytes, it will be truncated to 1518 bytes later send. Regardless of whether the first device supports processing the first Ethernet type packet, but the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the first device can directly send the first Ethernet packet. Two Ethernet packets. In this way, small packets (Ethernet packets with a frame length of less than 64 bytes), large packets (Ethernet packets with a frame length greater than 1518 bytes) and existing Ethernet packets can be compatible at the same time.
在上述方案中,该第一设备可以读取自身寄存器中的标识信息使能自身是否支持处理所述第一以太类型报文。比如,该第一设备中可以通过物理层的硬件升级(如应用新的芯片,或刷入新的现场可编程逻辑门阵列(field programmable gate array,FPGA代码)来实现支持处理所述第一以太类型报文的功能。In the above solution, the first device can read the identification information in its own register to enable itself whether it supports processing the first ether type message. For example, the first device can be implemented to support processing the first Ethernet through hardware upgrades at the physical layer (such as applying a new chip, or flashing a new field programmable gate array (FPGA code)) Type of message function.
结合上述方面,一种可能实现方式中,该第一以太类型报文还包括帧长大于等于于64字节且小于等于1518字节的以太报文。即该第一设备对于任意一个帧长的以太报文都进行标识。With reference to the above aspects, in a possible implementation manner, the first Ethernet type packet further includes an Ethernet packet with a frame length greater than or equal to 64 bytes and less than or equal to 1518 bytes. That is, the first device identifies an Ethernet packet with any frame length.
结合第一方面,该第一设备根据该第一标识信息处理该第一以太报文的具体做法可以如下几种可能实现方式:With reference to the first aspect, the specific method of processing the first Ethernet packet by the first device according to the first identification information may be implemented in the following possible ways:
一种可能实现方式中,该第一设备检测该第一以太报文在介质访问控制层(media access control,MAC)生成的前导码,该前层码的帧首定界符(start frame delimiter,SFD)位置信息作为该第一标识信息;然后该第一设备根据该第一标识信息处理该第一以太报文。即在前导码中,可以用区别于现有以太报文中的帧首定界符位置信息来作为该第一标识信息。In a possible implementation, the first device detects the preamble that the first Ethernet message generates at the media access control layer (media access control, MAC), and the frame head delimiter (start frame delimiter, SFD) location information as the first identification information; then the first device processes the first Ethernet packet according to the first identification information. That is, in the preamble, the position information of the frame header delimiter which is different from the existing Ethernet packet can be used as the first identification information.
另一种可能实现方式中,该第一设备检测该第一以太报文在MAC层生成的前导码,该前导码中的目标标识字段作为该第一标识信息;然后该第一设备根据该第一标识信息处理该第一以太报文。即在前导码中,可以用特定的标识字段作为该第一标识信息。具体来说,该目标标识字段可以位置于SFD之后,循环冗余校验(cyclic redundancy check,CRC)之前的任意位置。可以理解的是,该帧首定界符位置信息与该目标标识字段可以同时作为该第一标识信息,只要可以正确指示该第一以太报文的帧长即可。本实施例中,该目标标识字段也可以称为计算以太标识(Computing Ethernet),计算标识(Computing)或者迷你帧(Mini Frame)标识、弹性以太标识(Flex Ethernet)等。其具体可以是0x5F等其 他未使用过的字段。In another possible implementation manner, the first device detects a preamble generated by the first Ethernet packet at the MAC layer, and the target identification field in the preamble is used as the first identification information; An identification information processes the first Ethernet packet. That is, in the preamble, a specific identification field can be used as the first identification information. Specifically, the target identification field may be located at any position after the SFD and before the cyclic redundancy check (cyclic redundancy check, CRC). It can be understood that the position information of the frame head delimiter and the target identification field can be used as the first identification information at the same time, as long as the frame length of the first Ethernet packet can be correctly indicated. In this embodiment, the target identification field may also be referred to as a computing Ethernet identification (Computing Ethernet), a computing identification (Computing) or a mini frame (Mini Frame) identification, a flexible Ethernet identification (Flex Ethernet), and the like. Specifically, it can be other unused fields such as 0x5F.
另一种可能实现方式中,该第一设备检测物理编码子层(physical coding sublayer,PCS)生成的该第一以太报文的编码,其中,该编码的块类型作为该第一标识信息;然后该第一设备根据该第一标识信息处理该第一以太报文。可以理解的是,该块类型的编码可以是区别于现有块类型的编码。比如0x00;或者可以选取IEEE 802.3-2018版表格中没有选取的编码,但需要保证与其他编码的汉明距离至少为4,例如0xE1。本实施例中,该编码的块类型可以包括该第一以太报文在编码过程中生成的至少一个块的块类型。比如该第一以太报文在编码过程中生成了两个块(block),则可以利用该第一以太报文的开始块的块类型指示该第一标识信息;可以利用该第一以太报文的第二个块的块类型指示该第一标识信息;可以同时利用该第一以太报文的开始块的块类型和该第二个块的块类型指示该第一标识信息。具体方式此处不做限定。In another possible implementation manner, the first device detects the encoding of the first Ethernet packet generated by a physical coding sublayer (PCS), wherein the encoded block type is used as the first identification information; then The first device processes the first Ethernet packet according to the first identification information. It can be understood that the encoding of the block type may be different from the encoding of the existing block type. For example, 0x00; or you can select codes that are not selected in the IEEE 802.3-2018 table, but you need to ensure that the Hamming distance from other codes is at least 4, such as 0xE1. In this embodiment, the encoded block type may include the block type of at least one block generated during the encoding process of the first Ethernet packet. For example, two blocks (blocks) are generated in the first Ethernet packet during the encoding process, and the block type of the start block of the first Ethernet packet can be used to indicate the first identification information; the first Ethernet packet can be used to indicate the first identification information. The block type of the second block indicates the first identification information; the first identification information can be indicated by the block type of the start block of the first Ethernet packet and the block type of the second block at the same time. The specific method is not limited here.
可以理解的是,上述两种方式,该第一设备可以分别使用也可以同时使用。即该第一设备可以单独检测在MAC层携带的该第一标识信息,可以单独检测该PCS层携带的该第一标识信息也可以同时检测MAC层和PCS层携带的该第一标识信息。上述描述了该第一设备检测该第一以太报文中携带的第一标识信息的方法。而该第一设备在第二以太报文中携带该第二标识信息时也可以是采用上述方式。具体此处不再赘述。It can be understood that, in the above two manners, the first devices can be used separately or simultaneously. That is, the first device can independently detect the first identification information carried in the MAC layer, can detect the first identification information carried in the PCS layer alone, or can simultaneously detect the first identification information carried in the MAC layer and the PCS layer. The above describes the method for the first device to detect the first identification information carried in the first Ethernet packet. When the first device carries the second identification information in the second Ethernet packet, the above-mentioned manner may also be used. The details are not repeated here.
结合上述可能实现方式,若该第一标识信息仅用于指示该第二设备可以支持处理第一以太类型报文,则该第一设备还可以检测该第一以太报文中携带的用于指示该第一以太报文的帧长类型的服务类型标识。此处,该第一以太报文的帧长类型可以为小报文(即帧长小于64字节的以太报文)、大报文(即帧长大于1518字节的以太报文)以及帧长小于等于64字节且小于等于1518字节的以太报文。因此该第一设备检测该第一以太报文中携带的该服务类型标识的方式具体可以如下:In combination with the above possible implementations, if the first identification information is only used to indicate that the second device can support processing the first Ethernet type packet, the first device can also detect the first Ethernet packet carried in the first Ethernet packet for indicating The service type identifier of the frame length type of the first Ethernet packet. Here, the frame length type of the first Ethernet packet may be a small packet (that is, an Ethernet packet with a frame length of less than 64 bytes), a large packet (that is, an Ethernet packet with a frame length greater than 1518 bytes), and a frame Ethernet packets whose length is less than or equal to 64 bytes and less than or equal to 1518 bytes. Therefore, the specific manner in which the first device detects the service type identifier carried in the first Ethernet packet may be as follows:
一种可能实现方式中,该第一设备检测该第一以太报文的前导码中携带的该服务类型标识。具体来说,该第二设备可以分别使用不同的标识字段标识该以太报文的帧长类型。该服务类型标识可以位于上述目标标识字段之后,CRC之前。In a possible implementation manner, the first device detects the service type identifier carried in the preamble of the first Ethernet packet. Specifically, the second device may use different identification fields to identify the frame length type of the Ethernet packet. The service type identifier may be located after the above target identifier field and before the CRC.
另一种可能实现方式中,该第一设备检测该第一以太报文在PCS层进行编码时,在所述第一以太报文的块类型之后的至少一字节中携带的该服务类型标识。In another possible implementation manner, when the first device detects that the first Ethernet packet is encoded at the PCS layer, the service type identifier carried in at least one byte after the block type of the first Ethernet packet .
可选的,本实施例中,该第一以太类型报文也还可以包括帧长大于1518字节的以太报文。本实施例中该帧长大于1518字节的以太报文的处理方式与该帧长小于64字节的以太报文的处理方式相同,具体此处不再赘述。Optionally, in this embodiment, the first Ethernet type packet may also include an Ethernet packet with a frame length greater than 1518 bytes. In this embodiment, the processing method of the Ethernet packet whose frame length is greater than 1518 bytes is the same as that of the Ethernet packet whose frame length is less than 64 bytes, and details are not described herein again.
结合第一方面,一种可能实现方式中,该第一设备在处理该第一以太报文之前,还可以与第二设备协商确定双方是否支持处理所述第一以太类型报文。比如,该第一设备为交换机A,该第二设备为与该交换机A处于同一链路的交换机B,且该交换机A与该交换机B之间进行数据传输。With reference to the first aspect, in a possible implementation manner, before processing the first Ethernet packet, the first device may further negotiate with the second device to determine whether both parties support processing the first Ethernet type packet. For example, the first device is switch A, the second device is switch B that is on the same link with switch A, and data transmission is performed between switch A and switch B.
可选的,该第一设备与该第二设备可以采用如下几种可能实现方式进行协商:Optionally, the first device and the second device may negotiate in the following possible implementation manners:
一种可能实现方式中,该第一设备与该第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述 第一设备或所述第二设备支持处理所述第一以太类型报文。In a possible implementation manner, the first device and the second device negotiate whether to support processing the first Ethernet packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, and the negotiation information is used for Instructing the first device or the second device to support processing of the first Ethernet type packet.
可选的,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;或者所述自协商脉冲的链路编码字扩展页中的消息代码值(即Message Code value)指示所述协商信息。Optionally, the bits that have not been used in the link code word base page of the self-negotiation pulse indicate the negotiation information; or the message code value (that is, the Message Code value in the link code word extension page of the self-negotiation pulse) value) indicates the negotiation information.
另一种可能实现方式中,该第一设备与该第二设备通过发送发送链路层发现协议(link layer discovery protocol,LLDP)协商是否支持处理所述第一以太类型报文,所述LLDP中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。In another possible implementation manner, the first device and the second device negotiate whether to support processing the first Ethernet type packet by sending and sending a link layer discovery protocol (LLDP). Carrying the negotiation information, where the negotiation information is used to indicate that the first device or the second device supports processing the first Ethernet type packet.
可选的,所述LLDP中生成弹性以太TLV类型,所述TLV类型指示所述协商信息。第二方面,本申请实施例提供一种以太报文的处理方法,具体包括:第一设备在发送第二以太报文时,在该第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;然后该第一设备发送该第二以太报文。Optionally, an elastic Ethernet TLV type is generated in the LLDP, and the TLV type indicates the negotiation information. In a second aspect, an embodiment of the present application provides a method for processing an Ethernet packet, which specifically includes: when a first device sends a second Ethernet packet, carrying second identification information in the second Ethernet packet, and the first device carries second identification information in the second Ethernet packet. The second identification information is used to indicate that the first device supports processing of the first Ethernet type packet, and the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes; then the first device sends the second Ethernet packet message.
该第一以太类型报文在包括多种帧长的以太报文时,可以称为弹性以太(Flex Frame或Flex Ethernet Frame)类型报文或者计算以太(Computing Ethernet)类型报文;而针对不同帧长的以太报文,也可以有其他名称。比如对于帧长小于64字节的以太报文,该第一以太类型报文也可以称为迷你帧/小帧(Mini Frame)类型报文。When the first Ethernet type packet includes Ethernet packets with multiple frame lengths, it may be called a Flex Frame (Flex Frame or Flex Ethernet Frame) type packet or a Computing Ethernet (Computing Ethernet) type packet; and for different frames Long Ethernet packets, which may have other names. For example, for an Ethernet packet whose frame length is less than 64 bytes, the first Ethernet type packet may also be referred to as a mini frame/mini frame (Mini Frame) type packet.
本实施例中,该第一设备在支持处理第一以太类型报文时,对于帧长小于64字节的以太报文携带标识信息,使得以太协议栈中其他支持处理第一以太类型报文设备可以接收处理该帧长小于64字节的以太报文,从而提高了以太网络的报文吞吐率,以及由于对于帧长小于64字节的以太报文不再需要进行填充处理,报文overhead降低,从而提高该第一设备的发送效率。In this embodiment, when the first device supports processing of the first Ethernet type packet, the identification information is carried for the Ethernet packet whose frame length is less than 64 bytes, so that other devices in the Ethernet protocol stack that support processing the first Ethernet type packet It can receive and process Ethernet packets whose frame length is less than 64 bytes, thereby improving the packet throughput rate of the Ethernet network. Since the Ethernet packets whose frame length is less than 64 bytes no longer need to be filled, the packet overhead is reduced. , thereby improving the transmission efficiency of the first device.
结合第一方面,一种可能实现方式中,该第一设备在发送该第二以太报文之前还可以进行如下步骤:With reference to the first aspect, in a possible implementation manner, the first device may further perform the following steps before sending the second Ethernet packet:
一种可能实现方式中,该第一设备确定自身是否支持处理该第一以太类型报文,若该第一设备支持处理该第一以太类型报文,则该第一设备执行在该第二以太报文中携带第二标识信息的操作。即该第一设备只要使能自身支持处理该第一以太类型报文,则无需要判断该第二以太报文的帧长,可以直接在该第二以太报文中携带该第二标识信息。In a possible implementation manner, the first device determines whether it supports processing the first ether type packet, and if the first device supports processing the first ether type packet, the first device executes the execution in the second ether type packet. The operation of carrying the second identification information in the packet. That is, as long as the first device enables itself to support processing the first Ethernet type message, it does not need to judge the frame length of the second Ethernet message, and can directly carry the second identification information in the second Ethernet message.
另一种可能实现方式中,该第一设备确定该第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;若该第一设备支持处理该第一以太类型报文,且该第二以太报文的帧长小于64字节,则该第一设备将执行在该第二以太报文中携带该第二标识信息的操作。即该第一设备在使能自身支持处理该第一以太类型报文时,还需要判断该第二以太报文的帧长,只有在两个条件都满足的情况下,才可以在该第二以太报文中携带该第二标识信息。In another possible implementation manner, the first device determines the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports processing the first Ethernet type packet , and the frame length of the second Ethernet packet is less than 64 bytes, the first device will perform the operation of carrying the second identification information in the second Ethernet packet. That is, when the first device enables itself to support the processing of the first Ethernet type packet, it also needs to judge the frame length of the second Ethernet packet. The second identification information is carried in the Ethernet packet.
可选的,结合上述方案,在现有以太网的处理过程中,该第一设备可以将支持该第一以太类型报文的方案与不支持第一以太类型报文的方案结合实施,具体可以如下:Optionally, in combination with the above solution, in the existing Ethernet processing process, the first device may implement the solution that supports the first Ethernet type message and the solution that does not support the first Ethernet type message. as follows:
在该第一设备使能自身支持处理该第一以太类型报文时,该第一设备可以执行上述方 案;若该第一设备使能自身不支持处理该第一以太类型报文时,该第一设备可以执行如下方案:When the first device enables itself to support the processing of the first ether type packet, the first device can execute the above solution; if the first device enables itself to not support processing the first ether type packet, the first device A device can perform the following schemes:
若该第一设备不支持处理该第一以太类型报文,且该第二以太报文的帧长小于64字节,则该第一设备将该第二以太报文的帧长填充至64字节,然后该第一设备将填充后的第二以太报文进行发送;若该第一设备不支持处理该第一以太类型报文,且所述第二以太报文的帧长大于1518字节,则该第一设备将该第二以太报文的帧长截断至1518字节,然后将该截断后的帧长为1518字节的以太报文进行发送,而超出1518字节的以太报文将再次进行判断之后再发送。比如,将该第二以太报文截断至1518字节之后,该第二以太报文超出1518字节的部分作为下一个以太报文进行发送。若该超出1518字节的部分的帧长小于64字节,则填充至64字节之后再发送;若该超出1518字节的部分的帧长大于1518字节,则再次截断至1518字节之后发送。而无论该第一设备是否支持处理该第一以太类型报文,但是该第二以太报文的帧长大于等于64字节且小于等于1518字节时,该第一设备都可以直接发送该第二以太报文。这样小报文(帧长小于64字节的以太报文)、大报文(帧长大于要1518字节的以太报文)和现有以太网的以太报文可以同时兼容。If the first device does not support processing the first Ethernet packet, and the frame length of the second Ethernet packet is less than 64 bytes, the first device fills the frame length of the second Ethernet packet to 64 bytes section, and then the first device sends the filled second Ethernet packet; if the first device does not support processing the first Ethernet type packet, and the frame length of the second Ethernet packet is greater than 1518 bytes , the first device truncates the frame length of the second Ethernet packet to 1518 bytes, and then sends the truncated Ethernet packet with a frame length of 1518 bytes, while the Ethernet packet exceeding 1518 bytes is sent. It will be judged again before sending. For example, after truncating the second Ethernet packet to 1518 bytes, the part of the second Ethernet packet exceeding 1518 bytes is sent as the next Ethernet packet. If the frame length of the part exceeding 1518 bytes is less than 64 bytes, it will be padded to 64 bytes before sending; if the frame length of the part exceeding 1518 bytes will be greater than 1518 bytes, it will be truncated to 1518 bytes later send. Regardless of whether the first device supports processing the first Ethernet type packet, but the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the first device can directly send the first Ethernet packet. Two Ethernet packets. In this way, small packets (Ethernet packets with a frame length of less than 64 bytes), large packets (Ethernet packets with a frame length greater than 1518 bytes) and existing Ethernet packets can be compatible at the same time.
在上述方案中,该第一设备可以读取自身寄存器中的标识信息使能自身是否支持处理所述第一以太类型报文。比如,该第一设备中可以通过物理层的硬件升级(如应用新的芯片,或刷入新的现场可编程逻辑门阵列(field programmable gate array,FPGA代码)来实现支持处理所述第一以太类型报文的功能。In the above solution, the first device can read the identification information in its own register to enable itself whether it supports processing the first ether type message. For example, the first device can be implemented to support processing the first Ethernet through hardware upgrades at the physical layer (such as applying a new chip, or flashing a new field programmable gate array (FPGA code)) Type of message function.
结合第一方面,一种可能实现方式中,在以太报文的传输过程中,该第一设备还可以接收第一以太报文,该第一以太报文中携带第一标识信息,该第一标识信息用于指示第二设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文,所述第二设备与所述第一设备处于同一链路的两端;然后该第一设备根据该第一标识信息处理该第一以太报文。In combination with the first aspect, in a possible implementation manner, during the transmission of an Ethernet packet, the first device may also receive a first Ethernet packet, where the first Ethernet packet carries first identification information, and the first Ethernet packet carries first identification information. The identification information is used to indicate that the second device supports processing of the first Ethernet type packet, the first Ethernet type packet includes an Ethernet packet with a frame length of less than 64 bytes, and the second device and the first device are in the same two ends of the link; then the first device processes the first Ethernet packet according to the first identification information.
本实施例中,该第一设备在接收帧长小于64字节的以太报文时,根据标识信息进行以太报文的处理,从而使得以太协议栈能够支持帧长小于64字节的以太报文发送和处理,提高了以太网络的报文吞吐率。In this embodiment, when receiving an Ethernet packet with a frame length of less than 64 bytes, the first device processes the Ethernet packet according to the identification information, so that the Ethernet protocol stack can support the Ethernet packet with a frame length of less than 64 bytes. Sending and processing improves the packet throughput of the Ethernet network.
结合第一方面,一种可能实现方式中,该第一设备在处理该第一以太报文之前还可以进行如下步骤:With reference to the first aspect, in a possible implementation manner, the first device may further perform the following steps before processing the first Ethernet packet:
该第一设备确定该第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;若该第一设备支持转发该帧长小于64字节的以太报文,且该第一以太报文的帧长小于64字节或者所述第一以太报文的帧长大于1518字节,则该第一设备将执行处理该第一以太报文的操作。The first device determines the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; if the first device supports forwarding the Ethernet packet whose frame length is less than 64 bytes, and the If the frame length of an Ethernet packet is less than 64 bytes or the frame length of the first Ethernet packet is greater than 1518 bytes, the first device will perform an operation of processing the first Ethernet packet.
可选的,若该第一设备不支持处理该帧长小于64字节或者帧长大于1518字节的以太报文,且该第一以太报文的帧长小于64字节或者该第一以太报文的帧长大于1518字节,则该第一设备将该第一以太报文丢弃。这样小报文(帧长小于64字节的以太报文)、大报文(帧长大于要1518字节的以太报文)和现有以太网的以太报文可以同时兼容。Optionally, if the first device does not support processing Ethernet packets whose frame length is less than 64 bytes or whose frame length is greater than 1518 bytes, and the frame length of the first Ethernet packet is less than 64 bytes or the first Ethernet packet If the frame length of the packet is greater than 1518 bytes, the first device discards the first Ethernet packet. In this way, small packets (Ethernet packets with a frame length of less than 64 bytes), large packets (Ethernet packets with a frame length greater than 1518 bytes) and existing Ethernet packets can be compatible at the same time.
结合第一方面,一种可能实现方式中,该第一标识信息还可以指示该第一以太报文的 帧长大于等于于64字节且小于等于1518字节的以太报文。即该第一设备对于任意一个帧长的以太报文都进行标识。With reference to the first aspect, in a possible implementation manner, the first identification information may further indicate that the frame length of the first Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes of Ethernet packets. That is, the first device identifies an Ethernet packet with any frame length.
结合第一方面,该第一设备在该第二以太报文中携带第二标识信息的具体做法可以如下几种可能实现方式:With reference to the first aspect, the specific method for the first device to carry the second identification information in the second Ethernet packet may be implemented in the following possible ways:
一种可能实现方式中,该第一设备在介质访问控制层(media access control,MAC)生成前导码,该前层码的帧首定界符(start frame delimiter,SFD)位置信息作为该第二标识信息。即在前导码中,可以用区别于现有以太报文中的帧首定界符位置信息来作为该第二标识信息。In a possible implementation, the first device generates a preamble at the media access control layer (media access control, MAC), and the frame head delimiter (start frame delimiter, SFD) position information of the preamble is used as the second. identification information. That is, in the preamble, the position information of the frame header delimiter that is different from the existing Ethernet packet can be used as the second identification information.
另一种可能实现方式中,该第一设备在MAC层生成前导码,该前导码中的目标标识字段作为该第二标识信息。即在前导码中,可以用特定的标识字段作为该第二标识信息。具体来说,该目标标识字段可以位置于SFD之后,循环冗余校验(cyclic redundancy check,CRC)之前的任意位置。可以理解的是,该帧首定界符位置信息与该目标标识字段可以同时作为该第二标识信息,只要可以正确指示该第二以太报文的帧长即可。本实施例中,该目标标识字段也可以称为计算以太标识(Computing Ethernet),计算标识(Computing)或者迷你帧(Mini Frame)标识、弹性以太标识(Flex Ethernet)等。其具体可以是0x5F等其他未使用过的字段。In another possible implementation manner, the first device generates a preamble at the MAC layer, and a target identification field in the preamble is used as the second identification information. That is, in the preamble, a specific identification field can be used as the second identification information. Specifically, the target identification field may be located at any position after the SFD and before the cyclic redundancy check (cyclic redundancy check, CRC). It can be understood that the frame head delimiter position information and the target identification field can be used as the second identification information at the same time, as long as the frame length of the second Ethernet packet can be correctly indicated. In this embodiment, the target identification field may also be referred to as a computing Ethernet identification (Computing Ethernet), a computing identification (Computing) or a mini frame (Mini Frame) identification, a flexible Ethernet identification (Flex Ethernet), and the like. Specifically, it can be other unused fields such as 0x5F.
另一种可能实现方式中,该第一设备在物理编码子层(physical coding sublayer,PCS)生成该第二以太报文的编码,其中,该编码的块类型作为该第二标识信息。可以理解的是,该块类型的编码可以是区别于现有块类型的编码。比如0x00;或者可以选取IEEE802.3-2018版表格中没有选取的编码,但需要保证与其他编码的汉明距离至少为4,例如0xE1。本实施例中,该编码的块类型可以包括该第二以太报文在编码过程中生成的至少一个块的块类型。比如该第二以太报文在编码过程中生成了两个块(block),则可以利用该第二以太报文的开始块的块类型指示该第二标识信息;可以利用该第二以太报文的第二个块的块类型指示该第二标识信息;可以同时利用该第二以太报文的开始块的块类型和该第二个块的块类型指示该第二标识信息。具体方式此处不做限定。In another possible implementation manner, the first device generates a code of the second Ethernet packet in a physical coding sublayer (physical coding sublayer, PCS), where the block type of the code is used as the second identification information. It can be understood that the encoding of the block type may be different from the encoding of the existing block type. For example, 0x00; or you can select codes that are not selected in the IEEE802.3-2018 version table, but you need to ensure that the Hamming distance from other codes is at least 4, such as 0xE1. In this embodiment, the encoded block type may include the block type of at least one block generated during the encoding process of the second Ethernet packet. For example, in the encoding process of the second Ethernet packet, two blocks (blocks) are generated, and the block type of the start block of the second Ethernet packet can be used to indicate the second identification information; the second Ethernet packet can be used to indicate the second identification information. The block type of the second block of the second block indicates the second identification information; the block type of the start block of the second Ethernet packet and the block type of the second block can be used to indicate the second identification information. The specific method is not limited here.
可以理解的是,上述两种方式,该第一设备可以分别使用也可以同时使用。即该第一设备可以单独在MAC层携带该第二标识信息,可以单独在该PCS层携带该第二标识信息也可以同时在MAC层和PCS层携带该第二标识信息。上述描述了该第一设备在该第二以太报文中携带第二标识信息的方法,而该第二以太报文也可以是由其他设备采用上述方式携带该第二标识信息。具体此处不再赘述。It can be understood that, in the above two manners, the first devices can be used separately or simultaneously. That is, the first device may carry the second identification information at the MAC layer alone, may carry the second identification information at the PCS layer alone, or may simultaneously carry the second identification information at the MAC layer and the PCS layer. The above describes the method for the first device to carry the second identification information in the second Ethernet packet, and the second Ethernet packet may also be carried by other devices in the above-mentioned manner. The details are not repeated here.
结合上述可能实现方式,若该第二标识信息仅用于指示该第一设备可以支持处理第一以太类型报文,则该第一设备还可以在该第二以太报文中携带用于指示该第二以太报文的帧长类型的服务类型标识。此处,该第二以太报文的帧长类型可以为小报文(即帧长小于64字节的以太报文)、大报文(即帧长大于1518字节的以太报文)以及帧长小于等于64字节且小于等于1518字节的以太报文。因此该第一设备在该第二以太报文中携带该服务类型标识的方式具体可以如下:In combination with the above possible implementations, if the second identification information is only used to indicate that the first device can support processing the first Ethernet type packet, the first device may also carry in the second Ethernet packet to indicate the The service type identifier of the frame length type of the second Ethernet packet. Here, the frame length type of the second Ethernet packet may be a small packet (that is, an Ethernet packet with a frame length of less than 64 bytes), a large packet (that is, an Ethernet packet with a frame length greater than 1518 bytes), and a frame Ethernet packets whose length is less than or equal to 64 bytes and less than or equal to 1518 bytes. Therefore, the specific manner in which the first device carries the service type identifier in the second Ethernet packet may be as follows:
一种可能实现方式中,该第二以太报文的前导码中携带该服务类型标识。具体来说, 该第一设备可以分别使用不同的标识字段标识该以太报文的帧长类型。该服务类型标识可以位于上述目标标识字段之后,CRC之前。In a possible implementation manner, the service type identifier is carried in the preamble of the second Ethernet packet. Specifically, the first device may use different identification fields to identify the frame length type of the Ethernet packet. The service type identifier may be located after the above target identifier field and before the CRC.
另一种可能实现方式中,该第二以太报文在PCS层进行编码时,在所述第二以太报文的块类型之后的至少一字节中携带该服务类型标识。In another possible implementation manner, when the second Ethernet packet is encoded at the PCS layer, the service type identifier is carried in at least one byte after the block type of the second Ethernet packet.
可选的,本实施例中,该第一以太类型报文也还可以包括帧长大于1518字节的以太报文。本实施例中该帧长大于1518字节的以太报文的处理方式与该帧长小于64字节的以太报文的处理方式相同,具体此处不再赘述。Optionally, in this embodiment, the first Ethernet type packet may also include an Ethernet packet with a frame length greater than 1518 bytes. In this embodiment, the processing method of the Ethernet packet whose frame length is greater than 1518 bytes is the same as that of the Ethernet packet whose frame length is less than 64 bytes, and details are not described herein again.
结合第一方面,一种可能实现方式中,该第一设备在发送该第二以太报文之前,还可以与第二设备协商确定双方是否支持处理所述第一以太类型报文。此时,该第一设备与该第二设备为处于同一链路两端的设备。比如,该第一设备为交换机A,该第二设备为与该交换机A处于同一链路的交换机B,且该交换机A与该交换机B之间进行数据传输。With reference to the first aspect, in a possible implementation manner, before sending the second Ethernet packet, the first device may further negotiate with the second device to determine whether both parties support processing the first Ethernet type packet. At this time, the first device and the second device are devices at two ends of the same link. For example, the first device is switch A, the second device is switch B that is on the same link with switch A, and data transmission is performed between switch A and switch B.
可选的,该第一设备与该第二设备可以采用如下几种可能实现方式进行协商:Optionally, the first device and the second device may negotiate in the following possible implementation manners:
一种可能实现方式中,该第一设备与该第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。In a possible implementation manner, the first device and the second device negotiate whether to support processing the first Ethernet packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, and the negotiation information is used for Instructing the first device or the second device to support processing of the first Ethernet type packet.
可选的,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;或者所述自协商脉冲的链路编码字扩展页中的消息代码值(即Message Code value)指示所述协商信息。Optionally, the bits that have not been used in the link code word base page of the self-negotiation pulse indicate the negotiation information; or the message code value (that is, the Message Code value in the link code word extension page of the self-negotiation pulse) value) indicates the negotiation information.
另一种可能实现方式中,该第一设备与该第二设备通过发送发送链路层发现协议(link layer discovery protocol,LLDP)协商是否支持处理所述第一以太类型报文,所述LLDP中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。In another possible implementation manner, the first device and the second device negotiate whether to support processing the first Ethernet type packet by sending and sending a link layer discovery protocol (LLDP). Carrying the negotiation information, where the negotiation information is used to indicate that the first device or the second device supports processing the first Ethernet type packet.
可选的,所述LLDP中生成弹性以太TLV类型,所述TLV类型指示所述协商信息。Optionally, an elastic Ethernet TLV type is generated in the LLDP, and the TLV type indicates the negotiation information.
第三方面,本申请提供一种以太报文处理设备,该以太报文处理设备具有实现上述第一方面中第一设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a third aspect, the present application provides an Ethernet packet processing device having a function of implementing the behavior of the first device in the first aspect above. This function can be implemented by hardware or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的实现方式中,该以太报文处理设备包括用于执行以上第一方面各个步骤的单元或模块。例如,该设备包括:收发模块,用于接收第二设备发送的第一以太报文,该第一以太报文携带第一标识信息,该第一标识信息用于指示该第二设备支持处理第一以太类型模块,该第一以太类型报文包括帧长小于64字节的以太报文;In a possible implementation manner, the Ethernet packet processing device includes a unit or module for executing each step of the above first aspect. For example, the device includes: a transceiver module configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet packet. an ether type module, the first ether type message includes an ether message whose frame length is less than 64 bytes;
处理模块,根据该第一标识信息处理该第一以太报文。The processing module processes the first Ethernet packet according to the first identification information.
可选的,还包括存储模块,用于保存第一设备必要的程序指令和数据。Optionally, it also includes a storage module for storing necessary program instructions and data of the first device.
在一种可能的实现方式中,该装置包括:处理器和收发器,该处理器被配置为支持第一设备执行上述第一方面提供的方法中相应的功能。收发器用于指示第一设备和第二设备之间的通信,向第二设备发送上述方法中所涉及的以太报文。可选的,此装置还可以包括存储器,该存储器用于与处理器耦合,其保存第一设备必要的程序指令和数据。In a possible implementation manner, the apparatus includes: a processor and a transceiver, where the processor is configured to support the first device to perform corresponding functions in the method provided in the first aspect. The transceiver is used to instruct the communication between the first device and the second device, and send the Ethernet packet involved in the above method to the second device. Optionally, the apparatus may further include a memory, which is used for coupling with the processor, and which stores necessary program instructions and data of the first device.
在一种可能的实现方式中,当该装置为第一设备内的芯片时,该芯片包括:处理模块 和收发模块。该收发模块,该收发模块例如可以是该芯片上的输入/输出接口、管脚或电路等,接收天线接收到的信号,比如接收该第二设备发送的第一以太报文,并将该第一以太报文传送给与此芯片耦合的其他芯片或模块中,其中,该第一以太报文中携带第一标识信息,所述第一标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文。该处理模块例如可以是处理器,此处理器用于根据该第一标识信息处理该第一以太报文。该处理模块可执行存储单元存储的计算机执行指令,以支持第一设备执行上述第一方面提供的方法。可选地,该存储单元可以为该芯片内的存储单元,如寄存器、缓存等,该存储单元还可以是位于该芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。In a possible implementation manner, when the device is a chip in the first device, the chip includes: a processing module and a transceiver module. The transceiver module, which can be, for example, an input/output interface, a pin or a circuit on the chip, receives a signal received by the antenna, such as receiving the first Ethernet packet sent by the second device, and transmits the first Ethernet packet to the second device. An Ethernet packet is transmitted to other chips or modules coupled to this chip, wherein the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the first device supports processing the first An Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes. For example, the processing module may be a processor, and the processor is configured to process the first Ethernet packet according to the first identification information. The processing module can execute the computer-executed instructions stored in the storage unit, so as to support the first device to execute the method provided in the first aspect. Optionally, the storage unit can be a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip, such as a read-only memory (read-only memory, ROM) or a memory unit. Other types of static storage devices that store static information and instructions, random access memory (RAM), etc.
在一种可能的实现方式中,该装置包括:处理器,基带电路,射频电路和天线。其中处理器用于实现对各个电路部分功能的控制,基带电路用于生成以太报文,经由射频电路进行模拟转换、滤波、放大和上变频等处理后,再经由天线发送给第二设备。可选的,该装置还包括存储器,其保存第一设备必要的程序指令和数据。In a possible implementation manner, the apparatus includes: a processor, a baseband circuit, a radio frequency circuit and an antenna. The processor is used to control the functions of each circuit part, and the baseband circuit is used to generate the Ethernet message, which is sent to the second device through the antenna after analog conversion, filtering, amplification and frequency up-conversion processing by the radio frequency circuit. Optionally, the apparatus further includes a memory, which stores necessary program instructions and data of the first device.
在一种可能实现方式中,该装置包括通信接口和逻辑电路。该通信接口,用于接收该第二设备发送的第一以太报文,该第一以太报文中携带第一标识信息,所述第一标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;该逻辑电路,用于根据该第一标识信息处理该第一以太报文。In one possible implementation, the apparatus includes a communication interface and logic circuitry. The communication interface is used to receive a first Ethernet packet sent by the second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the first device supports processing the first Ethernet packet. An Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet with a frame length of less than 64 bytes; the logic circuit is configured to process the first Ethernet packet according to the first identification information.
其中,上述任一处提到的处理器,可以是一个通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制上述各方面数据传输方法的程序执行的集成电路。Wherein, the processor mentioned in any of the above may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more An integrated circuit for controlling program execution of the data transmission methods of the above aspects.
第四方面,本申请提供一种以太报文处理设备,该以太报文处理设备具有实现上述第一方面中第一设备行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。In a fourth aspect, the present application provides an Ethernet packet processing device, the Ethernet packet processing device having a function of implementing the behavior of the first device in the above-mentioned first aspect. This function can be implemented by hardware or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的实现方式中,该以太报文处理设备包括用于执行以上第一方面各个步骤的单元或模块。例如,该设备包括:处理模块,用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;In a possible implementation manner, the Ethernet packet processing device includes a unit or module for executing each step of the above first aspect. For example, the device includes: a processing module configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet, the first Ethernet packet An Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes;
收发模块,用于发送所述第二以太报文。A transceiver module, configured to send the second Ethernet message.
可选的,还包括存储模块,用于保存第一设备必要的程序指令和数据。Optionally, it also includes a storage module for storing necessary program instructions and data of the first device.
在一种可能的实现方式中,该装置包括:处理器和收发器,该处理器被配置为支持第一设备执行上述第一方面提供的方法中相应的功能。收发器用于指示第一设备和第二设备之间的通信,向第二设备发送上述方法中所涉及的以太报文。可选的,此装置还可以包括存储器,该存储器用于与处理器耦合,其保存第一设备必要的程序指令和数据。In a possible implementation manner, the apparatus includes: a processor and a transceiver, where the processor is configured to support the first device to perform corresponding functions in the method provided in the first aspect. The transceiver is used to instruct the communication between the first device and the second device, and send the Ethernet packet involved in the above method to the second device. Optionally, the apparatus may further include a memory, which is used for coupling with the processor, and which stores necessary program instructions and data of the first device.
在一种可能的实现方式中,当该装置为第一设备内的芯片时,该芯片包括:处理模块和收发模块,该处理模块例如可以是处理器,此处理器用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一 以太类型报文包括帧长小于64字节的以太报文。该收发模块例如可以是该芯片上的输入/输出接口、管脚或电路等,将处理器生成的以太报文传送给与此芯片耦合的其他芯片或模块中。该处理模块可执行存储单元存储的计算机执行指令,以支持第一设备执行上述第一方面提供的方法。可选地,该存储单元可以为该芯片内的存储单元,如寄存器、缓存等,该存储单元还可以是位于该芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。In a possible implementation manner, when the device is a chip in the first device, the chip includes: a processing module and a transceiver module. carries second identification information, where the second identification information is used to indicate that the first device supports processing a first Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet with a frame length of less than 64 bytes. The transceiver module may be, for example, an input/output interface, a pin or a circuit on the chip, and transmits the Ethernet packet generated by the processor to other chips or modules coupled to the chip. The processing module can execute the computer-executed instructions stored in the storage unit, so as to support the first device to execute the method provided in the first aspect. Optionally, the storage unit can be a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip, such as a read-only memory (read-only memory, ROM) or a memory unit. Other types of static storage devices that store static information and instructions, random access memory (RAM), etc.
在一种可能的实现方式中,该装置包括:处理器,基带电路,射频电路和天线。其中处理器用于实现对各个电路部分功能的控制,基带电路用于生成以太报文,经由射频电路进行模拟转换、滤波、放大和上变频等处理后,再经由天线发送给第二设备。可选的,该装置还包括存储器,其保存第一设备必要的程序指令和数据。In a possible implementation manner, the apparatus includes: a processor, a baseband circuit, a radio frequency circuit and an antenna. The processor is used to control the functions of each circuit part, and the baseband circuit is used to generate the Ethernet message, which is sent to the second device through the antenna after analog conversion, filtering, amplification and frequency up-conversion processing by the radio frequency circuit. Optionally, the apparatus further includes a memory, which stores necessary program instructions and data of the first device.
在一种可能实现方式中,该装置包括通信接口和逻辑电路。该逻辑电路,用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;该通信接口,还用于发送所述第二以太报文。In one possible implementation, the apparatus includes a communication interface and logic circuitry. The logic circuit is configured to carry second identification information in a second Ethernet packet, where the second identification information is used to indicate that the first device supports processing a first Ethernet type packet, and the first Ethernet type packet It includes an Ethernet packet whose frame length is less than 64 bytes; the communication interface is also used for sending the second Ethernet packet.
其中,上述任一处提到的处理器,可以是一个通用中央处理器(Central Processing Unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制上述各方面数据传输方法的程序执行的集成电路。Wherein, the processor mentioned in any of the above may be a general-purpose central processing unit (Central Processing Unit, CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more An integrated circuit for controlling program execution of the data transmission methods of the above aspects.
第五方面,本申请实施例提供一种计算机可读存储介质,该计算机存储介质存储有计算机指令,该计算机指令用于执行上述各方面中任意一方面任意可能的实施方式该的方法。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer storage medium, and the computer instructions are used to execute the method in any possible implementation manner of any one of the foregoing aspects.
第六方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面中任意一方面该的方法。In a sixth aspect, the embodiments of the present application provide a computer program product including instructions, which, when executed on a computer, cause the computer to execute the method in any one of the foregoing aspects.
第七方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持以太报文处理设备实现上述方面中所涉及的功能,例如生成或处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,该芯片系统还包括存储器,该存储器,用于保存设备必要的程序指令和数据,以实现上述各方面中任意一方面的功能。该芯片系统可以由芯片构成,也可以包含芯片和其他分立器件。In a seventh aspect, the present application provides a chip system, the chip system includes a processor for supporting an Ethernet packet processing device to implement the functions involved in the above aspects, such as generating or processing the data involved in the above method and/or or information. In a possible design, the chip system further includes a memory, which is used for storing necessary program instructions and data of the device to realize the function of any one of the above aspects. The chip system can be composed of chips, and can also include chips and other discrete devices.
第八方面,本申请实施例提供一种通信系统,该系统包括上述方面该的以太报文处理设备。In an eighth aspect, an embodiment of the present application provides a communication system, where the system includes the Ethernet packet processing device of the above aspect.
附图说明Description of drawings
图1为IEEE 802.3以太报文的帧格式示意图;Figure 1 is a schematic diagram of the frame format of an IEEE 802.3 Ethernet message;
图2为IEEE 802.3MAC Frame的帧长约束示意图;Figure 2 is a schematic diagram of the frame length constraint of the IEEE 802.3 MAC Frame;
图3为本申请实施例中以太报文处理设备的一个结合示意图;3 is a combined schematic diagram of an Ethernet packet processing device in an embodiment of the application;
图4a为本申请实施例中以太报文发送侧的一个流程示意图;4a is a schematic flowchart of an Ethernet message sending side in an embodiment of the application;
图4b为本申请实施例中以太报文发送侧的另一个流程示意图;FIG. 4b is another schematic flowchart of the sending side of the Ethernet message in the embodiment of the application;
图4c为本申请实施例中以太报文接收侧的一个流程示意图;FIG. 4c is a schematic flowchart of an Ethernet message receiving side in an embodiment of the present application;
图5a为本申请实施例中MAC层携带标识信息的一个系统架构示意图;5a is a schematic diagram of a system architecture in which the MAC layer carries identification information in an embodiment of the present application;
图5b为本申请实施例中PCS层携带标识信息的一个系统架构示意图;5b is a schematic diagram of a system architecture in which the PCS layer carries identification information in an embodiment of the application;
图6为本申请实施例中以太报文的处理方法的一个实施例示意图;6 is a schematic diagram of an embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图7为本申请实施例中64b/66b编码中生成的码块的一个示意图;7 is a schematic diagram of a code block generated in 64b/66b encoding in an embodiment of the present application;
图8为本申请实施例中64b/66b编码中块格式的一个示意图;8 is a schematic diagram of a block format in 64b/66b encoding in an embodiment of the present application;
图9为本申请实施例中PCS层利用块类型标识标识信息的一个示意图;9 is a schematic diagram of the PCS layer utilizing the block type identification information in the embodiment of the application;
图10为本申请实施例中PCS层利用块类型标识标识信息的一个示意图FIG. 10 is a schematic diagram of using the block type identification information by the PCS layer in the embodiment of the application
图11为本申请实施中PCS层利用块类型标识标识信息的一个示意图;11 is a schematic diagram of the PCS layer utilizing block type identification information in the implementation of the application;
图12为本申请实施例中PCS层利用块类型标识标识信息的一个示意图;12 is a schematic diagram of the PCS layer utilizing the block type identification information in the embodiment of the application;
图13为本申请实施例中以太报文的处理方法的另一个实施例示意图;13 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图14为本申请实施例中以太报文的处理方法的另一个实施例示意图;14 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图15为本申请实施例中以太报文的处理方法的另一个实施例示意图;15 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图16为本申请实施例中以太报文的处理方法的另一个实施例示意图;16 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图17为本申请实施例中以太报文的处理方法的另一个实施例示意图;17 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图18为本申请实施例中以太报文的处理方法的另一个实施例示意图;18 is a schematic diagram of another embodiment of a method for processing an Ethernet packet in an embodiment of the present application;
图19为本申请实施例中第一设备与第二设备协商确定支持第一以太类型报文的一个实施例示意图;FIG. 19 is a schematic diagram of an embodiment in which a first device and a second device negotiate and determine to support a first Ethernet type packet in an embodiment of the present application;
图20a为LCW Base Page的格式示意图;Fig. 20a is the format schematic diagram of LCW Base Page;
图20b为在LCW Base Page中选取目前尚未使用的bit位来标识支持第一以太类型报文的一个示意图;Figure 20b is a schematic diagram of selecting a bit that has not been used at present in the LCW Base Page to identify the support for the first ether type message;
图20c为LCW extended page中Message Next page的格式示意图;Figure 20c is a schematic diagram of the format of the Message Next page in the LCW extended page;
图20d为LCW extended page中Unformatted Next page的格式示意图;Figure 20d is a schematic diagram of the format of the Unformatted Next page in the LCW extended page;
图21为本申请实施例中第一设备与第二设备协商确定支持第一以太类型报文的另一个实施例示意图;FIG. 21 is a schematic diagram of another embodiment in which the first device and the second device negotiate and determine to support the first ether type packet in the embodiment of the application;
图22为本申请实施例中LLDP携带协商信息的格式示意图;22 is a schematic diagram of the format of LLDP carrying negotiation information in an embodiment of the present application;
图23为本申请实施例中以太报文处理设备的一个结构示意图;23 is a schematic structural diagram of an Ethernet packet processing device in an embodiment of the application;
图24为本申请实施例中以太报文处理设备的一个结构示意图。FIG. 24 is a schematic structural diagram of an Ethernet packet processing device in an embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. . Those of ordinary skill in the art know that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有 的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。本申请中所出现的单元的划分,是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式,例如多个单元可以结合成或集成在另一个系统中,或一些特征可以忽略,或不执行,另外,所显示的或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元之间的间接耦合或通信连接可以是电性或其他类似的形式,本申请中均不作限定。并且,作为分离部件说明的单元或子单元可以是也可以不是物理上的分离,可以是也可以不是物理单元,或者可以分布到多个电路单元中,可以根据实际的需要选择其中的部分或全部单元来实现本申请方案的目的。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or modules is not necessarily limited to those expressly listed Rather, those steps or modules may include other steps or modules not expressly listed or inherent to the process, method, product or apparatus. The naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering, and the named or numbered process steps can be implemented according to the The technical purpose is to change the execution order, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. In practical applications, there may be other division methods. For example, multiple units may be combined or integrated into another system, or some features may be ignored. , or not implemented, in addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection between units may be electrical or other similar forms. There are no restrictions in the application. In addition, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units, and some or all of them may be selected according to actual needs. unit to achieve the purpose of the scheme of this application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述。在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请的描述中,“至少一项”是指一项或者多项,“多项”是指两项或两项以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。The technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. In the description of this application, unless otherwise stated, "/" means or means, for example, A/B can mean A or B; "and/or" in this application is only an association relationship that describes an associated object , which means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the present application, "at least one item" refers to one or more items, and "multiple items" refers to two or more items. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
目前的标准中,MAC帧格式如图1所示,即IEEE 802.3以太报文由7字节前导码(Preamble),1字节帧首定界符(start frame delimiter,SFD),2字节的类型/长度(length/type),6字节的源目地址字段(source address)和6个字节的目的地址字段(destination address),负荷(Payload),4字节帧校验码序列(Frame Check Sequence,FCS)和12字节的帧间隔(interpacket gap,IPG)。其中,MAC帧包含,类型长度、地址、payload和FCS字段。而根据如图2所示的IEEE 802.3MAC Frame的帧长约束可知:在发送端,以太报文的最小帧长要满足64字节,否则需填充到64字节发送;以太基础帧的最大长度不能超过1518字节,否则需要截断至1518字节发送;在接收端,接收到帧长小于64字节的以太报文或者帧长大于1518字节的以太报文时,丢弃该以太报文。这样将导致在小报文较多的应用中,以太网的转发性能不够,而在大报文较多的应用中,以太网的开销较大。In the current standard, the MAC frame format is shown in Figure 1, that is, an IEEE 802.3 Ethernet packet consists of a 7-byte preamble, a 1-byte start frame delimiter (SFD), and a 2-byte frame delimiter (SFD). Type/length (length/type), 6-byte source address field (source address) and 6-byte destination address field (destination address), payload (Payload), 4-byte frame check code sequence (Frame Check Sequence, FCS) and 12-byte frame interval (interpacket gap, IPG). Among them, the MAC frame contains, type length, address, payload and FCS fields. According to the frame length constraint of IEEE 802.3MAC Frame as shown in Figure 2, it can be known that: at the sending end, the minimum frame length of the Ethernet packet must meet 64 bytes, otherwise it needs to be filled to 64 bytes for transmission; the maximum length of the Ethernet basic frame It cannot exceed 1518 bytes, otherwise it needs to be truncated to 1518 bytes and sent; at the receiving end, when receiving an Ethernet packet with a frame length less than 64 bytes or an Ethernet packet with a frame length greater than 1518 bytes, the Ethernet packet is discarded. This will result in insufficient forwarding performance of Ethernet in applications with many small packets, while in applications with many large packets, Ethernet has a large overhead.
为了解决上述问题,本申请实施例提供如下技术方案:第一设备在发送第一以太报文时,在该第一以太报文中携带第一标识信息,所述第一标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;然后该第一设备发送该第一以太报文。本申请实施例的技术方案可以应用于各种通信系统,例如:全球移动通讯(global system of mobile communication,GSM)系统、码分多址(code division multiple access,CDMA)系统、宽带码分多址(wideband code division multiple access,WCDMA)系统、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex, TDD)、通用移动通信系统(universal mobile telecommunication system,UMTS)、5G通信系统、以及未来的无线通信系统等。In order to solve the above problems, the embodiments of the present application provide the following technical solutions: when the first device sends the first Ethernet packet, the first identification information is carried in the first Ethernet packet, and the first identification information is used to indicate the The first device supports processing a first Ethernet type packet, where the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes; and then the first device sends the first Ethernet packet. The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: global system of mobile communication (GSM) system, code division multiple access (CDMA) system, wideband code division multiple access (wideband code division multiple access, WCDMA) system, long term evolution (long term evolution, LTE) system, LTE frequency division duplex (frequency division duplex, FDD) system, LTE time division duplex (time division duplex, TDD), Universal Mobile Communication system (universal mobile telecommunication system, UMTS), 5G communication system, and future wireless communication system, etc.
本申请中第一设备可以是用户设备或者网络设备。其中用户设备(User Equipment,UE)也可以指终端设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。接入终端可以是蜂窝电话、无绳电话、会话启动协议(Session Initiation Protocol,SIP)电话、无线本地环路(Wireless Local Loop,WLL)站、个人数字处理(Personal Digital Assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备,5G网络中的终端设备或者未来演进的PLMN网络中的终端设备等。而网络设备可以是用于与用户设备进行通信的设备,例如,可以是GSM系统或CDMA中的基站(base transceiver station,BTS),也可以是WCDMA系统中的基站(nodeB,NB),还可以是LTE系统中的演进型基站(evolutional node B,eNB或eNodeB),或者该网络设备可以为中继站、接入点、车载设备、可穿戴设备以及5G网络中的网络侧设备或未来演进的公共陆地移动网络(public land mobile network,PLMN)网络中的网络设备等。In this application, the first device may be user equipment or network equipment. User Equipment (UE) may also refer to terminal equipment, access terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile equipment, user terminal, terminal, wireless communication equipment, user agent or user device. The access terminal may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), a wireless communication Functional handheld devices, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks or in future evolved PLMN networks, etc. The network device may be a device used to communicate with user equipment, for example, it may be a base station (base transceiver station, BTS) in a GSM system or CDMA, or a base station (nodeB, NB) in a WCDMA system, or It is an evolved base station (evolutional node B, eNB or eNodeB) in the LTE system, or the network device can be a relay station, an access point, a vehicle-mounted device, a wearable device, and a network-side device in a 5G network or a public land that evolves in the future Network equipment in a mobile network (public land mobile network, PLMN) network, etc.
图3为本申请实施例中以太报文处理设备的硬件结构示意图。该以太报文处理设备可以是本申请实施例中第一设备的一种可能的实现方式。如图3所示,以太报文处理设备至少包括处理器304,存储器303,和收发器302,存储器303进一步用于存储指令3031和数据3032。可选的,该以太报文处理设备还可以包括天线306,I/O(输入/输出,Input/Output)接口310和总线312。收发器302进一步包括发射器3021和接收器3022。此外,处理器304,收发器302,存储器303和I/O接口310通过总线312彼此通信连接,天线306与收发器302相连。FIG. 3 is a schematic diagram of a hardware structure of an Ethernet packet processing device in an embodiment of the present application. The Ethernet packet processing device may be a possible implementation manner of the first device in the embodiment of the present application. As shown in FIG. 3 , the Ethernet packet processing device includes at least a processor 304 , a memory 303 , and a transceiver 302 , and the memory 303 is further configured to store instructions 3031 and data 3032 . Optionally, the Ethernet packet processing device may further include an antenna 306 , an I/O (input/output, Input/Output) interface 310 and a bus 312 . The transceiver 302 further includes a transmitter 3021 and a receiver 3022. In addition, the processor 304 , the transceiver 302 , the memory 303 and the I/O interface 310 are communicatively connected to each other through the bus 312 , and the antenna 306 is connected to the transceiver 302 .
处理器304可以是通用处理器,例如但不限于,中央处理器(central processing unit,CPU),也可以是专用处理器,例如但不限于,数字信号处理器(digital signal processor,DSP),应用专用集成电路(application specific integrated circuit,ASIC)和现场可编程门阵列(field programmable gate array,FPGA)等。该处理器304还可以是神经网络处理单元(neural processing unit,NPU)。此外,处理器304还可以是多个处理器的组合。特别的,在本申请实施例提供的技术方案中,处理器304可以用于执行,后续方法实施例中生成以太报文的方法的相关步骤。处理器304可以是专门设计用于执行上述步骤和/或操作的处理器,也可以是通过读取并执行存储器303中存储的指令3031来执行上述步骤和/或操作的处理器,处理器304在执行上述步骤和/或操作的过程中可能需要用到数据3032。The processor 304 may be a general-purpose processor, such as, but not limited to, a central processing unit (CPU), or a special-purpose processor, such as, but not limited to, a digital signal processor (DSP), an application Application specific integrated circuit (ASIC) and field programmable gate array (FPGA), etc. The processor 304 may also be a neural network processing unit (NPU). Furthermore, the processor 304 may also be a combination of multiple processors. In particular, in the technical solutions provided in the embodiments of the present application, the processor 304 may be configured to execute relevant steps of the method for generating an Ethernet packet in the subsequent method embodiments. The processor 304 may be a processor specially designed to perform the above steps and/or operations, or may be a processor that performs the above steps and/or operations by reading and executing the instructions 3031 stored in the memory 303, the processor 304 Data 3032 may be required in performing the steps and/or operations described above.
收发器302包括发射器3021和接收器3022,在一种可选的实现方式中,发射器3021用于通过天线306发送信号。接收器3022用于通过天线306之中的至少一根天线接收信号。特别的,在本申请实施例提供的技术方案中,发射器3021具体可以用于通过天线306之中的至少一根天线执行,例如,后续方法实施例中处理以太报文的方法应用于以太报文处理设备时,以太报文处理设备中接收模块或发送模块所执行的操作。The transceiver 302 includes a transmitter 3021 and a receiver 3022 , and in an optional implementation manner, the transmitter 3021 is used to transmit signals through the antenna 306 . The receiver 3022 is used to receive signals through at least one of the antennas 306 . In particular, in the technical solutions provided by the embodiments of the present application, the transmitter 3021 may be specifically configured to be executed by at least one antenna among the antennas 306. For example, the method for processing an Ethernet packet in the subsequent method embodiments is applied to the Ethernet packet. The operation performed by the receiving module or the sending module in the Ethernet packet processing device.
在本申请实施例中,收发器302用于支持以太报文处理设备执行前述的接收功能和发 送功能。将具有处理功能的处理器视为处理器304。接收器3022也可以称为输入口、接收电路等,发射器3021可以称为发射器或者发射电路等。In this embodiment of the present application, the transceiver 302 is configured to support the Ethernet packet processing device to perform the aforementioned receiving function and sending function. A processor with processing capabilities is considered processor 304 . The receiver 3022 may also be referred to as an input port, a receiving circuit, and the like, and the transmitter 3021 may be referred to as a transmitter or a transmitting circuit, or the like.
处理器304可用于执行该存储器303存储的指令,以控制收发器302接收消息和/或发送消息,完成本申请方法实施例中以太报文处理设备的功能。作为一种实现方式,收发器302的功能可以考虑通过收发电路或者收发的专用芯片实现。本申请实施例中,收发器302接收消息可以理解为收发器302输入消息,收发器302发送消息可以理解为收发器302输出消息。The processor 304 may be configured to execute the instructions stored in the memory 303 to control the transceiver 302 to receive messages and/or send messages, so as to complete the function of the Ethernet packet processing device in the method embodiment of the present application. As an implementation manner, the function of the transceiver 302 may be implemented by a transceiver circuit or a dedicated chip for transceiver. In this embodiment of the present application, receiving a message by the transceiver 302 may be understood as an input message by the transceiver 302 , and sending a message by the transceiver 302 may be understood as an output message by the transceiver 302 .
存储器303可以是各种类型的存储介质,例如随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),非易失性RAM(Non-Volatile RAM,NVRAM),可编程ROM(Programmable ROM,PROM),可擦除PROM(Erasable PROM,EPROM),电可擦除PROM(Electrically Erasable PROM,EEPROM),闪存,光存储器和寄存器等。存储器303具体用于存储指令3031和数据3032,处理器304可以通过读取并执行存储器303中存储的指令3031,来执行本申请方法实施例中所述的步骤和/或操作,在执行本申请方法实施例中操作和/或步骤的过程中可能需要用到数据3032。The memory 303 may be various types of storage media, such as random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), non-volatile RAM (Non-Volatile RAM, NVRAM), or Programmable ROM (Programmable ROM, PROM), Erasable PROM (Erasable PROM, EPROM), Electrically Erasable PROM (Electrically Erasable PROM, EEPROM), Flash memory, optical memory and registers, etc. The memory 303 is specifically used to store the instructions 3031 and the data 3032, and the processor 304 can perform the steps and/or operations described in the method embodiments of the present application by reading and executing the instructions 3031 stored in the memory 303. Data 3032 may be required during the operations and/or steps of a method embodiment.
可选的,该以太报文处理设备还可以包括I/O接口310,该I/O接口310用于接收来自外围设备的指令和/或数据,以及向外围设备输出指令和/或数据。Optionally, the Ethernet packet processing device may further include an I/O interface 310, where the I/O interface 310 is configured to receive instructions and/or data from peripheral devices, and output instructions and/or data to peripheral devices.
在本申请提供的技术方案中,在以太报文的传输过程时主要包括以太报文的发送流程和接收流程。In the technical solution provided by the present application, the transmission process of the Ethernet message mainly includes the sending process and the receiving process of the Ethernet message.
请参阅图4a,图4a为发送端对以太报文的一个示例性发送处理流程。在此发送处理流程中,当以太报文将被发送时,该以太报文处理设备判断该以太报文的帧长是否小于64字节或者大于1518字节;若是,则该以太报文处理设备判断自身是否支持处理第一以太类型报文;若否,则该以太报文处理设备直接按照现有以太报文的发送流程进行处理发送;若该以太报文处理设备使能自身支持处理第一以太类型报文,则该以太报文处理设备在该以太报文中携带用于标识该以太报文处理设备支持处理第一以太类型报文的标识信息,然后再处理发送。若该以太报文处理设备使能自身不支持处理第一以太类型报文,则该以太报文处理设备按照现有以太报文的处理流程将以太报文的帧长填充至64字节或者将以太报文的帧长截断至1518字节,然后再处理发送。Please refer to FIG. 4a. FIG. 4a is an exemplary process flow of sending an Ethernet packet by the sender. In this sending process flow, when an Ethernet packet is to be sent, the Ethernet packet processing device determines whether the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes; if so, the Ethernet packet processing device Determine whether it supports processing the first Ethernet type packet; if not, the Ethernet packet processing device directly processes and sends according to the existing Ethernet packet sending process; if the Ethernet packet processing device enables itself to support processing the first Ethernet packet Ethernet type packet, the Ethernet packet processing device carries the identification information in the Ethernet packet for identifying that the Ethernet packet processing device supports processing the first Ethernet type packet, and then processes and sends it. If the Ethernet packet processing device is enabled and does not support processing the first Ethernet type packet, the Ethernet packet processing device fills the frame length of the Ethernet packet to 64 bytes according to the existing Ethernet packet processing flow or adds The frame length of the Ethernet packet is truncated to 1518 bytes before being processed and sent.
请参阅图4b,图4b为发送端对以太报文的另一个示例性发送处理流程。在此发送处理流程中,当以太报文将被发送时,该以太报文处理设备判断自身是否支持处理第一以太类型报文,若是,则该以太报文处理设备在该以太报文中携带用于标识该以太报文处理设备支持处理第一以太类型报文的标识信息,然后再处理发送;若该以太报文处理设备使能自身不支持处理第一以太类型报文,则该以太报文处理设备判断该以太报文的帧长是否小于64字节或者大于1518字节;若该以太报文的帧长大于等于64字节且小于等于1518字节,则该以太报文处理设备直接按照现有以太报文的发送流程进行处理发送;若该以太报文的帧长小于64字节或者大于1518字节,则该以太报文处理设备按照现有以太报文的处理流程将以太报文的帧长填充至64字节或者将以太报文的帧长截断至1518字节,然后再处理发送。Please refer to FIG. 4b. FIG. 4b is another exemplary process flow of sending an Ethernet packet by the sender. In this sending process flow, when an Ethernet packet is to be sent, the Ethernet packet processing device determines whether it supports processing the first Ethernet type packet, and if so, the Ethernet packet processing device carries the Ethernet packet Identification information used to identify that the Ethernet packet processing device supports processing the first Ethernet type packet, and then processes and sends it; if the Ethernet packet processing device is enabled to not support processing the first Ethernet type packet, the Ethernet packet The packet processing device determines whether the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes; if the frame length of the Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the Ethernet packet processing device directly Processing and sending according to the existing Ethernet packet sending process; if the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes, the Ethernet packet processing device sends the Ethernet packet according to the existing Ethernet packet processing process. The frame length of the message is padded to 64 bytes or the frame length of the Ethernet message is truncated to 1518 bytes, and then processed and sent.
请参阅图4c,图4c为接收端对以太报文的一个示例性接收处理流程。在此接收处理流程中,接收端接收到以太报文后,该以太报文处理设备判断自身是否支持处理第一以太类型报文;若是,则该以太报文处理设备判断该以太报文中是否携带有用于标识第一以太类型报文的标识信息,若该以太报文处理设备确定该以太报文中携带用于标识第一以太类型报文的标识信息,则直接处理转发;若该以太报文处理设备判断自身不支持处理第一以太类型报文或者该以太报文处理设备确定该以太报文中未携带用于标识第一以太类型报文的标识信息,则该以太报文处理设备对该以太报文进行MAC层帧长检测;判断该以太报文的帧长是否小于64字节或者大于1518字节,若否,则该以太报文处理设备根据现有以太报文接收处理流程处理转发该以太报文,若是,则丢弃该以太报文。Please refer to FIG. 4c, which is an exemplary process flow of receiving an Ethernet packet by a receiving end. In this receiving processing flow, after the receiving end receives the Ethernet packet, the Ethernet packet processing device determines whether it supports processing the first Ethernet type packet; if so, the Ethernet packet processing device determines whether the Ethernet packet contains Carrying identification information for identifying the first Ethernet type packet, if the Ethernet packet processing device determines that the Ethernet packet carries identification information for identifying the first Ethernet type packet, it directly processes and forwards it; If the packet processing device determines that it does not support processing the first Ethernet type packet or the Ethernet packet processing device determines that the Ethernet packet does not carry identification information for identifying the first Ethernet type packet, the Ethernet packet processing device will The Ethernet packet is subjected to MAC layer frame length detection; it is judged whether the frame length of the Ethernet packet is less than 64 bytes or greater than 1518 bytes; if not, the Ethernet packet processing device processes the Ethernet packet according to the existing Ethernet packet receiving and processing flow Forward the Ethernet packet, and if so, discard the Ethernet packet.
基于上述处理流程,为实现该以太报文中携带标识信息,本申请实施例提供出如下几种以太报文的处理方法的系统架构图。请参阅图5a所示的一个系统架构图,该以太报文处理设备在现有MAC层之下和协调子层(reconciliation sublayer,RS)之上,通过前导码来标识该以太报文处理设备支持处理第一以太类型报文。请参阅图5b所示的一个系统架构图,该以太报文处理设备在RS层之下,PCS层之上,通过编码的块类型来标识该以太报文处理设备支持第一以太类型报文。Based on the above processing flow, in order to implement the identification information carried in the Ethernet packet, the embodiments of the present application provide system architecture diagrams of the following methods for processing Ethernet packets. Please refer to a system architecture diagram shown in FIG. 5a, the Ethernet message processing device is below the existing MAC layer and above the reconciliation sublayer (RS), and the Ethernet message processing device is identified by a preamble to support Process the first ether type packet. Please refer to a system architecture diagram shown in FIG. 5b, the Ethernet message processing device is below the RS layer and above the PCS layer, and the Ethernet message processing device supports the first Ethernet type message by using the encoded block type to identify.
首先对本申请实施例中的部分名词进行说明:First, some nouns in the embodiments of the present application are described:
第一以太类型报文:其包括帧长小于64字节的以太报文。可以理解的是,在该以太报文处理设备使能所有以太报文均携带标识信息时,该第一以太类型报文还可以包括帧长大于等于64字节且小于等于1518字节的以太报文、帧长大于1518字节的以太报文。在其包括多个帧长类型的以太报文时,该第一以太类型报文可以称为弹性以太(Flex Frame或Flex Ethernet Frame)类型报文或者计算以太(Computing Ethernet)类型报文。可以理解的是,针对不同帧长类型的报文,该第一以太类型报文也可以有相应的称呼。比如帧长小于64字节的以太报文可以称为迷你帧/小帧(Mini Frame)类型报文。The first Ethernet type packet: it includes an Ethernet packet whose frame length is less than 64 bytes. It can be understood that, when the Ethernet packet processing device enables all Ethernet packets to carry identification information, the first Ethernet type packet may also include an Ethernet packet whose frame length is greater than or equal to 64 bytes and less than or equal to 1518 bytes. Ethernet packets with a frame length greater than 1518 bytes. When it includes a plurality of frame length type Ethernet packets, the first Ethernet type packet may be referred to as a flexible Ethernet (Flex Frame or Flex Ethernet Frame) type packet or a computing Ethernet (Computing Ethernet) type packet. It can be understood that, for packets of different frame length types, the first Ethernet type packet may also have corresponding names. For example, an Ethernet packet whose frame length is less than 64 bytes can be called a mini frame/mini frame (Mini Frame) type packet.
目标标识字段:或称为计算以太标识(Computing Ethernet),计算标识(Computing),弹性标识(Flex Ethernet)或者在以太报文的帧长小于64字节的情况下称为迷你帧(Mini Frame)标识(Mini Frame)等。其具体用于标识该以太报文处理设备支持处理第一以太类型报文。具体来说,该目标标识字段可以位于SFD与CRC之间的任意位置。该目标标识字段具体可以是0x5F等其他未使用过的字段。Target identification field: or called Computing Ethernet, Computing, Flex Ethernet, or Mini Frame when the frame length of the Ethernet packet is less than 64 bytes Logo (Mini Frame), etc. It is specifically used to identify that the Ethernet packet processing device supports processing the first Ethernet type packet. Specifically, the target identification field can be located anywhere between the SFD and the CRC. The target identification field may specifically be other unused fields such as 0x5F.
服务类型标识:用于标识该以太报文的帧长小于64字节或用于标识该以太报文的帧长大于1518字节。可以理解的是,在该以太报文处理设备使能所有以太报文均携带标识信息时,该服务类型标识也可以标识该以太报文的帧长大于等于64字节且小于等于1518字节。Service type identifier: the frame length used to identify the Ethernet packet is less than 64 bytes or the frame length used to identify the Ethernet packet is greater than 1518 bytes. It can be understood that, when the Ethernet packet processing device enables all Ethernet packets to carry identification information, the service type identification can also identify that the frame length of the Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes.
下面介绍本申请实施例的方法部分,为了便于说明,以在同一链路的两端的第一设备和第二设备进行介绍。请参阅图6,图6为本申请实施例提出的一种以太报文的处理方法的实施例示意图,具体包括:The method part of the embodiment of the present application is described below. For convenience of description, the first device and the second device at two ends of the same link are used for introduction. Please refer to FIG. 6. FIG. 6 is a schematic diagram of an embodiment of an Ethernet packet processing method proposed by an embodiment of the present application, which specifically includes:
601、该第一设备在该第一以太报文中携带第一标识信息,该第一标识信息用于指示该第一设备支持处理第一以太类型报文,该第一以太类型报文包括帧长小于64字节的以太报文。601. The first device carries first identification information in the first Ethernet packet, where the first identification information is used to indicate that the first device supports processing a first Ethernet type packet, and the first Ethernet type packet includes a frame Ethernet packets less than 64 bytes long.
本实施例中,基于图5a所示的系统架构图可知,该第一设备可以在该MAC层生成前导码,并由该前导码携带该第一标识信息。在现有标准下,前导码连同起始标记共包含8个字节,而对于不同的帧,其格式也存在差异。如表1所示的常用以太网,该前导码中包括7个0x55和1字节的0xD5。该0xD5表示该SFD,且该SFD位于8个字节的最后一个字节。In this embodiment, based on the system architecture diagram shown in FIG. 5a, it can be known that the first device can generate a preamble at the MAC layer, and the preamble carries the first identification information. Under the existing standard, the preamble together with the start marker contains a total of 8 bytes, and for different frames, there are differences in its format. For the common Ethernet shown in Table 1, the preamble includes 7 0x55 and 1 byte of 0xD5. The 0xD5 represents the SFD, and the SFD is located in the last byte of 8 bytes.
表1Table 1
0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 0xD50xD5
如表2所示的以太网无源光网络(Ethernet Passive Optical Network,EPON)帧,该前导码第一个字节和第二个字节为0x55,第三个字节为0xD5,作为逻辑链路标识(Logical Link identity,LLID)头定界符(Start of LLID Delimiter,SLD),第六个字节和第七个字节为LLID,最后一个字节为CRC校验码。As shown in Table 2, the Ethernet Passive Optical Network (EPON) frame, the first byte and the second byte of the preamble are 0x55, and the third byte is 0xD5, as a logical chain Road identification (Logical Link identity, LLID) header delimiter (Start of LLID Delimiter, SLD), the sixth and seventh bytes are LLID, and the last byte is the CRC check code.
表2Table 2
0x550x55 0x550x55 0xD50xD5 0x550x55 0x550x55 LLIDLLID LLIDLLID CRCCRC
如表3或表4所示的抢占式发送的以太标识,它包含两种前导标识定义。其中合并MAC报文的头部定界符(Start mPacket Delimiter,SMD)有两种含义。表3表示该以太报文是完整报文的一个分片,并标有分片计数;表4表示该以太报文为快速通过报文(Express packet),或者一个完整的可以被抢占的报文,或者某个报文的首个分片。As shown in Table 3 or Table 4, the preemptive sent Ethernet identifier includes two definitions of preamble identifiers. The header delimiter (Start mPacket Delimiter, SMD) of the combined MAC packet has two meanings. Table 3 indicates that the Ethernet packet is a fragment of a complete packet, and is marked with a fragment count; Table 4 indicates that the Ethernet packet is an Express packet, or a complete packet that can be preempted , or the first fragment of a packet.
表3table 3
0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 SMDSMD Frag-countFrag-count
表4Table 4
0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 0x550x55 SMDSMD
基于上述描述可知,该第一设备在MAC层的前导码携带该第一标识信息时,可以采用如下几种可能实现方式:Based on the above description, when the first device carries the first identification information in the preamble of the MAC layer, the following possible implementations can be adopted:
一种可能实现方式中,该第一设备在MAC层生成前导码,该前导码的帧首定界符位置信息作为该第一标识信息。即前导码中的SFD的位置信息只要与现有帧中SFD的位置信息不同,就可以指示该第一标识信息。如表5所示,本实施例提供的前导码的SFD位于第四个字节,则可以表示该前导码携带了该第一标识信息。In a possible implementation manner, the first device generates a preamble at the MAC layer, and the position information of the frame header delimiter of the preamble is used as the first identification information. That is, as long as the location information of the SFD in the preamble is different from the location information of the SFD in the existing frame, the first identification information can be indicated. As shown in Table 5, the SFD of the preamble provided in this embodiment is located in the fourth byte, which means that the preamble carries the first identification information.
表5table 5
0x550x55 0x550x55 0x550x55 0xD50xD5 0x550x55 0x550x55 0x550x55 CRCCRC
另一种可能实现方式中,该第一设备在MAC层生成前导码,该前导码中的目标标识字段作为该第一标识信息。即前导码中的采用新的标识字段表示该第一标识信息。如表6所示,本实施例提供的前导码中第四个字节的FE字段(比如采用0x5F)表示该第一标识信息。在此方案中,该目标标识字段可以位于SFD与第八个字节(CRC)之间的任意位置,只要可以完整标识该第一以太报文的信息即可。In another possible implementation manner, the first device generates a preamble at the MAC layer, and a target identification field in the preamble is used as the first identification information. That is, a new identification field in the preamble is used to represent the first identification information. As shown in Table 6, the FE field of the fourth byte in the preamble provided by this embodiment (for example, 0x5F is used) represents the first identification information. In this solution, the target identification field may be located at any position between the SFD and the eighth byte (CRC), as long as the information of the first Ethernet packet can be completely identified.
表6Table 6
0x550x55 0x550x55 0xD50xD5 0x5F0x5F 0x550x55 0x550x55 0x550x55 CRCCRC
在MAC层,该前导码中还可以包括用于标识该第一以太报文的服务类型的服务类型标识。如表7所示,该SID则用于标识服务类型。At the MAC layer, the preamble may further include a service type identifier for identifying the service type of the first Ethernet packet. As shown in Table 7, the SID is used to identify the service type.
表7Table 7
0x550x55 0x550x55 0xD50xD5 0x5F0x5F 0x550x55 SIDSID SIDSID CRCCRC
可以理解的是,在该前导码中可以使用服务类型标识来对该第一以太报文的服务类型进行标识,也可以使用其他方式来标识。比如该目标标识字段选用不同的字段进行标识,比如设定字段A、B、C均用于指示该第一设备支持处理第一以太类型报文,但是该字段A还用于标识以太报文为帧长小于64字节的小报文,该字段B用于标识以太报文为帧长大于1518字节的大报文,该字段C用于标识以太报文为帧长为大于等于64字节且小于等于1518字节的报文。It can be understood that, the service type identifier may be used in the preamble to identify the service type of the first Ethernet packet, or other manners may be used to identify the service type. For example, the target identification field selects different fields for identification. For example, the setting fields A, B, and C are used to indicate that the first device supports processing the first Ethernet type packet, but the field A is also used to identify the Ethernet packet as A small packet with a frame length of less than 64 bytes. This field B is used to identify an Ethernet packet as a large packet with a frame length greater than 1518 bytes. This field C is used to identify an Ethernet packet whose frame length is greater than or equal to 64 bytes. and less than or equal to 1518 bytes.
同理,在以该SFD位置信息指示该第一设备支持处理第一以太类型报文时,不同的位置信息也可以标识不同的服务类型。比如,设定位置A、位置B和位置C均用于指示该第一设备支持处理第一以太类型报文,但是该位置A还用于标识以太报文为帧长小于64字节的小报文,该位置B用于标识以太报文为帧长大于1518字节的大报文,该位置C用于标识以太报文为帧长为大于等于64字节且小于等于1518字节的报文。Similarly, when the SFD location information is used to indicate that the first device supports processing of the first Ethernet type packet, different location information may also identify different service types. For example, the set position A, position B and position C are all used to indicate that the first device supports processing the first Ethernet type packet, but the position A is also used to identify the Ethernet packet as a small packet with a frame length of less than 64 bytes The position B is used to identify the Ethernet packet as a large packet with a frame length greater than 1518 bytes, and the position C is used to identify the Ethernet packet as a packet with a frame length greater than or equal to 64 bytes and less than or equal to 1518 bytes .
本实施例中,基于图5b所示的系统架构图可知,该第一设备可以在该PCS层生成编码,并由该编码的块类型指示该第一标识信息。In this embodiment, based on the system architecture diagram shown in FIG. 5b, it can be known that the first device can generate a code at the PCS layer, and the first identification information is indicated by the block type of the code.
现有标准中,该PCS层主要会进行编码(可选择8b/10b或64b/66b等,具体此处不做限定),加扰码,可选地加前向纠错码(Forward Error Correction,FEC),然后分发。本实施例中以64b/66b编码进行说明。64b/66b的编码方式可以如图7所示,即每64比特(bit)形成一个块(block),然后再添加2bit的头,形成66bit一个块。对于每个66比特块,大类上分成2种类型,即纯数据块(sync头为01标识)和控制/控制数据块(sync头为10标识)。后者sync头后的第一个字节(8-bit)为块类型字段(block Type field),标识后续7个字节的数据/控制构成方式。下面以40/100/200/400GBASE-R的64b/66b编码为例,给出64b/66b块格式的定义。如图8所示,左侧控制块格式(control block format)标识了媒体接口(xGMII)的输入,右侧为对应的64b/66b编码后的66bit码块。其中,C表示控制信号,/S/表示报文开头(Start of Packet,SOP),/T/表示报文结尾(End of Packet,EOP)。/O/表示ordered sets,用于在链路上发送远端/本地故障状态。0x1E表示后续7个字节均为控制信息;0x78表示一个数据报文的开始块。T0~T7标识了8个报文可能存在的结尾位置。由此可知,通过不同的block type类型,我们就可以获得一个报文的开头和结尾,完成一个报文的定界。In the existing standard, the PCS layer mainly performs coding (8b/10b or 64b/66b, etc., which are not limited here), scrambling code, and optionally forward error correction code (Forward Error Correction, FEC), and then distributed. In this embodiment, 64b/66b encoding is used for description. The encoding method of 64b/66b can be shown in Figure 7, that is, every 64 bits (bit) forms a block (block), and then adds a 2-bit header to form a 66-bit block. For each 66-bit block, it is classified into two types, namely, pure data blocks (with the sync header marked with 01) and control/control data blocks (with the sync header marked with 10). The first byte (8-bit) after the sync header of the latter is the block Type field, which identifies the data/control structure of the subsequent 7 bytes. The following takes the 64b/66b encoding of 40/100/200/400GBASE-R as an example to give the definition of the 64b/66b block format. As shown in Figure 8, the left control block format (control block format) identifies the input of the media interface (xGMII), and the right side is the corresponding 66bit code block after 64b/66b encoding. Among them, C represents the control signal, /S/ represents the start of the packet (Start of Packet, SOP), and /T/ represents the end of the packet (End of Packet, EOP). /O/ represents ordered sets, which are used to send remote/local failure status on the link. 0x1E indicates that the following 7 bytes are all control information; 0x78 indicates the start block of a data packet. T0 to T7 identify the possible ending positions of 8 packets. It can be seen that through different block type types, we can obtain the beginning and end of a message, and complete the delimitation of a message.
基于上述描述可知,该第一设备在PCS层通过编码携带该第一标识信息时,可以采用如下几种可能实现方式:Based on the above description, when the first device carries the first identification information through encoding at the PCS layer, the following possible implementations may be adopted:
一种可能实现方式中,该第一设备在PCS层对该第一以太报文进行编码,将编码的块类型作为该第一标识信息。如图9所示,该第一设备采用0x00这个块类型标识该第一标识 信息。可以理解的是,该第一以太报文在编码过程中可能编码生成多个码块,对于每个码块来说,都有一个块类型标识字段。而该第一设备在利用块类型标识该第一标识信息时,可以采用其中至少一个码块的块类型进行标识。如图9所示,该第一以太报文在编码过程生成了三个码块,分别为第一个码块(也称为以太报文的开始块),第二个码块和第三个码块。则该第一以太报文可以如图9所示,利用开始块的块类型标识该第一标识信息;也可以如图10所示,利用第二个码块的块类型标识该第一标识信息;也可以如图11所示,利用第三个码块的块类型标识该第一标识信息;也可以如图12所示,利用该开始块、该第二个码块和该第三个码块的块类型标识该第一标识信息。本实施例中,该块类型的编码可以为0x00,也可以是IEEE 802.3-2018版-5表格中没有选取的编码,只需要保证与其他编码的汉明距离至少为4即可,例如0xE1。In a possible implementation manner, the first device encodes the first Ethernet packet at the PCS layer, and uses the encoded block type as the first identification information. As shown in Figure 9, the first device uses the block type 0x00 to identify the first identification information. It can be understood that the first Ethernet packet may be encoded to generate multiple code blocks during the encoding process, and for each code block, there is a block type identification field. When the first device uses the block type to identify the first identification information, the first device may use the block type of at least one code block for identification. As shown in Figure 9, the first Ethernet packet generates three code blocks during the encoding process, which are the first code block (also called the start block of the Ethernet packet), the second code block and the third code block. code block. Then this first Ethernet message can use the block type of the start block to identify the first identification information as shown in Figure 9; also can use the block type of the second code block to identify the first identification information as shown in Figure 10 ; Also as shown in Figure 11, use the block type of the 3rd code block to identify the first identification information; also as shown in Figure 12, use the start block, the second code block and the 3rd code The block type of the block identifies the first identification information. In this embodiment, the code of the block type may be 0x00, or it may be a code not selected in the IEEE 802.3-2018 version-5 table, and it is only necessary to ensure that the Hamming distance with other codes is at least 4, such as 0xE1.
在PCS层,该编码的码块中还可以包括用于标识该第一以太报文的服务类型的服务类型标识。如图9至图12所示,该P1则用于标识服务类型。该P1的大小可以小于1字节,或者大于1字节(那就要占后面D2的空间)。可以理解的是,该编码的块类型也可以标识该第一以太报文的服务类型。比如,设定块类型A、块类型B和块类型C均用于指示该第一设备支持处理第一以太类型报文,但是该块类型A还用于标识以太报文为帧长小于64字节的小报文,该块类型B用于标识以太报文为帧长大于1518字节的大报文,该块类型C用于标识以太报文为帧长为大于等于64字节且小于等于1518字节的报文。At the PCS layer, the encoded code block may further include a service type identifier for identifying the service type of the first Ethernet packet. As shown in FIG. 9 to FIG. 12 , the P1 is used to identify the service type. The size of the P1 can be less than 1 byte, or greater than 1 byte (then it will occupy the space of the following D2). It can be understood that the encoded block type may also identify the service type of the first Ethernet packet. For example, the block type A, block type B and block type C are all set to indicate that the first device supports processing the first Ethernet type packet, but the block type A is also used to identify the Ethernet packet as having a frame length of less than 64 words The block type B is used to identify the Ethernet packet as a large packet with a frame length greater than 1518 bytes, and the block type C is used to identify the Ethernet packet as a frame length greater than or equal to 64 bytes and less than or equal to 1518-byte message.
本实施例中,该第一设备在发送该第一以太报文时,该MAC层发送给xGMII接口第一以太类型报文的指示信息,然后该xGMII接口生成相应的控制字,此时该xGMII接口生成的控制字用于标识第一以太类型报文;最后该PCS层在接收到xGMII接口发送的数据或控制字时,进行相应的编码并将该控制字转换为块类型。可以理解的是,本实施例中,xGMII用于表示某个速率的GMII接口。每个速率的MII口名字都不一样。比如400G速率下,其对应GMII接口为200GMII接口或者400GMII接口。In this embodiment, when the first device sends the first Ethernet packet, the MAC layer sends the indication information of the first Ethernet type packet to the xGMII interface, and then the xGMII interface generates a corresponding control word. At this time, the xGMII interface The control word generated by the interface is used to identify the first Ether type message; finally, when the PCS layer receives the data or control word sent by the xGMII interface, it performs corresponding encoding and converts the control word into a block type. It can be understood that, in this embodiment, xGMII is used to indicate a GMII interface of a certain rate. The name of the MII port for each rate is different. For example, at a rate of 400G, the corresponding GMII interface is a 200GMII interface or a 400GMII interface.
基于上述图5a和图5b的系统架构图,该第一设备可以同时在该MAC层和PCS携带该第一标识信息。具体实现方式如上述方案描述,此处不再赘述。Based on the system architecture diagrams of FIG. 5a and FIG. 5b, the first device may carry the first identification information in the MAC layer and the PCS at the same time. The specific implementation is as described in the above solution, and details are not repeated here.
602、该第一设备发送该第一以太报文。602. The first device sends the first Ethernet packet.
可选的,在上述以太报文的发送侧来说,该以太报文的处理方法还可以如图13所示,具体包括:Optionally, on the sending side of the above Ethernet packet, the processing method of the Ethernet packet may also be as shown in Figure 13, which specifically includes:
1301、该第一设备确定该第一以太报文的帧长是否小于64字节,若是,则执行步骤1302,若否,则执行步骤1306。1301. The first device determines whether the frame length of the first Ethernet packet is less than 64 bytes, and if so, executes step 1302, and if not, executes step 1306.
本实施例中,该第一设备可以通过该第一以太报文中的服务类型标识确定该第一以太报文的帧长;In this embodiment, the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
或者,该第一设备检测该第一以太报文的MAC帧的帧长,并判断该第一以太报文的帧长是否小于64字节。Or, the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is less than 64 bytes.
1302、该第一设备确定自身是否支持处理第一以太类型报文,若是,则执行步骤1303至步骤1304,若否,则执行步骤1305。1302. The first device determines whether it supports processing the first ether type packet, and if so, executes steps 1303 to 1304, and if not, executes step 1305.
本实施例中,该第一设备读取自身寄存器中的标识信息,根据该标识信息确定自身是 否支持处理第一以太类型报文。若该标识信息指示该第一设备可以支持处理第一以太类型报文,则该第一设备使用自身支持处理第一以太类型报文。In this embodiment, the first device reads the identification information in its own register, and determines whether it supports processing the first Ether type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
1303、该第一设备在该第一以太报文中携带该第一标识信息。1303. The first device carries the first identification information in the first Ethernet packet.
该第一设备可以采用步骤601中所示的方案在该第一以太报文中携带该第一标识信息。The first device may use the solution shown in step 601 to carry the first identification information in the first Ethernet packet.
1304、该第一设备发送该第一以太报文。1304. The first device sends the first Ethernet packet.
1305、该第一设备将该第一以太报文的帧长填充至64字节,并发送。1305. The first device fills the frame length of the first Ethernet packet to 64 bytes, and sends it.
1306、该第一设备发送该第一以太报文,该第一以太报文不携带该第一标识信息。1306. The first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
在上述以太报文的发送侧来说,该以太报文的处理方法还可以如图14所示,具体包括:Regarding the sending side of the above-mentioned Ethernet packet, the processing method of the Ethernet packet can also be shown in Figure 14, which specifically includes:
1401、该第一设备确定自身是否支持处理第一以太类型报文,若是,则执行步骤1402至步骤1403,若否,则执行步骤1404。1401. The first device determines whether it supports processing the first ether type packet, if so, executes steps 1402 to 1403, and if not, executes step 1404.
本实施例中,该第一设备读取自身寄存器中的标识信息,根据该标识信息确定自身是否支持处理第一以太类型报文。若该标识信息指示该第一设备可以支持处理第一以太类型报文,则该第一设备使用自身支持处理第一以太类型报文。In this embodiment, the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
1402、该第一设备在该第一以太报文中携带该第一标识信息。1402. The first device carries the first identification information in the first Ethernet packet.
本实施例中,该第一设备对于任意一以太报文都携带该第一标识信息。In this embodiment, the first device carries the first identification information for any Ethernet packet.
1403、该第一设备发送该第一以太报文。1403. The first device sends the first Ethernet packet.
1404、该第一设备确定该第一以太报文的帧长是否小于64字节,若是,则执行步骤1405,若否,则执行步骤1406。1404. The first device determines whether the frame length of the first Ethernet packet is less than 64 bytes, and if so, executes step 1405, and if not, executes step 1406.
本实施例中,该第一设备可以通过该第一以太报文中的服务类型标识确定该第一以太报文的帧长;In this embodiment, the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
或者,该第一设备检测该第一以太报文的MAC帧的帧长,并判断该第一以太报文的帧长是否小于64字节。Or, the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is less than 64 bytes.
1405、该第一设备将该第一以太报文的帧长填充至64字节,并发送。1405. The first device fills the frame length of the first Ethernet packet to 64 bytes, and sends it.
1406、该第一设备发送该第一以太报文,该第一以太报文中不携带该第一标识信息。1406. The first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
可以理解的是,该第一以太类型报文还包括帧长大于1518字节的大报文。在该第一以太类型报文为帧长大于1518字节的以太报文时,该第一设备也可以采用上述方式在该第一以太报文中携带该第一标识信息。It can be understood that the first Ether type packet also includes a large packet with a frame length greater than 1518 bytes. When the first Ethernet packet is an Ethernet packet with a frame length greater than 1518 bytes, the first device may also carry the first identification information in the first Ethernet packet in the above manner.
可选的,在上述以太报文的发送侧来说,在该以太报文的帧长大于1518字节时,该以太报文的处理方法还可以如图15所示,具体包括:Optionally, on the sending side of the above-mentioned Ethernet packet, when the frame length of the Ethernet packet is greater than 1518 bytes, the processing method of the Ethernet packet may also be as shown in Figure 15, which specifically includes:
1501、该第一设备确定该第一以太报文的帧长是否大于1518字节,若是,则执行步骤1502,若否,则执行步骤1506。1501. The first device determines whether the frame length of the first Ethernet packet is greater than 1518 bytes, and if so, executes step 1502, and if not, executes step 1506.
本实施例中,该第一设备可以通过该第一以太报文中的服务类型标识确定该第一以太报文的帧长;In this embodiment, the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
或者,该第一设备检测该第一以太报文的MAC帧的帧长,并判断该第一以太报文的帧长是否大于1518字节。Or, the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is greater than 1518 bytes.
1502、该第一设备确定自身是否支持处理第一以太类型报文,若是,则执行步骤1503至步骤1504,若否,则执行步骤1505。1502. The first device determines whether it supports processing of the first ether type packet, and if so, executes steps 1503 to 1504, and if not, executes step 1505.
本实施例中,该第一设备读取自身寄存器中的标识信息,根据该标识信息确定自身是否支持处理第一以太类型报文。若该标识信息指示该第一设备可以支持处理第一以太类型报文,则该第一设备使用自身支持处理第一以太类型报文。In this embodiment, the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
1503、该第一设备在该第一以太报文中携带该第一标识信息。1503. The first device carries the first identification information in the first Ethernet packet.
该第一设备可以采用步骤601中所示的方案在该第一以太报文中携带该第一标识信息。The first device may use the solution shown in step 601 to carry the first identification information in the first Ethernet packet.
1504、该第一设备发送该第一以太报文。1504. The first device sends the first Ethernet packet.
1505、该第一设备将该第一以太报文的帧长截断至1518字节,并发送。1505. The first device truncates the frame length of the first Ethernet packet to 1518 bytes, and sends it.
1506、该第一设备发送该第一以太报文,该第一以太报文不携带该第一标识信息。1506. The first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
在上述以太报文的发送侧来说,该以太报文的处理方法还可以如图16所示,具体包括:In terms of the sending side of the above-mentioned Ethernet packet, the processing method of the Ethernet packet can also be as shown in Figure 16, which specifically includes:
1601、该第一设备确定自身是否支持处理第一以太类型报文,若是,则执行步骤1602至步骤1603,若否,则执行步骤1604。1601. The first device determines whether it supports the processing of the first ether type packet, and if so, executes steps 1602 to 1603, and if not, executes step 1604.
本实施例中,该第一设备读取自身寄存器中的标识信息,根据该标识信息确定自身是否支持处理第一以太类型报文。若该标识信息指示该第一设备可以支持处理第一以太类型报文,则该第一设备使用自身支持处理第一以太类型报文。In this embodiment, the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
1602、该第一设备在该第一以太报文中携带该第一标识信息。1602. The first device carries the first identification information in the first Ethernet packet.
本实施例中,该第一设备对于任意一以太报文都携带该第一标识信息。In this embodiment, the first device carries the first identification information for any Ethernet packet.
1603、该第一设备发送该第一以太报文。1603. The first device sends the first Ethernet packet.
1604、该第一设备确定该第一以太报文的帧长是否大于1518字节,若是,则执行步骤1605,若否,则执行步骤1606。1604. The first device determines whether the frame length of the first Ethernet packet is greater than 1518 bytes, and if so, executes step 1605, and if not, executes step 1606.
本实施例中,该第一设备可以通过该第一以太报文中的服务类型标识确定该第一以太报文的帧长;In this embodiment, the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
或者,该第一设备可以通过该第一以太报文中的服务类型标识确定该第一以太报文的帧长;Alternatively, the first device may determine the frame length of the first Ethernet packet by using the service type identifier in the first Ethernet packet;
或者,该第一设备检测该第一以太报文的MAC帧的帧长,并判断该第一以太报文的帧长是否大于1518字节。Or, the first device detects the frame length of the MAC frame of the first Ethernet packet, and determines whether the frame length of the first Ethernet packet is greater than 1518 bytes.
1605、该第一设备将该第一以太报文的帧长截断至1518字节,并发送。1605. The first device truncates the frame length of the first Ethernet packet to 1518 bytes, and sends it.
1606、该第一设备发送该第一以太报文,该第一以太报文中不携带该第一标识信息。1606. The first device sends the first Ethernet packet, where the first Ethernet packet does not carry the first identification information.
可以理解的是,针对上述第一设备作为发送端进行以太报文发送流程的描述中,所提及的第一以太报文实质等同于本申请权利要求中的第二以太报文,该第一标识信息实质等同于本申请权利要求中的第二标识信息。It can be understood that, in the description of the Ethernet packet sending process performed by the first device as the sender, the mentioned first Ethernet packet is substantially equivalent to the second Ethernet packet in the claims of this application. The identification information is substantially equivalent to the second identification information in the claims of the present application.
下面以以太报文的接收处理流程对本申请实施例中的以太报文的处理进行说明。请参阅图17,图17为本申请实施例提出的一种以太报文的处理方法的实施例示意图,具体包括:The processing of the Ethernet packet in the embodiment of the present application will be described below with reference to the receiving processing flow of the Ethernet packet. Please refer to FIG. 17. FIG. 17 is a schematic diagram of an embodiment of an Ethernet packet processing method proposed by an embodiment of the present application, which specifically includes:
1701、该第一设备接收第二以太报文。1701. The first device receives a second Ethernet packet.
本实施例中,该第一设备通过天线或者其他接口接收对端设备发送的第二以太报文。In this embodiment, the first device receives the second Ethernet packet sent by the peer device through an antenna or other interface.
1702、该第一设备确定自身是否支持处理第一以太类型报文,若是,则执行步骤1703,若否,则执行步骤1705。1702. The first device determines whether it supports processing of the first ether type packet, and if so, executes step 1703, and if not, executes step 1705.
本实施例中,该第一设备读取自身寄存器中的标识信息,根据该标识信息确定自身是否支持处理第一以太类型报文。若该标识信息指示该第一设备可以支持处理第一以太类型报文,则该第一设备使用自身支持处理第一以太类型报文。In this embodiment, the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
1703、该第一设备确定该第二以太报文是否携带第二标识信息,该第二标识信息用于指示该对端设备支持处理第一以太类型报文,该第一以太类型报文包括帧长小于64字节的以太报文,若是,则执行步骤1704,若否,则执行步骤1705。1703. The first device determines whether the second Ethernet packet carries second identification information, where the second identification information is used to indicate that the peer device supports processing of the first Ethernet type packet, and the first Ethernet type packet includes a frame For the Ethernet packet whose length is less than 64 bytes, if yes, go to step 1704; if not, go to step 1705.
本实施例中该第一设备检测该第二以太报文的前导码中是否存在指示该第二标识信息的标识或者检测该编码中是否存在指示该第二标识信息的标识,若存在,则确定该第二以太报文携带该第二标识信息,且该第二以太报文为一个第一以太类型报文。1704、该第一设备处理该第二以太报文。In this embodiment, the first device detects whether there is an identifier indicating the second identification information in the preamble of the second Ethernet packet or detects whether there is an identifier indicating the second identification information in the encoding, and if so, determines whether there is an identifier indicating the second identification information. The second Ethernet packet carries the second identification information, and the second Ethernet packet is a first Ethernet type packet. 1704. The first device processes the second Ethernet packet.
该第一设备直接解码该第二以太报文或者转发该第二以太报文。The first device directly decodes the second Ethernet packet or forwards the second Ethernet packet.
1705、该第一设备确定该第二以太报文的帧长是否小于64字节,若是,则执行步骤1706,若否,则执行步骤1704。1705. The first device determines whether the frame length of the second Ethernet packet is less than 64 bytes, and if so, executes step 1706, and if not, executes step 1704.
本实施例中,该第一设备可以通过该第二以太报文中的服务类型标识确定该第二以太报文的帧长;In this embodiment, the first device may determine the frame length of the second Ethernet packet through the service type identifier in the second Ethernet packet;
或者,or,
该第一设备检测该第二以太报文的MAC帧长度,从而确定该第二以太报文的帧长。The first device detects the MAC frame length of the second Ethernet packet, so as to determine the frame length of the second Ethernet packet.
1706、该第一设备丢弃该第二以太报文。1706. The first device discards the second Ethernet packet.
可选的,在上述以太报文的接收侧来说,在该以太报文的帧长大于1518字节时,该以太报文的处理方法还可以如图18所示,图18为本申请实施例提出的一种以太报文的处理方法的实施例示意图,具体包括:Optionally, on the receiving side of the above-mentioned Ethernet packet, when the frame length of the Ethernet packet is greater than 1518 bytes, the processing method of the Ethernet packet may also be as shown in FIG. 18 , which is implemented in this application. A schematic diagram of an embodiment of an Ethernet packet processing method proposed in this example, which specifically includes:
1801、该第一设备接收该第二设备发送的第二以太报文。1801. The first device receives a second Ethernet packet sent by the second device.
本实施例中,该第一设备通过天线或者其他接口接收该第二设备发送的第二以太报文。In this embodiment, the first device receives the second Ethernet packet sent by the second device through an antenna or other interface.
1802、该第一设备确定自身是否支持处理第一以太类型报文,若是,则执行步骤1803,若否,则执行步骤1805。1802. The first device determines whether it supports processing of the first ether type packet, and if so, executes step 1803, and if not, executes step 1805.
本实施例中,该第一设备读取自身寄存器中的标识信息,根据该标识信息确定自身是否支持处理第一以太类型报文。若该标识信息指示该第一设备可以支持处理第一以太类型报文,则该第一设备使用自身支持处理第一以太类型报文。In this embodiment, the first device reads the identification information in its own register, and determines whether it supports processing the first Ethernet type message according to the identification information. If the identification information indicates that the first device can support processing the first Ethernet type packet, the first device uses its own support to process the first Ethernet type packet.
1803、该第一设备确定该第二以太报文是否携带第二标识信息,该第二标识信息用于指示该第二设备支持处理第一以太类型报文,该第一以太类型报文包括帧长大于1518字节的以太报文,若是,则执行步骤1804,若否,则执行步骤1805。1803. The first device determines whether the second Ethernet packet carries second identification information, where the second identification information is used to indicate that the second device supports processing a first Ethernet type packet, and the first Ethernet type packet includes a frame For an Ethernet packet longer than 1518 bytes, if yes, go to step 1804; if not, go to step 1805.
本实施例中该第一设备检测该第二以太报文的前导码中是否存在指示该第二标识信息 的标识或者检测该编码中是否存在指示该第二标识信息的标识,若存在,则确定该第二以太报文携带该第二标识信息,且该第二以太报文为一个第一以太类型报文。In this embodiment, the first device detects whether there is an identifier indicating the second identification information in the preamble of the second Ethernet packet or detects whether there is an identifier indicating the second identification information in the encoding, and if so, determines whether there is an identifier indicating the second identification information. The second Ethernet packet carries the second identification information, and the second Ethernet packet is a first Ethernet type packet.
1804、该第一设备处理该第二以太报文。1804. The first device processes the second Ethernet packet.
该第一设备直接解码该第二以太报文或者转发该第二以太报文。The first device directly decodes the second Ethernet packet or forwards the second Ethernet packet.
1805、该第一设备确定该第二以太报文的帧长是否大于1518字节,若是,则执行步骤1806,若否,则执行步骤1804。1805. The first device determines whether the frame length of the second Ethernet packet is greater than 1518 bytes, and if so, executes step 1806, and if not, executes step 1804.
本实施例中,该第一设备可以通过该第二以太报文中的服务类型标识确定该第二以太报文的帧长;In this embodiment, the first device may determine the frame length of the second Ethernet packet through the service type identifier in the second Ethernet packet;
或者,or,
该第一设备检测该第二以太报文的MAC帧长度,从而确定该第二以太报文的帧长。The first device detects the MAC frame length of the second Ethernet packet, so as to determine the frame length of the second Ethernet packet.
1806、该第一设备丢弃该第二以太报文。1806. The first device discards the second Ethernet packet.
可以理解的是,针对上述第一设备作为接收端进行以太报文接收处理流程的描述中,所提及的第二以太报文实质等同于本申请权利要求中的第一以太报文,该第二标识信息实质等同于本申请权利要求中的第一标识信息。上面的方案中,该第一设备可以理解为只用确定自身是否支持该第一以太类型报文即可,并不确定对端设备是否也支持处理第一以太类型报文。而本实施例中,该第一设备与处于同一链路两端的第二设备之间还可以协商确定双方是否支持处理第一以太类型报文。请参阅图19所示,本申请实施例中该第一设备与该第二设备之间协商确定是否支持处理第一以太类型报文的一个示例性流程包括:It can be understood that, in the description of the above-mentioned first device as the receiving end to receive the Ethernet packet, the mentioned second Ethernet packet is substantially equivalent to the first Ethernet packet in the claims of this application, and the first The second identification information is substantially equivalent to the first identification information in the claims of this application. In the above solution, the first device can be understood as only to determine whether it supports the first Ethernet type message, and does not determine whether the peer device also supports processing the first Ethernet type message. However, in this embodiment, the first device and the second device at both ends of the same link may further negotiate to determine whether both parties support processing the first Ether-type packet. Referring to FIG. 19 , in this embodiment of the present application, an exemplary process for negotiating between the first device and the second device to determine whether to support processing of the first Ethernet type packet includes:
1901、第一设备向该第二设备发送第一自协商脉冲,该第一自协商脉冲中携带协商信息,该协商信息用于指示该第一设备支持处理第一以太类型报文。1901. The first device sends a first auto-negotiation pulse to the second device, where the first auto-negotiation pulse carries negotiation information, where the negotiation information is used to indicate that the first device supports processing of the first ether type packet.
在该第一设备与该第二设备发送/接收前述第一以太类型报文之前,该第一设备与该第二设备可以通过链路层自协商(Auto-negotiation,AN)方式,协商双方是否具备支持处理第一以太类型报文的能力。而AN是IEEE 802.3提供的一种可选功能,链路两端设备在上电(Power-on)、链路重启(link restart)或重协商(renegotiation)阶段通过发送自协商脉冲,来协商两端能力。本实施例中,该自协商脉冲将携带用于指示该第一设备支持处理第一以太类型报文的协商信息,而该协商信息可以是该自协商脉冲中的数据信息。而自协商脉冲中的数据信息是通过差分曼彻斯特(Differential Manchester Encoding,DME)页来编码的。每48bit Data构成一个DME page,即链路编码字(link code word,LCW)。整个协商信息,可以由LCW基础页(base page)和扩展页(extended page)构成。因此在该自协商脉冲携带该协商信息时,可以采用如下几种可能实现方式:Before the first device and the second device send/receive the foregoing first Ethernet type packet, the first device and the second device may negotiate whether the two parties are in a link layer auto-negotiation (AN) manner. It has the ability to support the processing of the first Ethernet type message. AN is an optional function provided by IEEE 802.3. Devices at both ends of the link negotiate two end capability. In this embodiment, the auto-negotiation pulse will carry negotiation information used to instruct the first device to support processing the first Ethernet type packet, and the negotiation information may be data information in the auto-negotiation pulse. The data information in the auto-negotiation pulse is encoded through a differential Manchester (Differential Manchester Encoding, DME) page. Each 48bit Data constitutes a DME page, that is, a link code word (LCW). The entire negotiation information can be composed of LCW base page and extended page. Therefore, when the auto-negotiation pulse carries the negotiation information, the following possible implementations can be adopted:
一种可能实现方式中,在该LCW Base Page中利用尚未使用的比特位来标识支持第一以太类型报文。如图20a所示的LCW Base Page的格式可知。可以在A0~A26所指示的技术能力信息中选取目前尚未使用的bit位来标识支持第一以太类型报文。如图20b所示的A19,即D40。In a possible implementation manner, unused bits are used in the LCW Base Page to identify the support for the first ether type message. The format of the LCW Base Page shown in Figure 20a is known. A bit that has not been used at present may be selected from the technical capability information indicated by A0 to A26 to identify the support for the first Ethernet type message. A19, as shown in Figure 20b, is D40.
另一种可能实现方式中,在该LCW extended page中利用消息代码值来标识支持第一以太类型报文。在现有标准中,该LCW extended page有两种编码格式(Message Next page和Unformatted Next page),如图20c和20d所示。图20c所示的Message Next page的 编码格式中携带有Message Code Field的,表示定义具体的Message Page格式。图20d所示的Unformatted Next page的编码格式是Unformatted page encoding,无格式的page。这两种格式都是根据信息页(Message Page,MP)比特的置位来判断,当MP设置为1时,表示为Message page;当置位为0时,表示unformatted page。根据Message Code Field的设置,来判定后续D16~D47位置的含义。基于上述描述,该第一设备可以在Message Code Field中生成消息代码值来标识支持第一以太类型报文。In another possible implementation manner, the message code value is used in the LCW extended page to identify the support of the first ether type message. In the existing standard, the LCW extended page has two encoding formats (Message Next page and Unformatted Next page), as shown in Figures 20c and 20d. The encoding format of the Message Next page shown in Figure 20c carries the Message Code Field, which means that the specific Message Page format is defined. The encoding format of the Unformatted Next page shown in Figure 20d is Unformatted page encoding, an unformatted page. These two formats are judged according to the setting of the Message Page (MP) bit. When MP is set to 1, it means Message page; when it is set to 0, it means unformatted page. According to the setting of Message Code Field, determine the meaning of subsequent D16~D47 positions. Based on the above description, the first device can generate a message code value in the Message Code Field to identify support for the first ether type message.
1902、第一设备接收该第二设备发送的第二自协商脉冲,该第二自协商脉冲中携带协商信息,该协商信息用于指示该第二设备支持处理第一以太类型报文。1902. The first device receives a second auto-negotiation pulse sent by the second device, where the second auto-negotiation pulse carries negotiation information, where the negotiation information is used to indicate that the second device supports processing of the first Ethernet type packet.
同理,该第二设备发送的第二自协商脉冲中携带该协商信息的方式与步骤1901中该第一自协商脉冲中携带该协商信息的方式相同,此处不再赘述。Similarly, the manner in which the negotiation information is carried in the second auto-negotiation pulse sent by the second device is the same as the manner in which the negotiation information is carried in the first auto-negotiation pulse in step 1901, and details are not repeated here.
1903、该第一设备根据该第二自协商脉冲确定该第二设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。1903. The first device determines, according to the second auto-negotiation pulse, that the second device supports processing of the first Ether-type packet, and enables itself to support the processing of the first Ether-type packet.
该第一设备在接收到该第二自协商脉冲之后,检测该自协商脉冲中是否存在协商信息,以此来确定该第二设备支持处理第一以太类型报文。若确定该第二设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。After receiving the second auto-negotiation pulse, the first device detects whether there is negotiation information in the auto-negotiation pulse, so as to determine that the second device supports processing the first Ethernet type packet. If it is determined that the second device supports the processing of the first ether type packet, it enables itself to support processing the first ether type packet.
1904、该第二设备根据该第一自协商脉冲确定该第一设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。1904. The second device determines, according to the first auto-negotiation pulse, that the first device supports the processing of the first Ether-type packet, and enables itself to support the processing of the first Ether-type packet.
该第二设备在接收到该第一自协商脉冲之后,检测该自协商脉冲中是否存在协商信息,以此来确定该第一设备支持处理第一以太类型报文。若确定该第一设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。After receiving the first self-negotiation pulse, the second device detects whether there is negotiation information in the self-negotiation pulse, so as to determine that the first device supports processing of the first Ethernet type message. If it is determined that the first device supports the processing of the first Ether-type packet, it enables itself to support the processing of the first Ether-type packet.
在此自协商过程中,该第一设备与该第二设备之间可以多次重复该步骤1901到步骤1904,以此达到协商一致的目的。若该第一设备与该第二设备不能协商一致,则该第一设备和该第二设备均不使能自身支持处理第一以太类型报文,并通知其他邻居。During this auto-negotiation process, steps 1901 to 1904 may be repeated between the first device and the second device for many times, so as to achieve a consensus. If the first device and the second device cannot reach an agreement through negotiation, neither the first device nor the second device is enabled to support the processing of the first ether type packet, and notify other neighbors.
可以理解的是,该步骤1901与步骤1902之间并未限定的时间顺序,该步骤1903与步骤1904之间也并未限定时间顺序。It can be understood that there is no time sequence defined between steps 1901 and 1902 , and no time sequence is defined between steps 1903 and 1904 .
请参阅图21所示,本申请实施例中该第一设备与该第二设备之间协商确定是否支持处理第一以太类型报文的一个示例性流程包括:Referring to FIG. 21 , in this embodiment of the present application, an exemplary process for negotiating between the first device and the second device to determine whether to support processing of the first Ethernet type packet includes:
2101、第一设备向该第二设备发送第一链路层发现协议报文,该第一链路层发现协议中携带协商信息,该协商信息用于指示该第一设备支持处理第一以太类型报文。2101. The first device sends a first link layer discovery protocol packet to the second device, where the first link layer discovery protocol carries negotiation information, and the negotiation information is used to indicate that the first device supports processing the first ether type message.
在该第一设备与该第二设备发送/接收前述第一以太类型报文之前,该第一设备与该第二设备可以通过发送链路层发现协议(Link Layer Discovery Protocol,LLDP)报文的方式,协商确定双方是否具备支持第一以太类型报文的能力。在该第一设备与该第二设备的端口启用(UP)之后,该第一设备向该第二设备发送第一LLDP协议报文。其中,该LLDP协议报文中生成一个802.3TLV类型来标识该协商信息。如图22所示的生成了用于标识该协商信息的LLDP消息格式,其中第一个字节的TLV type=127表示是Organizationally Specific TLVs,后续标记有802.3的OUI,表示是802.3定义的能力。而subtype=8用来表述支持第一以太类型报文(Flex Eth)或者计算以太类型报文或者小帧类型报文能力协 商。Before the first device and the second device send/receive the aforementioned first Ethernet type message, the first device and the second device may send a Link Layer Discovery Protocol (LLDP) message through the communication between the first device and the second device. way, negotiate to determine whether the two parties have the ability to support the first Ethernet type message. After the ports of the first device and the second device are enabled (UP), the first device sends a first LLDP protocol packet to the second device. Wherein, an 802.3TLV type is generated in the LLDP protocol message to identify the negotiation information. As shown in Figure 22, the LLDP message format used to identify the negotiation information is generated, wherein the TLV type=127 of the first byte indicates that it is Organizationally Specific TLVs, and the subsequent OUI is marked with 802.3, indicating that it is a capability defined by 802.3. And subtype=8 is used to express the capability negotiation of supporting the first ether type packet (Flex Eth) or calculating the ether type packet or the small frame type packet.
2102、第一设备接收该第二设备发送的第二链路层发现协议报文,该第二链路层发现协议报文中携带协商信息,该协商信息用于指示该第二设备支持处理第一以太类型报文。2102. The first device receives a second link layer discovery protocol packet sent by the second device, where the second link layer discovery protocol packet carries negotiation information, and the negotiation information is used to instruct the second device to support processing the first link layer. An Ethernet type packet.
同理,该第二设备发送的第二链路层发现协议报文中携带该协商信息的方式与步骤2101中该第一链路层发现协议报文中携带该协商信息的方式相同,此处不再赘述。Similarly, the manner in which the negotiation information is carried in the second link layer discovery protocol packet sent by the second device is the same as the manner in which the negotiation information is carried in the first link layer discovery protocol packet in step 2101. No longer.
2103、该第一设备根据该第二链路层发现协议报文确定该第二设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。2103. The first device determines, according to the second link layer discovery protocol message, that the second device supports processing the first Ethernet type packet, and enables itself to support processing the first Ethernet type packet.
该第一设备在接收到该第二链路层发现协议报文之后,检测该第二链路层发现协议报文中是否存在协商信息,以此来确定该第二设备支持处理第一以太类型报文。若确定该第二设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。After receiving the second link layer discovery protocol packet, the first device detects whether there is negotiation information in the second link layer discovery protocol packet, so as to determine that the second device supports processing the first ether type message. If it is determined that the second device supports the processing of the first ether type packet, it enables itself to support processing the first ether type packet.
2104、该第二设备根据该第一链路层发现协议报文确定该第一设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。2104. The second device determines, according to the first link layer discovery protocol message, that the first device supports processing of the first ether type packet, and enables itself to support processing the first ether type packet.
该第二设备在接收到该第一链路层发现协议报文之后,检测该第一链路层发现协议报文中是否存在协商信息,以此来确定该第二设备支持处理第一以太类型报文。若确定该第二设备支持处理第一以太类型报文,则使能自身支持处理第一以太类型报文。After receiving the first link layer discovery protocol packet, the second device detects whether there is negotiation information in the first link layer discovery protocol packet, so as to determine that the second device supports processing the first ether type message. If it is determined that the second device supports the processing of the first ether type packet, it enables itself to support processing the first ether type packet.
本实施例中,基于LLDP协议的协商需要在端口启用(UP)之后才可以运行。即在这一协商方式下,最初第一以太类型报文能力是关闭的。第一设备通过向第二设备发送携带有Flex Eth能力标记的LLDP报文,进行协商,才使能第一以太类型报文的收发。这一LLDP协商可以在端口运行时候的任何时刻触发。在此自协商过程中,该第一设备与该第二设备之间可以多次重复该步骤2101到步骤2104,以此达到协商一致的目的。若该第一设备与该第二设备不能协商一致,则该第一设备和该第二设备均不使能自身支持处理第一以太类型报文,并通知其他邻居。In this embodiment, the negotiation based on the LLDP protocol can be run only after the port is enabled (UP). That is, in this negotiation mode, the first Ethernet type packet capability is initially disabled. The first device sends an LLDP message carrying the Flex Eth capability flag to the second device, and performs negotiation to enable the sending and receiving of the first Ether-type message. This LLDP negotiation can be triggered at any time while the port is running. During this auto-negotiation process, the first device and the second device may repeat the steps 2101 to 2104 for many times, so as to achieve the purpose of negotiation. If the first device and the second device cannot reach an agreement through negotiation, neither the first device nor the second device is enabled to support the processing of the first ether type packet, and notify other neighbors.
可以理解的是,该步骤2101与步骤2102之间并未限定的时间顺序,该步骤2103与步骤2104之间也并未限定时间顺序。It can be understood that there is no time sequence defined between steps 2101 and 2102 , and no time sequence is defined between steps 2103 and 2104 .
上面描述了本申请实施例中的以太报文处理方法,可以理解的是,以太报文处理设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The Ethernet packet processing method in the embodiments of the present application has been described above. It can be understood that, in order to implement the above functions, the Ethernet packet processing device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or in the form of a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware 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.
本申请实施例可以根据上述方法示例对以太报文处理设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the Ethernet packet processing device can be divided into functional modules according to the foregoing method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
下面对本申请中的以太报文处理设备进行详细描述,请参阅图23,图23为本申请实 施例中以太报文处理设备的一种实施例示意图。以太报文处理设备可以部署于交换机(或路由器)中,以太报文处理设备2300包括:The following describes the Ethernet packet processing device in this application in detail, please refer to FIG. 23, which is a schematic diagram of an embodiment of the Ethernet packet processing device in the embodiment of the application. The Ethernet packet processing device can be deployed in a switch (or router), and the Ethernet packet processing device 2300 includes:
收发模块2301,用于接收第二设备发送的第一以太报文,所述第一以太报文携带第一标识信息,所述第一标识信息用于指示所述第二设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;A transceiver module 2301, configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet Type message, the first Ethernet type message includes an Ethernet message whose frame length is less than 64 bytes;
处理模块2302,用于根据所述第一标识信息处理所述第一以太报文。The processing module 2302 is configured to process the first Ethernet packet according to the first identification information.
一种可能实现方式中,所述处理模块2302,还用于确定所述第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第一以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行根据所述第一标识信息处理所述第一以太报文的操作。In a possible implementation manner, the processing module 2302 is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
一种可能实现方式中,所述处理模块2302,还用于在不支持处理所述第一以太类型报文且所述第一以太报文小于64字节时,丢弃所述第二以太报文。In a possible implementation manner, the processing module 2302 is further configured to discard the second Ethernet packet when processing the first Ethernet type packet is not supported and the first Ethernet packet is less than 64 bytes .
一种可能实现方式中,该处理模块2302,还用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理所述第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;In a possible implementation manner, the processing module 2302 is further configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing the first Ethernet type message, the first Ethernet type message includes an Ethernet message with a frame length of less than 64 bytes;
所述收发模块2301,用于发送所述第二以太报文。The transceiver module 2301 is configured to send the second Ethernet packet.
一种可能实现方式中,所述处理模块2302,还用于确定所述第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第二以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行在所述第二以太报文中携带第二标识信息的操作。In a possible implementation manner, the processing module 2302 is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes, and when processing the first Ethernet type packet is supported, the operation of carrying the second identification information in the second Ethernet packet is performed.
一种可能实现方式中,所述处理模块2302,还用于在不支持处理所述第一以太类型报文且所述第二以太报文的帧长小于64字节时,将所述第二以太报文的帧长填充至64字节并发送;在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于等于64字节且小于等于1518字节时,发送所述第二以太报文,所述第二以太报文中不携带所述第二标识信息。In a possible implementation manner, the processing module 2302 is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes. The frame length of the Ethernet packet is padded to 64 bytes and sent; when the processing of the first Ethernet type packet is not supported and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, Send the second Ethernet packet, where the second Ethernet packet does not carry the second identification information.
一种可能实现方式中,所述第一以太类型报文还包括帧长大于等于64字节的以太报文。In a possible implementation manner, the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
一种可能实现方式中,所述处理模块2302,具体用于检测所述第一以太报文的前导码,所述前导码的帧首定界符位置信息作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。In a possible implementation manner, the processing module 2302 is specifically configured to detect the preamble of the first Ethernet packet, and the position information of the frame header delimiter of the preamble is used as the first identification information; The first identification information is used to process the first Ethernet packet.
一种可能实现方式中,所述处理模块2302,具体用于检测所述第一以太报文的前导码,所述前导码中的目标标识字段作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。In a possible implementation manner, the processing module 2302 is specifically configured to detect the preamble of the first Ethernet packet, and the target identification field in the preamble is used as the first identification information; according to the first The identification information processes the first Ethernet packet.
一种可以实现方式中,所述处理模块2302,还用于检测所述第一以太报文的前导码中携带的第一服务类型标识,所述第一服务类型标识用于指示所述第一以太报文的类型。In a possible implementation manner, the processing module 2302 is further configured to detect the first service type identifier carried in the preamble of the first Ethernet packet, where the first service type identifier is used to indicate the first service type identifier. Type of Ethernet packet.
一种可能实现方式中,所述处理模块2302,具体用于检测所述第一以太报文的编码,所述编码的块类型作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。In a possible implementation manner, the processing module 2302 is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; Describe the first Ethernet packet.
一种可能实现方式中,所述编码的块类型为所述第一以太报文的开始块的块类型。In a possible implementation manner, the encoded block type is the block type of the start block of the first Ethernet packet.
一种可能实现方式中,所述处理模块2302,还用于检测所述编码的块类型后的至少一个字节中携带的第二服务类型标识,所述第二服务类型标识用于指示所述第一以太报文的类型。In a possible implementation manner, the processing module 2302 is further configured to detect a second service type identifier carried in at least one byte after the encoded block type, where the second service type identifier is used to indicate the Type of the first Ethernet packet.
一种可能实现方式中,所述处理模块2302,还用于与该第二设备协商确定是否支持处理所述第一以太类型报文。In a possible implementation manner, the processing module 2302 is further configured to negotiate with the second device to determine whether to support processing of the first Ethernet type packet.
一种可能实现方式中,所述收发模块2301,还用于与所述第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文;In a possible implementation manner, the transceiver module 2301 is further configured to negotiate with the second device whether to support processing the first Ethertype packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet;
或,or,
所述收发模块2301,还用于与所述第二设备通过发送链路层发现协议LLDP协商是否支持处理所述第一以太类型报文,所述链路层发现协议中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。The transceiver module 2301 is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
一种可能实现方式中,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;In a possible implementation manner, the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information;
或者,or,
所述自协商脉冲的链路编码字扩展页中的消息代码值指示所述协商信息。The message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
一种可能实现方式中,所述链路层发现协议中生成弹性能力标识TLV类型,所述TLV类型指示所述协商信息。In a possible implementation manner, an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
上述实施例中的以太报文处理设备可以是网络设备或者用户设备,也可以是应用于网络设备中的芯片或者其他可实现上述网络设备功能的组合器件、部件等。当以太报文处理设备是网络设备时,收发模块可以是收发器,该收发器可以包括天线和射频电路等,处理模块可以是处理器,例如基带芯片等。以太报文处理设备是具有上述以太报文处理设备功能的部件时,收发模块可以是射频单元,处理模块可以是处理器。当以太报文处理设备是芯片系统时,收发模块中用于接收的部分可以是芯片系统的输入端口,收发模块中用于发送的部分可以是芯片系统的输出接口、处理模块可以是芯片系统的处理器,例如:中央处理器(central processing unit,CPU)。The Ethernet packet processing device in the foregoing embodiment may be a network device or user equipment, or may be a chip applied in the network device or other combined devices or components that can implement the functions of the foregoing network device. When the Ethernet packet processing device is a network device, the transceiver module may be a transceiver, and the transceiver may include an antenna and a radio frequency circuit, and the processing module may be a processor, such as a baseband chip. When the Ethernet packet processing device is a component having the function of the above-mentioned Ethernet packet processing device, the transceiver module may be a radio frequency unit, and the processing module may be a processor. When the Ethernet packet processing device is a chip system, the receiving part of the transceiver module can be the input port of the chip system, the sending part of the transceiver module can be the output interface of the chip system, and the processing module can be the chip system A processor, such as a central processing unit (CPU).
在本申请实施例中,该以太报文处理设备所包括的存储器主要用于存储软件程序和数据,例如存储上述实施例中所描述的程序等。该以太报文处理设备还具有以下功能:In the embodiments of the present application, the memory included in the Ethernet packet processing device is mainly used to store software programs and data, for example, to store the programs described in the foregoing embodiments. The Ethernet packet processing device also has the following functions:
收发器,用于接收第二设备发送的第一以太报文,所述第一以太报文携带第一标识信息,所述第一标识信息用于指示所述第二设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;a transceiver, configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet type message, the first Ethernet type message includes an Ethernet message with a frame length of less than 64 bytes;
处理器,用于根据所述第一标识信息处理所述第一以太报文。a processor, configured to process the first Ethernet packet according to the first identification information.
一种可能实现方式中,所述处理器,还用于确定所述第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第一以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行根据所述第一标识信息处理所述第一以太报文的操作。In a possible implementation manner, the processor is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
一种可能实现方式中,所述处理器,还用于在不支持处理所述第一以太类型报文且所 述第一以太报文小于64字节时,丢弃所述第二以太报文。In a possible implementation manner, the processor is further configured to discard the second Ethernet packet when the processing of the first Ethernet packet is not supported and the first Ethernet packet is smaller than 64 bytes.
一种可能实现方式中,该处理器,还用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理所述第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;In a possible implementation manner, the processor is further configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet. The first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes;
所述收发器,用于发送所述第二以太报文。The transceiver is configured to send the second Ethernet packet.
一种可能实现方式中,所述处理器,还用于确定所述第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第二以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行在所述第二以太报文中携带第二标识信息的操作。In a possible implementation manner, the processor is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of carrying the second identification information in the second Ethernet packet is performed.
一种可能实现方式中,所述处理器,还用于在不支持处理所述第一以太类型报文且所述第二以太报文的帧长小于64字节时,将所述第二以太报文的帧长填充至64字节并发送;在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于等于64字节且小于等于1518字节时,发送所述第二以太报文,所述第二以太报文中不携带所述第二标识信息。In a possible implementation manner, the processor is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes. The frame length of the packet is padded to 64 bytes and sent; when the first Ethernet type packet cannot be processed and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, send For the second Ethernet packet, the second Ethernet packet does not carry the second identification information.
一种可能实现方式中,所述第一以太类型报文还包括帧长大于等于64字节的以太报文。In a possible implementation manner, the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
一种可能实现方式中,所述处理器,具体用于检测所述第一以太报文的前导码,所述前导码的帧首定界符位置信息作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。In a possible implementation manner, the processor is specifically configured to detect the preamble of the first Ethernet packet, and the position information of the frame header delimiter of the preamble is used as the first identification information; according to the The first identification information processes the first Ethernet packet.
一种可能实现方式中,所述处理器,具体用于检测所述第一以太报文的前导码,所述前导码中的目标标识字段作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。In a possible implementation manner, the processor is specifically configured to detect the preamble of the first Ethernet packet, and the target identification field in the preamble is used as the first identification information; according to the first identification The information processes the first Ethernet packet.
一种可以实现方式中,所述处理器,还用于检测所述第一以太报文的前导码中携带的第一服务类型标识,所述第一服务类型标识用于指示所述第一以太报文的类型。In one possible implementation, the processor is further configured to detect the first service type identifier carried in the preamble of the first Ethernet packet, where the first service type identifier is used to indicate the first Ethernet packet. Type of message.
一种可能实现方式中,所述处理器,具体用于检测所述第一以太报文的编码,所述编码的块类型作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。In a possible implementation manner, the processor is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the first identification information; process the encoding according to the first identification information. The first Ethernet packet.
一种可能实现方式中,所述编码的块类型为所述第一以太报文的开始块的块类型。In a possible implementation manner, the encoded block type is the block type of the start block of the first Ethernet packet.
一种可能实现方式中,所述处理器,还用于检测所述编码的块类型后的至少一个字节中携带的第二服务类型标识,所述第二服务类型标识用于指示所述第一以太报文的类型。In a possible implementation manner, the processor is further configured to detect a second service type identifier carried in at least one byte after the encoded block type, where the second service type identifier is used to indicate the first An Ethernet packet type.
一种可能实现方式中,所述处理器,还用于与该第二设备协商确定是否支持处理所述第一以太类型报文。In a possible implementation manner, the processor is further configured to negotiate with the second device to determine whether to support processing of the first Ethernet type packet.
一种可能实现方式中,所述收发器,还用于与所述第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文;In a possible implementation manner, the transceiver is further configured to negotiate with the second device whether to support processing the first Ether-type packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, so the The negotiation information is used to instruct the first device or the second device to support processing the first ether type packet;
或,or,
所述收发器,还用于与所述第二设备通过发送链路层发现协议LLDP协商是否支持处理所述第一以太类型报文,所述链路层发现协议中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。The transceiver is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, so The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
一种可能实现方式中,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;In a possible implementation manner, the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information;
或者,or,
所述自协商脉冲的链路编码字扩展页中的消息代码值指示所述协商信息。The message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
一种可能实现方式中,所述链路层发现协议中生成弹性能力标识TLV类型,所述TLV类型指示所述协商信息。In a possible implementation manner, an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
下面对本申请中的以太报文处理设备进行详细描述,请参阅图24,图24为本申请实施例中以太报文处理设备的一种实施例示意图。以太报文处理设备可以部署于交换机(或路由器)中,以太报文处理设备2400包括:处理模块2401,用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;The following describes the Ethernet packet processing device in this application in detail, please refer to FIG. 24 , which is a schematic diagram of an embodiment of the Ethernet packet processing device in the embodiment of the application. The Ethernet packet processing device can be deployed in a switch (or router). The Ethernet packet processing device 2400 includes: a processing module 2401, configured to carry second identification information in the second Ethernet packet, where the second identification information is used for Instructing the first device to support processing of the first ether type packet, where the first ether type packet includes an ether packet with a frame length less than 64 bytes;
收发模块2402,用于发送所述第二以太报文。The transceiver module 2402 is configured to send the second Ethernet packet.
一种可能实现方式中,所述处理模块2401,还用于确定所述第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第二以太报文的帧长小于64字节,且所述第一设备支持处理所述第一以太类型报文时,执行在所述第二以太报文中携带第二标识信息的操作。In a possible implementation manner, the processing module 2401 is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes, and the first device supports processing the first Ethernet type packet, the operation of carrying the second identification information in the second Ethernet packet is performed.
一种可能实现方式中,所述处理模块2401,还用于在不支持处理所述第一以太类型报文且所述第二以太报文的帧长小于64字节时,将所述第二以太报文的帧长填充至64字节并发送;In a possible implementation manner, the processing module 2401 is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes. The frame length of the Ethernet message is padded to 64 bytes and sent;
在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于等于64字节且小于等于1518字节时,发送所述第二以太报文,所述第二以太报文不携带所述第二标识信息;When processing of the first Ethernet type packet is not supported and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the second Ethernet packet is sent, and the second Ethernet packet is sent. The message does not carry the second identification information;
在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于1518字节时,将所述第二以太报文的帧长截断至1518字节并发送。When processing of the first Ethernet packet is not supported and the frame length of the second Ethernet packet is greater than 1518 bytes, the frame length of the second Ethernet packet is truncated to 1518 bytes and sent.
一种可能实现方式中,所述收发模块2402,用于接收第一以太报文,所述第一以太报文中携带第一标识信息,所述第一标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;In a possible implementation manner, the transceiver module 2402 is configured to receive a first Ethernet packet, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate the first device support processing of the first ether type packet, the first ether type packet includes an ether packet whose frame length is less than 64 bytes;
所述处理模块2401,还用于根据所述第一标识信息处理所述第一以太报文。The processing module 2401 is further configured to process the first Ethernet packet according to the first identification information.
一种可能实现方式中,所述处理模块2401,还用于确定所述第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第一以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行根据所述第一标识信息处理所述第一以太报文的操作。In a possible implementation manner, the processing module 2401 is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
一种可能实现方式中,所述处理模块2401,还用于在不支持处理所述第一以太类型报文且所述第一以太报文小于64字节时,丢弃所述第一以太报文。In a possible implementation manner, the processing module 2401 is further configured to discard the first Ethernet packet when the processing of the first Ethernet type packet is not supported and the first Ethernet packet is less than 64 bytes .
一种可能实现方式中,所述第一以太类型报文还包括帧长大于等于64字节的以太报文。In a possible implementation manner, the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
一种可能实现方式中,所述处理模块2401,具体用于在介质访问控制层MAC生成所述 第二以太报文的前导码,所述前导码的帧首定界符位置信息作为所述第二标识信息。In a possible implementation manner, the processing module 2401 is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the frame header delimiter position information of the preamble is used as the first code. 2. Identification information.
一种可能实现方式中,所述处理模块2401,具体用于在介质访问控制层MAC生成所述第二以太报文的前导码,所述前导码中的目标标识字段作为所述第二标识信息。In a possible implementation manner, the processing module 2401 is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the target identification field in the preamble is used as the second identification information. .
一种可以实现方式中,所述处理模块2401,还用于在所述第二以太报文的前导码中携带第一服务类型标识,所述第一服务类型标识用于指示所述第二以太报文的类型。In a possible implementation manner, the processing module 2401 is further configured to carry a first service type identifier in the preamble of the second Ethernet packet, and the first service type identifier is used to indicate the second Ethernet packet. Type of message.
一种可能实现方式中,所述处理模块2401,具体用于在物理编码子层PCS生成所述第二以太报文的编码,所述编码的块类型作为所述第二标识信息。In a possible implementation manner, the processing module 2401 is specifically configured to generate the encoding of the second Ethernet packet in the physical encoding sublayer PCS, and the encoded block type is used as the second identification information.
一种可能实现方式中,所述编码的块类型为所述第二以太报文的开始块的块类型。In a possible implementation manner, the encoded block type is the block type of the start block of the second Ethernet packet.
一种可能实现方式中,所述处理模块2401,还用于在所述编码的块类型后的至少一个字节中携带第二服务类型标识,所述第二服务类型标识用于指示所述第二以太报文的类型。In a possible implementation manner, the processing module 2401 is further configured to carry a second service type identifier in at least one byte after the encoded block type, where the second service type identifier is used to indicate the first 2 Types of Ethernet packets.
一种可能实现方式中,所述处理模块2401,还用于与第二设备协商确定是否支持处理所述第一以太类型报文,所述第一设备与所述第二设备处于同一链路的两端。In a possible implementation manner, the processing module 2401 is further configured to negotiate with a second device to determine whether to support processing the first Ethernet type packet, and the first device and the second device are on the same link. both ends.
一种可能实现方式中,所述收发模块2402,还用于与所述第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文;In a possible implementation manner, the transceiver module 2402 is further configured to negotiate with the second device whether to support processing the first EtherType packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet;
或,or,
所述收发模块2402,还用于与所述第二设备通过发送链路层发现协议LLDP协商是否支持处理所述第一以太类型报文,所述链路层发现协议中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。The transceiver module 2402 is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
一种可能实现方式中,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;In a possible implementation manner, the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information;
或者,or,
所述自协商脉冲的链路编码字扩展页中的消息代码值指示所述协商信息。The message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
一种可能实现方式中,所述链路层发现协议中生成弹性能力标识TLV类型,所述TLV类型指示所述协商信息。In a possible implementation manner, an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
上述实施例中的以太报文处理设备可以是网络设备或者用户设备,也可以是应用于网络设备中的芯片或者其他可实现上述网络设备功能的组合器件、部件等。当以太报文处理设备是网络设备时,收发模块可以是收发器,该收发器可以包括天线和射频电路等,处理模块可以是处理器,例如基带芯片等。以太报文处理设备是具有上述以太报文处理设备功能的部件时,收发模块可以是射频单元,处理模块可以是处理器。当以太报文处理设备是芯片系统时,收发模块中用于接收的部分可以是芯片系统的输入端口,收发模块中用于发送的部分可以是芯片系统的输出接口、处理模块可以是芯片系统的处理器,例如:中央处理器(central processing unit,CPU)。The Ethernet packet processing device in the foregoing embodiment may be a network device or user equipment, or may be a chip applied in the network device or other combined devices or components that can implement the functions of the foregoing network device. When the Ethernet packet processing device is a network device, the transceiver module may be a transceiver, and the transceiver may include an antenna and a radio frequency circuit, and the processing module may be a processor, such as a baseband chip. When the Ethernet packet processing device is a component having the function of the above-mentioned Ethernet packet processing device, the transceiver module may be a radio frequency unit, and the processing module may be a processor. When the Ethernet packet processing device is a chip system, the receiving part of the transceiver module can be the input port of the chip system, the sending part of the transceiver module can be the output interface of the chip system, and the processing module can be the chip system A processor, such as a central processing unit (CPU).
在本申请实施例中,该以太报文处理设备所包括的存储器主要用于存储软件程序和数据,例如存储上述实施例中所描述的程序等。该以太报文处理设备还具有以下功能:In the embodiments of the present application, the memory included in the Ethernet packet processing device is mainly used to store software programs and data, for example, to store the programs described in the foregoing embodiments. The Ethernet packet processing device also has the following functions:
处理器,用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述 第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;a processor, configured to carry second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing of the first Ethernet type packet, and the first Ethernet type packet includes Ethernet packets whose frame length is less than 64 bytes;
收发器,用于发送所述第二以太报文。a transceiver, configured to send the second Ethernet packet.
一种可能实现方式中,所述处理器,还用于确定所述第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第二以太报文的帧长小于64字节,且所述第一设备支持处理所述第一以太类型报文时,执行在所述第二以太报文中携带第二标识信息的操作。In a possible implementation manner, the processor is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes, and the first device supports processing the first Ethernet type packet, the operation of carrying the second identification information in the second Ethernet packet is performed.
一种可能实现方式中,所述处理器,还用于在不支持处理所述第一以太类型报文且所述第二以太报文的帧长小于64字节时,将所述第二以太报文的帧长填充至64字节并发送;In a possible implementation manner, the processor is further configured to process the second Ethernet packet when processing the first Ethernet packet is not supported and the frame length of the second Ethernet packet is less than 64 bytes. The frame length of the message is padded to 64 bytes and sent;
在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于等于64字节且小于等于1518字节时,发送所述第二以太报文,所述第二以太报文不携带所述第二标识信息;When processing of the first Ethernet type packet is not supported and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the second Ethernet packet is sent, and the second Ethernet packet is sent. The message does not carry the second identification information;
在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于1518字节时,将所述第二以太报文的帧长截断至1518字节并发送。When processing of the first Ethernet packet is not supported and the frame length of the second Ethernet packet is greater than 1518 bytes, the frame length of the second Ethernet packet is truncated to 1518 bytes and sent.
一种可能实现方式中,所述收发器,用于接收第一以太报文,所述第一以太报文中携带第一标识信息,所述第一标识信息用于指示所述第一设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;In a possible implementation manner, the transceiver is configured to receive a first Ethernet packet, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the first device supports processing a first ether type packet, where the first ether type packet includes an ether packet whose frame length is less than 64 bytes;
所述处理器,还用于根据所述第一标识信息处理所述第一以太报文。The processor is further configured to process the first Ethernet packet according to the first identification information.
一种可能实现方式中,所述处理器,还用于确定所述第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第一以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行根据所述第一标识信息处理所述第一以太报文的操作。In a possible implementation manner, the processor is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the length is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
一种可能实现方式中,所述处理器,还用于在不支持处理所述第一以太类型报文且所述第一以太报文小于64字节时,丢弃所述第一以太报文。In a possible implementation manner, the processor is further configured to discard the first Ethernet packet when the processing of the first Ethernet type packet is not supported and the first Ethernet packet is smaller than 64 bytes.
一种可能实现方式中,所述第一以太类型报文还包括帧长大于等于64字节的以太报文。In a possible implementation manner, the first Ethernet type packet further includes an Ethernet packet whose frame length is greater than or equal to 64 bytes.
一种可能实现方式中,所述处理器,具体用于在介质访问控制层MAC生成所述第二以太报文的前导码,所述前导码的帧首定界符位置信息作为所述第二标识信息。In a possible implementation manner, the processor is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the frame header delimiter position information of the preamble is used as the second Ethernet packet. identification information.
一种可能实现方式中,所述处理器,具体用于在介质访问控制层MAC生成所述第二以太报文的前导码,所述前导码的帧首定界符位置信息作为所述第二标识信息。In a possible implementation manner, the processor is specifically configured to generate a preamble of the second Ethernet packet at the medium access control layer MAC, and the frame header delimiter position information of the preamble is used as the second Ethernet packet. identification information.
一种可能实现方式中,所述处理器,具体用于在介质访问控制层MAC生成所述第二以太报文的前导码,所述前导码中的目标标识字段作为所述第二标识信息。In a possible implementation manner, the processor is specifically configured to generate a preamble of the second Ethernet packet at a medium access control layer MAC, and a target identification field in the preamble is used as the second identification information.
一种可以实现方式中,所述处理器,还用于在所述第二以太报文的前导码中携带第一服务类型标识,所述第一服务类型标识用于指示所述第二以太报文的类型。In a possible implementation manner, the processor is further configured to carry a first service type identifier in the preamble of the second Ethernet packet, and the first service type identifier is used to indicate the second Ethernet packet. type of text.
一种可能实现方式中,所述处理器,具体用于在物理编码子层PCS生成所述第二以太报文的编码,所述编码的块类型作为所述第二标识信息。In a possible implementation manner, the processor is specifically configured to generate an encoding of the second Ethernet packet at the physical encoding sublayer PCS, and the encoded block type is used as the second identification information.
一种可能实现方式中,所述编码的块类型为所述第二以太报文的开始块的块类型。In a possible implementation manner, the encoded block type is the block type of the start block of the second Ethernet packet.
一种可能实现方式中,所述处理器,还用于在所述编码的块类型后的至少一个字节中 携带第二服务类型标识,所述第二服务类型标识用于指示所述第二以太报文的类型。In a possible implementation manner, the processor is further configured to carry a second service type identifier in at least one byte after the encoded block type, where the second service type identifier is used to indicate the second service type identifier. Type of Ethernet packet.
一种可能实现方式中,所述处理器,还用于与第二设备协商确定是否支持处理所述第一以太类型报文,所述第一设备与所述第二设备处于同一链路的两端。In a possible implementation manner, the processor is further configured to negotiate with a second device to determine whether to support processing of the first Ethernet type packet, and the first device and the second device are on two sides of the same link. end.
一种可能实现方式中,所述收发器,还用于与所述第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文;In a possible implementation manner, the transceiver is further configured to negotiate with the second device whether to support processing the first Ether-type packet by sending an auto-negotiation pulse, and the auto-negotiation pulse carries negotiation information, so the The negotiation information is used to instruct the first device or the second device to support processing the first ether type packet;
或,or,
所述收发器,还用于与所述第二设备通过发送链路层发现协议LLDP协商是否支持处理所述第一以太类型报文,所述链路层发现协议中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。The transceiver is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, so The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
一种可能实现方式中,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;In a possible implementation manner, the unused bits in the link code word base page of the auto-negotiation pulse indicate the negotiation information;
或者,or,
所述自协商脉冲的链路编码字扩展页中的消息代码值指示所述协商信息。The message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
一种可能实现方式中,所述链路层发现协议中生成弹性能力标识TLV类型,所述TLV类型指示所述协商信息。In a possible implementation manner, an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
本申请实施例还提供了一种处理装置。处理装置包括处理器和接口;该处理器,用于执行上述任一方法实施例的以太报文的处理方法。The embodiment of the present application also provides a processing device. The processing device includes a processor and an interface; the processor is configured to execute the method for processing an Ethernet packet according to any of the foregoing method embodiments.
应理解,上述处理装置可以是一个芯片,该处理器可以通过硬件实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。It should be understood that the above-mentioned processing device may be a chip, and the processor may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, The processor may be a general-purpose processor, and is implemented by reading software codes stored in a memory, which may be integrated in the processor, or located outside the processor, and exists independently.
其中,“通过硬件实现”是指通过不具有程序指令处理功能的硬件处理电路来实现上述模块或者单元的功能,该硬件处理电路可以通过分立的硬件元器件组成,也可以是集成电路。为了减少功耗、降低尺寸,通常会采用集成电路的形式来实现。硬件处理电路可以包括ASIC(application-specific integrated circuit,专用集成电路),或者PLD(programmable logic device,可编程逻辑器件);其中,PLD又可包括FPGA(field programmable gate array,现场可编程门阵列)、CPLD(complex programmable logic device,复杂可编程逻辑器件)等等。这些硬件处理电路可以是单独封装的一块半导体芯片(如封装成一个ASIC);也可以跟其他电路(如CPU、DSP)集成在一起后封装成一个半导体芯片,例如,可以在一个硅基上形成多种硬件电路以及CPU,并单独封装成一个芯片,这种芯片也称为SoC,或者也可以在硅基上形成用于实现FPGA功能的电路以及CPU,并单独封闭成一个芯片,这种芯片也称为SoPC(system on a programmable chip,可编程片上系统)。Wherein, "implemented by hardware" means that the functions of the above-mentioned modules or units are realized by a hardware processing circuit that does not have the function of processing program instructions. The hardware processing circuit can be composed of discrete hardware components or an integrated circuit. In order to reduce power consumption and reduce size, it is usually implemented in the form of integrated circuits. The hardware processing circuit may include ASIC (application-specific integrated circuit, application-specific integrated circuit), or PLD (programmable logic device, programmable logic device); wherein, PLD may include FPGA (field programmable gate array, field programmable gate array) , CPLD (complex programmable logic device, complex programmable logic device) and so on. These hardware processing circuits can be a single semiconductor chip packaged separately (such as packaged into an ASIC); they can also be integrated with other circuits (such as CPU, DSP) and packaged into a semiconductor chip, for example, can be formed on a silicon substrate A variety of hardware circuits and CPUs are individually packaged into a chip, which is also called SoC, or circuits and CPUs for implementing FPGA functions can also be formed on a silicon substrate and individually enclosed into a single chip. Also known as SoPC (system on a programmable chip, programmable system on a chip).
本申请实施例还提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机控制以太报文处理设备执行如前述方法实施例所示任一项实现方式。Embodiments of the present application further provide a computer-readable storage medium, including instructions, which, when run on a computer, cause the computer to control an Ethernet packet processing device to execute any one of the implementations shown in the foregoing method embodiments.
本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现 方式。An embodiment of the present application also provides a computer program product, the computer program product includes computer program code, and when the computer program code is run on a computer, causes the computer to execute any one of the implementations shown in the foregoing method embodiments.
本申请实施例还提供一种芯片系统,包括存储器和处理器,存储器用于存储计算机程序,处理器用于从存储器中调用并运行计算机程序,使得芯片执行如前述方法实施例所示任一项实现方式。An embodiment of the present application further provides a chip system, including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the chip executes any one of the implementations shown in the foregoing method embodiments. Way.
本申请实施例还提供一种芯片系统,包括处理器,处理器用于调用并运行计算机程序,使得芯片执行如前述方法实施例所示任一项实现方式。Embodiments of the present application further provide a chip system, including a processor, where the processor is configured to call and run a computer program, so that the chip executes any one of the implementations shown in the foregoing method embodiments.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be A physical unit, which can be located in one place or distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware. Special components, etc. to achieve. Under normal circumstances, all functions completed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuit, etc. However, a software program implementation is a better implementation in many cases for this application. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art. The computer software products are stored in a readable storage medium, such as a floppy disk of a computer. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device execute the methods described in the various embodiments of the present application.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。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.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、第一网络设备或第二网络设备、计算设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、第一网络设备或第二网络设备、计算设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的第一网络设备或第二网络设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are 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 instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website site, a computer, a first network device or a second network device, computing device, or data center to another website site, computer, first, by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) A network device or a second network device, computing device or data center transmits. The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a first network device or a second network device, a data center, etc. that includes one or more available media integrated. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的 特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It is to be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。Additionally, the terms "system" and "network" are often used interchangeably herein. It should be understood that, in this embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean that B is only determined according to A, and B may also be determined according to A and/or other information.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。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, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. 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.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
总之,以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。In a word, the above descriptions are only preferred embodiments of the technical solutions of the present application, and are not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the principles of this application shall be included within the protection scope of this application.

Claims (38)

  1. 一种以太报文的处理方法,其特征在于,包括:A method for processing an Ethernet message, comprising:
    第一设备接收第二设备发送的第一以太报文,所述第一以太报文携带第一标识信息,所述第一标识信息用于指示所述第二设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;The first device receives the first Ethernet packet sent by the second device, the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing of the first Ethernet type packet , the first Ethernet type packet includes an Ethernet packet whose frame length is less than 64 bytes;
    所述第一设备根据所述第一标识信息处理所述第一以太报文。The first device processes the first Ethernet packet according to the first identification information.
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备根据所述第一标识信息处理所述第一以太报文之前,所述方法还包括:The method according to claim 1, wherein before the first device processes the first Ethernet packet according to the first identification information, the method further comprises:
    所述第一设备确定所述第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;The first device determines the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet;
    在所述第一以太报文的帧长小于64字节,且所述第一设备支持处理所述第一以太类型报文时,所述第一设备执行根据所述第一标识信息处理所述第一以太报文的操作。When the frame length of the first Ethernet packet is less than 64 bytes and the first device supports processing of the first Ethernet type packet, the first device executes the processing according to the first identification information. Operation of the first Ethernet packet.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, wherein the method further comprises:
    在所述第一设备不支持处理所述第一以太类型报文且所述第一以太报文小于64字节时,所述第一设备丢弃所述第二以太报文。When the first device does not support processing the first Ethernet packet and the first Ethernet packet is smaller than 64 bytes, the first device discards the second Ethernet packet.
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 3, wherein the method further comprises:
    所述第一设备在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理所述第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;The first device carries second identification information in the second Ethernet packet, where the second identification information is used to indicate that the first device supports processing the first Ethernet type packet, and the first Ethernet type packet The message includes Ethernet messages whose frame length is less than 64 bytes;
    所述第一设备发送所述第二以太报文。The first device sends the second Ethernet packet.
  5. 根据权利要求4所述的方法,其特征在于,所述第一设备在第二以太报文中携带第二标识信息之前,所述方法还包括:The method according to claim 4, wherein before the first device carries the second identification information in the second Ethernet packet, the method further comprises:
    所述第一设备确定所述第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;The first device determines the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet;
    在所述第一以太报文的帧长小于64字节,且所述第一设备支持处理所述第一以太类型报文时,所述第一设备执行在所述第二以太报文中携带第二标识信息的操作。When the frame length of the first Ethernet packet is less than 64 bytes, and the first device supports processing of the first Ethernet type packet, the first device executes the process of carrying in the second Ethernet packet Operation of the second identification information.
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, wherein the method further comprises:
    在所述第一设备不支持处理所述第一以太类型报文且所述第二以太报文的帧长小于64字节时,所述第一设备将所述第二以太报文的帧长填充至64字节并发送;When the first device does not support processing the first Ethernet packet and the frame length of the second Ethernet packet is less than 64 bytes, the first device converts the frame length of the second Ethernet packet to Pad to 64 bytes and send;
    在所述第一设备不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于等于64字节且小于等于1518字节时,所述第一设备发送所述第二以太报文,所述第二以太报文中不携带所述第二标识信息。When the first device does not support processing the first Ethernet packet and the frame length of the second Ethernet packet is greater than or equal to 64 bytes and less than or equal to 1518 bytes, the first device sends the first Ethernet packet. Two Ethernet packets, the second Ethernet packets do not carry the second identification information.
  7. 根据权利要求1所述的方法,其特征在于,所述第一以太类型报文还包括帧长大于等于64字节的以太报文。The method according to claim 1, wherein the first Ethernet type packet further comprises an Ethernet packet whose frame length is greater than or equal to 64 bytes.
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一设备根据所述第一标识信息处理所述第一以太报文包括:The method according to any one of claims 1 to 7, wherein the processing of the first Ethernet packet by the first device according to the first identification information comprises:
    所述第一设备检测所述第一以太报文的前导码,所述前导码的帧首定界符位置信息作 为所述第一标识信息;The first device detects the preamble of the first Ethernet message, and the frame head delimiter position information of the preamble is used as the first identification information;
    所述第一设备根据所述第一标识信息处理所述第一以太报文。The first device processes the first Ethernet packet according to the first identification information.
  9. 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一设备根据所述第一标识信息处理所述第一以太报文包括:The method according to any one of claims 1 to 7, wherein the processing of the first Ethernet packet by the first device according to the first identification information comprises:
    所述第一设备检测所述第一以太报文的前导码,所述前导码中的目标标识字段作为所述第一标识信息;The first device detects the preamble of the first Ethernet message, and the target identification field in the preamble is used as the first identification information;
    所述第一设备根据所述第一标识信息处理所述第一以太报文。The first device processes the first Ethernet packet according to the first identification information.
  10. 根据权利要求8或9中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8 or 9, wherein the method further comprises:
    所述第一设备检测所述第一以太报文的前导码中携带的第一服务类型标识,所述第一服务类型标识用于指示所述第一以太报文的类型。The first device detects the first service type identifier carried in the preamble of the first Ethernet packet, where the first service type identifier is used to indicate the type of the first Ethernet packet.
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述第一设备根据所述第一标识信息处理所述第一以太报文包括:The method according to any one of claims 1 to 10, wherein the processing of the first Ethernet packet by the first device according to the first identification information comprises:
    所述第一设备检测所述第一以太报文的编码,所述编码的块类型作为所述第一标识信息;The first device detects the encoding of the first Ethernet message, and the encoded block type is used as the first identification information;
    所述第一设备根据所述第一标识信息处理所述第一以太报文。The first device processes the first Ethernet packet according to the first identification information.
  12. 根据权利要求11所述的方法,其特征在于,所述编码的块类型为所述第一以太报文的开始块。The method according to claim 11, wherein the encoded block type is a start block of the first Ethernet packet.
  13. 根据权利要求11或12所述的方法,其特征在于,所述方法还包括:The method according to claim 11 or 12, wherein the method further comprises:
    所述第一设备检测所述编码的块类型后的至少一个字节中携带的第二服务类型标识,所述第二服务类型标识用于指示所述第一以太报文的类型。The first device detects a second service type identifier carried in at least one byte after the encoded block type, where the second service type identifier is used to indicate the type of the first Ethernet packet.
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 13, wherein the method further comprises:
    所述第一设备与所述第二设备协商确定是否支持处理所述第一以太类型报文。The first device negotiates with the second device to determine whether to support processing of the first Ethernet type packet.
  15. 根据权利要求14所述的方法,其特征在于,所述方法还包括:The method of claim 14, wherein the method further comprises:
    所述第一设备与所述第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文;The first device and the second device negotiate whether to support processing the first Ethernet type packet by sending an auto-negotiation pulse, the auto-negotiation pulse carries negotiation information, and the negotiation information is used to indicate the first Ethernet type packet. The device or the second device supports processing of the first Ethernet type packet;
    或,or,
    所述第一设备与所述第二设备通过发送链路层发现协议LLDP协商是否支持处理所述第一以太类型报文,所述链路层发现协议中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。The first device and the second device negotiate whether to support processing the first Ethernet type packet by sending the link layer discovery protocol LLDP, the link layer discovery protocol carries the negotiation information, the negotiation information It is used to instruct the first device or the second device to support processing the first Ethernet type packet.
  16. 根据权利要求15所述的方法,其特征在于,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;The method according to claim 15, wherein an unused bit in the link code word base page of the auto-negotiation pulse indicates the negotiation information;
    或者,or,
    所述自协商脉冲的链路编码字扩展页中的消息代码值指示所述协商信息。The message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
  17. 根据权利要求15所述的方法,其特征在于,所述链路层发现协议中生成弹性能力标识TLV类型,所述TLV类型指示所述协商信息。The method according to claim 15, wherein an elastic capability identifier TLV type is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
  18. 一种以太报文处理设备,其特征在于,包括:An Ethernet packet processing device, comprising:
    收发模块,用于接收第二设备发送的第一以太报文,所述第一以太报文携带第一标识信息,所述第一标识信息用于指示所述第二设备支持处理第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;A transceiver module, configured to receive a first Ethernet packet sent by a second device, where the first Ethernet packet carries first identification information, and the first identification information is used to indicate that the second device supports processing the first Ethernet type message, the first Ethernet type message includes an Ethernet message with a frame length of less than 64 bytes;
    处理模块,用于根据所述第一标识信息处理所述第一以太报文。A processing module, configured to process the first Ethernet packet according to the first identification information.
  19. 根据权利要求18所述的以太报文处理设备,其特征在于,所述处理模块,还用于确定所述第一以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第一以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行根据所述第一标识信息处理所述第一以太报文的操作。The Ethernet packet processing device according to claim 18, wherein the processing module is further configured to determine the frame length of the first Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length of the first Ethernet packet is less than 64 bytes and the processing of the first Ethernet type packet is supported, the operation of processing the first Ethernet packet according to the first identification information is performed.
  20. 根据权利要求19所述的以太报文处理设备,其特征在于,所述处理模块,还用于在不支持处理所述第一以太类型报文且所述第一以太报文小于64字节时,丢弃所述第二以太报文。The device for processing an Ethernet packet according to claim 19, wherein the processing module is further configured to process the first Ethernet packet when the first Ethernet packet is not supported and the first Ethernet packet is less than 64 bytes. , discard the second Ethernet packet.
  21. 根据权利要求18至20中任一项所述的以太报文处理设备,其特征在于,所述处理模块,用于在第二以太报文中携带第二标识信息,所述第二标识信息用于指示所述第一设备支持处理所述第一以太类型报文,所述第一以太类型报文包括帧长小于64字节的以太报文;The Ethernet packet processing device according to any one of claims 18 to 20, wherein the processing module is configured to carry second identification information in the second Ethernet packet, and the second identification information is used for instructing the first device to support processing of the first ether type packet, where the first ether type packet includes an ether packet with a frame length less than 64 bytes;
    所述收发模块,还用于发送所述第二以太报文。The transceiver module is further configured to send the second Ethernet message.
  22. 根据权利要求21所述的以太报文处理设备,其特征在于,所述处理模块,还用于确定所述第二以太报文的帧长以及自身是否支持处理所述第一以太类型报文;在所述第二以太报文的帧长小于64字节,且支持处理所述第一以太类型报文时,执行在所述第二以太报文中携带第二标识信息的操作。The Ethernet packet processing device according to claim 21, wherein the processing module is further configured to determine the frame length of the second Ethernet packet and whether it supports processing the first Ethernet type packet; When the frame length of the second Ethernet packet is less than 64 bytes and supports processing of the first Ethernet type packet, the operation of carrying the second identification information in the second Ethernet packet is performed.
  23. 根据权利要求22所述的以太报文处理设备,其特征在于,所述处理模块,还用于在不支持处理所述第一以太类型报文且所述第二以太报文的帧长小于64字节时,将所述第二以太报文的帧长填充至64字节并发送;在不支持处理所述第一以太类型报文且所述第二以太报文的帧长大于等于64字节且小于等于1518字节时,发送所述第二以太报文,所述第二以太报文中不携带所述第二标识信息。The device for processing an Ethernet packet according to claim 22, wherein the processing module is further configured to process the first Ethernet type packet and the frame length of the second Ethernet packet is less than 64 Bytes, fill the frame length of the second Ethernet packet to 64 bytes and send it; when the first Ethernet type packet cannot be processed and the frame length of the second Ethernet packet is greater than or equal to 64 bytes When the number of bytes is less than or equal to 1518 bytes, the second Ethernet packet is sent, and the second Ethernet packet does not carry the second identification information.
  24. 根据权利要求18所述的以太报文处理设备,其特征在于,所述第一以太类型报文还包括帧长大于等于64字节的以太报文。The Ethernet packet processing device according to claim 18, wherein the first Ethernet type packet further comprises an Ethernet packet whose frame length is greater than or equal to 64 bytes.
  25. 根据权利要求18至24中任一项所述的以太报文处理设备,其特征在于,所述处理模块,具体用于检测所述第一以太报文的前导码,所述前导码的帧首定界符位置信息作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。The Ethernet packet processing device according to any one of claims 18 to 24, wherein the processing module is specifically configured to detect the preamble of the first Ethernet packet, and the frame header of the preamble is The delimiter position information is used as the first identification information; the first Ethernet packet is processed according to the first identification information.
  26. 根据权利要求18至24中任一项所述的以太报文处理设备,其特征在于,所述处理模块,具体用于检测所述第一以太报文的前导码,所述前导码中的目标标识字段作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。The Ethernet packet processing device according to any one of claims 18 to 24, wherein the processing module is specifically configured to detect a preamble of the first Ethernet packet, and the target in the preamble is The identification field is used as the first identification information; the first Ethernet packet is processed according to the first identification information.
  27. 根据权利要求25或26中任一项所述的以太报文处理设备,其特征在于,所述处理模块,还用于检测所述第一以太报文的前导码中携带的第一服务类型标识,所述第一服务类型标识用于指示所述第一以太报文的类型。The Ethernet packet processing device according to any one of claims 25 or 26, wherein the processing module is further configured to detect the first service type identifier carried in the preamble of the first Ethernet packet , the first service type identifier is used to indicate the type of the first Ethernet packet.
  28. 根据权利要求18至27中任一项所述的以太报文处理设备,其特征在于,所述处理 模块,具体用于检测所述第一以太报文的编码,所述编码的块类型作为所述第一标识信息;根据所述第一标识信息处理所述第一以太报文。The Ethernet packet processing device according to any one of claims 18 to 27, wherein the processing module is specifically configured to detect the encoding of the first Ethernet packet, and the encoded block type is used as the the first identification information; and the first Ethernet packet is processed according to the first identification information.
  29. 根据权利要求28所述的以太报文处理设备,其特征在于,所述编码的块类型为所述第一以太报文的开始块。The Ethernet packet processing device according to claim 28, wherein the encoded block type is a start block of the first Ethernet packet.
  30. 根据权利要求28或29所述的以太报文处理设备,其特征在于,所述处理模块,还用于检测所述编码的块类型后的至少一个字节中携带的第二服务类型标识,所述第二服务类型标识用于指示所述第一以太报文的类型。The Ethernet packet processing device according to claim 28 or 29, wherein the processing module is further configured to detect the second service type identifier carried in at least one byte after the encoded block type, the The second service type identifier is used to indicate the type of the first Ethernet packet.
  31. 根据权利要求18至30中任一项所述的以太报文处理设备,其特征在于,所述处理模块,还用于与所述第二设备协商确定是否支持处理所述第一以太类型报文。The Ethernet packet processing device according to any one of claims 18 to 30, wherein the processing module is further configured to negotiate with the second device to determine whether to support processing the first Ethernet type packet .
  32. 根据权利要求31所述的以太报文处理设备,其特征在于,所述收发模块,还用于与所述第二设备通过发送自协商脉冲协商是否支持处理所述第一以太类型报文,所述自协商脉冲中携带协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文;The Ethernet packet processing device according to claim 31, wherein the transceiver module is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending an auto-negotiation pulse, so The auto-negotiation pulse carries negotiation information, and the negotiation information is used to instruct the first device or the second device to support processing the first Ethernet type packet;
    或,or,
    所述收发模块,还用于与所述第二设备通过发送链路层发现协议LLDP协商是否支持处理所述第一以太类型报文,所述链路层发现协议中携带所述协商信息,所述协商信息用于指示所述第一设备或所述第二设备支持处理所述第一以太类型报文。The transceiver module is further configured to negotiate with the second device whether to support processing the first Ethernet type packet by sending a link layer discovery protocol LLDP, where the link layer discovery protocol carries the negotiation information, so the The negotiation information is used to indicate that the first device or the second device supports processing of the first Ethernet type packet.
  33. 根据权利要求32所述的以太报文处理设备,其特征在于,所述自协商脉冲的链路编码字基础页中尚未使用的比特位指示所述协商信息;The Ethernet packet processing device according to claim 32, wherein an unused bit in the link code word base page of the auto-negotiation pulse indicates the negotiation information;
    或者,or,
    所述自协商脉冲的链路编码字扩展页中的消息代码值指示所述协商信息。The message code value in the link code word extension page of the auto-negotiation burst indicates the negotiation information.
  34. 根据权利要求32所述的以太报文处理设备,其特征在于,所述链路层发现协议中生成弹性能力标识TLV类型,所述TLV类型指示所述协商信息。The Ethernet packet processing device according to claim 32, wherein a TLV type of elastic capability identifier is generated in the link layer discovery protocol, and the TLV type indicates the negotiation information.
  35. 一种计算机程序,其特征在于,当所述计算机程序在计算机上运行时,使得计算机执行如权利要求1至17中任意一项所述的方法。A computer program, characterized in that, when the computer program is run on a computer, it causes the computer to execute the method according to any one of claims 1 to 17.
  36. 一种计算机可读存储介质,其特征在于,包括程序,当所述程序在计算机上运行时,使得计算机执行如权利要求1至17中任一项所述的方法。A computer-readable storage medium, characterized by comprising a program, which, when the program is run on a computer, causes the computer to execute the method according to any one of claims 1 to 17 .
  37. 一种通信装置,其特征在于,包括处理器和存储器,所述处理器与所述存储器耦合,A communication device, characterized in that it comprises a processor and a memory, the processor is coupled to the memory,
    所述存储器,用于存储程序;the memory for storing programs;
    所述处理器,用于执行所述存储器中的程序,使得所述通信装置执行如权利要求1至17中任一项所述的方法。The processor is configured to execute a program in the memory, so that the communication device executes the method according to any one of claims 1 to 17.
  38. 一种芯片系统,其特征在于,所述芯片系统包括一个或多个处理器和存储器,所述存储器中存储有程序指令,当所述程序指令在所述一个或多个处理器中执行时,使得如权利要求1至17中任一项所述的方法被执行。A chip system, characterized in that the chip system includes one or more processors and a memory, the memory stores program instructions, and when the program instructions are executed in the one or more processors, The method as claimed in any one of claims 1 to 17 is caused to be performed.
PCT/CN2021/140402 2021-03-17 2021-12-22 Ethernet packet processing method and related device WO2022193767A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110286473.2A CN115174699A (en) 2021-03-17 2021-03-17 Processing method of Ethernet message and related equipment
CN202110286473.2 2021-03-17

Publications (1)

Publication Number Publication Date
WO2022193767A1 true WO2022193767A1 (en) 2022-09-22

Family

ID=83321699

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/140402 WO2022193767A1 (en) 2021-03-17 2021-12-22 Ethernet packet processing method and related device

Country Status (2)

Country Link
CN (1) CN115174699A (en)
WO (1) WO2022193767A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117560226B (en) * 2024-01-09 2024-03-19 上海芯联芯智能科技有限公司 Method and device for data transmission through VPN

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789843A (en) * 2009-12-29 2010-07-28 迈普通信技术股份有限公司 Method for implementing multi-line E1 binding and network bridge
CN103312577A (en) * 2012-03-09 2013-09-18 中兴通讯股份有限公司 Method and device for processing MAC data
CN107395504A (en) * 2017-07-28 2017-11-24 江西山水光电科技股份有限公司 A kind of method and device of oversized frame service message forwarding
US20200076741A1 (en) * 2018-08-30 2020-03-05 International Business Machines Corporation Implementing enhanced network device labeling via ethernet

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789843A (en) * 2009-12-29 2010-07-28 迈普通信技术股份有限公司 Method for implementing multi-line E1 binding and network bridge
CN103312577A (en) * 2012-03-09 2013-09-18 中兴通讯股份有限公司 Method and device for processing MAC data
CN107395504A (en) * 2017-07-28 2017-11-24 江西山水光电科技股份有限公司 A kind of method and device of oversized frame service message forwarding
US20200076741A1 (en) * 2018-08-30 2020-03-05 International Business Machines Corporation Implementing enhanced network device labeling via ethernet

Also Published As

Publication number Publication date
CN115174699A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
JP7023918B2 (en) Systems and methods for signaling and generating variable-length block acknowledgment fields in wireless networks
JP5047472B2 (en) MAC header compression used with frame aggregation
US8761089B2 (en) Frame acknowledgment in a communication network
TWI478616B (en) Legacy-compatible control frames
RU2484587C1 (en) Method for transmitting media access control protocol data unit
WO2019019906A1 (en) Communication method and device, and storage medium
KR20080074854A (en) Fast control messaging mechanism for use in wireless network communications
WO2018099221A1 (en) Method and device for transmitting data packet
US10499336B2 (en) Method for direct communication between stations in wireless local area network and related device
US20160262052A1 (en) Aggregated data frame structures
WO2022193767A1 (en) Ethernet packet processing method and related device
EP1988655A1 (en) Method and apparatus for using an error code in transmission of data
US20100128741A1 (en) Method and system for configuring a media access control header to reduce a header overhead
EP3813281A1 (en) Method for receiving code block stream, method for sending code block stream and communication apparatus
WO2013135116A1 (en) A-msdu aggregation method and apparatus, data reception method and apparatus
WO2018045521A1 (en) Method and device for transmitting signaling in wireless network
JP7346662B2 (en) Data transmission methods and transfer devices
JP2007520121A (en) Method for transmitting IEEE 1394 data over a wireless link and apparatus implementing the method
JP2021533656A (en) How to receive a code blockstream, how to send a codeblock stream, and communication equipment
JP2020532237A (en) Replacement method and equipment
TW201438430A (en) Acknowledgement (ACK) type indication and deferral time determination

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: 21931340

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: 21931340

Country of ref document: EP

Kind code of ref document: A1