WO2023024572A1 - 数据处理的方法和装置 - Google Patents

数据处理的方法和装置 Download PDF

Info

Publication number
WO2023024572A1
WO2023024572A1 PCT/CN2022/091494 CN2022091494W WO2023024572A1 WO 2023024572 A1 WO2023024572 A1 WO 2023024572A1 CN 2022091494 W CN2022091494 W CN 2022091494W WO 2023024572 A1 WO2023024572 A1 WO 2023024572A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
information
data
boundary information
boundary
Prior art date
Application number
PCT/CN2022/091494
Other languages
English (en)
French (fr)
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 WO2023024572A1 publication Critical patent/WO2023024572A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • 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/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • 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 data processing, and more specifically, to a data processing method and device.
  • Packet aggregation is a method of merging multiple received data packets into a single data packet through a network interface controller (network interface controller, NIC)/network card, and the aggregated data packets can be reduced by processor or business processing logic The business processing overhead of each data packet, thereby improving the business processing performance, efficiency and throughput of network end nodes.
  • NIC network interface controller
  • Packet aggregation is based on reception, which requires the first device (sending side) to slice the data belonging to the same data flow according to certain rules, and the second device (receiving side) to aggregate the received data packets.
  • a typical aggregation technology is that the first device slices large TCP data through TCP segment offload (TSO) technology, and the second device realizes it through TCP large receive offload (LRO) technology. Packet aggregation.
  • the aggregation engine of the second device needs to know all the details of the transport protocol to realize the data aggregation of the protocol.
  • the details of different transport protocols are completely different, and even the same transport protocol has different implementation details and requirements on different operating systems or different platforms.
  • the aggregation engine needs to evolve the packet header according to the evolution and support of the business, resulting in high complexity and low efficiency for aggregated data.
  • the present application provides a data processing method and device, which can reduce the complexity of data aggregation processing and improve the efficiency of aggregation processing.
  • a data processing method includes: a first device configures aggregation policy information for a data packet, and the aggregation policy information is used to indicate whether a second device receiving the data packet aggregates and processes the data A packet: the first device sends the data packet to the second device, where the data packet includes the aggregation policy information.
  • the data packet sent by the first device includes aggregation policy information for indicating whether the second device receiving the data packet aggregates and processes the data packet, and the second device can information to process the packet.
  • the first device explicitly instructs the second device whether to aggregate the data packet or how to aggregate and process the data packet by configuring the aggregation policy information in the data packet, and the second device no longer needs to guess the intention of the first device and all the details according to the transmission protocol Therefore, the complexity of data aggregation processing by the second device can be reduced, and the efficiency of aggregation processing can be improved.
  • the packet header of the data packet includes the aggregation policy information
  • the aggregation policy information includes at least one of the following information: the sequence number of the data packet, Boundary information, priority information, dirty field and dirty mode field
  • the boundary information is used to indicate the way of not aggregating the data packet or aggregating the data packet
  • the priority information is used to indicate the priority of the data packet Whether the level is higher than or equal to a preset value
  • the dirty field is used to indicate whether the data in the data packet has been modified by a third device, wherein the third device is a device used to transmit the data packet
  • the dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information includes any of the following: first boundary information, second boundary information, third boundary information, or fourth boundary information; wherein, the The first boundary information is used to indicate that the data packet is not aggregated, the second boundary information is used to indicate that the data packet is aggregated with a data packet sent after the data packet, and the third boundary information is used to indicate that the data packet is aggregated.
  • the data packet is aggregated with the data packet sent before the data packet and the data packet sent after the data packet, and the fourth boundary information is used to indicate that the data packet cannot be combined with the data packet sent after the data packet polymerization.
  • the boundary information is indicated by bit information; when the bit information is equal to the first value, it indicates that the data packet is an independent data packet, and the The boundary information in the data packet is the first boundary information; when the bit information is equal to the second value, it indicates that the data packet is the first data packet in the data stream, and the boundary information in the data packet is The second boundary information; when the bit information is equal to a third value, indicating that the data packet is an intermediate data packet in the data stream, and the boundary information in the data packet is the third boundary information; when the When the bit information is equal to the fourth value, it indicates that the data packet is the last data packet in the data stream, and the boundary information in the data packet is the fourth boundary information.
  • the priority information includes first priority information or second priority information
  • the first priority information indicates that the data packet has a high priority equal to or equal to the preset value
  • the second priority information indicates that the priority of the data packet is lower than the preset value
  • the dirty field in the data packet is modified by the third device if the data in the data packet is modified by the third device if the data in the data packet is modified by the third device; If the data in the data packet has not been modified by the third device, the dirty field in the data packet has not been modified by the third device.
  • a data processing method includes: a second device receives a data packet sent by a first device, the data packet includes aggregation policy information, and the aggregation policy information is used to indicate whether to aggregate and process all the data packet; the second device processes the data packet according to the aggregation policy information in the data packet.
  • the data packet received by the second device from the first device includes aggregation policy information for indicating whether to aggregate and process the data packet, and the second device can process the data packet according to the aggregation policy information in the data packet .
  • the first device explicitly instructs the second device whether to aggregate the data packet or how to aggregate and process the data packet by configuring the aggregation policy information in the data packet, and the second device no longer needs to guess the intention of the first device and all the details according to the transmission protocol Therefore, the complexity of data aggregation processing by the second device can be reduced, and the efficiency of aggregation processing can be improved.
  • the packet header of the data packet includes the aggregation policy information
  • the aggregation policy information includes at least one of the following information: the sequence number of the data packet, Boundary information, priority information, dirty field and dirty mode field
  • the boundary information is used to indicate the way of not aggregating the data packet or aggregating the data packet.
  • the priority information is used to indicate the priority of the data packet whether it is higher than or equal to a preset value
  • the dirty field is used to indicate whether the data in the data packet is modified by a third device, wherein the third device is a device used to transmit the data packet
  • the The dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information includes any of the following: first boundary information, second boundary information, third boundary information, or fourth boundary information; the second The device processes the data packet according to the aggregation policy information in the data packet, including: when the aggregation policy information includes the first boundary information, the second device does not aggregate the data packet; When the aggregation policy information includes the second boundary information, the second device aggregates the data packet with a data packet received after the data packet, wherein the data packet received after the data packet The sequence number of the data packet is continuous with the sequence number of the data packet; when the aggregation policy information includes the third boundary information, the second device compares the data packet with the sequence number before the data packet The data packets received and the data packets received after the data packets are aggregated, wherein the sequence numbers of the data packets received before the data packets are continuous with the sequence numbers of the data packets, so The sequence number of the data packet received after the data packet is continuous with the sequence number of the data packet; when the aggregation policy information includes the second boundary information, the second device
  • the boundary information is indicated by bit information; when the bit information is equal to the first value, it indicates that the data packet is an independent data packet, the The boundary information in the data packet is the first boundary information; when the bit information is equal to the second value, it indicates that the data packet is the first data packet in the data stream, and the boundary information in the data packet is The second boundary information; when the bit information is equal to a third value, indicating that the data packet is an intermediate data packet in the data stream, and the boundary information in the data packet is the third boundary information; when the When the bit information is equal to the fourth value, it indicates that the data packet is the last data packet in the data stream, and the boundary information in the data packet is the fourth boundary information.
  • the priority information includes first priority information or second priority information, and the first priority information indicates that the data packet has a high priority equal to or equal to the preset value, the second priority information indicates that the priority of the data packet is lower than the preset value; the second device processes the data packet according to the aggregation policy information in the data packet
  • the data packet includes: when the aggregation policy information includes the first priority information and the third boundary information, the second device compares the data packet with the data packet received before the data packet aggregate the data packet and the data packet received after the data packet, and the aggregation context information sent by the second device to the processor includes the identification information of the data packet, which is used to instruct the processor to processing the data packet; or, when the aggregation policy information includes the first priority information and the third boundary information, the second device compares the data packet with that received before the data packet aggregate the received data packets or aggregate the data packets with data packets received after the data packets; when the aggregation policy information includes
  • the second device if the data in the data packet is modified by the third device, the dirty field in the data packet is modified by the third device ; If the data in the data packet has not been modified by the third device, the dirty field in the data packet has not been modified by the third device; Aggregating policy information to process the data packet includes: when the dirty field indicates that the data packet is modified by the third device, the second device does not aggregate the data packet; when the dirty field indicates that the data packet is modified by the third device; When the data packet is not modified by the third device, the second device processes the data packet according to at least one of the sequence number of the data packet, the boundary information, and the priority information .
  • the second device processes the data packet according to aggregation policy information in the data packet, including: when the dirty field indicates that the data packet When modified by the third device and the dirty mode field indicates not to ignore the dirty field, the second device does not aggregate the data packet; when the dirty mode field indicates to ignore the dirty field, the The second device processes the data packet according to at least one of the sequence number of the data packet, the boundary information, and the priority information.
  • a data processing apparatus including: a processing unit configured to configure aggregation policy information for a data packet, where the aggregation policy information is used to indicate whether the second device receiving the data packet aggregates and processes the data packet a sending unit, configured to send the data packet to the second device, where the data packet includes the aggregation policy information.
  • the packet header of the data packet includes the aggregation policy information
  • the aggregation policy information includes at least one of the following information: the sequence number of the data packet, Boundary information, priority information, dirty field and dirty mode field
  • the boundary information is used to indicate the way of not aggregating the data packet or aggregating the data packet
  • the priority information is used to indicate the priority of the data packet Whether the level is higher than or equal to a preset value
  • the dirty field is used to indicate whether the data in the data packet has been modified by a third device, wherein the third device is a device used to transmit the data packet
  • the dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information includes any of the following: first boundary information, second boundary information, third boundary information, or fourth boundary information; wherein, the The first boundary information is used to indicate that the data packet is not aggregated, the second boundary information is used to indicate that the data packet is aggregated with a data packet sent after the data packet, and the third boundary information is used to indicate that the data packet is aggregated.
  • the data packet is aggregated with the data packet sent before the data packet and the data packet sent after the data packet, and the fourth boundary information is used to indicate that the data packet cannot be combined with the data packet sent after the data packet polymerization.
  • the boundary information is indicated by bit information; when the bit information is equal to the first value, it indicates that the data packet is an independent data packet, the The boundary information in the data packet is the first boundary information; when the bit information is equal to the second value, it indicates that the data packet is the first data packet in the data stream, and the boundary information in the data packet is The second boundary information; when the bit information is equal to a third value, indicating that the data packet is an intermediate data packet in the data stream, and the boundary information in the data packet is the third boundary information; when the When the bit information is equal to the fourth value, it indicates that the data packet is the last data packet in the data stream, and the boundary information in the data packet is the fourth boundary information.
  • the priority information includes first priority information or second priority information, and the first priority information indicates that the data packet has a high priority equal to or equal to the preset value, the second priority information indicates that the priority of the data packet is lower than the preset value.
  • the dirty field in the data packet is modified by the third device if the data in the data packet is modified by the third device if the data in the data packet is modified by the third device; If the data in the data packet has not been modified by the third device, the dirty field in the data packet has not been modified by the third device.
  • a data processing apparatus including: a receiving unit, configured to receive a data packet sent by a first device, the data packet includes aggregation policy information, and the aggregation policy information is used to indicate whether to aggregate and process the A data packet; a processing unit, configured to process the data packet according to the aggregation policy information in the data packet.
  • the packet header of the data packet includes the aggregation policy information
  • the aggregation policy information includes at least one of the following information: the sequence number of the data packet, Boundary information, priority information, dirty field and dirty mode field
  • the boundary information is used to indicate the way of not aggregating the data packet or aggregating the data packet
  • the priority information is used to indicate the priority of the data packet Whether the level is higher than or equal to a preset value
  • the dirty field is used to indicate whether the data in the data packet has been modified by a third device, wherein the third device is a device used to transmit the data packet
  • the dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information includes any of the following: first boundary information, second boundary information, third boundary information, or fourth boundary information; the processing unit Specifically used for: when the aggregation policy information includes the first boundary information, the processing unit does not aggregate the data packet; when the aggregation policy information includes the second boundary information, the processing The unit aggregates the data packet with a data packet received after the data packet, wherein the sequence number of the data packet received after the data packet is consecutive to the sequence number of the data packet; when When the aggregation policy information includes the third boundary information, the processing unit aggregates the data packet with a data packet received before the data packet and a data packet received after the data packet , wherein, the sequence number of the data packet received before the data packet is continuous with the sequence number of the data packet, and the sequence number of the data packet received after the data packet is consistent with the sequence number of the data packet The sequence numbers are continuous; when the aggregation policy information includes the fourth boundary information, the processing unit aggregates the data packet
  • the boundary information is indicated by bit information; when the bit information is equal to the first value, it indicates that the data packet is an independent data packet, and the The boundary information in the data packet is the first boundary information; when the bit information is equal to the second value, it indicates that the data packet is the first data packet in the data stream, and the boundary information in the data packet is The second boundary information; when the bit information is equal to a third value, indicating that the data packet is an intermediate data packet in the data stream, and the boundary information in the data packet is the third boundary information; when the When the bit information is equal to the fourth value, it indicates that the data packet is the last data packet in the data stream, and the boundary information in the data packet is the fourth boundary information.
  • the priority information includes first priority information or second priority information, and the first priority information indicates that the data packet has a high priority equal to or equal to the preset value, the second priority information indicates that the priority of the data packet is lower than the preset value;
  • the processing unit is specifically configured to: when the aggregation policy information includes the When the first priority information and the third boundary information are used, aggregate the data packet with data packets received before the data packet or aggregate the data packet with data received after the data packet or, when the aggregation policy information includes the first priority information and the third boundary information, combine the data packet with the data packet received before the data packet and the data packet received before the data packet Aggregating data packets received after the data packets, the aggregation context information sent by the second device to the processor includes identification information of the data packets, and is used to instruct the processor to process the data packets ;
  • the aggregation policy information includes the second priority information, process the data packet according to the boundary information.
  • the processing unit is specifically used for: when the dirty When the field indicates that the data packet is modified by the third device, the data packet is not aggregated; when the dirty field indicates that the data packet has not been modified by the third device, according to the data packet At least one of a sequence number, the boundary information, and the priority information processes the data packet.
  • the processing unit is specifically configured to: when the dirty field indicates that the data packet is modified by the third device, and the dirty mode field indicates that the data packet is not ignored When the dirty field is used, the data packet is not aggregated; when the dirty mode field indicates that the dirty field is ignored, according to the sequence number of the data packet, the boundary information, and the priority information At least one type of information handles the data packet.
  • a data processing device including a processor and a transceiver, the transceiver is used to receive computer codes or instructions and transmit them to the processor, and the processor runs the computer codes or instructions, Such as the first aspect or the method in any possible implementation manner of the first aspect.
  • a data processing device including a processor and a transceiver, the transceiver is used to receive computer codes or instructions and transmit them to the processor, and the processor runs the computer codes or instructions, Such as the second aspect or the method in any possible implementation manner of the second aspect.
  • a seventh aspect provides a data processing system, including: the first device described in the first aspect and the second device described in the second aspect.
  • a computer-readable storage medium stores a computer program; when the computer program runs on a computer, the computer executes any one of the above-mentioned first aspect and the first aspect.
  • a computer-readable storage medium stores a computer program; when the computer program runs on a computer, the computer executes any one of the above-mentioned second aspect and the second aspect Methods in Possible Implementations.
  • a computer program product including instructions is provided, and when the instructions are executed by a computer, the communication device implements the above first aspect and the method in any possible implementation manner of the first aspect.
  • a computer program product including instructions is provided, and when the instructions are executed by a computer, the communication device implements the method in the above-mentioned second aspect and any possible implementation manner of the second aspect.
  • Fig. 1 is a schematic diagram of slicing, transmission and aggregation processing by message.
  • FIG. 2 is a schematic diagram of the TSO technology.
  • Figure 3 is a schematic diagram of the LRO technique.
  • FIG. 4 is a schematic diagram of an application scenario of an embodiment of the present application.
  • Fig. 5 is a schematic flowchart interaction diagram of a data processing method proposed by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a location of aggregation policy information in a header of a data packet.
  • Fig. 7 is a schematic block diagram of a data processing device according to an embodiment of the present application.
  • Fig. 8 is a schematic block diagram of another data processing device according to an embodiment of the present application.
  • Fig. 9 is a schematic block diagram of a communication device according to an embodiment of the present application.
  • Packet aggregation is a method of merging multiple received data packets into a single data packet through a network interface controller (network interface controller, NIC)/network card, and the aggregated data packets can be reduced by processor or business processing logic The business processing overhead of each data packet, thereby improving the business processing performance, efficiency and throughput of network end nodes.
  • NIC network interface controller
  • Ordinary NIC generates a CPU interrupt for a group of aggregated data packets, and the CPU submits this group of aggregated data packets to the protocol stack for processing in the interrupt handler, and finally the driver or protocol stack releases the buffers they occupy together, improving the Business processing efficiency.
  • the Smart NIC offloads the network processing protocol stack, and performs a business process for a group of aggregated data packets on the Smart NIC, which can improve data processing efficiency and business performance.
  • the efficiency of aggregation will be significantly improved, such as the data packets in the transmission control protocol (transmission control protocol, TCP) flow by bit (byte)
  • TCP transmission control protocol
  • the data packets in the RoCEv2 flow in the network protocol (RDMA over converged ethernet, RoCE) that allows the application to realize remote memory access through Ethernet are transmitted according to the sequence number (sequence) and the message (message).
  • a group of aggregated data packets can be presented to the processor as a single large data packet, and the processor can complete the corresponding protocol stack-related business processing in one operation.
  • the Aggregation Processing Engine shall recognize the following information in received packets:
  • the newly received data packet belongs to the same message as the aggregated data packet.
  • FIG. 1 it shows a schematic diagram of slicing, transmission and aggregation processing by message.
  • the first device sending side
  • the second device receiveiving side
  • the intermediate network device transmits the sliced data packets one by one.
  • Data packet aggregation is based on reception, which requires the first device to slice the data belonging to the same data flow according to certain rules, and the second device to aggregate the received data packets.
  • a typical NIC technology is that the first device slices large TCP data through TCP segment offload (TSO) technology, and the second device realizes it through TCP large receive offload (LRO) technology.
  • Packet aggregation As shown in FIG. 2 , a schematic diagram of the TSO technology is shown; as shown in FIG. 3 , a schematic diagram of the LRO technology is shown.
  • user data transmitted through the network is encapsulated into different service layers of the data through messages, such as the transport layer and the steering layer.
  • the aggregation engine provides the combined data packets to the protocol stack, the key data information of different business service layers should not be lost. Among them, some data needs to be accumulated and can be obtained from the last data packet, such as the sequence number; other parts of the data information need to be aggregated in a "stateful" manner, such as TCP's selective acknowledgment (SACK) information .
  • SACK selective acknowledgment
  • the aggregation engine is a "stateless" processor engine that needs to guess the intent of the first device to aggregate packets.
  • the aggregation engine of the second device needs to know all the details of the transport protocol to realize the data aggregation of the protocol.
  • the details of different transport protocols are completely different, and even the same transport protocol has different implementation details and requirements on different operating systems or different platforms, resulting in aggregation.
  • the engine needs to evolve in accordance with the evolution and support of the business.
  • the aggregation engine can only judge the aggregation qualification of the data packets to be merged based on heuristic analysis, deep packet header inspection and protocol awareness, resulting in high complexity and low efficiency of aggregated data.
  • the embodiment of the present application proposes a data processing method, which can reduce the complexity of data aggregation processing and improve the efficiency of aggregation processing.
  • Both the first device and the second device include smart network cards, and the intermediate network device may be a switch or a router.
  • FIG. 5 shows a schematic flow interaction diagram of a data processing method 500 proposed by the embodiment of the present application.
  • the method includes:
  • the first device configures aggregation policy information for the data packet, where the aggregation policy information is used to indicate whether the second device receiving the data packet aggregates and processes the data packet.
  • the first device may configure aggregation policy information for each of the multiple data packets, the multiple data packets may be data packets belonging to different data flows, or the multiple data packets may be data packets belonging to the same data flow Bag.
  • the multiple data packets are obtained by slicing data according to messages by the slicing engine in the first device.
  • the slicing engine can be a hardware module or a software module.
  • the packet header of the data packet includes aggregation policy information
  • the aggregation policy information may include at least one of the following information: sequence number of the data packet, boundary information, priority information, dirty field and dirty mode field, and the like.
  • the boundary information is used to indicate not to aggregate the data packet or the way to aggregate the data packet;
  • the priority information is used to indicate whether the priority of the data packet is higher than or equal to the preset value;
  • the dirty field is used to indicate the Whether the data is modified by a third device, wherein the third device is the device used to transmit the data packet;
  • the dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information may include any one of the following: first boundary information, second boundary information, third boundary information, or fourth boundary information.
  • the first boundary information is used to indicate that the data packet is not aggregated, it can be understood that the data packet can be sent to the processor for processing separately;
  • the second boundary information is used to indicate that the data packet can be connected with the data packet sent after the data packet Data packet aggregation, that is, the data packet cannot be aggregated with the data packet sent before the data packet;
  • the third boundary information is used to indicate that the data packet can be combined with the data packet sent before the data packet and the data packet sent after the data packet Data packet aggregation, it can be understood that the data packet can not only be aggregated with the data packet sent before the data packet, the data packet can also be aggregated with the data packet sent after the data packet;
  • the fourth boundary information is used to indicate the A packet cannot be aggregated with a packet sent after this packet, which may or may not be aggregated with a packet sent before this packet.
  • a data packet may be understood as a data packet, and a header of a data packet may be understood as a header of a data packet, which is not specifically limited in this application.
  • the boundary information is indicated by bit (bit) information.
  • bit information When the bit information is equal to the first value, it indicates that the boundary information in the data packet is the first boundary information; when the bit information is equal to the second value, it indicates that the boundary information in the data packet is the second boundary information; when the When the bit information is equal to the third value, it indicates that the boundary information in the data packet is the third boundary information; when the bit information is equal to the fourth value, it indicates that the boundary information in the data packet is the fourth boundary information.
  • bit information used to indicate the boundary information in the data packet when the bit information used to indicate the boundary information in the data packet is equal to the first value, "loner” may be indicated, indicating that the data packet is an independent data packet; when the bit information used to indicate the boundary information in the data packet When it is equal to the second value, it can indicate "first", indicating that the data packet is the first data packet in the data stream; when the bit information used to indicate the boundary information in the data packet is equal to the third value, it can indicate "next” , indicating that the data packet is an intermediate data packet in the data stream; when the bit information used to indicate the boundary information in the data packet is equal to the fourth value, "last” can be indicated, indicating that the data packet is the last data in the data stream Bag.
  • the bit information may occupy two bits in the packet header of the data packet. The first value may be equal to 0, the second value may be equal to 1, the third value may be equal to 2, and the fourth value may be equal to 3.
  • the sequence number of the data packet may be monotonically increasing or monotonically decreasing.
  • the first device may assign a unique sequence number to each data packet, and the sequence number of the initially transmitted data packet is different from the sequence number of the retransmitted data packet.
  • a serial number with a bit width of 40bit/48bit/64bit can be used, which can increase the inversion cycle of the serial number and reduce the inversion of the serial number.
  • the priority information includes first priority information or second priority information
  • the first priority information may indicate that the priority of the data packet is higher than or equal to a preset value
  • the second priority information may indicate that the data packet Priority is lower than a preset value, which may be predefined.
  • the priority of the data packet is higher than or equal to the preset value, it means that the data packet cannot be ignored or is relatively important, and needs to be instructed to the processor for processing.
  • the priority information may also be indicated by bit information.
  • the bit information may occupy one bit in the packet header of the data packet. When the bit value corresponding to the bit is equal to 1, it can indicate that the priority of the data packet is higher than or equal to the preset value; when the bit value corresponding to the bit is equal to 0, it can indicate that the priority of the data packet is lower than default value.
  • the bit value used to indicate the priority of the data packet when it is equal to 1, it may indicate "on”, indicating that the data packet needs to be separately indicated to the processor for processing; the bit value used to indicate the priority of the data packet When it is equal to "0", it can indicate "off”, indicating that the data packet does not need to be separately instructed to the processor for processing.
  • the dirty field and the dirty mode field may also be indicated by bit information.
  • the first device sequentially sends data packets to the second device, where the data packets include aggregation policy information.
  • the first device may send multiple data packets to the second device through at least one third device.
  • the second device may be an aggregation engine.
  • the third device may also be called an intermediate device, and the third device may be a switch or a router.
  • the second device receives the data packet sent by the first device, where the data packet includes aggregation policy information, where the aggregation policy information is used to indicate whether to aggregate and process the data packet.
  • the second device may receive multiple data packets sent by the first device through at least one third device.
  • the dirty field in the aggregation policy information can be modified by a third device (intermediate device) that transmits the data packet.
  • the dirty field may occupy a bit in the packet header of the data packet.
  • the modification of the data in the data packet by the third device includes adding the address information of the third device into the data packet, so that the second device can know the transmission path of the data packet and the like.
  • the first device configures the bit value in the dirty field to be 0, and if the data packet is modified, the bit value in the dirty field is modified to 1, and the modified dirty field indicates that the data packet cannot be aggregated with other data packets.
  • the bit value in the dirty field configured by the first device may also be 1, which is not specifically limited.
  • dirty fields can also occupy more bits.
  • the dirty mode field is used to indicate whether to ignore the dirty field. It can be understood that the dirty mode field is used to indicate whether to ignore the modification of the bit value in the dirty field.
  • the dirty mode field can occupy two bits in the packet header of the data packet. Exemplarily, when the bit value in the dirty mode field in the data packet is 0, it may indicate to ignore the dirty field; when the bit value in the dirty mode field in the data packet is 1, it may indicate not to ignore the dirty field. It should be understood that when the bit value in the dirty mode field in the data packet indicates 1, it indicates to ignore the dirty field, which is not specifically limited in the present application.
  • the second device processes the data packet according to the aggregation policy information in the data packet.
  • the aggregation engine in the second device processes the data packet according to the aggregation policy information in the data packet.
  • the aggregation engine may be a hardware module or a software module.
  • the aggregation policy information may include the sequence number of the data packet and one of the following four types of boundary information: first boundary information, second boundary information, third boundary information, or fourth boundary information.
  • the second device When the aggregation policy information of the data packet includes the first boundary information, the second device does not aggregate the data packet, and may send the data packet to the processor separately for processing.
  • the processor may be a processor in the protocol stack of the host independent of the second device, or a processor in the second device, which is not specifically limited.
  • the second device can aggregate the data packet with the data packet received after the data packet, but the data packet cannot be aggregated with the data packet sent before the data packet Packet aggregation.
  • the aggregation policy information of the data packet with the sequence number 101 includes the second boundary information, if the second device receives the data packet with the sequence number 102 after receiving the data packet with the sequence number 101, the second device The device can aggregate the data packet with the serial number 101 and the data packet with the serial number 102; if the second device does not receive the data packet with the serial number 102 after receiving the data packet with the serial number 101, but After receiving the data packet with the serial number 103, the second device does not need to aggregate the data packet with the serial number 101 and the data packet with the serial number 103, but only needs to send the data packet with the serial number 101 to the processor separately. Can. Wherein, the data packet with the sequence number 101, the data packet with the sequence number 102, and the data packet with the
  • the second device can not only aggregate the data packet with the data packet received before the data packet, but also aggregate the data packet with the data packet received after the data packet Arrived packet aggregation.
  • the aggregation policy information of the data packet with the sequence number 202 includes the third boundary information, if the second device receives the data packet with the sequence number 201 before receiving the data packet with the sequence number 202, the second device The data packet with the serial number 202 can be aggregated with the data packet with the serial number 201; if the second device receives the data packet with the serial number 203 after receiving the data packet with the serial number 202, the second device The data packet with the sequence number 203 can be aggregated with the data packet with the sequence number 201 and the data packet with the sequence number 202.
  • the data packet with the sequence number 201, the data packet with the sequence number 202 and the data packet with the sequence number 203 belong to the same data flow and the same message.
  • the second device may aggregate the data packet with the data packet sent before the data packet, or may not aggregate the data packet, but the data packet cannot be aggregated with Aggregation of packets sent after this packet.
  • the aggregation policy information of the data packet with the sequence number 302 includes the fourth boundary information, if the second device also receives the data packet with the sequence number 301 before receiving the data packet with the sequence number 302, the second device A packet with sequence number 302 can be aggregated with a packet with sequence number 301. If the second device has not received the data packet with the sequence number 301 before receiving the data packet with the sequence number 302, the second device may send the data packet with the sequence number 302 to the processor separately. Wherein, the data packet with the sequence number 301 and the data packet with the sequence number 302 belong to the same data flow and the same message.
  • the aggregated policy information may include sequence numbers, boundary information, and priority information of data packets.
  • the second device may combine the data packet with the data packet received before the data packet and the data packet received after the data packet Aggregation is performed, and the aggregation context information sent by the second device to the processor includes the identification information of the data packet, which is used to instruct the processor to process the data packet.
  • the identification information of the data packet may be the header information of the data packet, or the serial number of the data packet, which is not specifically limited in this application.
  • the aggregated context information includes the header information of the first (first) data packet, the header information of the last (last) data packet, and the data information of the aggregated multiple data packets among the aggregated multiple data packets . Therefore, when the boundary information in the aggregation policy information of the data packet is the first boundary information, the second boundary information or the fourth boundary information, the packet header information of the data packet will be sent to the processor through the aggregation context information, without further
  • the first priority information indicates that the priority of the data packet is higher than or equal to the preset value, that is, the second device does not need to add the header information of the data packet or the header information of the data packet to the aggregation context information sent to the processor. serial number.
  • the second device may also aggregate the data packet with a data packet received before the data packet, or, the second device The second device aggregates the data packet with the data packet received after the data packet, so that the aggregation context information sent by the second device to the processor includes header information of the data packet.
  • the second device can process the data packet according to the boundary information, which can be understood as that the second device processes the data packet according to the sequence number and boundary information of the data packet.
  • boundary information can be understood as that the second device processes the data packet according to the sequence number and boundary information of the data packet.
  • the aggregation policy information may include the sequence number, boundary information, priority information and dirty field of the data packet.
  • the second device When the aggregation policy information of the data packet includes a dirty field and the dirty field indicates that the data packet has been modified by the third device, the second device does not aggregate the data packet. It should be understood that when the dirty field indicates that the data packet is modified by a third device, no matter what kind of boundary information the boundary information in the aggregated policy information is, or whether the priority information in the aggregated policy information is the first priority information or the second priority information Second priority information, the second device cannot aggregate the data packet.
  • the second device When the aggregation policy information of the data packet includes a dirty field, but the dirty field indicates that the data packet has not been modified by the third device, the second device according to at least one of the sequence number, boundary information and priority information of the data packet information to process the packet.
  • the second device when the aggregation policy information only includes the sequence number, boundary information and dirty field of the data packet, when the dirty field indicates that the data packet has not been modified by the third device, the second device can information to process the packet.
  • the aggregation policy information includes the serial number, boundary information, priority information and dirty field of the data packet
  • the second device when the dirty field indicates that the data packet has not been modified by the third device, the second device can Boundary information and priority information process the packet.
  • the aggregation policy information may include the sequence number of the data packet, boundary information, priority information, dirty field and dirty mode field.
  • the second device When the dirty field in the aggregation policy information indicates that the data packet is modified by the third device, and the dirty mode field indicates that the dirty field is not ignored, the second device does not aggregate the data packet. It should be understood that when the dirty field indicates that the data packet is modified by a third device, and the dirty mode field indicates that the dirty field is not to be ignored, no matter what kind of boundary information is in the aggregated policy information, and regardless of the boundary information in the aggregated policy information Whether the priority information is the first priority information or the second priority information, the second device cannot aggregate the data packet.
  • the second device may, according to at least one of the sequence number, boundary information, and priority information of the data packet, information to process the packet. For example, when the aggregation policy information only includes the sequence number, boundary information, dirty field, and dirty mode field of the data packet, when the dirty field indicates that the data packet is modified by a third device, and the dirty mode field indicates that the dirty field is ignored, The second device can process the data packet according to the sequence number and boundary information of the data packet.
  • the second device may process the data packet according to the sequence number, boundary information, and priority information of the data packet.
  • the second device can At least one of information and priority information process the packet. For example, when the aggregation policy information only includes the sequence number, boundary information, dirty field and dirty mode field of the data packet, when the dirty field indicates that the data packet has not been modified by the third device, the second device can Sequence numbers and boundary information handle the packet.
  • the second device can The sequence number, boundary information, and priority information of the packet are processed.
  • FIG. 6 it shows a schematic diagram of a location of aggregation policy information in a packet header of a data packet.
  • the data packet can include information such as the sequence number, boundary information, priority information, dirty field, dirty mode field and user data of the data packet, where the boundary information, priority information, dirty field and dirty mode field can occupy the data packet 6 bits in the header.
  • the field composed of boundary information, priority information, dirty field and dirty mode field can be called coalescing tag, and the field composed of sequence number, boundary information, priority information, dirty field and dirty mode field of the data packet can be called It is a coalescing header, which can be understood as the above-mentioned aggregation policy information. It should be understood that the present application does not limit the specific position where the aggregation label and the serial number of the data packet should be placed in the header of the data packet.
  • the data packet sent by the first device includes aggregation policy information for indicating whether the second device receiving the data packet aggregates and processes the data packet, and the second device can The aggregated policy information in the packet handles the packet.
  • the first device explicitly instructs the second device whether to aggregate the data packet or how to aggregate and process the data packet by configuring the aggregation policy information in the data packet, and the second device no longer needs to guess the intention of the first device and all the details according to the transmission protocol Therefore, the complexity of data aggregation processing by the second device can be reduced, and the efficiency of aggregation processing can be improved.
  • FIG. 7 shows a schematic block diagram of a data processing device 700 in the embodiment of the present application.
  • This apparatus may be applied to the first device in the method embodiment in FIG. 5 .
  • the communication device 700 includes:
  • the processing unit 710 is configured to configure aggregation policy information for the data packet, where the aggregation policy information is used to indicate whether the second device receiving the data packet aggregates and processes the data packet;
  • a sending unit 720 configured to send the data packet to the second device, where the data packet includes the aggregation policy information.
  • the packet header of the data packet includes the aggregation policy information
  • the aggregation policy information includes at least one of the following information: sequence number, boundary information, priority information, dirty field and dirty mode of the data packet field; the boundary information is used to indicate not to aggregate the data packet or the way to aggregate the data packet; the priority information is used to indicate whether the priority of the data packet is higher than or equal to a preset value; the The dirty field is used to indicate whether the data in the data packet is modified by a third device, wherein the third device is a device used to transmit the data packet; the dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information includes any one of the following: first boundary information, second boundary information, third boundary information, or fourth boundary information; wherein the first boundary information is used to indicate that the data is not aggregated packet, the second boundary information is used to indicate that the data packet is aggregated with the data packet sent after the data packet, and the third boundary information is used to indicate that the data packet is aggregated with the data packet sent before the data packet The data packet and the data packet sent after the data packet are aggregated, and the fourth boundary information is used to indicate that the data packet cannot be aggregated with the data packet sent after the data packet.
  • the boundary information is indicated by bit information; when the bit information is equal to the first value, it indicates that the data packet is an independent data packet, and the boundary information in the data packet is the first boundary information; when the bit information is equal to the second value, it indicates that the data packet is the first data packet in the data stream, and the boundary information in the data packet is the second boundary information; when the bit information When it is equal to the third value, it indicates that the data packet is an intermediate data packet in the data stream, and the boundary information in the data packet is the third boundary information; when the bit information is equal to the fourth value, it indicates that the The data packet is the last data packet in the data flow, and the boundary information in the data packet is the fourth boundary information.
  • the priority information includes first priority information or second priority information
  • the first priority information indicates that the priority of the data packet is higher than or equal to the preset value
  • the second The second priority information indicates that the priority of the data packet is lower than the preset value
  • the dirty field in the data packet is modified by the third device; if the data in the data packet is not modified by the third device modified by the third device, the dirty field in the data packet is not modified by the third device.
  • the embodiment of the present application proposes another data processing device, as shown in FIG. 8 , which shows a schematic block diagram of a data processing device 800 in the embodiment of the present application.
  • This apparatus may be applied to the second device in the method embodiment in FIG. 5 .
  • the communication device 800 includes:
  • the receiving unit 810 is configured to receive a data packet sent by the first device, the data packet includes aggregation policy information, and the aggregation policy information is used to indicate whether to aggregate and process the data packet;
  • the processing unit 820 is configured to process the data packet according to the aggregation policy information in the data packet.
  • the packet header of the data packet includes the aggregation policy information
  • the aggregation policy information includes at least one of the following information: sequence number, boundary information, priority information, dirty field and dirty mode of the data packet field; the boundary information is used to indicate not to aggregate the data packet or the way to aggregate the data packet; the priority information is used to indicate whether the priority of the data packet is higher than or equal to a preset value; the The dirty field is used to indicate whether the data in the data packet is modified by a third device, wherein the third device is a device used to transmit the data packet; the dirty mode field is used to indicate whether to ignore the dirty field.
  • the boundary information includes any one of the following: first boundary information, second boundary information, third boundary information or fourth boundary information;
  • the processing unit 820 is specifically used for:
  • the processing unit does not aggregate the data packets
  • the processing unit aggregates the data packet with a data packet received after the data packet, wherein the data packet received after the data packet
  • the sequence number of the data packet is continuous with the sequence number of the data packet
  • the processing unit compares the data packet with a data packet received before the data packet and a data packet received after the data packet Aggregation, wherein the sequence numbers of the data packets received before the data packets are consecutive to the sequence numbers of the data packets, and the sequence numbers of the data packets received after the data packets are consecutive to the sequence numbers of the data packets
  • the serial numbers of the packages are consecutive;
  • the processing unit aggregates the data packet with the data packet received before the data packet, wherein the data packet before the data packet The sequence number of the received data packet is continuous with the sequence number of the data packet.
  • the boundary information is indicated by bit information
  • bit information When the bit information is equal to the first value, it indicates that the data packet is an independent data packet, and the boundary information in the data packet is the first boundary information;
  • bit information is equal to the second value, indicating that the data packet is the first data packet in the data stream, and the boundary information in the data packet is the second boundary information;
  • bit information is equal to a third value, indicating that the data packet is an intermediate data packet in the data stream, and the boundary information in the data packet is the third boundary information;
  • bit information When the bit information is equal to the fourth value, it indicates that the data packet is the last data packet in the data stream, and the boundary information in the data packet is the fourth boundary information.
  • the priority information includes first priority information or second priority information, the first priority information indicates that the priority of the data packet is higher than or equal to the preset value, and the second The second priority information indicates that the priority of the data packet is lower than the preset value;
  • the processing unit 820 is specifically used for:
  • the aggregation policy information includes the first priority information and the third boundary information, aggregate the data packet with a data packet received before the data packet or combine the data packet with a data packet received before the data packet data packets received after said data packets are aggregated; or,
  • the aggregation policy information includes the first priority information and the third boundary information, combine the data packet with the data packet received before the data packet and the data packet received after the data packet Aggregating data packets, the information in the aggregation context sent by the second device to the processor includes identification information of the data packets, and is used to instruct the processor to process the data packets;
  • the aggregation policy information includes the second priority information, process the data packet according to the boundary information.
  • the dirty field in the data packet is modified by the third device
  • the dirty field in the data packet has not been modified by the third device
  • the processing unit 820 is specifically used for:
  • the third device When the dirty field indicates that the data packet has not been modified by the third device, process the data packet according to at least one of the sequence number of the data packet, the boundary information, and the priority information data pack.
  • processing unit 820 is specifically configured to:
  • the data packet is processed according to at least one of the sequence number of the data packet, the boundary information, and the priority information.
  • An embodiment of the present application provides a data processing device 900 , as shown in FIG. 9 , which shows a schematic block diagram of the data processing device 900 according to the embodiment of the present application.
  • the data processing device 900 includes: a processor 910 and a transceiver 920, the transceiver 920 is used to receive computer codes or instructions, and transmit them to the processor 910, and the processor 910 runs the computer codes or instructions, In order to realize the method in the embodiment of this application.
  • the data processing device may be the first device or the second device in the embodiment of the present application.
  • the above-mentioned processor 910 may be an integrated circuit chip, which has a signal processing capability. In the implementation process, each step of the above-mentioned method embodiments may be completed by an integrated logic circuit of hardware in a processor or instructions in the form of software.
  • the above-mentioned processor can be a general-purpose processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field programmable gate array, FPGA) or other available Program logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA off-the-shelf programmable gate array
  • Program logic devices discrete gate or transistor logic devices, discrete hardware components.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method in combination with its hardware.
  • An embodiment of the present application also provides a data processing system, including the data processing device described in FIG. 7 and the data processing device described in FIG. 8 .
  • the embodiment of the present application also provides a computer-readable storage medium, on which a computer program for implementing the method in the above method embodiment is stored.
  • a computer program for implementing the method in the above method embodiment is stored.
  • the computer program runs on the computer, the computer can implement the methods in the above method embodiments.
  • the 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 the computer, the method in the above method embodiment is executed.
  • the embodiment of the present application also provides a chip, including a processor, the processor is connected to a memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the The chip executes the method in the above method embodiment.
  • the term "and/or” in this application is only an association relationship describing associated objects, indicating that there may be three relationships, for example, A and/or B may indicate: A exists alone, and A and B exist simultaneously , there are three cases of B alone.
  • the character "/" in this article generally means that the contextual objects are an "or” relationship; the term “at least one” in this application can mean “one” and "two or more", for example, A , B and C, can mean: A exists alone, B exists alone, C exists alone, A and B exist simultaneously, A and C exist simultaneously, C and B exist simultaneously, A, B and C exist simultaneously, these seven kinds Condition.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了一种数据处理的方法和装置,能够降低聚合处理数据的复杂度、提高聚合处理的效率。该方法包括:第一设备给数据包配置聚合策略信息,所述聚合策略信息用于指示接收所述数据包的第二设备是否聚合处理所述数据包;所述第一设备向所述第二设备发送所述数据包,所述数据包中包括所述聚合策略信息;第二设备接收第一设备发送的数据包;所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包。

