WO2023087306A1 - 一种处理数据包的方法和设备 - Google Patents

一种处理数据包的方法和设备 Download PDF

Info

Publication number
WO2023087306A1
WO2023087306A1 PCT/CN2021/132095 CN2021132095W WO2023087306A1 WO 2023087306 A1 WO2023087306 A1 WO 2023087306A1 CN 2021132095 W CN2021132095 W CN 2021132095W WO 2023087306 A1 WO2023087306 A1 WO 2023087306A1
Authority
WO
WIPO (PCT)
Prior art keywords
data segment
data
data packets
received data
packets
Prior art date
Application number
PCT/CN2021/132095
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 华为技术有限公司
Priority to CN202180099446.2A priority Critical patent/CN117561706A/zh
Priority to PCT/CN2021/132095 priority patent/WO2023087306A1/zh
Publication of WO2023087306A1 publication Critical patent/WO2023087306A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/43Assembling or disassembling of packets, e.g. segmentation and reassembly [SAR]

Definitions

  • the embodiments of the present application relate to the technical field of communications, and in particular, to a method and device for processing data packets.
  • the downlink rate on the wireless air interface side can reach 10Gbps or even more, so the terminal side also needs to have faster sending and receiving capabilities and stronger processing ability.
  • the terminal side includes an application processor, configured to process data packets received by the terminal.
  • the application processor can support multi-core computing, but in the scenario of grouping and receiving packets, the application processor processes data packets with a single core, so the load of one core is too high, while the load of other cores is low situation, resulting in a reduction in the application processor's ability to process packets.
  • Embodiments of the present application provide a method and device for processing data packets, which are applied to electronic devices, and can reasonably balance the loads of multiple cores of the application processor when the electronic devices are grouping and receiving packets, thereby improving the efficiency of electronic devices in processing data packets. ability.
  • an embodiment of the present application provides an electronic device, the electronic device includes: a modem, configured to demodulate a plurality of received data packets, divide the plurality of received data packets into at least one data segment, and at least one data segment Each data segment corresponds to an application program, each data segment includes a data segment header, and the data segment header is used to identify the application program; the application processor includes multiple cores, and the application processor is used to parse at least one data segment to obtain the data segment header, The one or more received data packets in each data segment are transferred to the core corresponding to the application program according to the data segment header.
  • the electronic device provided by the embodiment of the present application can divide multiple received data packets into at least one data segment by changing the packet format, so that one or more received data packets included in each data segment correspond to the same An application, and the data segment header is used to identify the application, so that no additional processing overhead can be introduced when parsing the data segment, and it is convenient to directly determine which one or more received data packets included in each data segment correspond to s application.
  • the application processor of the electronic device includes multiple cores, and the application processor can transmit one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header obtained by parsing the data segment, The application is caused to run on the core to process the one or more received data packets.
  • the application processor is specifically configured to: parse at least one data segment on the network card layer, obtain the data segment header, and determine the application program according to the data segment header; transmit one or more received data packets from the network card layer To the protocol stack layer; parse one or more received data packets on the protocol stack layer to obtain parsed data; transmit the parsed data to the core corresponding to the application program. Therefore, the electronic device provided by the embodiment of the present application can determine the application program corresponding to the data segment according to the data segment header obtained by parsing the data segment on the network card layer.
  • the L3/L4 of the data packet divides multiple data packets, resulting in the introduction of additional consumption.
  • the application can determine the corresponding applications of multiple received data packets without introducing additional processing overhead on the network card layer.
  • the electronic device provided by the embodiment of the present application can analyze one or more received data packets on the protocol stack layer, obtain the data in each data segment, and transmit the analyzed data to the core corresponding to the application program, so that in Run the application program on the core to process the one or more received data packets, that is, process one or more received data packets in the data segment on the core corresponding to the application program corresponding to each data segment, so that in different data segments
  • the received data packets run on the cores corresponding to different application programs, so as to reasonably balance the load of multiple cores of the electronic device and improve the ability of the electronic device to process data packets.
  • the modem is specifically configured to: determine the data segment corresponding to each received data packet according to the quintuple information of each received data packet in the multiple received data packets, so that one or more received data packets group package in each data segment. Therefore, the electronic device provided by the embodiment of the present application can determine the data segment corresponding to each received data packet according to the quintuple information of each received data packet in multiple received data packets by changing the packet format, and the quintuple One or more received data packets with the same group information are grouped in the same data segment, so that no additional processing overhead can be introduced when parsing the data segment, and it is convenient to directly determine one or more data segments included in each data segment The application that received the packet.
  • the embodiment of the present application provides a modulation and demodulation device
  • the modulation and demodulation device includes: a demodulation module, used to demodulate a plurality of received data packets; Divided into at least one data segment, each data segment in the at least one data segment corresponds to an application program, each data segment includes a data segment header, and the data segment header is used to identify the application program; the sending module is configured to send at least one application program to the application processing device A data segment, each of which contains one or more received packets for transmission to the core corresponding to the application.
  • the modulation and demodulation device provided by the embodiment of the present application can divide multiple received data packets into at least one data segment by changing the packet format, so that one or more received data packets included in each data segment are Corresponding to the same application, and the data segment header is used to identify the application, so that no additional processing overhead can be introduced when parsing the data segment, and it is convenient to directly determine one or more received data packets included in each data segment corresponding application.
  • the grouping module is specifically configured to: determine the data segment corresponding to each received data packet according to the quintuple information of each received data packet in multiple received data packets, so as to combine one or more received Packets are grouped within each data segment. Therefore, the modulation and demodulation device provided by the embodiment of the present application can determine the data segment corresponding to each received data packet according to the quintuple information of each received data packet among multiple received data packets by changing the packet format, and One or more received data packets with the same five-tuple information are packaged in the same data segment, so that no additional processing overhead can be introduced when parsing the data segment, and it is convenient to directly determine one or more of the data included in each data segment. Multiple applications corresponding to received packets.
  • the embodiment of the present application provides an application processing device, the application processing device includes a plurality of cores, and the application processing device includes: a receiving module, configured to receive at least one data segment from a modem device, at least one data segment Each data segment in the segment corresponds to an application program, each data segment includes a data segment header, and the data segment header is used to identify the application program; the parsing module is used to parse at least one data segment to obtain the data segment header; the scheduling module is used to The one or more received data packets in each data segment are transferred to the core corresponding to the application program according to the data segment header.
  • the application processing device provided by the embodiment of the present application includes multiple cores, and the application processing device can transmit one or more received data packets in each data segment to the application program according to the data segment header obtained by parsing the data segment.
  • a corresponding core such that the application program is run on the core to process the one or more received data packets. Therefore, multiple received data packets can be processed through multiple checks. Compared with the processing of multiple data packets through a single core in the prior art, resulting in a reduction in the processing capability of electronic equipment, this application can achieve a reasonable balance of multiple cores of electronic equipment. The technical effect of increasing the ability of electronic equipment to process data packets.
  • the parsing module is specifically used to: parse at least one data segment on the network card layer to obtain a data segment header, and determine an application program according to the data segment header; transmit one or more received data packets from the network card layer to The protocol stack layer; analyze one or more received data packets on the protocol stack layer to obtain the analyzed data; the scheduling module is specifically used to transmit the analyzed data to the core corresponding to the application program. Therefore, the application processing device provided by the embodiment of the present application can determine the application program corresponding to the data segment according to the data segment header obtained by parsing the data segment at the network card layer.
  • the L3/L4 of a data packet splits multiple data packets, resulting in the introduction of additional consumption.
  • the application can determine the corresponding applications of multiple received data packets without introducing additional processing overhead on the network card layer.
  • the application processing device provided by the embodiment of the present application can analyze one or more received data packets on the protocol stack layer, obtain the data in each data segment, and transmit the analyzed data to the core corresponding to the application program, so that Run the application program on the core to process the one or more received data packets, that is, process one or more received data packets in the data segment on the core corresponding to the application program corresponding to each data segment, so that different data segments
  • the received data packets in the system run on cores corresponding to different application programs, so as to reasonably balance the load of multiple cores of the electronic device and improve the ability of the electronic device to process data packets.
  • the embodiment of the present application provides a method for processing data packets, which is applied to an electronic device, and the electronic device includes multiple cores.
  • the method includes: demodulating multiple received data packets, and dividing the multiple received data packets into To at least one data segment, each data segment in at least one data segment corresponds to an application program, each data segment includes a data segment header, and the data segment header is used to identify the application program; parse at least one data segment to obtain the data segment header, according to The data segment header transfers one or more received packets in each data segment to the core corresponding to the application.
  • the beneficial effects achieved in the fourth aspect can be referred to the beneficial effects in the first aspect.
  • At least one data segment is parsed to obtain a data segment header, and one or more received data packets in each data segment are transmitted to the core corresponding to the application program according to the data segment header.
  • Parse at least one data segment on the layer get the data segment header, determine the application program according to the data segment header; transmit one or more received data packets from the network card layer to the protocol stack layer; parse one or more received data packets on the protocol stack layer package to obtain the parsed data; and transmit the parsed data to the core corresponding to the application program.
  • demodulating multiple received data packets, and dividing the multiple received data packets into at least one data segment specifically includes: determining each data segment corresponding to each received data packet, so that one or more received data packets are grouped into each data segment.
  • a computer-readable storage medium includes computer instructions, and when the computer instructions are run on the computer or the processor, the computer or the processor executes any possible design in the fourth aspect and the fourth aspect method.
  • Fig. 1 is a schematic flow chart of processing data packets
  • Fig. 2 is a schematic flow chart of processing data packets
  • FIG. 3 is a schematic diagram of an application scenario of a method for processing data packets provided in an embodiment of the present application
  • FIG. 4 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a method for processing data packets provided in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a packet format provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of a packet format provided by the embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a method for processing data packets provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the structure and composition of a device provided in the embodiment of the present application.
  • FIG. 10 is a schematic diagram of the structure and composition of a device provided in the embodiment of the present application.
  • FIG. 11 is a schematic diagram of the structure and composition of an electronic device provided by an embodiment of the present application.
  • the Packet It is the data unit in transmission control protocol/internet protocol (transmission control protocol/internet protocol, TCP/IP) protocol communication transmission.
  • the data packet includes the physical layer, the link layer, the transmission control protocol (transmission control protocol, TCP) layer and the Internet protocol (internet protocol, IP) layer, which correspond to the layer 1, layer 2, and layer 3 (layer 3, L3) of the data packet respectively. ) and layer 4 (layer 4, L4).
  • TCP transmission control protocol/internet protocol
  • IP Internet protocol
  • Each layer will append a header to the data in the packet, which contains the necessary information of the layer.
  • the header of the TCP layer of the data packet includes the source port and the destination port of the data packet
  • the header of the IP layer of the data packet includes the source IP address, the destination IP address and the protocol number of the data packet.
  • the L3/L4 of the data packet refers to the TCP/IP layer of the data packet. Analyzing the L3/L4 header of the data packet can be understood as analyzing the header of the TCP/IP layer of the data packet, so as to obtain the source IP address, destination IP address, protocol number, source port and destination port of the data packet, that is, get Five-tuple information for this packet.
  • Five-tuple information including source IP address, destination IP address, protocol number, source port, and destination port.
  • data packets with the same five-tuple information correspond to the same data flow.
  • the modem of the terminal needs to send multiple data packets received from the air interface side to the application processor for processing. By grouping packets, multiple data packets are grouped into one data packet for transmission, which can increase the transmission rate.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features.
  • plural means two or more. “At least one of the following” or similar expressions refer to any combination of these items, including any combination of single or plural items.
  • At least one item (piece) of a, b or c can mean: a, b, c, "a and b", “a and c", “b and c", or "a and b and c ", where a, b, c can be single or multiple.
  • the process of processing data packets on the terminal side is shown in FIG. 1 , and the terminal side includes a modem and an application processor.
  • the modem is used for receiving the data packet and sending the data packet to the application processor
  • the application processor is used for processing the data packet, which specifically includes the following steps:
  • Step 1 The modem receives multiple data packets from the air interface side.
  • Step 2 The modem groups multiple data packets according to the sequence received from the air interface side.
  • Step 2 can be understood as the modem grouping multiple data packets into one large data packet (that is, the grouped data packet) according to the sequence received from the air interface side.
  • Step 3 the modem sends the packetized data packet to the application processor through a universal serial bus (universal serial bus, USB).
  • a universal serial bus universal serial bus, USB
  • Step 4 The application processor receives the grouped data packets on the hardware adaptation layer, and transmits the grouped data packets to the network card layer of the application processor.
  • the application processor may be understood as a central processing unit (central processing unit, CPU).
  • the application processor includes a hardware adaptation layer, a network card layer, a protocol stack layer and an application layer.
  • the header of each layer in the data packet has independent software to parse, among them, the hardware adaptation layer and the network card layer can be understood as the software that parses the header of the data packet link layer, and the protocol stack layer in the application processor It can be understood as a collection of software that parses the headers of the TCP layer and the IP layer of the data packet, and the application layer includes one or more application programs.
  • Application processors run different software on different layers to perform different actions. For example, the application processor is mainly responsible for transmitting the received packetized data packets to the network card layer at the hardware adaptation layer.
  • step 4 the application processor schedules the packaged data packets to a core (i.e., a single core) of the application processor on the hardware adaptation layer, and transmits the packaged data packets to the application through the single core.
  • a core i.e., a single core
  • the NIC layer of the processor is a core of the application processor.
  • Step 5 The application processor unpacks the packaged data packets on the network card layer to obtain multiple data packets.
  • the application processor After the application processor receives the packetized data packet at the network card layer, it will unpack the format of the packetized data packet to obtain multiple data packets. It can also be understood as unpacking a large data packet (that is, a packaged data packet) into multiple data packets.
  • step 5 the application processor deassembles the packetized data packets through a single core on the network card layer to obtain multiple data packets.
  • Step 6 the application processor transmits multiple data packets to the protocol stack layer of the application processor on the network card layer.
  • step 6 the application processor schedules multiple data packets obtained after unpacking the packets on the network card layer to a single core for transmission to the protocol stack layer.
  • the application processor unpacks and transmits multiple data packets through a single core on the network card layer, which will cause the single core to bear
  • the load of the application processor is relatively large, which in turn leads to a decrease in the speed at which the application processor processes data packets, that is, the decrease in the processing capability of the terminal side.
  • Step 7 The application processor unpacks the multiple data packets on the protocol stack layer, obtains multiple user data in the multiple data packets, and copies the multiple user data to the core corresponding to the application program.
  • the application processor After the application processor receives multiple data packets on the protocol stack layer, it will unpack the multiple data packets to obtain multiple user data in the multiple data packets, which can be understood as dividing each of the multiple data packets Each data packet is analyzed layer by layer to obtain the user data in each data packet.
  • step 7 the application processor unpacks multiple data packets through a single core on the protocol stack layer, obtains multiple user data in multiple data packets, and dispatches multiple user data to a single core for copying to the core corresponding to the application.
  • the application processor decodes multiple data packets through a single core on the protocol stack layer and copies the user data in the data packets to the core corresponding to the application program.
  • the load borne by the single core is relatively large, which further reduces the processing capability of the terminal side.
  • the process of the application processor unpacking packets, unpacking data packets and copying user data to the core corresponding to the application program involved in steps 5 to 7 is
  • the application processor takes up a large load in the process of processing data packets.
  • the terminal side will only process data packets through a single core, so one core of the application processor may be overloaded, while other cores may be under low load or in an idle state.
  • it takes a long time and a slow processing speed to process data packets through a single core, which will lead to a decrease in the processing capability of the terminal side.
  • the application processor parses the L3/L4 headers of multiple data packets after unpacking the packets on the network card layer. That is, the scheme of the header of the TCP/IP layer of multiple data packets.
  • this solution can be understood as replacing the above-mentioned steps 5-step 7 with steps 5'-step 7', and the process of the remaining steps 1-step 4 remains unchanged, and steps 5'-step 7' are as follows:
  • Step 5' the application processor unpacks the grouped data packets on the network card layer to obtain multiple data packets, and then parses the L3/L4 headers of the multiple data packets.
  • the quintuple information of the data packet can be obtained by parsing the L3/L4 header of the data packet, and the data flow to which the data packet belongs can be determined according to the quintuple information of the data packet.
  • the same data flow is initiated by the same application, and the same application can initiate multiple different data flows. It can also be understood that the same data flow corresponds to the same application, and multiple different data flows can be corresponding to the same application.
  • the application processor can distinguish the multiple data packets according to the data flow by analyzing the L3/L4 headers of the multiple data packets at the network card layer, that is, divide the multiple data packets.
  • step 5' the application processor unpacks the grouped data packets through a single core on the network card layer to obtain multiple data packets, and then parses the L3/L4 headers of multiple data packets through a single core .
  • Step 6' the application processor transmits multiple data packets to the protocol stack layer of the application processor on the network card layer.
  • transmitting multiple data packets to the protocol stack layer of the application processor can be understood as: dispatching data packets belonging to the same data flow to the same core according to the result of distributing multiple data packets in step 5' Upward transmission to the protocol stack layer of the application processor, that is, in step 6', the application processor dispatches multiple data packets obtained after unpacking the packets on the network card layer to multiple cores for transmission to the protocol stack layer.
  • Step 7' the application processor unpacks the multiple data packets on the protocol stack layer, obtains multiple user data in the multiple data packets, and copies the multiple user data to the core corresponding to the application program.
  • the application processor unpacks the data packets by checking multiple data packets on the protocol stack layer, obtains multiple user data in multiple data packets, and schedules multiple user data to multiple cores Upcopied to the core corresponding to the application. It can also be understood as scheduling multiple user data obtained by parsing multiple data packets belonging to the same data flow to the same core and copying them to the core corresponding to the application program corresponding to the data flow.
  • the application processor can process data packets through multiple cores, the load borne by a single core can be reduced.
  • the application processor adds an additional processing process on the network card layer, that is, the application processor adds the processing process of parsing the L3/L4 headers of multiple data packets on the network card layer, and the application processor adds a processing process on the protocol stack layer
  • the packet will still be decoded according to the original processing flow. Therefore, this solution will cause additional consumption of the application processor and introduce additional processing overhead.
  • the present application proposes a method for processing data packets, which can be applied to electronic devices.
  • this application in the scenario of grouping and receiving packets, combines multiple received data
  • the packet is divided into at least one data segment, each data segment corresponds to an application program, each data segment includes a data segment header, and one or more received data packets in each data segment are transmitted to the corresponding application program according to the data segment header cores, so as to reasonably balance the load borne by multiple cores of the application processor, avoid the situation that one core bears a high load while other cores bear a low load or are in an idle state, and improve the efficiency of electronic equipment in processing data packets. ability.
  • the method for processing data packets proposed in the embodiment of the present application can be applied to the scenario of grouping and receiving packets, which includes electronic devices and external devices, and the electronic devices can be, for example, chips, mobile terminals, tablet computers, A notebook computer, a personal computer (personal computer, PC), etc., and the external device may be a server, for example.
  • the electronic device and the external device can communicate with each other, for example, data packets can be transmitted to each other, the external device is used to send multiple received data packets to the electronic device, and the electronic device is used to receive multiple received data packets sent by the external device, and The plurality of received data packets are processed.
  • the communication between the electronic device and the external device may pass through one or more intermediate nodes, such as base stations, wireless routers, wired routers, gateways or relay nodes, etc.
  • FIG. 4 it shows a schematic diagram of a hardware structure of an electronic device.
  • the electronic device may be a chip, and the chip 400 is exemplified in FIG. 4 .
  • the chip 400 may include a processor 401, a memory 402, a chip interface 403, and the like.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the chip 400 .
  • the chip 400 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 401 may include one or more processing units, and the processing unit is used to process the multiple received data packets received from the chip interface 403, for example, group the multiple received data packets into groups, group the grouped Data packet unpacking, unpacking multiple received data packets, scheduling multiple received data packets, etc.
  • the different processing units can be independent components or integrated in one or more processors.
  • the processor 401 may include a graphics processing unit (graphics processing unit, GPU), a central processing unit (central processing unit, CPU), and/or a neural network processing unit (neural network processing unit, NPU), etc.
  • the processor 401 includes a modem 4011 and an application processor 4012 .
  • the modem 4011 can be used to receive and process the received data packets.
  • the modem 4011 can be used to parse the L3/L4 headers of the multiple received data packets, obtain the quintuple information of the multiple received data packets, identify the data streams corresponding to the multiple received data packets, and One or more received data packets corresponding to the same data flow are divided into the same data segment for grouping. It can be understood that a data segment corresponds to a data stream, that is, one or more received data packets in a data segment correspond to the application program corresponding to the same data stream, and a data stream is initiated by an application program, so it can also be understood One data flow corresponds to one application.
  • the modem 4011 is also used to send out the packetized data packets.
  • the application processor 4012 may be configured to receive and process received data packets.
  • the application processor 4012 can be used to unpack the packaged data packets to obtain at least one data segment, and transmit one or more received data packets in each data segment to the corresponding application program. the nucleus.
  • Memory 402 may be used to store one or more computer programs comprising instructions.
  • the processor 401 may execute the above instructions stored in the memory 402, so that the chip 400 executes the method for processing data packets provided in the embodiment of the present application, and the like.
  • Memory 402 may include code storage and data storage. Wherein, the data storage area can store data created during the use of the chip 400 and the like.
  • the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (universal flash storage, UFS) and the like. In the embodiment of the present application, the memory 402 may be used to store one or more application programs.
  • the chip interface 403 may include one or more chip interfaces.
  • the chip interface 403 may be an interface for external communication of the modem 4011 in the processor 401, or may be an antenna or an Ethernet interface.
  • the chip interface 403 is used for communicating with external devices of the chip, such as communicating with a server.
  • each data segment corresponds to an application program
  • each data segment includes a data segment header
  • one or more received data packets in each data segment are transmitted to the application program according to the data segment header
  • the corresponding kernel process is introduced.
  • the embodiment of the present application provides a method for processing data packets.
  • the method is applied to an electronic device, and the electronic device includes multiple cores.
  • the electronic device includes:
  • Step 501 demodulate multiple received data packets, and divide the multiple received data packets into at least one data segment.
  • multiple received data packets can be understood as multiple data packets received by the electronic device from external devices, such as multiple data packets received from a server, and multiple received data packets may come from different servers, multiple received data packets such as Can be multiple Ethernet packets.
  • Each received data packet among the plurality of received data packets has a corresponding data stream, and the data streams corresponding to each received data packet may be the same or different.
  • the data stream is initiated by an application program, and one application program can initiate multiple data streams, which can be understood as the same application program can initiate multiple different data streams, that is, multiple data streams with different quintuple information.
  • a data stream corresponds to an application program, and it can also be understood that each received data packet has a corresponding application program.
  • Divide multiple received data packets into at least one data segment according to the data stream specifically, divide one or more received data packets corresponding to the same data stream among multiple received data packets into the same data segment, which can be understood as a data segment
  • a stream corresponds to a data segment.
  • Each data segment in at least one data segment corresponds to an application program, which can be understood as a data segment corresponding to an application program, and multiple data segments can correspond to the same application program, that is, the multiple data streams corresponding to the multiple data segments are initiated by the same application.
  • Each data segment in at least one data segment includes a data segment header, and the data segment header is used to identify the application program.
  • the data segment header includes data stream identifier (identifier, ID) information, and the data stream ID information is used to indicate the corresponding
  • the application program may be understood as an application program corresponding to one or more received data packets divided into the data segment.
  • the electronic device after the electronic device receives multiple received data packets, it will demodulate the multiple received data packets, and identify the respective data streams corresponding to the multiple received data packets, that is, split the multiple received data packets, which will belong to the same data stream Divide one or more received data packets into the same data segment, which can be understood as grouping multiple received data packets.
  • the electronic device After the electronic device demodulates received data packet 0, received data packet 1 and received data packet 2 as an example, after the electronic device demodulates received data packet 0, received data packet 1 and received data packet 2, It is identified that received data packet 2 corresponds to the first data flow, and received data packet 0 and received data packet 1 correspond to the second data flow.
  • the electronic device separately packs the received data packet 2 into the first data segment, and the first data segment includes a data segment header 0, which is used to identify the first application program corresponding to the first data segment.
  • the electronic device packs the received data packet 0 and the received data packet 1 into the second data segment in the order received, and the second data segment includes a data segment header 1, which is used to identify the second data segment corresponding to the second data segment.
  • application Wherein, the first application program and the second application program may be the same application program or different application programs.
  • the foregoing step 501 may be executed by a modem in the electronic device, for example, may be executed by the modem 4011 in FIG. 4 .
  • step 501 specifically includes:
  • Step 5011 Determine the data segment corresponding to each received data packet according to the quintuple information of each received data packet among the plurality of received data packets, so as to pack one or more received data packets into each data segment.
  • Demodulating multiple received data packets in step 501 may be, for example, parsing L3/L4 headers of multiple received data packets to obtain 5-tuple information of each received data packet.
  • data packets with identical quintuple information correspond to the same data flow, that is, data packets with identical quintuple information can be divided into the same data segment and correspond to the same application program.
  • the process of the application processor parsing the L3/L4 headers of multiple data packets on the network card layer in step 5' of the prior art is performed by the modem 4011 of the present application, and the modem 4011 of the present application has the ability to parse multiple received data packets
  • the L3/L4 header has the ability to get the 5-tuple information of each received packet.
  • the modem 4011 of the present application includes a hardware accelerator, and the modem 4011 executes the step of parsing L3/L4 headers of multiple received data packets to obtain 5-tuple information of each received data packet through the hardware accelerator.
  • the modem 4011 After the modem 4011 obtains the quintuple information of each received data packet, it can pack one or more received data packets with the same quintuple information into the same data segment. This step can also be performed by the hardware accelerator in the modem 4011. to execute.
  • the electronic device After the electronic device obtains the 5-tuple information of each received data packet, it determines the data segment corresponding to each received data packet according to the 5-tuple information of each received data packet, and the one or Multiple received data packets are grouped in the same data segment.
  • the electronic device packs one or more received data packets with the same quintuple information into the same data segment in the order in which multiple received data packets are received.
  • the plurality of received data packets after grouping includes a group packet header, a data segment header of each data segment, and one or more received data packets in each data segment.
  • the packet header is used to store the description information of multiple received data packets after the entire packet
  • the data segment header of each data segment is used to identify the data stream corresponding to the data segment, that is, to identify the application corresponding to the data segment program
  • the one or more received data packets in each data segment are one or more received data packets corresponding to the same data stream, that is, one or more received data packets corresponding to the application program identified by the header of the data segment.
  • NCM network control model
  • the NCM header can be understood as a packet header, which is used to store description information of multiple received data packets after packetization.
  • the NCM header includes information such as NCM transfer header (NCM transfer header, NTH), length (NCM header) and pointer (NDP).
  • NTH is the packet identifier, which is used to store the fixed string application specific integrated circuit (ASIC) code
  • the length (NCM header) is used to describe the length of the entire NCM header
  • the pointer (NDP) is used to point to the package after
  • the position of the first NDP in the multiple received data packets of can be understood as being able to index to the first NDP header after parsing to the pointer (NDP).
  • a plurality of NDPs can be understood as a plurality of data segments.
  • the data packets included in each NDP correspond to the same data flow, that is, to the same application program.
  • a plurality of NDPs include NDP0 and NDP1 , NDP0 includes received data packet 2 , and NDP1 includes received data packet 0 and received data packet 1 as an example.
  • NDP0 includes NDP0 header, length (NDP0), pointer (next NDP), pointer (receive data packet 2) and length (receive data packet 2) and other information.
  • the NDP0 header can be understood as a data segment header.
  • the NDP header stores the "ncmx" string ASIC code value by default.
  • the NCM header is optimized to store the information used to identify the application.
  • the NDP0 header is used to represent the information of the application program corresponding to the NDP0, such as storing the data flow ID information.
  • the first 16 bits (bit) can be fixed characters, and the last 16 bits place the data stream ID information, which is not limited in this application.
  • the length (NDP0) is used to describe the length of the entire NDP0
  • the pointer (next NDP) is used to point to the position of the next NDP
  • the pointer (received data packet 2) is used to point to the position of the received data packet 2
  • the length (received data packet 2 ) is used to describe the length of received packet 2.
  • NDP1 The format of NDP1 is similar to that of NDP0.
  • NDP1 includes NDP1 header, length (NDP1), pointer (next NDP), pointer (received packet 0), length (received packet 0), pointer (received packet 1) and Length (received packet 1) and other information.
  • NDP1 header the data flow ID information stored in the NDP1 header is different from the data flow ID information stored in the NDP0 header. It can be understood that NDP1 and NDP0 correspond to different applications.
  • the length (NDP1) is used to describe the length of the entire NDP1.
  • the pointer (below One NDP) is used to point to the position of the next NDP.
  • a plurality of received data packets can be, for example, a plurality of Ethernet data packets, and according to the quintuple information of each received data packet, one or more received data packets with the same quintuple information are grouped according to the grouping shown in FIG. 6 or FIG. 7 Format groups are packaged in the same data segment.
  • NCM packet format of the CDC protocol specification illustrated in Figure 7 including one or more received data packets in the NDP can be understood as including the pointer information of the one or more received data packets in the NDP, and through the one or more received The data packet pointer information indexes to the location of the one or more received data packets. For example, the position of the received data packet 1 is indexed through the information of the pointer (received data packet 1) in NDP1.
  • NDP1 does not directly include the received data packet 1, but includes a pointer indicating the location of the received data packet 1 (received data packet 1 ) information, which can be expressed as NDP1 includes received data packet 1.
  • the packet format proposed in the embodiment of the present application may also be an artificially defined packet format, wherein each data segment directly includes one or more received data packets, and the one or more data packets correspond to the same data stream, which corresponds to the same application.
  • Step 502 Parse at least one data segment to obtain a data segment header, and transmit one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header.
  • parsing at least one data segment can be understood as the electronic device unpacks the multiple received data packets after grouping, and obtains the data segment header included in each data segment in at least one data segment, and the data segment in each data segment. One or more received packets.
  • An electronic device includes multiple cores. It can be understood that an application processor in the electronic device includes multiple cores. One application program corresponds to one core. It can be understood that one application program runs on one core. According to the data segment header of each data segment obtained by parsing at least one data segment, the data flow ID information included in the data segment header can identify the application program corresponding to the data segment. Transmitting one or more received data packets in each data segment to the core corresponding to the application program corresponding to the data segment can be understood as scheduling the one or more received data packets to the application program corresponding to the data segment run on the corresponding core.
  • the electronic device can obtain the data segment header of each data segment and one or more received data packets in each data segment after unpacking the multiple received data packets after grouping, according to each The application program identified by the data segment header of the data segment transmits one or more received data packets in each data segment to the core corresponding to the corresponding application program, and runs the application program on the core to process the one or more received data packets. data pack. Referring to the multiple received data packets after grouping shown in Figure 6, after the electronic device unpacks the multiple received data packets after grouping, it will obtain data segment header 0, received data packet 2, and data segment header 1 , Receive data packet 0 and receive data packet 1 and other information.
  • the electronic device transmits the received data packet 2 to the core corresponding to the first application program identified by the data segment header 0 according to the data segment header 0, and runs the first application program on the core corresponding to the first application program to process the received data packet 2.
  • the electronic device transmits the received data packet 0 and the received data packet 1 to the core corresponding to the second application program identified by the data segment header 1 according to the data segment header 1, and runs the second application program on the core corresponding to the second application program, thereby
  • the Receive Packet 0 and Receive Packet 1 are processed.
  • step 502 may be executed by an application processor in the electronic device, for example, may be executed by the application processor 4012 in FIG. 4 .
  • the application processor includes a hardware adaptation layer, a network card layer, a protocol stack layer and an application layer.
  • the header of each layer in the data packet has independent software to parse, among them, the hardware adaptation layer and the network card layer can be understood as the software that parses the header of the data packet link layer, and the protocol stack layer in the application processor It can be understood as a collection of software that parses the headers of the TCP layer and the IP layer of the data packet.
  • the application layer includes one or more applications, one application runs on one core, the hardware adaptation layer, the network card layer and the protocol stack Layer supports multi-core operation.
  • Step 502 specifically includes:
  • Step 5021 Parse at least one data segment on the network card layer to obtain the header of the data segment, and determine the application program according to the header of the data segment.
  • the electronic device After the electronic device receives the grouped multiple received data packets on the hardware adaptation layer, it will transmit the grouped multiple received data packets to the network card layer.
  • the electronic device unpacks the grouped multiple received data packets on the network card layer to obtain the data segment header of each data segment, and determines the application program corresponding to each data segment according to the application program identified by the data segment header.
  • Step 5022 Transmit one or more received data packets from the network card layer to the protocol stack layer.
  • the electronic device transmits one or more received data packets corresponding to the same application program to the protocol stack layer, which can be understood as the electronic device schedules one or more received data packets corresponding to the same application program to the same core for transmission To the protocol stack layer, that is, the electronic device schedules one or more received data packets corresponding to different application programs to different cores for transmission to the protocol stack layer.
  • the electronic device transmits one or more received data packets in each data segment to the protocol stack layer through different upload queues according to the application program identified by the data segment header of each data segment at the network card layer. Wherein, one or more received data packets in the same data segment are transmitted in the same upload queue.
  • Step 5023 analyze one or more received data packets on the protocol stack layer, and obtain the analyzed data.
  • the electronic device analyzes the received data packets layer by layer on the protocol stack layer to obtain the parsed data, and the parsed data of one or more received data packets in the same data segment corresponds to the same application program.
  • Step 5024 transmit the parsed data to the core corresponding to the application program.
  • the electronic device transmits the parsed data to the core corresponding to the application program corresponding to the parsed data, that is, transmits the parsed data to the core corresponding to the application program corresponding to the data segment corresponding to the parsed data. It can be understood that one or more received data packets corresponding to the same data segment among multiple received data packets correspond to the same application program, and one application program corresponds to one core, and one or more received data packets corresponding to the same data segment are parsed The obtained data is dispatched to the core corresponding to the corresponding application.
  • a method for processing data packets provided by the embodiment of the present application can be applied to an electronic device, such as a chip.
  • an electronic device such as a chip.
  • Each data segment corresponds to an application program, and the data segment header of each data segment is used to identify the packet format of the application program.
  • unpacking one or more received data packets in each data segment are transmitted to the The core corresponding to the application corresponding to the data segment.
  • the electronic device includes a modem and an application processor, the modem is used to receive multiple received data packets from the air interface side and process the multiple received data packets, and the application processor is used to receive multiple received data packets from the modem to the modem Receive data packets and process multiple received data packets.
  • the application processor includes multiple cores.
  • the application processor includes a hardware adaptation layer, a network card layer, a protocol stack layer, and an application layer.
  • the application layer includes one or more programs, specifically Include the following steps:
  • Step a the modem receives multiple data packets from the air interface side.
  • the modem may receive multiple data packets sent by the server from the air interface side.
  • Step b The modem demodulates multiple received data packets.
  • step b reference may be made to the description of step 501 above, and details are not repeated here.
  • Step c the modem divides the multiple received data packets into at least one data segment.
  • each data segment in at least one data segment corresponds to an application program
  • each data segment includes a data segment header
  • the data segment header is used to identify the application program.
  • Step c specifically includes step c1, determining the data segment corresponding to each received data packet according to the quintuple information of each received data packet in the plurality of received data packets, so as to group one or more received data packets into each in the data segment.
  • step c1 reference may be made to the description of the above step 5011, which will not be repeated here.
  • the modem may include a hardware accelerator, and the above-mentioned processes of step b and step c may be specifically executed by the hardware accelerator, that is, the hardware accelerator divides and groups the multiple received data packets.
  • Step d the modem sends at least one data segment to the application processor.
  • the modem may send at least one data segment to the application processor in a wired or wireless manner, for example, the modem may send at least one data segment to the application processor through USB.
  • Step e the application processor receives at least one data segment from the modem.
  • the application processor receives at least one data segment on the hardware adaptation layer, and transmits at least one data segment to the network card layer of the application processor.
  • Step f the application processor parses at least one data segment to obtain a data segment header.
  • step f reference may be made to the description of step 502 above, and details are not repeated here.
  • Step f specifically includes: step f1, parsing at least one data segment on the network card layer to obtain a data segment header, and determining an application program according to the data segment header.
  • Step f2 transmitting one or more received data packets from the network card layer to the protocol stack layer.
  • Step f3 analyzing one or more received data packets on the protocol stack layer to obtain the analyzed data
  • Step f4 transmitting the parsed data to the core corresponding to the application program.
  • Step f1-step f4 can refer to the description of the above-mentioned step 5021-step 5024, which will not be repeated here.
  • Step g the application processor transmits one or more received data packets in each data segment to the core corresponding to the application program according to the data segment header.
  • step g reference may be made to the description of step 502 above, and details are not repeated here.
  • a method for processing data packets provided by the embodiment of the present application can be applied to electronic equipment, and the electronic equipment includes a modem and an application processor.
  • the modem divides multiple received data packets into At least one data segment, each data segment corresponds to an application program, and the data segment header of each data segment is used to identify the package format of the application program, when unpacking, the application processor will use one or A plurality of received data packets are transmitted to the core corresponding to the application program corresponding to the data segment.
  • this application changes the packet format and processes multiple received data packets through multiple checks, and does not Introduce additional consumption, realize the technical effect of reasonably balancing the load of multiple cores of electronic equipment, and improving the ability of electronic equipment to process data packets.
  • the above-mentioned electronic device includes corresponding hardware structures and/or software modules for performing each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the example units and algorithm steps described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the embodiments of the present application.
  • the embodiments of the present application may divide the above-mentioned electronic device into functional modules according to the above-mentioned method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 9 shows a possible composition diagram of the modulation and demodulation device 900 involved in the above embodiment, and the modulation and demodulation device 900 can be the Modem, as shown in FIG. 9 , the modem device 900 may include: a demodulation module 901 , a packetization module 902 and a sending module 903 .
  • the demodulation module 901 may be used to support the modulation and demodulation apparatus 900 to execute the above step 501 and step b, etc., and/or other processes for the technologies described herein.
  • the grouping module 902 may be used to support the modem device 900 to perform the above step 501, step 5011, step c and step c1, etc., and/or other processes for the technologies described herein.
  • the sending module 903 may be used to support the modem device 900 to perform the above step d, etc., and/or other processes for the technologies described herein.
  • the modulation and demodulation device 900 provided in this embodiment is used to implement the above-mentioned method for processing data packets, so it can achieve the same effect as the above-mentioned implementation method.
  • FIG. 10 shows a possible composition diagram of the application processing device 1000 involved in the above embodiment.
  • the application processing device 1000 can process As shown in FIG. 10 , the application processing apparatus 1000 may include: a receiving module 1001 , an analyzing module 1002 and a scheduling module 1003 .
  • the receiving module 1001 may be used to support the application processing apparatus 1000 to execute the above step e, etc., and/or other processes for the technologies described herein.
  • the parsing module 1002 may be used to support the application processing apparatus 1000 to execute the above-mentioned step 502, step 5021, step 5022, step 5023, step f, step f1, step f2, and step f3, etc., and/or other methods for the technology described herein process.
  • the scheduling module 1003 may be used to support the application processing apparatus 1000 to execute the above step 502, step 5024, step f4 and step g, etc., and/or other processes for the technologies described herein.
  • the application processing apparatus 1000 provided in this embodiment is used to execute the above-mentioned method for processing data packets, so the same effect as the above-mentioned implementation method can be achieved.
  • the embodiment of the present application discloses an electronic device 1100 , and the electronic device 1100 may be the chip 400 in the above embodiment.
  • the electronic device 1100 may include a processing module, a storage module, and a communication module.
  • the processing module can be used to control and manage the actions of the electronic device 1100, for example, it can be used to support the electronic device 1100 to execute the demodulation module 901, packetization module 902, sending module 903, receiving module 1001, parsing module 1002 and Steps executed by the scheduling module 1003 .
  • the storage module can be used to support the electronic device 1100 to store program codes, data, and the like.
  • the communication module may be used to support communication between the electronic device 1100 and other devices. For example, it may be used to support the electronic device 1100 to perform the above step a.
  • the unit modules in the above electronic device 1100 include but are not limited to the above processing module, storage module and communication module.
  • the processing module may be a processor or a controller. It can implement or execute the various illustrative logical blocks, modules and circuits described in connection with the present disclosure.
  • the processor can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (digital signal processing, DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may be a device that interacts with other external devices.
  • the processing module is the processor 401
  • the storage module may be the memory 402
  • the communication module may be the chip interface 403 .
  • the electronic device 1100 provided in the embodiment of the present application may be the chip 400 shown in FIG. 4 .
  • the above-mentioned processor 401, memory 402, chip interface 403, etc. may be connected together, for example, connected through a bus.
  • the embodiment of the present application also provides an electronic device, including one or more processors and one or more memories.
  • the one or more memories are coupled with one or more processors, the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs
  • the above related method steps implement the method for processing data packets in the above embodiments.
  • the embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores computer program codes, and when the computer instructions run on the computer or the processor, the computer or the processor executes the above-mentioned embodiment.
  • the method to process the packet is also provided.
  • the electronic device and the computer storage medium provided in this embodiment are both used to execute the corresponding method provided above, therefore, the beneficial effect that it can achieve can refer to the beneficial effect in the corresponding method provided above, I won't repeat them here.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be Incorporation or may be integrated into another device, or some features may be omitted, 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 unit described as a separate component may or may not be physically separated, and the component displayed as a unit may be one physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places . 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 above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the software product is stored in a storage medium Among them, several instructions are included to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: various media that can store program codes such as U disk, mobile hard disk, read only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种处理数据包的方法和设备,通过调制解调器解调多个接收数据包,将多个接收数据包划分到至少一个数据段,至少一个数据段中每个数据段对应一个应用程序,每个数据段包括数据段头,数据段头用于标识应用程序。应用处理器包括多个核,用于解析至少一个数据段,得到数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核。

Description

一种处理数据包的方法和设备 技术领域
本申请实施例涉及通信技术领域,尤其涉及一种处理数据包的方法和设备。
背景技术
随着第五代移动通信技术(5th generation mobile communication technology,5G)的蓬勃发展,无线空口侧的下行速率能达到10Gbps甚至更多,因此终端侧也需要具备更快的收发能力和更强的处理能力。
终端侧包括应用处理器,用于对终端接收到的数据包进行处理。目前,应用处理器可支持多核运算,但在组包收包的场景下,应用处理器处理数据包是单核处理,因此会出现其中一个核的负载过高,而其他核的负载较低的情况,导致应用处理器处理数据包的能力下降。
发明内容
本申请实施例提供一种处理数据包的方法和设备,应用于电子设备,可以在电子设备进行组包收包时,合理均衡应用处理器多个核的负载,从而提高电子设备处理数据包的能力。
为达到上述目的,本申请实施例采用如下技术方案:
第一方面,本申请实施例提供了一种电子设备,该电子设备包括:调制解调器,用于解调多个接收数据包,将多个接收数据包划分到至少一个数据段,至少一个数据段中每个数据段对应一个应用程序,每个数据段包括数据段头,数据段头用于标识应用程序;应用处理器包括多个核,应用处理器用于解析至少一个数据段,得到数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核。
由此,本申请实施例提供的电子设备,能够通过改变组包格式,将多个接收数据包划分到至少一个数据段,使得每个数据段中包括的一个或多个接收数据包都对应同一个应用程序,并且数据段头用于标识该应用程序,从而在解析数据段时能够不引入额外的处理开销,方便直接的确定出每个数据段中包括的一个或多个接收数据包所对应的应用程序。此外,电子设备的应用处理器包括多个核,应用处理器能够根据解析数据段得到的数据段头,将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核,使得在核上运行该应用程序从而处理该一个或多个接收数据包。从而能够通过多个核对多个接收数据包进行处理,相比于现有技术中通过单核对多个数据包进行处理,导致电子设备处理能力降低,本申请能够实现合理均衡电子设备多个核的负载,提高电子设备处理数据包的能力的技术效果。
在一种可能的设计中,应用处理器具体用于:在网卡层上解析至少一个数据段,得到数据段头,根据数据段头确定应用程序;将一个或多个接收数据包从网卡层传输至协议栈层;在协议栈层上解析一个或多个接收数据包,得到解析后的数据;将解析后的数据传输至与应用程序对应的核。由此,本申请实施例提供的电子设备,能够在 网卡层上根据解析数据段得到的数据段头确定出该数据段对应的应用程序,相比于现有技术中在网卡层上解析多个数据包的L3/L4对多个数据包进行分流,导致引入额外消耗,本申请能够通过不在网卡层上引入额外处理开销即可确定出多个接收数据包对应的应用程序。并且本申请实施例提供的电子设备,能够在协议栈层上解析一个或多个接收数据包,得到每个数据段中的数据,将解析后的数据传输至与应用程序对应的核,使得在核上运行该应用程序从而处理该一个或多个接收数据包,即在每个数据段对应的应用程序对应的核上处理该数据段中的一个或多个接收数据包,使得不同数据段中的接收数据包在不同应用程序对应的核上运行,从而合理均衡电子设备多个核的负载,提高电子设备处理数据包的能力。
在一种可能的设计中,调制解调器具体用于:根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,以将一个或多个接收数据包组包在每个数据段中。由此,本申请实施例提供的电子设备,能够通过改变组包格式,根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,将五元组信息相同的一个或多个接收数据包组包在同一个数据段中,从而在解析数据段时能够不引入额外的处理开销,方便直接的确定出每个数据段中包括的一个或多个接收数据包所对应的应用程序。
第二方面,本申请实施例提供了一种调制解调装置,该调制解调装置包括:解调模块,用于解调多个接收数据包;组包模块,用于将多个接收数据包划分到至少一个数据段,至少一个数据段中每个数据段对应一个应用程序,每个数据段包括数据段头,数据段头用于标识应用程序;发送模块,用于向应用处理装置发送至少一个数据段,每个数据段中的一个或多个接收数据包用于传输至与应用程序对应的核。
由此,本申请实施例提供的调制解调装置,能够通过改变组包格式,将多个接收数据包划分到至少一个数据段,使得每个数据段中包括的一个或多个接收数据包都对应同一个应用程序,并且数据段头用于标识该应用程序,从而在解析数据段时能够不引入额外的处理开销,方便直接的确定出每个数据段中包括的一个或多个接收数据包所对应的应用程序。
在一种可能的设计中,组包模块具体用于:根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,以将一个或多个接收数据包组包在每个数据段中。由此,本申请实施例提供的调制解调装置,能够通过改变组包格式,根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,将五元组信息相同的一个或多个接收数据包组包在同一个数据段中,从而在解析数据段时能够不引入额外的处理开销,方便直接的确定出每个数据段中包括的一个或多个接收数据包所对应的应用程序。
第三方面,本申请实施例提供了一种应用处理装置,该应用处理装置包括多个核,该应用处理装置包括:接收模块,用于从调制解调装置接收至少一个数据段,至少一个数据段中每个数据段对应一个应用程序,每个数据段包括数据段头,数据段头用于标识应用程序;解析模块,用于解析至少一个数据段,得到数据段头;调度模块,用于根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核。
由此,本申请实施例提供的应用处理装置包括多个核,应用处理装置能够根据解 析数据段得到的数据段头,将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核,使得在核上运行该应用程序从而处理该一个或多个接收数据包。从而能够通过多个核对多个接收数据包进行处理,相比于现有技术中通过单核对多个数据包进行处理,导致电子设备处理能力降低,本申请能够实现合理均衡电子设备多个核的负载,提高电子设备处理数据包的能力的技术效果。
在一种可能的设计中,解析模块具体用于:在网卡层上解析至少一个数据段,得到数据段头,根据数据段头确定应用程序;将一个或多个接收数据包从网卡层传输至协议栈层;在协议栈层上解析一个或多个接收数据包,得到解析后的数据;调度模块,具体用于将解析后的数据传输至与应用程序对应的核。由此,本申请实施例提供的应用处理装置,能够在网卡层上根据解析数据段得到的数据段头确定出该数据段对应的应用程序,相比于现有技术中在网卡层上解析多个数据包的L3/L4对多个数据包进行分流,导致引入额外消耗,本申请能够通过不在网卡层上引入额外处理开销即可确定出多个接收数据包对应的应用程序。并且本申请实施例提供的应用处理装置,能够在协议栈层上解析一个或多个接收数据包,得到每个数据段中的数据,将解析后的数据传输至与应用程序对应的核,使得在核上运行该应用程序从而处理该一个或多个接收数据包,即在每个数据段对应的应用程序对应的核上处理该数据段中的一个或多个接收数据包,使得不同数据段中的接收数据包在不同应用程序对应的核上运行,从而合理均衡电子设备多个核的负载,提高电子设备处理数据包的能力。
第四方面,本申请实施例提供了一种处理数据包的方法,该应用于电子设备,电子设备包括多个核,该方法包括:解调多个接收数据包,将多个接收数据包划分到至少一个数据段,至少一个数据段中每个数据段对应一个应用程序,每个数据段包括数据段头,数据段头用于标识应用程序;解析至少一个数据段,得到数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核。第四方面所达到的有益效果可以参见第一方面中有益效果。
在一种可能的设计中,解析至少一个数据段,得到数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核具体包括:在网卡层上解析至少一个数据段,得到数据段头,根据数据段头确定应用程序;将一个或多个接收数据包从网卡层传输至协议栈层;在协议栈层上解析一个或多个接收数据包,得到解析后的数据;将解析后的数据传输至与应用程序对应的核。
在一种可能的设计中,解调多个接收数据包,将多个接收数据包划分到至少一个数据段具体包括:根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,以将一个或多个接收数据包组包在每个数据段中。
第五方面,一种计算机可读存储介质,包括计算机指令,当计算机指令在计算机或处理器上运行时,使得计算机或处理器执行上述第四方面以及第四方面中的任一种可能的设计方法。
上述其他方面对应的有益效果,可以参见关于第一方面的有益效果的描述,此处不予赘述。
附图说明
图1为一种处理数据包的流程示意图;
图2为一种处理数据包的流程示意图;
图3为本申请实施例提供的一种处理数据包的方法的应用场景示意图;
图4为本申请实施例提供的一种电子设备的硬件结构示意图;
图5为本申请实施例提供的一种处理数据包的方法的流程示意图;
图6为本申请实施例提供的一种组包格式的示意图;
图7为本申请实施例提供的一种组包格式的示意图;
图8为本申请实施例提供的一种处理数据包的方法的流程示意图;
图9为本申请实施例提供的一种装置的结构组成示意图;
图10为本申请实施例提供的一种装置的结构组成示意图;
图11为本申请实施例提供的一种电子设备的结构组成示意图。
具体实施方式
为了便于理解,示例性地给出了部分与本申请实施例相关概念的说明以供参考。如下所示:
数据包(packet):是传输控制协议/因特网协议(transmission control protocol/internet protocol,TCP/IP)协议通信传输中的数据单位。数据包包括物理层、链路层、传输控制协议(transmission control protocol,TCP)层和因特网协议(internet protocol,IP)层,分别对应数据包的层1、层2、层3(layer 3,L3)和层4(layer 4,L4)。每一层都会对数据包中的数据附加一个头部,这个头部中包含了该层的必要信息。其中,数据包的TCP层的头部包含了该数据包的源端口和目的端口,数据包的IP层的头部包含了该数据包的源IP地址、目的IP地址和协议号。本申请实施例中,数据包的L3/L4即指数据包的TCP/IP层。解析数据包的L3/L4的头部可以理解为解析数据包的TCP/IP层的头部,从而得到该数据包的源IP地址、目的IP地址、协议号、源端口和目的端口,即得到该数据包的五元组信息。
五元组信息:包括源IP地址、目的IP地址、协议号、源端口和目的端口,本申请实施例中,五元组信息全部相同的数据包对应同一个数据流。
组包:终端的调制解调器需要将从空口侧接收到多个数据包发送到应用处理器进行处理,通过组包的方式,将多个数据包组包成一个数据包进行发送,能够提高传输速率。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”, 或“a和b和c”,其中a,b,c可以是单个,也可以是多个。
目前,在组包收包的场景下,终端侧处理数据包的过程如图1所示,终端侧包括调制解调器和应用处理器。其中,调制解调器用于接收数据包并将数据包发送给应用处理器,应用处理器用于对数据包进行处理,具体包括以下步骤:
步骤1、调制解调器从空口侧接收多个数据包。
步骤2、调制解调器将多个数据包按照从空口侧的接收顺序进行组包。
步骤2可以理解为调制解调器将多个数据包按照从空口侧的接收顺序组包成一个大数据包(即组包后的数据包)。
步骤3、调制解调器通过通用串行总线(universal serial bus,USB)将组包后的数据包发送到应用处理器。
步骤4、应用处理器在硬件适配层上接收组包后的数据包,并将组包后的数据包传输到应用处理器的网卡层。
其中,应用处理器可以理解为中央处理器(central processing unit,CPU)。应用处理器包括硬件适配层、网卡层、协议栈层和应用层。数据包中的每个层的头部都有独立的软件去解析,其中,硬件适配层和网卡层可以理解为解析数据包链路层的头部的软件,应用处理器中的协议栈层可以理解为解析数据包TCP层的头部和IP层的头部的软件合集,应用层包括一个或多个应用程序。应用处理器在不同的层上会运行不同的软件来执行不同的动作。例如,应用处理器在硬件适配层上主要负责将接收到的组包后的数据包传输到网卡层。
具体的,步骤4中应用处理器在硬件适配层上将组包后的数据包调度到应用处理器的一个核(即单核)上,通过单核将组包后的数据包传输到应用处理器的网卡层。
步骤5、应用处理器在网卡层上对组包后的数据包解组包,得到多个数据包。
应用处理器在网卡层上接收到组包后的数据包后,会对该组包后的数据包解组包格式,得到多个数据包。也可以理解为将一个大数据包(即组包后的数据包)解组包成多个数据包。
具体的,步骤5中应用处理器在网卡层上通过单核对组包后的数据包解组包,得到多个数据包。
步骤6、应用处理器在网卡层上将多个数据包传输到应用处理器的协议栈层。
具体的,步骤6中应用处理器在网卡层上将解组包后得到的多个数据包调度到单核上传输到协议栈层。
因此,当空口侧的下行速率过高,调制解调器从空口侧接收到的数据包较多时,应用处理器在网卡层上通过单核解组包并传输多个数据包,会导致该单核所承受的负载较大,进而导致应用处理器处理数据包的速度下降,即终端侧的处理能力降低。
步骤7、应用处理器在协议栈层上对多个数据包解数据包,得到多个数据包中的多个用户数据,并将多个用户数据拷贝到与应用程序对应的核。
应用处理器在协议栈层上接收到多个数据包后,会对该多个数据包解数据包,得到多个数据包中的多个用户数据,可以理解为将多个数据包中的每个数据包逐层解析,得到每个数据包中的用户数据。
具体的,步骤7中应用处理器在协议栈层上通过单核对多个数据包解数据包,得 到多个数据包中的多个用户数据,并将多个用户数据调度到单核上拷贝到与应用程序对应的核。
因此,当解数据包得到的用户数据较多时,应用处理器在协议栈层上通过单核对多个数据包解数据包并将数据包中的用户数据拷贝到与应用程序对应的核,会导致该单核所承受的负载较大,进而导致终端侧的处理能力降低。
可以看出,在上述终端侧处理数据包的过程中,步骤5-步骤7中涉及到的应用处理器解组包、解数据包以及将用户数据拷贝到与应用程序对应的核的过程,是应用处理器处理数据包的过程中负载占用较大的过程。但是,目前在上述组包收包的场景下,终端侧只会通过单核处理数据包,因此会出现应用处理器其中一个核的负载过高,而其他核的负载较低或处于空闲态的情况,并且通过单核处理数据包的处理时间较长,处理速度较慢,因此会导致终端侧的处理能力下降。
因此,为了通过多个核处理数据包,且使多个核所承受的负载均衡,提出了应用处理器在网卡层上解组包之后,再解析多个数据包的L3/L4的头部,即多个数据包的TCP/IP层的头部的方案。如图2所示,该方案可以理解为将上述步骤5-步骤7替换为步骤5'-步骤7',其余步骤1-步骤4的过程不变,步骤5'-步骤7'如下:
步骤5'、应用处理器在网卡层上对组包后的数据包解组包,得到多个数据包,再解析多个数据包的L3/L4的头部。
其中,解析数据包的L3/L4的头部能够得到数据包的五元组信息,根据数据包的五元组信息可以确定出该数据包所属于的数据流。其中,同一个数据流是由同一个应用程序发起的,同一个应用程序可以发起多个不同的数据流,也可以理解为,同一个数据流对应同一个应用程序,多个不同的数据流可以对应同一个应用程序。应用处理器在网卡层上能够通过解析多个数据包的L3/L4的头部,将多个数据包按照数据流进行区分,即对多个数据包进行分流。
具体的,步骤5'中应用处理器在网卡层上通过单核对组包后的数据包解组包,得到多个数据包,再通过单核解析多个数据包的L3/L4的头部。
步骤6'、应用处理器在网卡层上将多个数据包传输到应用处理器的协议栈层。
其中,将多个数据包传输到应用处理器的协议栈层可以理解为:根据步骤5'中对多个数据包进行分流后的结果,将属于同一个数据流的数据包调度到同一个核上传输到应用处理器的协议栈层,即步骤6'中应用处理器在网卡层上将解组包后得到的多个数据包调度到多个核上传输到协议栈层。
步骤7'、应用处理器在协议栈层上将多个数据包解数据包,得到多个数据包中的多个用户数据,并将多个用户数据拷贝到与应用程序对应的核。
具体的,步骤7'中应用处理器在协议栈层上通过多个核对多个数据包解数据包,得到多个数据包中的多个用户数据,并将多个用户数据调度到多个核上拷贝到与应用程序对应的核。也可以理解为,将属于同一个数据流的多个数据包解析得到的多个用户数据调度到同一个核上拷贝到与该数据流对应的应用程序对应的核。
将上述步骤5-步骤7替换为步骤5'-步骤7'后,应用处理器虽然能够通过多个核处理数据包,降低单核所承受的负载。但是,应用处理器在网卡层上增加了额外的处理过程,即应用处理器在网卡层上增加了解析多个数据包的L3/L4的头部的处理过 程,并且应用处理器在协议栈层上依旧会按照原有的处理流程解数据包。因此该方案会导致应用处理器增加额外的消耗,引入了额外的处理开销。
因此,本申请提出一种处理数据包的方法,该方法可以应用于电子设备。考虑到现有技术中在组包收包场景下,由单核处理数据包,导致应用处理器处理数据包的能力下降的问题,本申请在组包收包场景下,通过将多个接收数据包划分到至少一个数据段,每个数据段对应一个应用程序,每个数据段包括数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核,从而合理均衡了应用处理器多个核所承受的负载,避免出现某一个核承受负载较高而其他核所承受负载较低或处于空闲态的情况,提高了电子设备处理数据包的能力。
如图3所示,本申请实施例提出的处理数据包的方法可以应用于组包收包的场景中,该场景包括电子设备和外部设备,电子设备例如可以为芯片、移动终端、平板电脑、笔记本电脑、个人电脑(personal computer,PC)等,外部设备例如可以为服务器等。其中,电子设备和外部设备之间可以相互通信,例如可以相互传输数据包,外部设备用于向电子设备发送多个接收数据包,电子设备用于接收外部设备发送的多个接收数据包,并对该多个接收数据包进行处理。电子设备和外部设备之间的通信可经过一个或多个中间节点,例如基站、无线路由器、有线路由器、网关或中继节点等。
在一种示例中,如图4所示,其示出了一种电子设备的硬件结构示意图,该电子设备可以为芯片,图4中以芯片400示例的芯片。芯片400可包括处理器401、存储器402以及芯片接口403等。
可以理解的是,本申请实施例示意的结构并不构成对芯片400的具体限定。在本申请另一些实施例中,芯片400可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器401可以包括一个或多个处理单元,处理单元用于对从芯片接口403处接收的多个接收数据包进行处理,例如将多个接收数据包进行组包、将组包后的多个数据包解组包、对多个接收数据包解数据包以及对多个接收数据包进行调度等。不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。例如处理器401可以包括图形处理器(graphics processing unit,GPU)、中央处理器(central processing unit,CPU)、和/或神经网络处理器(neural network processing unit,NPU)等。本申请实施例中,处理器401包括调制解调器4011和应用处理器4012。
其中,调制解调器4011可以用于接收并处理接收数据包。本申请实施例中,调制解调器4011可以用于解析多个接收数据包的L3/L4的头部,得到多个接收数据包的五元组信息,识别多个接收数据包所对应的数据流,将对应同一个数据流的一个或多个接收数据包划分到同一个数据段进行组包。可以理解为一个数据段对应一个数据流,即一个数据段中的一个或多个接收数据包对应同一个数据流对应的应用程序,而一个数据流是由一个应用程序发起的,因此也可以理解为一个数据流对应一个应用程序。调制解调器4011还用于将组包后的数据包发送出去。
应用处理器4012可以用于接收并处理接收数据包。本申请实施例中,应用处理器4012可以用于将组包后的数据包解组包,得到至少一个数据段,将每个数据段中的一 个或多个接收数据包传输至与应用程序对应的核。
存储器402可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器401可以通过运行存储在存储器402的上述指令,从而使得芯片400执行本申请实施例中所提供的处理数据包的方法等。存储器402可以包括代码存储区和数据存储区。其中,数据存储区可存储芯片400使用过程中所创建的数据等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。本申请的实施例中,存储器402可以用于存储一个或多个应用程序。
芯片接口403可以包括一个或多个芯片接口,芯片接口403例如可以为处理器401中的调制解调器4011对外通信的接口,也可以为天线或以太接口等。芯片接口403用于与芯片的外部设备进行通信,例如与服务器进行通信。
应用上述本申请提供的电子设备,下面结合附图对本申请针对电子设备所提出的处理数据包的方法,以电子设备为芯片为例,在芯片进行组包收包过程中,通过将多个接收数据包划分到至少一个数据段,每个数据段对应一个应用程序,每个数据段包括数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核的过程进行介绍。
如图5所示,本申请实施例提供一种处理数据包的方法,该方法应用于电子设备,电子设备包括多个核,以电子设备为芯片400为例,该方法包括:
步骤501、解调多个接收数据包,将多个接收数据包划分到至少一个数据段。
其中,多个接收数据包可以理解为电子设备从外部设备接收的多个数据包,例如从服务器接收的多个数据包,且多个接收数据包可以来自不同的服务器,多个接收数据包例如可以为多个以太网数据包。多个接收数据包中的每个接收数据包都有对应的数据流,每个接收数据包对应的数据流可以相同或不相同。其中,数据流是由应用程序发起的,一个应用程序可以发起多个数据流,可以理解为同一个应用程序可以发起多个不同的数据流,即多个五元组信息不同的数据流。一个数据流对应一个应用程序,也可以理解为每个接收数据包都有对应的应用程序。
将多个接收数据包根据数据流划分到至少一个数据段,具体为将多个接收数据包中对应同一个数据流的一个或多个接收数据包划分到同一个数据段,可以理解为一个数据流对应一个数据段。至少一个数据段中每个数据段对应一个应用程序,可以理解为一个数据段对应一个应用程序,且多个数据段可以对应同一个应用程序,即该多个数据段对应的多个数据流是同一个应用程序发起的。
至少一个数据段中每个数据段包括数据段头,数据段头用于标识应用程序,例如数据段头包括数据流标识(identifier,ID)信息,数据流ID信息用于表示该数据段对应的应用程序,可以理解为用于表示被划分到该数据段中的一个或多个接收数据包对应的应用程序。
示例性的,电子设备接收到多个接收数据包之后,会解调多个接收数据包,识别多个接收数据包分别对应的数据流,即对多个接收数据包分流,将属于同一数据流的一个或多个接收数据包划分到同一个数据段中,可以理解为对多个接收数据包进行组包。如图6所示,以多个接收数据包为接收数据包0、接收数据包1和接收数据包2 为例,电子设备解调接收数据包0、接收数据包1和接收数据包2之后,识别出接收数据包2对应第一数据流,接收数据包0和接收数据包1对应第二数据流。电子设备将接收数据包2单独组包在第一数据段中,且第一数据段包括数据段头0,用于标识该第一数据段对应的第一应用程序。电子设备将接收数据包0和接收数据包1按照接收到的顺序一起组包在第二数据段中,且第二数据段包括数据段头1,用于标识该第二数据段对应的第二应用程序。其中,第一应用程序和第二应用程序可以是同一个应用程序,也可以是不同应用程序。
具体的,上述步骤501可以是电子设备中的调制解调器执行的,例如可以是图4中的调制解调器4011执行的。
在一些可选的实施例中,步骤501具体包括:
步骤5011、根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,以将一个或多个接收数据包组包在每个数据段中。
步骤501中解调多个接收数据包例如可以为解析多个接收数据包的L3/L4的头部,得到每个接收数据包的五元组信息。其中,五元组信息完全相同的数据包对应同一个数据流,即五元组信息完全相同的数据包能够划分到同一个数据段中,对应同一个应用程序。可以理解为现有技术步骤5'中应用处理器在网卡层上解析多个数据包的L3/L4的头部的过程由本申请的调制解调器4011执行,本申请的调制解调器4011具备解析多个接收数据包的L3/L4的头部,得到每个接收数据包的五元组信息的能力。示例性的,本申请的调制解调器4011中包括硬件加速器,调制解调器4011通过硬件加速器来执行解析多个接收数据包的L3/L4的头部,得到每个接收数据包的五元组信息这一步骤。调制解调器4011得到每个接收数据包的五元组信息后,能够将五元组信息相同的一个或多个接收数据包组包在同一个数据段中,该步骤也可以由调制解调器4011中的硬件加速器来执行。
示例性的,电子设备得到每个接收数据包的五元组信息后,根据每个接收数据包的五元组信息确定每个接收数据包对应的数据段,将五元组信息相同的一个或多个接收数据包组包在同一个数据段中。
如图6所示,电子设备按接收到多个接收数据包的顺序,将五元组信息相同的一个或多个接收数据包组包在同一个数据段中。组包后的多个接收数据包包括组包头、每个数据段的数据段头和每个数据段中的一个或多个接收数据包。其中,组包头用于存放整个组包后的多个接收数据包的描述信息,每个数据段的数据段头用于标识该数据段对应的数据流,即用于标识该数据段对应的应用程序,每个数据段中的一个或多个接收数据包为对应同一个数据流的一个或多个接收数据包,即对应该数据段头标识的应用程序的一个或多个接收数据包。
以通用串行总线(universal serial bus,USB)网络控制模型(network control model,NCM)组包格式为例,组包后的多个接收数据包如图7所示,包括NCM头、多个NCM数据包指针(NCM data pointer,NDP)和多个接收数据包等。
其中,NCM头可以理解为组包头,用于存放组包后的多个接收数据包的描述信息。NCM头包括NCM传输头(NCM transfer header,NTH)、长度(NCM头)和指针(NDP)等信息。NTH为组包标识符,用于存放固定字符串专用集成电路(application specific  integrated circuit,ASIC)码,长度(NCM头)用于描述整个NCM头的长度,指针(NDP)用于指向组包后的多个接收数据包中第一个NDP的位置,可以理解为解析到该指针(NDP)后,能够索引到第一个NDP头。
多个NDP可以理解为多个数据段,目前在USB通信设备类(communication device class,CDC)规范的NCM组包格式中并没有规范每个NDP的划分规则,本申请实施例中,优化为每个NDP包括的数据包都对应同一个数据流,即对应同一个应用程序。
如图7所示,以多个NDP包括NDP0和NDP1,NDP0包括接收数据包2,NDP1包括接收数据包0和接收数据包1为例。NDP0包括NDP0头、长度(NDP0)、指针(下一个NDP)、指针(接收数据包2)和长度(接收数据包2)等信息。其中,NDP0头可以理解为数据段头。目前在USB CDC规范的NCM组包格式中,NDP头默认存放“ncmx”字符串ASIC码值,本申请实施例中,优化为NCM头存放用于标识应用程序的信息。可以理解为NDP0头用于表示该NDP0对应的应用程序的信息,例如存放数据流ID信息,示例性的,将数据流ID信息放入到NDP0头中时,可以前16比特(bit)放置固定的字符,后16bit放置数据流ID信息,本申请不予限制。长度(NDP0)用于描述整个NDP0的长度,指针(下一个NDP)用于指向下一个NDP的位置,指针(接收数据包2)用于指向接收数据包2的位置,长度(接收数据包2)用于描述接收数据包2的长度。
NDP1的格式与NDP0的格式类似,NDP1包括NDP1头、长度(NDP1)、指针(下一个NDP)、指针(接收数据包0)、长度(接收数据包0)、指针(接收数据包1)和长度(接收数据包1)等信息。其中,NDP1头中存放的数据流ID信息与NDP0头中存放的数据流ID信息不同,可以理解为NDP1和NDP0对应不同的应用程序,长度(NDP1)用于描述整个NDP1的长度,指针(下一个NDP)用于指向下一个NDP的位置,当NDP1为最后一个NDP时,可以理解为当前数据段为最后一个数据段时,指针(下一个NDP)=空,指针(接收数据包0)用于指向接收数据包0的位置,长度(接收数据包0)用于描述接收数据包0的长度,指针(接收数据,1)用于指向接收数据包1的位置,长度(接收数据包1)用于描述接收数据包1的长度。
多个接收数据包例如可以为多个以太网数据包,根据每个接收数据包的五元组信息,将五元组信息相同的一个或多个接收数据包按照图6或图7的组包格式组包在同一个数据段中。
在图7示例的CDC协议规范的NCM组包格式中,NDP中包括一个或多个接收数据包可以理解为NDP中包括该一个或多个接收数据包的指针信息,通过该一个或多个接收数据包的指针信息索引到该一个或多个接收数据包的位置上。例如通过NDP1中的指针(接收数据包1)信息索引到接收数据包1的位置,NDP1中并不直接包括该接收数据包1,是包括指示该接收数据包1位置的指针(接收数据包1)信息,即可以表示为NDP1中包括接收数据包1。相应的,本申请实施例提出的组包格式也可以是人为定义一种组包格式,其中每个数据段中直接包括一个或多个接收数据包,该一个或多个数据包对应同一个数据流,即对应同一个应用程序。
步骤502、解析至少一个数据段,得到数据段头,根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核。
其中,解析至少一个数据段可以理解为电子设备将组包后的多个接收数据包进行 解组包,得到至少一个数据段中每个数据段包括的数据段头,以及每个数据段中的一个或多个接收数据包。
电子设备包括多个核,可以理解为电子设备中的应用处理器包括多个核,一个应用程序对应一个核,可以理解为一个应用程序在一个核上运行。根据解析至少一个数据段得到的每个数据段的数据段头,其中,数据段头中包括的数据流ID信息能够标识该数据段对应的应用程序。将每个数据段中的一个或多个接收数据包传输至与该数据段对应的应用程序对应的核,可以理解为将该一个或多个接收数据包调度到与该数据段对应的应用程序对应的核上运行。
示例性的,电子设备将组包后的多个接收数据包解组包后,能够得到每个数据段的数据段头和每个数据段中的一个或多个接收数据包等,根据每个数据段的数据段头标识的应用程序,将每个数据段中的一个或多个接收数据包传输至对应的应用程序对应的核,在核上运行该应用程序从而处理该一个或多个接收数据包。参考图6所示的组包后的多个接收数据包,电子设备对该组包后的多个接收数据包解组包后,会得到数据段头0、接收数据包2、数据段头1、接收数据包0和接收数据包1等信息。电子设备根据数据段头0将接收数据包2传输至数据段头0标识的第一应用程序对应的核,并在第一应用程序对应的核上运行该第一应用程序从而处理该接收数据包2。电子设备根据数据段头1将接收数据包0和接收数据包1传输至数据段头1标识的第二应用程序对应的核,并在第二应用程序对应的核上运行该第二应用程序从而处理该接收数据包0和接收数据包1。
具体的,上述步骤502可以是电子设备中的应用处理器执行的,例如可以是图4中的应用处理器4012执行的。
在一些可选的实施例中,应用处理器包括硬件适配层、网卡层、协议栈层和应用层。数据包中的每个层的头部都有独立的软件去解析,其中,硬件适配层和网卡层可以理解为解析数据包链路层的头部的软件,应用处理器中的协议栈层可以理解为解析数据包TCP层的头部和IP层的头部的软件合集,应用层包括一个或多个应用程序,一个应用程序运行在一个核上,硬件适配层、网卡层和协议栈层支持多核运行。步骤502具体包括:
步骤5021、在网卡层上解析至少一个数据段,得到数据段头,根据数据段头确定应用程序。
其中,电子设备在硬件适配层上接收到组包后的多个接收数据包后,会将组包后的多个接收数据包传输到网卡层。电子设备在网卡层上将组包后的多个接收数据包解组包,得到每个数据段的数据段头,并根据数据段头标识的应用程序确定出每个数据段对应的应用程序。
步骤5022、将一个或多个接收数据包从网卡层传输至协议栈层。
其中,电子设备将对应同一个应用程序的一个或多个接收数据包传输至协议栈层,可以理解为电子设备将对应同一个应用程序的一个或多个接收数据包调度到同一个核上传输至协议栈层,即电子设备将多个接收数据包中对应不同应用程序的一个或多个接收数据包调度到不同的核上传输到协议栈层。
示例性的,电子设备在网卡层上根据每个数据段的数据段头标识的应用程序,将 每个数据段中的一个或多个接收数据包通过不同的上送队列传输至协议栈层。其中,同一个上送队列中传输同一个数据段中的一个或多个接收数据包。
步骤5023、在协议栈层上解析一个或多个接收数据包,得到解析后的数据。
其中,电子设备在协议栈层上对接收数据包逐层进行解析,得到解析后的数据,同一个数据段中的一个或多个接收数据包解析后的数据对应同一个应用程序。
步骤5024、将解析后的数据传输至与应用程序对应的核。
其中,电子设备将解析后的数据传输至与该解析后的数据对应的应用程序对应的核,即将解析后的数据传输至与该解析后的数据对应的数据段对应的应用程序对应的核。可以理解为多个接收数据包中对应同一个数据段的一个或多个接收数据包对应同一个应用程序,一个应用程序对应一个核,将对应同一个数据段的一个或多个接收数据包解析得到的数据调度到对应的应用程序对应的核上。
由此,本申请实施例提供的一种处理数据包的方法,可以应用于电子设备,例如芯片中,当进行组包收包过程时,通过将多个接收数据包划分到至少一个数据段,每个数据段对应一个应用程序,且每个数据段的数据段头用于标识应用程序的组包格式,在解包时,将每个数据段中的一个或多个接收数据包传输至与该数据段对应的应用程序对应的核。相比于现有技术中对组包格式中每个数据段不进行规范,且通过单核对多个数据包进行处理,导致单核所承受负载较大,电子设备处理能力降低,本申请通过改变组包格式,且通过多个核对多个接收数据包进行处理,实现合理均衡电子设备多个核的负载,提高电子设备处理数据包的能力的技术效果。
如图8所示,电子设备包括调制解调器和应用处理器,调制解调器用于从空口侧接收多个接收数据包并对多个接收数据包进行处理,应用处理器用于从调至解调器接收多个接收数据包并对多个接收数据包进行处理,应用处理器包括多个核,应用处理器包括硬件适配层、网卡层、协议栈层和应用层,应用层包括一个或多个程序,具体包括以下步骤:
步骤a、调制解调器从空口侧接收多个数据包。
示例性的,调制解调器可以从空口侧接收服务器发送的多个数据包。
步骤b、调制解调器解调多个接收数据包。
步骤b可参见对上述步骤501的描述,此处不过多赘述。
步骤c、调制解调器将多个接收数据包划分到至少一个数据段。
其中,至少一个数据段中每个数据段对应一个应用程序,每个数据段包括数据段头,数据段头用于标识应用程序。步骤c可参见对上述步骤501的描述,此处不过多赘述。
步骤c具体的包括步骤c1、根据多个接收数据包中每个接收数据包的五元组信息确定每个接收数据包对应的数据段,以将一个或多个接收数据包组包在每个数据段中。步骤c1可参见对上述步骤5011的描述,此处不过多赘述。
调制解调器中例如可以包括硬件加速器,上述步骤b和步骤c的过程,具体可以由硬件加速器来执行,即由硬件加速器对接收到的多个接收数据包进行分流和组包。
步骤d、调制解调器向应用处理器发送至少一个数据段。
其中,每个数据段中的一个或多个接收数据包用于传输至与应用程序对应的核。 调制解调器可以通过有线方式或无线方式向应用处理器发送至少一个数据段,例如,调制解调器可以通过USB向应用处理器发送至少一个数据段。
步骤e、应用处理器从调制解调器接收至少一个数据段。
其中,应用处理器在硬件适配层上接收至少一个数据段,并将至少一个数据段传输到应用处理器的网卡层。
步骤f、应用处理器解析至少一个数据段,得到数据段头。
步骤f可参见对上述步骤502的描述,此处不过多赘述。
步骤f具体的包括:步骤f1、在网卡层上解析至少一个数据段,得到数据段头,根据数据段头确定应用程序。
步骤f2、将一个或多个接收数据包从网卡层传输至协议栈层。
步骤f3、在协议栈层上解析一个或多个接收数据包,得到解析后的数据;
步骤f4、将解析后的数据传输至与应用程序对应的核。
步骤f1-步骤f4可参见对上述步骤5021-步骤5024的描述,此处不过多赘述。
步骤g、应用处理器根据数据段头将每个数据段中的一个或多个接收数据包传输至与应用程序对应的核。
步骤g可参见对上述步骤502的描述,此处不过多赘述。
由此,本申请实施例提供的一种处理数据包的方法,可以应用于电子设备,电子设备包括调制解调器和应用处理器,当进行组包收包过程时,调制解调器将多个接收数据包划分到至少一个数据段,每个数据段对应一个应用程序,且每个数据段的数据段头用于标识应用程序的组包格式,在解包时,应用处理器将每个数据段中的一个或多个接收数据包传输至与该数据段对应的应用程序对应的核。相比于现有技术中在应用处理器侧引入额外消耗,使得电子设备处理能力降低,本申请通过改变组包格式,通过多个核对多个接收数据包进行处理,并且在应用处理器侧不引入额外消耗,实现合理均衡电子设备多个核的负载,提高电子设备处理数据包的能力的技术效果。
可以理解的是,上述电子设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
在采用对应各个功能划分各个功能模块的情况下,图9示出了上述实施例中涉及的调制解调装置900的一种可能的组成示意图,调制解调装置900可以为上述实施例中涉及的调制解调器,如图9所示,该调制解调装置900可以包括:解调模块901、组包模块902和发送模块903。
其中,解调模块901可以用于支持调制解调装置900执行上述步骤501和步骤b等,和/或用于本文所描述的技术的其他过程。
组包模块902可以用于支持调制解调装置900执行上述步骤501、步骤5011、步骤c和步骤c1等,和/或用于本文所描述的技术的其他过程。
发送模块903可以用于支持调制解调装置900执行上述步骤d等,和/或用于本文所描述的技术的其他过程。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的调制解调装置900,用于执行上述处理数据包的方法,因此可以达到与上述实现方法相同的效果。
在采用对应各个功能划分各个功能模块的情况下,图10示出了上述实施例中涉及的应用处理装置1000的一种可能的组成示意图,应用处理装置1000可以为上述实施例中涉及的应用处理器,如图10所示,该应用处理装置1000可以包括:接收模块1001、解析模块1002和调度模块1003。
其中,接收模块1001可以用于支持应用处理装置1000执行上述步骤e等,和/或用于本文所描述的技术的其他过程。
解析模块1002可以用于支持应用处理装置1000执行上述步骤502、步骤5021、步骤5022、步骤5023、步骤f、步骤f1、步骤f2和步骤f3等,和/或用于本文所描述的技术的其他过程。
调度模块1003可以用于支持应用处理装置1000执行上述步骤502、步骤5024、步骤f4和步骤g等,和/或用于本文所描述的技术的其他过程。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
本实施例提供的应用处理装置1000,用于执行上述处理数据包的方法,因此可以达到与上述实现方法相同的效果。
在采用集成的单元的情况下,如图11所示,本申请实施例公开了一种电子设备1100,该电子设备1100可以为上述实施例中的芯片400。电子设备1100可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备1100的动作进行控制管理,例如,可以用于支持电子设备1100执行上述解调模块901、组包模块902、发送模块903、接收模块1001、解析模块1002和调度模块1003执行的步骤。存储模块可以用于支持电子设备1100存储程序代码和数据等。通信模块可以用于支持电子设备1100与其他设备的通信例如,可以用于支持电子设备1100执行上述步骤a。
当然,上述电子设备1100中的单元模块包括但不限于上述处理模块、存储模块和通信模块。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为与其他外部设备交互的设备。
例如,处理模块为处理器401,存储模块可以为存储器402,通信模块可以为芯片接口403。本申请实施例所提供的电子设备1100可以为图4所示的芯片400。其中,上述处理器401、存储器402、芯片接口403等可以连接在一起,例如通过总线连接。
本申请实施例还提供一种电子设备,包括一个或多个处理器以及一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述相关方法步骤实现上述实施例中的处理数据包的方法。
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序代码,当计算机指令在计算机或处理器上运行时,使得计算机或处理器执行上述实施例中的处理数据包的方法。
其中,本实施例提供的电子设备和计算机存储介质均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任 何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (11)

  1. 一种电子设备,其特征在于,所述电子设备包括:
    调制解调器,用于解调多个接收数据包,将所述多个接收数据包划分到至少一个数据段,所述至少一个数据段中每个数据段对应一个应用程序,所述每个数据段包括数据段头,所述数据段头用于标识所述应用程序;
    应用处理器包括多个核,所述应用处理器用于解析所述至少一个数据段,得到所述数据段头,根据所述数据段头将所述每个数据段中的一个或多个接收数据包传输至与所述应用程序对应的核。
  2. 根据权利要求1所述的电子设备,其特征在于,所述应用处理器具体用于:
    在网卡层上解析所述至少一个数据段,得到所述数据段头,根据所述数据段头确定所述应用程序;
    将所述一个或多个接收数据包从所述网卡层传输至协议栈层;
    在所述协议栈层上解析所述一个或多个接收数据包,得到解析后的数据;
    将所述解析后的数据传输至与所述应用程序对应的所述核。
  3. 根据权利要求1或2所述的电子设备,其特征在于,所述调制解调器具体用于:
    根据所述多个接收数据包中每个接收数据包的五元组信息确定所述每个接收数据包对应的数据段,以将所述一个或多个接收数据包组包在所述每个数据段中。
  4. 一种调制解调装置,其特征在于,所述调制解调装置包括:
    解调模块,用于解调多个接收数据包;
    组包模块,用于将所述多个接收数据包划分到至少一个数据段,所述至少一个数据段中每个数据段对应一个应用程序,所述每个数据段包括数据段头,所述数据段头用于标识所述应用程序;
    发送模块,用于向应用处理装置发送所述至少一个数据段,所述每个数据段中的一个或多个接收数据包用于传输至与所述应用程序对应的核。
  5. 根据权利要求4所述的调制解调装置,其特征在于,所述组包模块具体用于:
    根据所述多个接收数据包中每个接收数据包的五元组信息确定所述每个接收数据包对应的数据段,以将所述一个或多个接收数据包组包在所述每个数据段中。
  6. 一种应用处理装置,所述应用处理装置包括多个核,其特征在于,所述应用处理装置包括:
    接收模块,用于从调制解调装置接收至少一个数据段,所述至少一个数据段中每个数据段对应一个应用程序,所述每个数据段包括数据段头,所述数据段头用于标识所述应用程序;
    解析模块,用于解析所述至少一个数据段,得到所述数据段头;
    调度模块,用于根据所述数据段头将所述每个数据段中的一个或多个接收数据包传输至与所述应用程序对应的核。
  7. 根据权利要求6所述的应用处理装置,其特征在于,所述解析模块具体用于:
    在网卡层上解析所述至少一个数据段,得到所述数据段头,根据所述数据段头确定所述应用程序;
    将所述一个或多个接收数据包从所述网卡层传输至协议栈层;
    在所述协议栈层上解析所述一个或多个接收数据包,得到解析后的数据;
    所述调度模块,具体用于将所述解析后的数据传输至与所述应用程序对应的所述核。
  8. 一种处理数据包的方法,所述方法应用于电子设备,所述电子设备包括多个核,其特征在于,所述方法包括:
    解调多个接收数据包,将所述多个接收数据包划分到至少一个数据段,所述至少一个数据段中每个数据段对应一个应用程序,所述每个数据段包括数据段头,所述数据段头用于标识所述应用程序;
    解析所述至少一个数据段,得到所述数据段头,根据所述数据段头将所述每个数据段中的一个或多个接收数据包传输至与所述应用程序对应的核。
  9. 根据权利要求8所述的方法,其特征在于,所述解析所述至少一个数据段,得到所述数据段头,根据所述数据段头将所述每个数据段中的一个或多个接收数据包传输至与所述应用程序对应的核具体包括:
    在网卡层上解析所述至少一个数据段,得到所述数据段头,根据所述数据段头确定所述应用程序;
    将所述一个或多个接收数据包从所述网卡层传输至协议栈层;
    在所述协议栈层上解析所述一个或多个接收数据包,得到解析后的数据;
    将所述解析后的数据传输至与所述应用程序对应的所述核。
  10. 根据权利要求8或9所述的方法,其特征在于,所述解调多个接收数据包,将所述多个接收数据包划分到至少一个数据段具体包括:
    根据所述多个接收数据包中每个接收数据包的五元组信息确定所述每个接收数据包对应的数据段,以将所述一个或多个接收数据包组包在所述每个数据段中。
  11. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在计算机或处理器上运行时,使得所述计算机或所述处理器执行上述权利要求8-10中任一项所述的方法。
PCT/CN2021/132095 2021-11-22 2021-11-22 一种处理数据包的方法和设备 WO2023087306A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180099446.2A CN117561706A (zh) 2021-11-22 2021-11-22 一种处理数据包的方法和设备
PCT/CN2021/132095 WO2023087306A1 (zh) 2021-11-22 2021-11-22 一种处理数据包的方法和设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/132095 WO2023087306A1 (zh) 2021-11-22 2021-11-22 一种处理数据包的方法和设备

Publications (1)

Publication Number Publication Date
WO2023087306A1 true WO2023087306A1 (zh) 2023-05-25

Family

ID=86396065

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/132095 WO2023087306A1 (zh) 2021-11-22 2021-11-22 一种处理数据包的方法和设备

Country Status (2)

Country Link
CN (1) CN117561706A (zh)
WO (1) WO2023087306A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080130680A1 (en) * 2006-12-05 2008-06-05 Electronics And Telecommunications Research Institute Apparatus and method for receiving upstream data packet
CN101689158A (zh) * 2007-07-09 2010-03-31 惠普发展公司,有限责任合伙企业 用于多核处理器的数据分组处理方法
CN110650168A (zh) * 2018-06-27 2020-01-03 华为技术有限公司 一种通信方法及其装置
CN110968415A (zh) * 2018-09-29 2020-04-07 Oppo广东移动通信有限公司 多核处理器的调度方法、装置及终端
CN112352404A (zh) * 2018-07-13 2021-02-09 三星电子株式会社 用于处理电子设备的数据分组的装置和方法
WO2021101014A1 (ko) * 2019-11-18 2021-05-27 삼성전자 주식회사 패킷 전달을 제어하는 전자 장치 및 그의 동작 방법

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080130680A1 (en) * 2006-12-05 2008-06-05 Electronics And Telecommunications Research Institute Apparatus and method for receiving upstream data packet
CN101689158A (zh) * 2007-07-09 2010-03-31 惠普发展公司,有限责任合伙企业 用于多核处理器的数据分组处理方法
CN110650168A (zh) * 2018-06-27 2020-01-03 华为技术有限公司 一种通信方法及其装置
CN112352404A (zh) * 2018-07-13 2021-02-09 三星电子株式会社 用于处理电子设备的数据分组的装置和方法
CN110968415A (zh) * 2018-09-29 2020-04-07 Oppo广东移动通信有限公司 多核处理器的调度方法、装置及终端
WO2021101014A1 (ko) * 2019-11-18 2021-05-27 삼성전자 주식회사 패킷 전달을 제어하는 전자 장치 및 그의 동작 방법

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A. RAMAZANI ; F. MONTEIRO ; C. DIOU ; A. DANDACHE: "A multiprocessor architecture for fast packet processing", ELECTRONICS, CIRCUITS AND SYSTEMS, 2005. ICECS 2005. 12TH IEEE INTERNATIONAL CONFERENCE ON, IEEE, PISCATAWAY, NJ, USA, 11 December 2005 (2005-12-11), Piscataway, NJ, USA , pages 1 - 4, XP031327254, ISBN: 978-9972-61-100-1 *

Also Published As

Publication number Publication date
CN117561706A (zh) 2024-02-13

Similar Documents

Publication Publication Date Title
CN109768939B (zh) 一种支持优先级的标签化网络栈方法和系统
JP4262888B2 (ja) 処理タスクをソフトウエアからハードウエアにオフロードする方法およびコンピュータ・プログラム製品
US8660137B2 (en) Method and system for quality of service and congestion management for converged network interface devices
US9813283B2 (en) Efficient data transfer between servers and remote peripherals
WO2016187813A1 (zh) 一种光电混合网络的数据传输方法及装置
WO2018121295A1 (zh) 一种异构多协议栈方法、装置及系统
US8949472B2 (en) Data affinity based scheme for mapping connections to CPUs in I/O adapter
CN106209506A (zh) 一种虚拟化深度包检测流量分析方法及系统
WO2021013046A1 (zh) 通信方法和网卡
CN101902395A (zh) 管理主机上的资源的系统和方法
CN101690047A (zh) 网络端点系统中的服务质量增强
CN1433623A (zh) 利用时序安排和头压缩降低分组延迟的方法和设备
WO2020151449A1 (zh) 基于quic协议栈的数据处理方法、系统、设备及存储介质
US11522805B2 (en) Technologies for protocol-agnostic network packet segmentation
CN104580011A (zh) 一种数据转发装置和方法
CN108768667B (zh) 一种用于多核处理器片内核间网络通信的方法
CN114726788B (zh) 应用于dpu的报文传输方法及相关装置
US20220321491A1 (en) Microservice data path and control path processing
US20220217085A1 (en) Server fabric adapter for i/o scaling of heterogeneous and accelerated compute systems
US20220103479A1 (en) Transmit rate based on detected available bandwidth
CN113986811B (zh) 一种高性能内核态网络数据包加速方法
WO2023087306A1 (zh) 一种处理数据包的方法和设备
US10185675B1 (en) Device with multiple interrupt reporting modes
CN104598430A (zh) 一种cpu互联扩展系统的网络接口互联设计与控制系统
US11528187B1 (en) Dynamically configurable networking device interfaces for directional capacity modifications

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180099446.2

Country of ref document: CN