Description

数据处理的方法和装置
本申请要求于2021年08月27日提交中国专利局、申请号为202110997496.4、发明名称为“数据处理的方法和装置”的专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理领域,并且更具体地,涉及一种数据处理的方法和装置。
背景技术
数据包聚合是通过网络接口控制器(network interface controller,NIC)/网卡将接收到的多个数据包合并成单个数据包的一种方法,处理器或业务处理逻辑处理聚合后的数据包可以减少对每个数据包的业务处理开销,从而提高了网络端节点的业务处理性能、效率和吞吐量。
数据包聚合是以接收为基础的聚合,需要第一设备(发送侧)按一定的规则对属于同一数据流的数据进行切片,在第二设备(接收侧)对接收到的数据包进行聚合。典型的聚合技术是第一设备通过传输控制协议切片卸载(TCP segment offload,TSO)技术对大的TCP数据进行数据切片,而在第二设备通过TCP大包聚合(large receive offload,LRO)技术实现数据包聚合。
目前,第二设备的聚合引擎需了解传输协议的所有细节才能实现该协议的数据聚合,不同传输协议的细节完全不同,甚至同一传输协议在不同操作系统或不同平台上的实现细节和要求不同,导致聚合引擎需要根据业务的演进和支持进行配套演进包头,导致聚合数据的复杂度较高、效率较低。
发明内容
本申请提供了一种的数据处理的方法和装置,能够降低聚合处理数据的复杂度、提高聚合处理的效率。
第一方面,提供一种数据处理的方法,该方法包括:第一设备给数据包配置聚合策略信息,所述聚合策略信息用于指示接收所述数据包的第二设备是否聚合处理所述数据包;所述第一设备向所述第二设备发送所述数据包,其中,所述数据包中包括所述聚合策略信息。
基于上述技术方案,第一设备发送的数据包中包括用于指示接收该数据包的第二设备是否聚合处理该数据包的聚合策略信息,第二设备可以根据接收到的数据包中的聚合策略信息处理该数据包。第一设备通过在数据包中配置聚合策略信息来显示地指示第二设备是否聚合该数据包或如何聚合处理该数据包,第二设备无需再猜测第一设备的意图以及根据传输协议的所有细节来实现对数据包的聚合处理,因此,能够降低第二设备聚合处理数据的复杂度,提高聚合处理的效率。
结合第一方面,在第一方面的某些实现方式中,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;所述脏模式字段用于指示是否忽略所述脏字段。
结合第一方面,在第一方面的某些实现方式中,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;其中,所述第一边界信息用于指示不聚合所述数据包,所述第二边界信息用于指示所述数据包与在所述数据包之后发送的数据包聚合,所述第三边界信息用于指示所述数据包与在所述数据包之前发送的数据包以及在所述数据包之后发送的数据包聚合,第四边界信息用于指示所述数据包不能与在所述数据包之后发送的数据包聚合。
结合第一方面,在第一方面的某些实现方式中,所述边界信息是通过比特信息指示的;当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
结合第一方面,在第一方面的某些实现方式中,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值。
结合第一方面,在第一方面的某些实现方式中,若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改。
第二方面,提供一种数据处理的方法,该方法包括:第二设备接收第一设备发送的数据包,所述数据包中包括聚合策略信息,所述聚合策略信息用于指示是否聚合处理所述数据包;所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包。
基于上述技术方案,第二设备接收的来自第一设备的数据包中包括用于指示是否聚合处理该数据包的聚合策略信息,该第二设备可以根据数据包中的聚合策略信息处理该数据包。第一设备通过在数据包中配置聚合策略信息来显示地指示第二设备是否聚合该数据包或如何聚合处理该数据包,第二设备无需再猜测第一设备的意图以及根据传输协议的所有细节来实现对数据包的聚合处理,因此,能够降低第二设备聚合处理数据的复杂度,提高聚合处理的效率。
结合第二方面,在第二方面的某些实现方式中,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输 所述数据包的设备;所述脏模式字段用于指示是否忽略所述脏字段。
结合第二方面,在第二方面的某些实现方式中,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:当所述聚合策略信息中包括所述第一边界信息时,所述第二设备不聚合所述数据包;当所述聚合策略信息中包括所述第二边界信息时,所述第二设备将所述数据包与在所述数据包之后接收的数据包进行聚合,其中,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;当所述聚合策略信息中包括所述第三边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;当所述聚合策略信息中包括所述第四边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的。
结合第二方面,在第二方面的某些实现方式中,所述边界信息是通过比特信息指示的;当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
结合第二方面,在第二方面的某些实现方式中,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值;所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,所述第二设备向处理器发送的聚合上下文中信息中包括所述数据包的标识信息,用于指示所述处理器对所述数据包进行处理;或者,当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包进行聚合或将所述数据包与在所述数据包之后接收到的数据包进行聚合;当所述聚合策略信息中包括所述第二优先级信息和所述边界信息时,所述第二设备根据所述边界信息处理所述数据包。
结合第二方面,在第二方面的某些实现方式中,若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改;所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:当所述脏字段指示所述数据包被所述第三设备修改时,所述第二设备不聚合所述数据包;当所述脏字段指示所述数据包没有被所述第三设备修改时,所述第二设备根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
结合第二方面,在第二方面的某些实现方式中,所述第二设备根据所述数据包中的聚 合策略信息,处理所述数据包,包括:当所述脏字段指示所述数据包被所述第三设备修改、所述脏模式字段指示不忽略所述脏字段时,所述第二设备不聚合所述数据包;当所述脏模式字段指示忽略所述脏字段时,所述第二设备根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
第三方面,提供一种数据处理装置,包括:处理单元,用于给数据包配置聚合策略信息,所述聚合策略信息用于指示接收所述数据包的第二设备是否聚合处理所述数据包;发送单元,用于向所述第二设备发送所述数据包,其中,所述数据包中包括所述聚合策略信息。
结合第三方面,在第三方面的某些实现方式中,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;所述脏模式字段用于指示是否忽略所述脏字段。
结合第三方面,在第三方面的某些实现方式中,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;其中,所述第一边界信息用于指示不聚合所述数据包,所述第二边界信息用于指示所述数据包与在所述数据包之后发送的数据包聚合,所述第三边界信息用于指示所述数据包与在所述数据包之前发送的数据包以及在所述数据包之后发送的数据包聚合,第四边界信息用于指示所述数据包不能与在所述数据包之后发送的数据包聚合。
结合第三方面,在第三方面的某些实现方式中,所述边界信息是通过比特信息指示的;当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
结合第三方面,在第三方面的某些实现方式中,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值。
结合第三方面,在第三方面的某些实现方式中,若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改。
第四方面,提供一种数据处理装置,包括:接收单元,用于接收第一设备发送的数据包,所述数据包中包括聚合策略信息,所述聚合策略信息用于指示是否聚合处理所述数据包;处理单元,用于根据所述数据包中的聚合策略信息,处理所述数据包。
结合第四方面,在第四方面的某些实现方式中,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;所述边界信息用于指示不聚合所述数据包或聚合所述数 据包的方式;所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;所述脏模式字段用于指示是否忽略所述脏字段。
结合第四方面,在第四方面的某些实现方式中,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;所述处理单元具体用于:当所述聚合策略信息中包括所述第一边界信息时,所述处理单元不聚合所述数据包;当所述聚合策略信息中包括所述第二边界信息时,所述处理单元将所述数据包与在所述数据包之后接收的数据包进行聚合,其中,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;当所述聚合策略信息中包括所述第三边界信息时,所述处理单元将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;当所述聚合策略信息中包括所述第四边界信息时,所述处理单元将所述数据包与在所述数据包之前接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的。
结合第四方面,在第四方面的某些实现方式中,所述边界信息是通过比特信息指示的;当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
结合第四方面,在第四方面的某些实现方式中,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值;所述处理单元具体用于:当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,将所述数据包与在所述数据包之前接收到的数据包进行聚合或将所述数据包与在所述数据包之后接收到的数据包进行聚合;或者,当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,所述第二设备向处理器发送的聚合上下文中信息中包括所述数据包的标识信息,用于指示所述处理器对所述数据包进行处理;当所述聚合策略信息中包括所述第二优先级信息时,根据所述边界信息处理所述数据包。
结合第四方面,在第四方面的某些实现方式中,若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改;所述处理单元具体用于:当所述脏字段指示所述数据包被所述第三设备修改时,不聚合所述数据包;当所述脏字段指示所述数据包没有被所述第三设备修改时,根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
结合第四方面,在第四方面的某些实现方式中,所述处理单元具体用于:当所述脏字 段指示所述数据包被所述第三设备修改、所述脏模式字段指示不忽略所述脏字段时,不聚合所述数据包;当所述脏模式字段指示忽略所述脏字段时,根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
第五方面,提供了一种数据处理设备,包括处理器和收发器,所述收发器用于接收计算机代码或指令,并传输至所述处理器,所述处理器运行所述计算机代码或指令,如第一方面或第一方面任意可能的实现方式中的方法。
第六方面,提供了一种数据处理设备,包括处理器和收发器,所述收发器用于接收计算机代码或指令,并传输至所述处理器,所述处理器运行所述计算机代码或指令,如第二方面或第二方面任意可能的实现方式中的方法。
第七方面,提供了一种数据处理系统,包括:如第一方面所述的第一设备和如第二方面所述的第二设备。
第八方面,提供了一种计算机可读存储介质,所述计算机可读介质存储有计算机程序;所述计算机程序在计算机上运行时,使得计算机执行上述第一方面以及第一方面中任一种可能实现方式中的方法。
第九方面,提供了一种计算机可读存储介质,所述计算机可读介质存储有计算机程序;所述计算机程序在计算机上运行时,使得计算机执行上述第二方面以及第二方面中任一种可能实现方式中的方法。
第十方面,提供一种包含指令的计算机程序产品,所述指令被计算机执行时使得通信装置实现上述第一方面以及第一方面中任一种可能实现方式中的方法。
第十一方面,提供一种包含指令的计算机程序产品,所述指令被计算机执行时使得通信装置实现上述第二方面以及第二方面中任一种可能实现方式中的方法。
附图说明
图1是按消息进行切片、传输和聚合处理的示意图。
图2是TSO技术的示意图。
图3是LRO技术的示意图。
图4是本申请实施例的应用场景示意图。
图5是本申请实施例提出的一种数据处理的方法的示意性流程交互图。
图6是一种聚合策略信息在数据包的包头中的位置示意图。
图7是本申请实施例的一种数据处理装置的示意性框图。
图8是本申请实施例的另一种数据处理装置的示意性框图。
图9是本申请实施例的一种通信设备的示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
数据包聚合是通过网络接口控制器(network interface controller,NIC)/网卡将接收到的多个数据包合并成单个数据包的一种方法,处理器或业务处理逻辑处理聚合后的数据包可以减少对每个数据包的业务处理开销,从而提高了网络端节点的业务处理性能、效率和吞吐量。
普通NIC针对一组聚合后的数据包产生一次CPU中断,CPU在中断处理程序将这组聚合后的数据包提交协议栈处理,最后由驱动或协议栈将他们占用的buffer一起释放掉,提升了业务的处理效率。智能网卡(Smart NIC)卸载网络处理协议栈,在Smart NIC为一组聚合后的数据包进行一次业务处理,能够提高数据的处理效率、提升业务性能。
当被聚合后的数据包按序到达,并且属于同一条流的同一传输消息时,聚合的效率会显著提高,如传输控制协议(transmission control protocol,TCP)流中的数据包按比特(byte)流的方式传输,允许应用通过以太网实现远程内存访问的网络协议(RDMA over converged ethernet,RoCE)中RoCEv2流中的数据包按序列号(sequence)和消息(message)进行传输。
在这种情况下,一组聚合的数据包可以作为单个大数据包呈现给处理器,处理器可以在一次操作中完成对应的协议栈相关的业务处理。为了达到这样的目的,聚合处理引擎应识别接收到的数据包中的以下信息:
(1)是否属于同一聚合流;
(2)按已经聚合的数据包要求的顺序来接收新的数据包:
(3)新接收的数据包与已聚合的数据包属于同一消息。
如图1所示,示出了按消息进行切片、传输和聚合处理的示意图。第一设备(发送侧)按消息进行切片,第二设备(接收侧)按消息进行聚合处理,中间网络设备对切成一片一片的数据包进行传输。
数据包聚合是以接收为基础的聚合,需要第一设备按一定的规则对属于同一数据流的数据进行切片,在第二设备对接收到的数据包进行聚合。典型的NIC技术是第一设备通过传输控制协议切片卸载(TCP segment offload,TSO)技术对大的TCP数据进行数据切片,而在第二设备通过TCP大包聚合(large receive offload,LRO)技术实现数据包聚合。如图2所示,示出了TSO技术的示意图;如图3所示,示出了LRO技术的示意图。
在现有的聚合技术中,通过网络传输的用户数据,通过消息被封装到数据的不同服务层次中,例如传输层(transport layer)、放置层(steering layer)。聚合引擎在向协议栈提供合并后的数据包时,不应丢失不同业务服务层的关键数据信息。其中,有一些数据是需要累积的,可以从最后一个数据包中获取,例如序列号;其他部分数据信息需要进行“有状态”的聚合操作,例如TCP的选择性确认(selective acknowledgment,SACK)信息。
目前,聚合引擎是“无状态”处理器引擎,需要猜测第一设备的意图对数据包进行聚合边界界定。第二设备的聚合引擎需了解传输协议的所有细节才能实现该协议的数据聚合,不同传输协议的细节完全不同,甚至同一传输协议在不同操作系统或不同平台上的实现细节和要求不同,导致聚合引擎需要根据业务的演进和支持进行配套演进。聚合引擎要根据启发式分析、深度包头检查和协议感知能力方能判断待合并的数据包的聚合资格,导致聚合数据的复杂度较高、效率较低。
为此,本申请实施例提出了一种数据处理的方法,能够降低聚合处理数据的复杂度、提高聚合处理的效率。
如图4所示,示出了本申请实施例的应用场景示意图。第一设备和第二设备中都包括智能网卡,中间网络设备可以为交换机或路由器。
如图5所示,示出了本申请实施例提出的一种数据处理的方法500的示意性流程交互 图。该方法包括:
510,第一设备数据包配置聚合策略信息,该聚合策略信息用于指示接收该数据包的第二设备是否聚合处理数据包。具体地,第一设备可以给多个数据包中的每个数据包配置聚合策略信息,多个数据包可以是属于不同数据流的数据包,多个数据包也可以是属于同一数据流的数据包。
多个数据包是第一设备中的切片引擎按消息对数据进行切片而得到的。该切片引擎可以是硬件模块、也可以是软件模块。
可选的,数据包的包头中包括聚合策略信息,该聚合策略信息中可以包括以下至少一种信息:数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段等。其中,边界信息用于指示不聚合该数据包或聚合该数据包的方式;优先级信息用于指示该数据包的优先级是否高于或等于预设值;脏字段用于指示数据包中的数据是否被第三设备修改,其中该第三设备是用于传输该数据包的设备;脏模式字段用于指示是否忽略该脏字段。应理解,只有脏字段可以被传输该数据包的第三设备修改,聚合策略信息中的其他信息不能被第三设备修改。示例性地,边界信息可以包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息。其中,第一边界信息用于指示不聚合该数据包,可以理解为,该数据包可以单独发送给处理器进行处理;第二边界信息用于指示该数据包可以与在该数据包之后发送的数据包聚合,即该数据包不能与在该数据包之前发送的数据包聚合;第三边界信息用于指示该数据包可以与在该数据包之前发送的数据包以及在该数据包之后发送的数据包聚合,可以理解为,该数据包不仅可以与在该数据包之前发送的数据包聚合,该数据包还可以与在该数据包之后发送的数据包聚合;第四边界信息用于指示该数据包不能与在该数据包之后发送的数据包聚合,该数据包可以与在该数据包之前发送的数据包聚合,也可以不聚合该数据包。
应理解,数据包可以理解为数据报文,数据包的包头可以理解为数据包的报头,本申请对此不做具体限定。
可选的,边界信息是通过比特(bit)信息指示的。当该比特信息等于第一数值时,指示该数据包中的边界信息为第一边界信息;当该比特信息等于第二数值时,指示该数据包中的边界信息为第二边界信息;当该比特信息等于第三数值时,指示该数据包中的边界信息为第三边界信息,;当该比特信息等于第四数值时,指示该数据包中的边界信息为第四边界信息。示例性地,当数据包中用于指示边界信息的比特信息等于第一数值时,可以指示“loner”,指示该数据包为独立的数据包;当数据包中用于指示边界信息的比特信息等于第二数值时,可以指示“first”,指示该数据包为数据流中的第一个数据包;当数据包中用于指示边界信息的比特信息等于第三数值时,可以指示“next”,指示该数据包为数据流中的中间数据包;当数据包中用于指示边界信息的比特信息等于第四数值时,可以指示“last”,指示该数据包为数据流中的最后一个数据包。示例性地,该比特信息可以占用数据包的包头中两个比特位。第一数值可以等于0,第二数值可以等于1,第三数值可以等于2,第四数值可以等于3。
示例性地,数据包的序列号可以是单调递增的,也可以是单调递减的。第一设备可以为每个数据包分配唯一的序列号,初传的数据包的序列号与重传的数据包的序列号是不同的。除此之外,本申请实施例中可以采用40bit/48bit/64bit位宽的序列号,能够使序列号 的翻转周期变大,减少序列号翻转。
示例性地,优先级信息包括第一优先级信息或第二优先级信息,第一优先级信息可以指示数据包的优先级高于或等于预设值,第二优先级信息可以指示数据包的优先级低于预设值,该预设值可以是预定义的。当数据包的优先级高于或等于预设值时,说明该数据包不可忽略或比较重要,需要指示给处理器进行处理。
可选的,优先级信息也可以是通过比特信息指示的。示例性地,该比特信息可以占用数据包的包头中一个比特位。当该比特位对应的比特值等于1时,可以指示该数据包的优先级高于或等于预设值;当该比特位对应的比特值等于0时,可以指示该数据包的优先级低于预设值。示例性地,用于指示数据包的优先级的比特值等于1时,可以指示“on”,指示需要将该数据包单独指示给处理器进行处理;用于指示数据包的优先级的比特值等于“0”时,可以指示“off”,指示无需将该数据包单独指示给处理器进行处理。
可选的,脏字段和脏模式字段也可以是通过比特信息指示的。
520,第一设备向第二设备依次发送数据包,该数据包中包括聚合策略信息。
具体地,第一设备可以通过至少一个第三设备向第二设备发送多个数据包。该第二设备可以是聚合引擎。第三设备也可以称为中间设备,该第三设备可以为交换机或路由器等。
530,第二设备接收第一设备发送的数据包,该数据包中包括聚合策略信息,聚合策略信息用于指示是否聚合处理该数据包。
具体地,第二设备可以接收第一设备通过至少一个第三设备发送的多个数据包。
聚合策略信息中脏字段是可以被传输该数据包的第三设备(中间设备)修改的。该脏字段可以占用数据包的包头中一个比特位。具体地,若数据包中的数据被第三设备修改,则该脏字段也被第三设备修改,该情况下,修改后的数据包将无法与其他数据包聚合;若数据包中的数据没有被第三设备修改,则该脏字段不会被第三设备修改。其中,第三设备对数据包中的数据进行修改包括将该第三设备的地址信息加入到该数据包中,用于第二设备获知该数据包的传输路径等。
例如,第一设备配置脏字段中的比特值为0,若数据包被修改,则该脏字段中的比特值被修改为1,修改后的脏字段指示该数据包无法与其他数据包聚合。应理解,第一设备配置该脏字段中的比特值也可以为1,对此不做具体限定。除此之外,脏字段也可以占用更多个比特位。
脏模式字段用于指示是否忽略脏字段,可以理解为,脏模式字段用于指示是否忽略脏字段中的比特值被修改。该脏模式字段可以占用数据包的包头中两个比特位。示例性地,当数据包中的脏模式字段中比特值为0时,可以指示忽略脏字段;当数据包中的脏模式字段中比特值为1时,可以指示不忽略脏字段。应理解,也可以是当数据包中的脏模式字段中比特值指示为1时,指示忽略脏字段,本申请对此不做具体限定。
540,第二设备根据数据包中聚合策略信息,处理该数据包。具体地,第二设备中的聚合引擎根据数据包中聚合策略信息,处理该数据包。该聚合引擎可以是硬件模块、也可以是软件模块。
示例性地,聚合策略信息中可以包括数据包的序列号和以下四种边界信息中的一种边界信息:第一边界信息、第二边界信息、第三边界信息或第四边界信息。
当数据包的聚合策略信息中包括第一边界信息时,第二设备不聚合该数据包,可以将 该数据包单独发送给处理器进行处理。该处理器可以是独立于该第二设备的主机的协议栈中的处理器,也可以是该第二设备中的处理器,对此不做具体限定。
当数据包的聚合策略信息中包括第二边界信息时,第二设备可以将该数据包与在该数据包之后接收的数据包进行聚合,但是,该数据包不能与在该数据包之前发送的数据包聚合。例如,序列号为101的数据包的聚合策略信息中包括第二边界信息,若第二设备在接收到序列号为101的数据包之后,接收到了序列号为102的数据包,则该第二设备可以将序列号为101的数据包与序列号为102的数据包进行聚合;若第二设备在接收到序列号为101的数据包之后,没有接收到序列号为102的数据包,而是接收到了序列号为103的数据包,则该第二设备无需将序列号为101的数据包与序列号为103的数据包聚合,只需将序列号为101的数据包单独发送给处理器即可。其中,序列号为101的数据包、序列号为102的数据包以及序列号为103的数据包是属于同一数据流、同一message的数据包。
当数据包的聚合策略信息中包括第三边界信息时,第二设备不仅可以将该数据包与在该数据包之前接收到的数据包聚合,还可以将该数据包与在该数据包之后接收到的数据包聚合。例如,序列号为202的数据包的聚合策略信息中包括第三边界信息,若第二设备在接收到序列号为202的数据包之前还收到了序列号为201的数据包,则第二设备可以将序列号为202的数据包与序列号为201的数据包进行聚合;若第二设备在接收到序列号为202的数据包之后还收到了序列号为203的数据包,则第二设备可以将序列号为203的数据包与序列号为201的数据包、序列号为202的数据包进行聚合。其中,序列号为201的数据包、序列号为202的数据包以及序列号为203的数据包是属于同一数据流、同一message的数据包。
当数据包的聚合策略信息中包括第四边界信息时,第二设备可以将该数据包与在该数据包之前发送的数据包聚合,也可以不聚合该数据包,但是,该数据包不能与在该数据包之后发送的数据包聚合。例如,序列号为302的数据包的聚合策略信息中包括第四边界信息,若第二设备在接收到序列号为302的数据包之前还收到了序列号为301的数据包,则第二设备可以将序列号为302的数据包与序列号为301的数据包进行聚合。若第二设备在接收序列号为302的数据包之前没有接收到了序列号为301的数据包,则第二设备可以将序列号为302的数据包单独发送给处理器。其中,序列号为301的数据包和序列号为302的数据包是属于同一数据流、同一message的数据包。
示例性地,聚合策略信息中可以包括数据包的序列号、边界信息和优先级信息。
当数据包的聚合策略信息中包括第一优先级信息和第三边界信息时,第二设备可以将该数据包与在该数据包之前接收到的数据包以及在数据包之后接收到的数据包进行聚合,且第二设备向处理器发送的聚合上下文信息中包括该数据包的标识信息,用于指示处理器对该数据包进行处理。数据包的标识信息可以是该数据包的包头信息,也可以是该数据包的序列号,本申请对此不做具体限定。
应理解,聚合上下文信息中包括聚合后的多个数据包中的第一个(first)数据包的包头信息、最后一个(last)数据包的包头信息以及聚合后的多个数据包的数据信息。因此,当数据包的聚合策略信息中的边界信息为第一边界信息、第二边界信息或第四边界信息时,该数据包的包头信息是会通过聚合上下文信息发送给处理器的,无需再通过第一优先级信息来指示该数据包的优先级高于或等于预设值,即第二设备向处理器发送的聚合上下 文信息中也无需再次增加该数据包的包头信息或该数据包的序列号。
可选的,当数据包的聚合策略信息中包括第一优先级信息和第三边界信息时,第二设备也可以将该数据包与在该数据包之前接收到的数据包聚合,或者,第二设备将该数据包与在数据包之后接收到的数据包进行聚合,使第二设备向处理器发送的聚合上下文信息中包括该数据包的包头信息。
可选的,当聚合策略信息中包括第二优先级信息和边界信息时,该第二设备可以根据边界信息处理该数据包,可以理解为,第二设备根据数据包的序列号和边界信息处理该数据包,具体过程如上述所述。
示例性地,聚合策略信息中可以包括数据包的序列号、边界信息、优先级信息和脏字段。
当数据包的聚合策略信息中包括脏字段,且该脏字段指示该数据包被第三设备修改时,第二设备不聚合该数据包。应理解,当脏字段指示该数据包被第三设备修改时,无论聚合策略信息中的边界信息是哪一种边界信息,也无论聚合策略信息中的优先级信息是第一优先级信息还是第二优先级信息,第二设备都不能聚合该数据包。
当数据包的聚合策略信息中包括脏字段、但该脏字段指示该数据包没有被第三设备修改时,第二设备根据该数据包的序列号、边界信息和优先级信息中的至少一种信息处理该数据包。
例如,聚合策略信息中仅包括数据包的序列号、边界信息和脏字段的情况下,当脏字段指示该数据包没有被第三设备修改时,第二设备可以根据数据包的序列号和边界信息处理该数据包。聚合策略信息中包括数据包的序列号、边界信息、优先级信息和脏字段的情况下,当脏字段指示该数据包没有被第三设备修改时,第二设备可以根据数据包的序列号、边界信息和优先级信息处理该数据包。
示例性地,聚合策略信息中可以包括数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段。
当聚合策略信息中的脏字段指示该数据包被第三设备修改、且脏模式字段指示不忽略该脏字段时,第二设备不聚合该数据包。应理解,当脏字段指示该数据包被第三设备修改、且脏模式字段指示不忽略该脏字段时,无论聚合策略信息中的边界信息是哪一种边界信息,也无论聚合策略信息中的优先级信息是第一优先级信息还是第二优先级信息,第二设备都不能聚合该数据包。
当聚合策略信息中的脏字段指示该数据包被第三设备修改,但脏模式字段指示忽略该脏字段时,第二设备可以根据数据包的序列号、边界信息和优先级信息中的至少一种信息处理该数据包。例如,聚合策略信息中仅包括数据包的序列号、边界信息、脏字段和脏模式字段的情况下,当脏字段指示该数据包被第三设备修改、脏模式字段指示忽略该脏字段时,第二设备可以根据数据包的序列号和边界信息处理该数据包。聚合策略信息中包括数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段的情况下,当脏字段指示该数据包被第三设备修改、脏模式字段指示忽略该脏字段时,第二设备可以根据数据包的序列号、边界信息和优先级信息处理该数据包。
当聚合策略信息中的脏字段指示该数据包没有被第三设备修改时,无论脏模式字段指示忽略该脏字段还是指示不忽略该脏字段,第二设备都可以根据数据包的序列号、边界信 息和优先级信息中的至少一种信息处理该数据包。例如,聚合策略信息中仅包括数据包的序列号、边界信息、脏字段和脏模式字段的情况下,当脏字段指示该数据包没有被第三设备修改时,第二设备可以根据数据包的序列号和边界信息处理该数据包。聚合策略信息中包括数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段的情况下,当脏字段指示该数据包没有被第三设备修改时,第二设备可以根据数据包的序列号、边界信息和优先级信息处理该数据包。
如图6所示,示出了一种聚合策略信息在数据包的包头中的位置示意图。数据包中可以包括数据包的序列号、边界信息、优先级信息、脏字段、脏模式字段以及用户数据等信息,其中,边界信息、优先级信息、脏字段和脏模式字段可以占用数据包的包头中6个比特。边界信息、优先级信息、脏字段和脏模式字段组成的字段可以称为聚合标签(coalescing tag),数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段组成的字段可以称为聚合包头(coalescing header),聚合包头可以理解为上述聚合策略信息。应理解,本申请并不限定聚合标签和数据包的序列号应放置在该数据包的包头中的具体位置。
在本申请实施例提供的技术方案中,第一设备发送的数据包中包括用于指示接收该数据包的第二设备是否聚合处理该数据包的聚合策略信息,第二设备可以根据接收到的数据包中的聚合策略信息处理该数据包。第一设备通过在数据包中配置聚合策略信息来显示地指示第二设备是否聚合该数据包或如何聚合处理该数据包,第二设备无需再猜测第一设备的意图以及根据传输协议的所有细节来实现对数据包的聚合处理,因此,能够降低第二设备聚合处理数据的复杂度,提高聚合处理的效率。
本申请实施例提出了一种数据处理装置,如图7所示,出示了本申请实施例的一种数据处理装置700的示意性框图。该装置可以应用于图5方法实施例中的第一设备。该通信装置700包括:
处理单元710,用于给数据包配置聚合策略信息,所述聚合策略信息用于指示接收所述数据包的第二设备是否聚合处理所述数据包;
发送单元720,用于向所述第二设备发送所述数据包,其中,所述数据包中包括所述聚合策略信息。
可选的,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;所述脏模式字段用于指示是否忽略所述脏字段。
可选的,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;其中,所述第一边界信息用于指示不聚合所述数据包,所述第二边界信息用于指示所述数据包与在所述数据包之后发送的数据包聚合,所述第三边界信息用于指示所述数据包与在所述数据包之前发送的数据包以及在所述数据包之后发送的数据包聚合,第四边界信息用于指示所述数据包不能与在所述数据包之后发送的数据包聚合。
可选的,所述边界信息是通过比特信息指示的;当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;当所述比特 信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
可选的,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值。
可选的,若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改。
本申请实施例提出了另一种数据处理装置,如图8所示,出示了本申请实施例的一种数据处理装置800的示意性框图。该装置可以应用于图5方法实施例中的第二设备。该通信装置800包括:
接收单元810,用于接收第一设备发送的数据包,所述数据包中包括聚合策略信息,所述聚合策略信息用于指示是否聚合处理所述数据包;
处理单元820,用于根据所述数据包中的聚合策略信息,处理所述数据包。
可选的,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;所述脏模式字段用于指示是否忽略所述脏字段。
可选的,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;
所述处理单元820具体用于:
当所述聚合策略信息中包括所述第一边界信息时,所述处理单元不聚合所述数据包;
当所述聚合策略信息中包括所述第二边界信息时,所述处理单元将所述数据包与在所述数据包之后接收的数据包进行聚合,其中,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;
当所述聚合策略信息中包括所述第三边界信息时,所述处理单元将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;
当所述聚合策略信息中包括所述第四边界信息时,所述处理单元将所述数据包与在所述数据包之前接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的。
可选的,所述边界信息是通过比特信息指示的;
当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边 界信息为所述第一边界信息;
当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;
当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;
当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
可选的,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值;
所述处理单元820具体用于:
当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,将所述数据包与在所述数据包之前接收到的数据包进行聚合或将所述数据包与在所述数据包之后接收到的数据包进行聚合;或者,
当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,所述第二设备向处理器发送的聚合上下文中信息中包括所述数据包的标识信息,用于指示所述处理器对所述数据包进行处理;
当所述聚合策略信息中包括所述第二优先级信息时,根据所述边界信息处理所述数据包。
可选的,若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;
若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改;
所述处理单元820具体用于:
当所述脏字段指示所述数据包被所述第三设备修改时,不聚合所述数据包;
当所述脏字段指示所述数据包没有被所述第三设备修改时,根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
可选的,所述处理单元820具体用于:
当所述脏字段指示所述数据包被所述第三设备修改、所述脏模式字段指示不忽略所述脏字段时,不聚合所述数据包;
当所述脏模式字段指示忽略所述脏字段时,根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
本申请实施例提供了一种数据处理设备900,如图9所示,出示了本申请实施例的一种数据处理设备900的示意性框图。
该数据处理设备900包括:处理器910和收发器920,所述收发器920用于接收计算机代码或指令,并传输至所述处理器910,所述处理器910运行所述计算机代码或指令,以实现本申请实施例中的方法。该数据处理设备可以是本申请实施例中的第一设备或第二设备。
上述的处理器910可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
本申请实施例还提供了一种数据处理系统,包括图7中所述的数据处理装置和图8中所述的数据处理装置。
本申请实施例还提供了一种计算机可读存储介质,其上存储有用于实现上述方法实施例中的方法的计算机程序。当该计算机程序在计算机上运行时,使得该计算机可以实现上述方法实施例中的方法。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得上述方法实施例中的方法被执行。
本申请实施例还提供了一种芯片,包括处理器,所述处理器与存储器相连,所述存储器用于存储计算机程序,所述处理器用于执行所述存储器中存储的计算机程序,以使得所述芯片执行上述方法实施例中的方法。
应理解,在本申请实施例中,编号“第一”、“第二”…仅仅为了区分不同的对象,比如为了区分不同的设备或边界信息等,并不对本申请实施例的范围构成限制,本申请实施例并不限于此。
另外,本申请中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;本申请中术语“至少一个”,可以表示“一个”和“两个或两个以上”,例如,A、B和C中,可以表示:单独存在A,单独存在B,单独存在C、同时存在A和B,同时存在A和C,同时存在C和B,同时存在A和B和C,这七种情况。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元 的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (31)

  1. 一种数据处理的方法,其特征在于,包括:
    第一设备给数据包配置聚合策略信息,所述聚合策略信息用于指示接收所述数据包的第二设备是否聚合处理所述数据包;
    所述第一设备向所述第二设备发送所述数据包,其中,所述数据包中包括所述聚合策略信息。
  2. 根据权利要求1所述的方法,其特征在于,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;
    所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;
    所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;
    所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;
    所述脏模式字段用于指示是否忽略所述脏字段。
  3. 根据权利要求2所述的方法,其特征在于,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;
    其中,所述第一边界信息用于指示不聚合所述数据包,所述第二边界信息用于指示所述数据包与在所述数据包之后发送的数据包聚合,所述第三边界信息用于指示所述数据包与在所述数据包之前发送的数据包以及在所述数据包之后发送的数据包聚合,第四边界信息用于指示所述数据包不能与在所述数据包之后发送的数据包聚合。
  4. 根据权利要求2或3所述的方法,其特征在于,
    所述边界信息是通过比特信息指示的;
    当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;
    当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;
    当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;
    当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值。
  6. 根据权利要求2至5中任一项所述的方法,其特征在于,
    若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;
    若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改。
  7. 一种数据处理的方法,其特征在于,包括:
    第二设备接收第一设备发送的数据包,所述数据包中包括聚合策略信息,所述聚合策略信息用于指示是否聚合处理所述数据包;
    所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包。
  8. 根据权利要求7所述的方法,其特征在于,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;
    所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;
    所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;
    所述脏模式字段用于指示是否忽略所述脏字段。
  9. 根据权利要求8所述的方法,其特征在于,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;
    所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:
    当所述聚合策略信息中包括所述第一边界信息时,所述第二设备不聚合所述数据包;
    当所述聚合策略信息中包括所述第二边界信息时,所述第二设备将所述数据包与在所述数据包之后接收的数据包进行聚合,其中,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;
    当所述聚合策略信息中包括所述第三边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;
    当所述聚合策略信息中包括所述第四边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的。
  10. 根据权利要求8或9所述的方法,其特征在于,
    所述边界信息是通过比特信息指示的;
    当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;
    当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;
    当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;
    当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
  11. 根据权利要求9或10所述的方法,其特征在于,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值;
    所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:
    当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,所述第二设备向处理器发送的聚合上下文中信息中包括所述数据包的标识信息,用于指示所述处理器对所述数据包进行处理;或者,
    当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,所述第二设备将所述数据包与在所述数据包之前接收到的数据包进行聚合或将所述数据包与在所述数据包之后接收到的数据包进行聚合;
    当所述聚合策略信息中包括所述第二优先级信息和所述边界信息时,所述第二设备根据所述边界信息处理所述数据包。
  12. 根据权利要求8至11中任一项所述的方法,其特征在于,
    若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;
    若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改;
    所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:
    当所述脏字段指示所述数据包被所述第三设备修改时,所述第二设备不聚合所述数据包;
    当所述脏字段指示所述数据包没有被所述第三设备修改时,所述第二设备根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
  13. 根据权利要求12所述的方法,其特征在于,所述第二设备根据所述数据包中的聚合策略信息,处理所述数据包,包括:
    当所述脏字段指示所述数据包被所述第三设备修改、所述脏模式字段指示不忽略所述脏字段时,所述第二设备不聚合所述数据包;
    当所述脏模式字段指示忽略所述脏字段时,所述第二设备根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
  14. 一种数据处理装置,其特征在于,包括:
    处理单元,用于给数据包配置聚合策略信息,所述聚合策略信息用于指示接收所述数据包的第二设备是否聚合处理所述数据包;
    发送单元,用于向所述第二设备发送所述数据包,其中,所述数据包中包括所述聚合策略信息。
  15. 根据权利要求14所述的装置,其特征在于,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;
    所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;
    所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;
    所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;
    所述脏模式字段用于指示是否忽略所述脏字段。
  16. 根据权利要求15所述的装置,其特征在于,所述边界信息包括以下任意一种: 第一边界信息、第二边界信息、第三边界信息或第四边界信息;
    其中,所述第一边界信息用于指示不聚合所述数据包,所述第二边界信息用于指示所述数据包与在所述数据包之后发送的数据包聚合,所述第三边界信息用于指示所述数据包与在所述数据包之前发送的数据包以及在所述数据包之后发送的数据包聚合,第四边界信息用于指示所述数据包不能与在所述数据包之后发送的数据包聚合。
  17. 根据权利要求15或16所述的装置,其特征在于,
    所述边界信息是通过比特信息指示的;
    当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;
    当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;
    当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;
    当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
  18. 根据权利要求15至17中任一项所述的装置,其特征在于,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值。
  19. 根据权利要求15至18中任一项所述的装置,其特征在于,
    若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;
    若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改。
  20. 一种数据处理装置,其特征在于,包括:
    接收单元,用于接收第一设备发送的数据包,所述数据包中包括聚合策略信息,所述聚合策略信息用于指示是否聚合处理所述数据包;
    处理单元,用于根据所述数据包中的聚合策略信息,处理所述数据包。
  21. 根据权利要求20所述的装置,其特征在于,所述数据包的包头中包括所述聚合策略信息,所述聚合策略信息包括以下至少一种信息:所述数据包的序列号、边界信息、优先级信息、脏字段和脏模式字段;
    所述边界信息用于指示不聚合所述数据包或聚合所述数据包的方式;
    所述优先级信息用于指示所述数据包的优先级是否高于或等于预设值;
    所述脏字段用于指示所述数据包中的数据是否被第三设备修改,其中,所述第三设备是用于传输所述数据包的设备;
    所述脏模式字段用于指示是否忽略所述脏字段。
  22. 根据权利要求21所述的装置,其特征在于,所述边界信息包括以下任意一种:第一边界信息、第二边界信息、第三边界信息或第四边界信息;
    所述处理单元具体用于:
    当所述聚合策略信息中包括所述第一边界信息时,所述处理单元不聚合所述数据包;
    当所述聚合策略信息中包括所述第二边界信息时,所述处理单元将所述数据包与在所述数据包之后接收的数据包进行聚合,其中,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;
    当所述聚合策略信息中包括所述第三边界信息时,所述处理单元将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的,所述在所述数据包之后接收的数据包的序列号与所述数据包的序列号是连续的;
    当所述聚合策略信息中包括所述第四边界信息时,所述处理单元将所述数据包与在所述数据包之前接收到的数据包进行聚合,其中,所述在所述数据包之前接收的数据包的序列号与所述数据包的序列号是连续的。
  23. 根据权利要求21或22所述的装置,其特征在于,
    所述边界信息是通过比特信息指示的;
    当所述比特信息等于第一数值时,指示所述数据包为独立的数据包、所述数据包中边界信息为所述第一边界信息;
    当所述比特信息等于第二数值时,指示所述数据包为数据流中的第一个数据包、所述数据包中的边界信息为所述第二边界信息;
    当所述比特信息等于第三数值时,指示所述数据包为数据流中的中间数据包、所述数据包中的边界信息为所述第三边界信息;
    当所述比特信息等于第四数值时,指示所述数据包为数据流中的最后一个数据包、所述数据包中的边界信息为所述第四边界信息。
  24. 根据权利要求22或23所述的装置,其特征在于,所述优先级信息包括第一优先级信息或第二优先级信息,所述第一优先级信息指示所述数据包的优先级高于或等于所述预设值,所述第二优先级信息指示所述数据包的优先级低于所述预设值;
    所述处理单元具体用于:
    当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,将所述数据包与在所述数据包之前接收到的数据包进行聚合或将所述数据包与在所述数据包之后接收到的数据包进行聚合;或者,
    当所述聚合策略信息中包括所述第一优先级信息和所述第三边界信息时,将所述数据包与在所述数据包之前接收到的数据包以及在所述数据包之后接收到的数据包进行聚合,所述第二设备向处理器发送的聚合上下文中信息中包括所述数据包的标识信息,用于指示所述处理器对所述数据包进行处理;
    当所述聚合策略信息中包括所述第二优先级信息时,根据所述边界信息处理所述数据包。
  25. 根据权利要求21至24中任一项所述的装置,其特征在于,
    若所述数据包中的数据被所述第三设备修改,则所述数据包中的所述脏字段被所述第三设备修改;
    若所述数据包中的数据没有被所述第三设备修改,则所述数据包中的所述脏字段没有被所述第三设备修改;
    所述处理单元具体用于:
    当所述脏字段指示所述数据包被所述第三设备修改时,不聚合所述数据包;
    当所述脏字段指示所述数据包没有被所述第三设备修改时,根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
  26. 根据权利要求25所述的装置,其特征在于,所述处理单元具体用于:
    当所述脏字段指示所述数据包被所述第三设备修改、所述脏模式字段指示不忽略所述脏字段时,不聚合所述数据包;
    当所述脏模式字段指示忽略所述脏字段时,根据所述所述数据包的序列号、所述边界信息和所述优先级信息中的至少一种信息处理所述数据包。
  27. 一种数据处理设备,其特征在于,包括:处理器和收发器,所述收发器用于接收计算机代码或指令,并传输至所述处理器,所述处理器运行所述计算机代码或指令,如权利要求1至6中任一项所述的方法。
  28. 一种数据处理设备,其特征在于,包括:处理器和收发器,所述收发器用于接收计算机代码或指令,并传输至所述处理器,所述处理器运行所述计算机代码或指令,如权利要求7至13中任一项所述的方法。
  29. 一种数据处理系统,其特征在于,包括:
    如权利要求14至19中任一项所述的数据处理装置,以及,如权利要求20至26中任一项所述的数据处理装置。
  30. 一种计算机可读存储介质,其特征在于,包括
    所述计算机可读介质存储有计算机程序;
    所述计算机程序在计算机上运行时,使得计算机执行权利要求1至13中任一项所述的方法。
  31. 一种计算机程序产品,其特征在于,包括计算机程序,当所述计算机程序被执行时,使得如权利要求1至13任一项所述的方法被实现。
PCT/CN2022/091494 2021-08-27 2022-05-07 数据处理的方法和装置 WO2023024572A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110997496.4 2021-08-27
CN202110997496.4A CN115733897A (zh) 2021-08-27 2021-08-27 数据处理的方法和装置

Publications (1)

Publication Number Publication Date
WO2023024572A1 true WO2023024572A1 (zh) 2023-03-02

Family

ID=85290553

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091494 WO2023024572A1 (zh) 2021-08-27 2022-05-07 数据处理的方法和装置

Country Status (2)

Country Link
CN (1) CN115733897A (zh)
WO (1) WO2023024572A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205037A1 (en) * 2012-02-02 2013-08-08 Apple Inc. Tcp-aware receive side coalescing
CN109688063A (zh) * 2018-11-14 2019-04-26 华为技术有限公司 一种大型接收卸载功能的设置方法和装置
US20200068048A1 (en) * 2017-01-03 2020-02-27 Intel Corporation Cross-device segmentation offload
US20200314037A1 (en) * 2019-03-27 2020-10-01 Samsung Electronics Co., Ltd. Method for processing network packets and electronic device therefor
US20200403919A1 (en) * 2020-09-03 2020-12-24 Intel Corporation Offload of acknowledgements to a network device
CN113079527A (zh) * 2020-01-06 2021-07-06 三星电子株式会社 用于控制无线通信系统中的网络切片数据速率的设备和方法
CN113141330A (zh) * 2020-01-17 2021-07-20 华为技术有限公司 通信方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130205037A1 (en) * 2012-02-02 2013-08-08 Apple Inc. Tcp-aware receive side coalescing
US20200068048A1 (en) * 2017-01-03 2020-02-27 Intel Corporation Cross-device segmentation offload
CN109688063A (zh) * 2018-11-14 2019-04-26 华为技术有限公司 一种大型接收卸载功能的设置方法和装置
US20200314037A1 (en) * 2019-03-27 2020-10-01 Samsung Electronics Co., Ltd. Method for processing network packets and electronic device therefor
CN113079527A (zh) * 2020-01-06 2021-07-06 三星电子株式会社 用于控制无线通信系统中的网络切片数据速率的设备和方法
CN113141330A (zh) * 2020-01-17 2021-07-20 华为技术有限公司 通信方法及装置
US20200403919A1 (en) * 2020-09-03 2020-12-24 Intel Corporation Offload of acknowledgements to a network device

Also Published As

Publication number Publication date
CN115733897A (zh) 2023-03-03

Similar Documents

Publication Publication Date Title
WO2018210117A1 (zh) 一种拥塞控制方法、网络设备及其网络接口控制器
US8175116B2 (en) Multiprocessor system for aggregation or concatenation of packets
US7760629B2 (en) Aggregate data frame generation
US7990857B2 (en) Priority aware MAC flow control
US20020054570A1 (en) Data communication system, data communication method, and recording medium with data communication program recorded thereon
US20020083331A1 (en) Methods and systems using PLD-based network communication protocols
US20060133364A1 (en) Method, system and article for improved network performance by dynamically setting a reassembly timer based on network interface
US20070255866A1 (en) Method and system for a user space TCP offload engine (TOE)
US20060029099A1 (en) Data transmission method using packet aggregation
US8953631B2 (en) Interruption, at least in part, of frame transmission
WO2020063339A1 (zh) 一种实现数据传输的方法、装置和系统
US20020080784A1 (en) Methods and systems using PLD-based network communication protocols
JP2014509483A (ja) ワイヤレスネットワークにおけるトランスミッション・コントロール・プロトコルの性能を改善する機構
JP2009509432A (ja) 通信システムにおけるパケットの分割および連結をシグナリングする方法および装置
US7751328B2 (en) System and method for efficient network flow control
US7480301B2 (en) Method, system and article for improved TCP performance during retransmission in response to selective acknowledgement
US7286483B2 (en) Electronic data transfer based on selective storage of incoming packets
WO2023024572A1 (zh) 数据处理的方法和装置
CN116095197B (zh) 数据传输方法及相关装置
WO2018045521A1 (zh) 无线网络中传输信令的方法和装置
CN104219178A (zh) 基于Openflow控制报文处理方法、发送装置、接收装置和系统
CN109951397B (zh) 报文处理的方法和设备
CN115714991A (zh) 时间明晰网络数据包的传输方法、设备及存储介质
TWI689820B (zh) Usb傳輸系統、usb裝置與支援usb傳輸的主機
US9628397B2 (en) Communication device and related packet processing method

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE