WO2019033891A1 - Rdma-based network traffic determination method and device - Google Patents

Rdma-based network traffic determination method and device Download PDF

Info

Publication number
WO2019033891A1
WO2019033891A1 PCT/CN2018/096210 CN2018096210W WO2019033891A1 WO 2019033891 A1 WO2019033891 A1 WO 2019033891A1 CN 2018096210 W CN2018096210 W CN 2018096210W WO 2019033891 A1 WO2019033891 A1 WO 2019033891A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
data
tail
analysis server
data packets
Prior art date
Application number
PCT/CN2018/096210
Other languages
French (fr)
Chinese (zh)
Inventor
张维
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019033891A1 publication Critical patent/WO2019033891A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/355Application aware switches, e.g. for HTTP

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method and apparatus for determining network traffic based on remote direct memory access (RDMA).
  • RDMA remote direct memory access
  • RDMA technology is a technique for quickly moving data from a terminal device's memory directly to the memory of another remote terminal through a network to eliminate the impact on the performance of the processor.
  • the main process of the RDMA is: the first terminal device directly sends the data in its own memory to the forwarding device in the network through its own network card, and the forwarding device forwards the data to the second terminal device, the second terminal device
  • the network card directly stores the received data into the memory of the second terminal device, so that the processors of the two terminal devices are not required to participate in the data access process to reduce the impact on the processor performance of the terminal device.
  • the forwarding device when forwarding the received data to the second terminal device, also copies and sends the data to the analysis server, so that the analysis server determines the network according to the data. Traffic, so that the network administrator performs subsequent network management based on the network traffic determined by the analysis server.
  • the first terminal device divides the data block to be transmitted into a plurality of data packets for transmission. Therefore, the following method is generally used to determine network traffic: the forwarding device copies and receives the received multiple data packets to the analysis server; the analysis server determines, among the multiple data packets sent by the forwarding device, the data packets belonging to the same data block. All packets, and the sum of the sizes of all the packets determined as the network traffic corresponding to the same data block.
  • more and more terminal devices transmit data based on RDMA, and the forwarding device copies and sends a large number of data packets to the analysis server, thereby causing a large occupation of the storage capacity of the analysis server, and wasting the forwarding device and the analysis server. Transmission resources between.
  • the present invention provides an RDMA-based network traffic determination method and apparatus, which are used to avoid the storage capacity of the analysis server caused by the analysis of the RDMA-based network traffic between the terminal devices in the prior art.
  • the problem of transmission resources between the device and the analysis server is wasted.
  • the present application provides an RDMA-based network traffic determination method.
  • the forwarding device copies the data packet, sends the copied data packet to the analysis server, and forwards the data packet to the second terminal device;
  • the data packet is not the target data packet of the plurality of data packets, and the forwarding device does not perform the process of copying the data packet, and forwards the data packet to the second terminal device; wherein the data block is And the first terminal device uses the RDMA mode to transmit the data block to the second terminal device by using the forwarding device, where the data packet includes a length of the data packet and a sequence number of the data packet.
  • the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for one data block to the analysis server, and the forwarding device pairs the data packets other than the target data packet among the plurality of data packets.
  • the process of copying and sending to the analysis server is not performed, so that the analysis server determines the network traffic corresponding to the data block according to the target data packet, thereby reducing the occupation of the storage capacity of the analysis server, and saving the forwarding device and the analysis server. Transfer resources between.
  • the length of the data packet is represented by a payload field in the data packet, and the serial number of the data packet passes through a packet sequence number (PSN) in the data packet.
  • PSN packet sequence number
  • the forwarding device may be, but is not limited to, a switch or a router or the like.
  • the target data packet may be a tail packet of the plurality of data packets.
  • the forwarding device determines whether the data packet is in the multiple data packets.
  • the target data packet may be: the forwarding device identifies a value of an opcode in the data packet, and if the value of the opcode is a value of an opcode corresponding to the tail packet, the forwarding device determines The data packet is a tail packet; if the value of the opcode is not the value of the opcode corresponding to the tail packet, the forwarding device determines that the data packet is not a tail packet.
  • the forwarding device can accurately identify the tail packets in the plurality of data packets, so that the forwarding device copies the identified tail packets and sends the tail packets to the analysis server, thereby enabling the analysis server.
  • the network traffic corresponding to the data block is determined by the tail packet.
  • the target data packet may be a first packet or a tail packet of the multiple data packets.
  • the forwarding device determines whether the data packet is the multiple data.
  • the target data packet in the packet may be: the forwarding device identifies the value of the opcode in the data packet, and if the value of the opcode is the value of the opcode corresponding to the first packet, the forwarding device determines the data.
  • the packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet, the forwarding device determines that the data packet is a tail packet.
  • the forwarding device can accurately identify the first packet or the tail packet of the plurality of data packets, so that the forwarding device copies the identified first packet or the tail packet and sends the identifier to the analysis server. And causing the analysis server to subsequently determine network traffic corresponding to the data block by using the first packet and the tail packet.
  • the forwarding device is configured with an access control list (ACL), where the ACL stores the correspondence between the value of the opcode and the first packet, and the correspondence between the value of the opcode and the tail packet.
  • ACL access control list
  • the forwarding device may determine whether the received data packet is the first packet or the tail packet by querying the correspondence between the value of the opcode in the ACL and the first packet, and the correspondence between the value of the opcode and the tail packet.
  • the RDMA mode can be divided into three types: send, write, and read, and the forwarding device can determine that the packet is the first packet (send_first) or the tail. a packet (send_last); the forwarding device may also determine that the data packet is a write first packet (write_first) or a write tail packet (write_last); the forwarding device may further determine that the data packet is a read first packet (read_first) or Read the tail package (read_last).
  • the analysis server can count the transmitted data block, the written data block or the network traffic corresponding to the read data block.
  • the present application further provides another method for determining network traffic based on RDMA.
  • the analyzing server receives a tail packet in a plurality of data packets obtained by dividing the data packet by the forwarding device, where the tail packet includes a length of the tail packet and a sequence number of the tail packet; and then the analyzing Determining, by the server, the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet; wherein the data block is transmitted to the second terminal device by using the RDMA mode by using the forwarding device The data block of the terminal device.
  • the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save the forwarding device and the analysis server. Transmission resources between.
  • the analysis server may further receive a first packet of the plurality of data packets obtained by the forwarding device for the data block partitioning; wherein the first packet includes the The length of the first packet and the serial number of the first packet.
  • the analyzing server determines the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, and specifically includes the following steps: the analyzing server according to the tail a sequence number of the packet and a sequence number of the first packet, after determining the number of data packets between the first packet and the tail packet, the analysis server is configured according to the length of the first packet, the first packet, and The number of data packets between the tail packets and the length of the tail packets determine the network traffic corresponding to the data blocks.
  • the analysis server may determine network traffic corresponding to the data block according to the first packet and the tail packet, and in the process, the forwarding device only needs to copy and send multiple data divided for the data block.
  • the first packet and the tail packet in the packet are sent to the analysis server, and the data packets other than the first packet and the tail packet of the plurality of data packets are not copied and sent to the analysis server, thereby reducing the occupation of the storage capacity of the analysis server. And can save transmission resources between the forwarding device and the analysis server.
  • the analysis server subtracts the serial number of the first packet from the serial number of the tail packet and then subtracts 1 to obtain a determined between the first packet and the tail packet. The number of packets.
  • the analysis server determines, according to the length of the first packet, the determined number of data packets between the first packet and the tail packet, and the length of the tail packet,
  • the network traffic of the data block can be based on the following formula:
  • L is the network traffic corresponding to the data block
  • Len1 is the length of the first packet
  • Len2 is the length of the tail packet
  • N is the number of data packets between the first packet and the tail packet.
  • the analysis server after receiving the first packet of the plurality of data packets, identifies and records the quintuple and the QP of the first packet; the analysis server is based on the recorded five-element a group and a QP, determining the received tail packet that is the same as the recorded five-tuple and QP, and using the tail packet as a tail packet in the plurality of data packets of the data block; The quintuple and QP of the first packet are used to indicate the quintuple and QP of the data block to which the plurality of data packets belong.
  • the analysis server can accurately identify the first packet and the tail packet of the data block, so that the subsequent analysis server determines the network traffic corresponding to the data block according to the first packet and the tail packet. .
  • the analyzing server determines the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, and specifically includes the following steps:
  • the analysis server identifies a quintuple and a queue pair QP in the tail package, and determines a quintuple and a QP of the tail package according to a correspondence between the saved quintuple and the value of the QP and the maximum transmission unit MTU.
  • the analysis server determines a starting sequence number of the set of the plurality of data packets, and according to the sequence number of the tail package and the set start of the plurality of data packets a sequence number, the number of data packets before the tail packet is determined; finally, the analysis server determines, according to the number of data packets before the tail packet, the quintuple of the tail packet, and the value of the MTU corresponding to the QP And the length of the tail packet determines a network traffic corresponding to the data block.
  • the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save the forwarding device and the analysis server. Transmission resources between.
  • the analyzing server determines a method for setting a starting sequence number of the plurality of data packets:
  • the analysis server acquires the start sequence number by using the data packet sent by the forwarding device ;
  • the analysis server acquires a pre-stored starting sequence number set when the first terminal device divides a plurality of data packets for one data block.
  • the analysis server can accurately determine the starting sequence number of the set plurality of data packets, so that the analysis server subsequently determines the number of data packets before the tail package.
  • the analysis server subtracts the set starting sequence number from the serial number of the tail package to obtain the number of data packets before the tail package.
  • the analysis server determines the corresponding location according to the number of data packets before the tail packet, the quintuple of the tail packet, the value of the MTU corresponding to the QP, and the length of the tail packet.
  • T is the network traffic corresponding to the data block
  • the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP
  • Len is the length of the tail packet
  • K is the data packet before the tail packet. The number.
  • the embodiment of the present application further provides a forwarding device, where the forwarding device has a function of implementing forwarding device behavior in the foregoing method instance.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the structure of the forwarding device includes a communication interface, a processor, and a memory
  • the communication interface is configured to receive and send data
  • the processor is configured to support the forwarding device to perform the foregoing The corresponding function in the method in one aspect.
  • the memory is coupled to the processor, which stores program instructions and data necessary for the forwarding device.
  • an embodiment of the present application further provides an analysis server, where the analysis server has a function of analyzing the behavior of the server in the foregoing method instance.
  • the functions may be implemented by hardware or by corresponding software implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the configuration of the analysis server includes a communication interface, a processor, and a memory
  • the communication interface is configured to receive and send data
  • the processor is configured to support the analysis server to perform the foregoing The corresponding function in the method in the two aspects.
  • the memory is coupled to the processor, which stores program instructions and data necessary for the analysis server.
  • the embodiment of the present application further provides a network traffic determining system, where the network traffic determining system includes multiple terminal devices, multiple forwarding devices, and an analysis server, and any one of the multiple forwarding devices
  • the analysis server is the analysis server of the fourth aspect described above.
  • the embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer executable instructions, where the computer executable instructions are used to cause the computer to execute when called by the computer. Any of the above methods.
  • the embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing the computer to perform any of the above methods.
  • the forwarding device receives one of a plurality of data packets obtained by dividing the network card of the first terminal device for one data block, and determines whether the data packet is target data in the multiple data packets. a packet, if yes, copying the data packet, transmitting the copied data packet to an analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform processing for copying the data packet, Forwarding the data packet to the second terminal device only; wherein the data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device.
  • the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the data packet.
  • the processing of the server is analyzed to enable the analysis server to determine network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
  • Figure 1a is a schematic diagram of a data packet provided by the present application.
  • FIG. 1 is a schematic structural diagram of a network traffic determining system provided by the present application.
  • FIG. 2 is a schematic flowchart of a RDMA-based network traffic determining method provided by the present application
  • FIG. 3 is a schematic structural diagram of a forwarding device provided by the present application.
  • FIG. 4 is a schematic structural diagram of an analysis server provided by the present application.
  • FIG. 5 is a structural diagram of a forwarding device provided by the present application.
  • FIG. 6 is a structural diagram of an analysis server provided by the present application.
  • the embodiment of the present application provides a method and an apparatus for determining network traffic based on RDMA, so as to avoid the storage capacity of the analysis server caused by the analysis of the RDMA-based network traffic between the terminal devices by the analysis server in the prior art.
  • the method and the device of the present application are based on the same inventive concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
  • a forwarding device a device that forwards data, such as a switch, a router, and the like.
  • the first terminal device and the second terminal device are devices that use RDMA to transmit data, for example, a handheld device with a wireless connection function, an in-vehicle device, a wearable device, a computing device, and a mobile station (mobile station) , MS) or other processing device or the like connected to the wireless modem, and a mobile terminal that communicates with one or more core networks via the access network.
  • a handheld device with a wireless connection function for example, a handheld device with a wireless connection function, an in-vehicle device, a wearable device, a computing device, and a mobile station (mobile station) , MS) or other processing device or the like connected to the wireless modem, and a mobile terminal that communicates with one or more core networks via the access network.
  • MS mobile station
  • the analysis server may be a big data analysis platform or a host for data analysis, and is configured to determine network traffic corresponding to the data block according to a tail packet of one data block.
  • the network card of the first terminal device and the network card of the second terminal device when the RDMA communication is used between the first terminal device and the second terminal device, the communication between the data sender and the data receiver is performed.
  • main body Specifically, the two network cards communicate with each other through a queue pair (QP).
  • the QP of each network card is divided into a receiving QP and a sending QP, which are used for data receiving and sending, respectively.
  • the data packet is obtained by dividing the data block to be transmitted by the terminal device, and can be divided into a first packet, an intermediate data packet, and a tail packet.
  • 1a is a schematic diagram of a data packet, wherein a payload field included in the data packet indicates a length of the data packet; and an opcode in a Base Transport Header (BTH) of the data packet.
  • BTH Base Transport Header
  • the field identifies the type of the data packet (ie, the first packet, the tail packet, or the intermediate data packet), and the QP field identifies the QP of the network card of the terminal device that needs to receive the data packet, and the PSN identifies the sequence number of the data packet.
  • the specific meanings of other fields in the data packet are not specifically mentioned in the present application, and therefore will not be described again.
  • the RDMA mode is divided into three types: send, write, and read. Therefore, the opcode can specifically identify whether the data packet is the first packet, the intermediate data packet, or the tail packet in the send mode, or the first packet and the middle in the write mode. The data packet or the tail packet is the first packet, the intermediate data packet or the tail packet in the read mode.
  • multiple means two or more.
  • FIG. 1 shows a possible network traffic determining system applicable to the RDMA-based network traffic determining method provided by the embodiment of the present application, where the network traffic determining system includes: multiple terminal devices, multiple forwarding devices, and an analysis server.
  • the RDMA mode communication is implemented by the multiple forwarding devices between the multiple terminal devices.
  • the plurality of terminal devices include a plurality of terminal device pairs that use RDMA communication, that is, a plurality of terminal devices that transmit data and a plurality of terminal devices that receive data, wherein any one of the terminal devices that transmit data (referred to as the first terminal device) is configured to divide the data block to be transmitted into a plurality of data packets, and use the plurality of data packets by the network card Sending a data packet to one of the plurality of forwarding devices (such as forwarding device A, forwarding device B, and forwarding device C shown in FIG. 1), so that the forwarding device will receive the multiple data packets.
  • RDMA communication that is, a plurality of terminal devices that transmit data and a plurality of terminal devices that receive data
  • any one of the terminal devices that transmit data (referred to as the first terminal device) is configured to divide the data block to be transmitted into a plurality of data packets, and use the plurality of data packets by the network card Sending a data packet to one of the plurality of forwarding devices (
  • the data packet includes a length and a sequence number in each of the plurality of data packets, where the plurality of data packets includes a first packet, M intermediate data packets, and a tail packet, where M is greater than or equal to 0.
  • the length of the first packet is the same as the length of the M intermediate data packets, and is a maximum transmission unit (maximum transmission unit, which can be transmitted in the transmission path of the first terminal device and the second terminal device, The value of the MTU), the length of the tail packet is less than or equal to the length of the first packet.
  • the forwarding device uses any one of the plurality of forwarding devices to transmit data by using an RDMA method, that is, the terminal device A and the terminal device B are a terminal device pair that communicates by using RDMA mode.
  • the terminal device C and the terminal device D are a pair of terminal devices that communicate by RDMA.
  • the terminal device A is to be treated
  • the transmitted data block is divided into a plurality of data packets, and the plurality of data packets are sent to the forwarding device A by the network card, and the forwarding device A forwards the plurality of data packets to the terminal device B.
  • the network card of the terminal device B directly stores the plurality of data packets into its own memory. In this way, data transmission is completed between the terminal device A and the terminal device B.
  • any one of the plurality of forwarding devices is configured to: after receiving a plurality of data packets sent by a network card of any one of the plurality of terminal devices, the data packet While forwarding to another terminal device, the plurality of data packets are also copied and sent to the analysis server, so that the analysis server determines network traffic corresponding to the data block to which the plurality of data packets belong.
  • the plurality of forwarding devices may not copy all the data packets, but only copy multiple data.
  • the target packet in the package Specifically, the forwarding device of the plurality of forwarding devices determines, according to each packet received from the first terminal device, whether the data packet is a target data packet in multiple data packets, and if so, Copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the process of copying the data packet is not performed, and only the data packet is forwarded to Second terminal device.
  • the target data packet may be a tail packet in the multiple data packets, or a first packet and a tail packet in the multiple data packets.
  • the analysis server is configured to determine network traffic corresponding to the data block sent by any one of the terminal devices, and display the determined network traffic on a display interface (such as the display interface in FIG. 1), so that the network administrator according to the Analyze the network traffic determined by the server for subsequent network management.
  • the determining, by the analysis server, the network traffic specifically includes: receiving, by the forwarding device, a target data packet in a plurality of data packets obtained by dividing a data block, and according to the length and sequence included in the target data packet. Number, determining the network traffic corresponding to the data block.
  • the forwarding device copies and transmits the target data packet of the plurality of data packets into one data block to the analysis server, and does not perform replication on other data packets except the target data packet. And sending the processing to the analysis server, so that the occupation of the storage capacity of the analysis server can be reduced, and at the same time, the transmission resource between the forwarding device and the analysis server can be saved.
  • An RDMA-based network traffic determining method provided by an embodiment of the present application is applicable to the network traffic determining system shown in FIG. 1. Referring to Figure 2, the specific process of the method includes:
  • Step 201 The forwarding device receives a data packet sent by the first terminal device, where the data packet is one of a plurality of data packets obtained by dividing a data block by the network card of the first terminal device; The first terminal device transmits the data block to the second terminal device through the forwarding device in an RDMA manner.
  • the data block to be transmitted is divided into multiple data packets for transmission in the network.
  • the network card of the first terminal device as the sender sends a plurality of data packets divided for one data block to the forwarding device, so that the forwarding device forwards the plurality of data packets to another terminal device, thereby Complete the data transfer.
  • each of the plurality of data packets includes a length of the data packet and a sequence number of the data packet, and specifically, a length of the data packet passes a payload in the data packet (
  • the payload field (as shown in the payload field in the packet shown in Figure 1a) is embodied, the sequence number of the data packet passing through the PSN field in the data packet (such as the PSN in the BTH in the data packet shown in Figure 1a) Field) embodies.
  • forwarding device can be, but is not limited to, a switch or a router.
  • Step 202 The forwarding device determines whether the data packet is a target data packet in the multiple data packets, and if the data packet is a target data packet in the multiple data packets, copying the data packet Step 203 is executed. If the data packet is not the target data packet in the plurality of data packets, the process of copying the data packet is not performed, and step 204 is performed.
  • each of the plurality of data packets further includes an opcode field (the opcode field in the BTH in the data packet as shown in FIG. 1a)
  • the packet type that is, the value of opcode in each packet indicates that the packet is a first packet, an intermediate packet, or a trailer.
  • the target data packet may be a tail packet or a first packet or a tail packet, optionally, when the target data packet is a tail packet in the multiple data packets, the forwarding device determines the data.
  • the specific method may be: the forwarding device identifies the value of the opcode opcode in the data packet, if the opcode value is an opcode corresponding to the tail packet The value determines that the data packet is a tail packet; if the value of the opcode is not the value of the opcode corresponding to the tail packet, it is determined that the data packet is not a tail packet.
  • the forwarding device determines whether the data packet is a target data packet in the multiple data packets, and may be: The forwarding device identifies the value of the opcode opcode in the data packet, and if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet, if the opcode value is an opcode corresponding to the tail packet The value of the packet is determined to be a tail packet.
  • An ACL is configured in the forwarding device, where the ACL stores the correspondence between the value of the opcode and the first packet, and the corresponding relationship between the value of the opcode and the tail packet.
  • the forwarding device may determine whether the received data packet is the first packet or the tail packet by querying the correspondence between the value of the opcode in the ACL and the first packet, and the correspondence between the value of the opcode and the tail packet.
  • the forwarding device can successfully identify a tail packet, or a first packet and a tail packet, of the plurality of data packets divided for one data block, and then copy the tail packet, or the first packet and the After the tail packet is described, the copied data packet is sent to the analysis server, so that the analysis server determines the network traffic corresponding to the data block by using the tail packet, or the first packet and the tail packet.
  • the The forwarding device may determine, by using the opcode in the data packet, which type of RDMA mode the first packet or the tail packet is.
  • the forwarding device may determine that the data packet is a send first packet (send_first) or a send tail packet (send_last); the data packet may be determined to be a write first packet (write_first) or a write tail packet (write_last); The data packet is judged to be a read first packet (read_first) or a read end packet (read_last).
  • Step 203 The forwarding device sends the copied data packet to an analysis server, and forwards the data packet to the second terminal device.
  • the forwarding device forwards the data packet to the second terminal device, so that the network card of the second terminal device stores the data packet to the second The memory of the terminal device, thereby realizing the data transmission of the first terminal device and the second terminal device by using RDMA mode.
  • the forwarding device sends the copied data packet (target data packet) to the analysis server, so that the analysis server subsequently stores only the data partitioned for one data block.
  • the target data packets in the data packets so that the storage capacity of the analysis server can be less.
  • Step 204 The forwarding device forwards the data packet to the second terminal device.
  • the data packet sent by the forwarding device to the second terminal device is other than the target data packet in the plurality of data packets divided by the network card of the first terminal device for one data block. Packet.
  • the forwarding device since the forwarding device does not perform the copy processing on the data packets other than the target data packet among the plurality of data packets, only the data packets other than the target data packet of the plurality of data packets are sent to the The second terminal device avoids copying and transmitting data packets other than the target data packet in the plurality of data packets to the analysis server, so that the analysis server can be prevented from storing the plurality of data packets.
  • a data packet other than the target data packet thereby reducing the occupation of the storage capacity of the analysis server, and saving transmission resources between the forwarding device and the analysis server.
  • Step 205 The analysis server determines network traffic corresponding to the data block according to the length of the target data packet and the sequence number of the target data packet.
  • the following two methods may be used:
  • the target data packet includes a first packet and a tail packet of the multiple data packets, and the method may be divided into the following three steps:
  • the analysis server receives a first packet of the plurality of data packets obtained by the forwarding device for the data block partitioning, where the first packet includes a length of the first packet and the first packet Serial number.
  • the analysis server determines the number of data packets between the first packet and the tail packet according to the sequence number of the tail packet and the sequence number of the first packet.
  • the analysis server determines network traffic corresponding to the data block according to the length of the first packet, the number of data packets between the first packet and the tail packet, and the length of the tail packet.
  • the target data packet includes a tail packet of the plurality of data packets, and the method may be divided into the following three steps:
  • the analysis server identifies the quintuple and the QP in the tail package, and determines the quintuple of the tail package and the MTU corresponding to the QP according to the saved quintuple and the correspondence between the QP and the MTU value. Value.
  • the quintual includes a source Internet Protocol (IP) address, a destination IP address, a source port, a destination port, and a transmission protocol; the QP is a QP field included in each data packet (as shown in FIG. 1a).
  • the illustrated QP field is used to identify the QP of the network card of the terminal device that needs to receive the data packet.
  • the analysis server determines a starting sequence number of the set of the plurality of data packets, and determines, according to the sequence number of the tail package and the set start sequence number of the multiple data packets. The number of packets before the tail packet.
  • the analysis server determines, according to the number of data packets before the tail packet, the quintuple of the tail packet, the value of the MTU corresponding to the QP, and the length of the tail packet, a network corresponding to the data block. flow.
  • the forwarding device first identifies the first packet of the multiple data packets because the multiple data packets are sent in the order from the first packet to the tail packet.
  • the first packet is then copied and sent to the analysis server. Therefore, in the first method described above, in order to determine the first packet and the tail packet of the data block, the analysis server further performs the following operations:
  • the analysis server After receiving the first packet of the plurality of data packets, the analysis server identifies and records the quintuple and the QP of the first packet; wherein the quintuple and the QP of the first packet are used to indicate the multiple The quintuple and QP of the data block to which the data packet belongs;
  • the analyzing server determines, according to the recorded quintuple and QP, the received tail packet that is the same as the recorded quintuple and QP, and uses the tail packet as the multiple of the data block The tail package in the packet.
  • the quintuple and the QP of the data block (that is, the identifier of the data block are recorded) are recorded, and the attribution sent by the subsequent forwarding device is identified.
  • the first packet and the tail packet of the data block are accurately determined, and the corresponding data block can be determined according to the first packet and the tail packet in the data block. Network traffic.
  • the analysis server may determine, by using the foregoing method, a first packet and a tail packet respectively included in each of the plurality of data blocks, thereby determining network traffic corresponding to each of the plurality of data blocks.
  • the analyzing server when the analyzing server performs step A2, subtracting 1 from the serial number of the first packet and subtracting 1 from the serial number of the tail packet, the determined first header may be obtained.
  • the length of the first packet is the same as the length of the data packet between the first packet and the trailer. Therefore, specifically, when the analysis server performs step A3, the following formula may be adopted:
  • L is the network traffic corresponding to the data block
  • Len1 is the length of the first packet
  • Len2 is the length of the tail packet
  • N is the number of data packets between the first packet and the tail packet.
  • the analysis server may adopt the foregoing The second method performs step 205.
  • the analysis server stores a correspondence between a quintuple and a value of a QP and an MTU, and the analysis server determines, according to the correspondence, a five-element of the tail package.
  • the value of the MTU corresponding to the group and the QP that is, the length of the first packet and the intermediate data packet in the plurality of data packets of the data block are determined.
  • the correspondence between the quintuple and the QP and MTU values saved by the analysis server can be as shown in Table 1 below:
  • the source IP address, the source port, the destination IP address, the destination port, and the transmission protocol in Table 1 are five-tuples; the source QP and the destination QP are respectively represented in the network card of the terminal device that transmits data and the terminal device that receives the data.
  • QP QP.
  • the analysis server searches for the value of the quintuple of the tail package and the MTU corresponding to the QP, the analysis server determines that the QP in the tail package meets the source QP and the purpose in the table 1. Any one of QP can be.
  • the analysis server needs to update the saved quintuple and the correspondence between the QP and the MTU values in real time.
  • the first terminal device first sends a connection request message to the second terminal device through the forwarding device, and then the second terminal device passes the foregoing, before the first terminal device and the second terminal device perform the data transmission.
  • the forwarding device returns a connection response message, where the connection request message includes a value of an MTU that can be transmitted between the first terminal device and the second terminal device, and a QP of the network card of the first terminal device;
  • the connection response message includes a QP of the network card of the second terminal device.
  • the forwarding device may copy and send the connection request message and the connection response message to the analysis server.
  • the analysis server may be configured according to the quintuple of the connection request message, the value of the MTU included in the connection request message, the QP, and the quintuple of the connection response message and the connection response report.
  • the QP included in the text obtains the correspondence between the quintuple and the QP (including the QP of the network card of the first terminal device and the QP of the network card of the second terminal device) and the value of the MTU, and then stores the obtained correspondence relationship into the In the analysis server, the update of the correspondence between the quintuple and the QP and MTU values is completed.
  • the method for the analysis server to determine the starting sequence number of the multiple data packets that are set may be:
  • the analysis server acquires the start sequence number by using the data packet sent by the forwarding device ;
  • the analysis server acquires a pre-stored starting sequence number set when the first terminal device divides a plurality of data packets for one data block.
  • the analysis server determines the number of data packets before the tail package according to the sequence number of the tail package and the set start sequence number of the plurality of data packets.
  • the specific method is: the analysis server subtracts the set start sequence number by using the serial number of the tail package, and obtains the number of data packets before the tail package.
  • the start sequence number is 0, the number of data packets before the tail package determined by the analysis server is equal to the sequence number of the tail package; when the start sequence number is 1, the The number of data packets before the tail packet determined by the analysis server is equal to the value obtained by subtracting 1 from the sequence number of the tail package.
  • T is the network traffic corresponding to the data block
  • MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP
  • Len is the length of the tail packet
  • K is the data before the tail packet. The number of packages.
  • the forwarding device receives one of the plurality of data packets obtained by dividing the network card of the first terminal device for one data block, and determines whether the data packet is the plurality of data packets. a target data packet in the data packet, if yes, copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform the copying device.
  • the processing of the data packet the data packet is forwarded only to the second terminal device; wherein the data block is transmitted to the second terminal device by the forwarding device by using the RDMA mode in the first terminal device. Data block.
  • the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the data packet.
  • the processing of the server is analyzed to enable the analysis server to determine network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
  • the embodiment of the present application further provides a forwarding device, where the forwarding device is applied to the network traffic determining system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determining method as shown in FIG. 2 .
  • the function of the forwarding device Referring to FIG. 3, the forwarding device 300 includes: a receiving unit 301, a processing unit 302, and a sending unit 303, where:
  • the receiving unit 301 is configured to receive a data packet sent by the first terminal device, where the data packet is one of a plurality of data packets obtained by dividing the network card of the first terminal device into one data block; the data block And the data block transmitted by the forwarding device to the second terminal device by using the RDMA mode in the RDMA mode;
  • the processing unit 302 is configured to determine whether the data packet is a target data packet in the multiple data packets, and if the data packet is a target data packet in the multiple data packets, copy the data Packet, controlling the sending unit 303 to send the copied data packet to the analysis server, and controlling the sending unit 303 to forward the data packet to the second terminal device; if the data packet is not the plurality of a target data packet in the data packet, the processing of copying the data packet is not performed, and the sending unit 303 is controlled to forward the data packet to the second terminal device;
  • the data packet includes a length of the data packet and a sequence number of the data packet.
  • the target data packet is a tail packet of the multiple data packets
  • the processing unit 302 when determining whether the data packet is a target data packet in the multiple data packets, specifically to:
  • Identifying the value of the opcode opcode in the data packet if the value of the opcode is the value of the opcode corresponding to the tail packet, determining that the data packet is a tail packet; if the value of the opcode is not the corresponding one of the tail packet The value of opcode determines that the packet is not a tail packet.
  • the target data packet is a first packet or a tail packet of the multiple data packets
  • the processing unit 302 is configured to determine whether the data packet is a target data packet in the multiple data packets. Specifically for:
  • Identifying the value of the opcode in the data packet if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet, It is determined that the data packet is a tail package.
  • the forwarding device 300 is a switch or a router.
  • the forwarding device receives one of a plurality of data packets obtained by the network card of the first terminal device for one data block, and determines whether the data packet is a target data packet in the multiple data packets. If yes, copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform the process of copying the data packet, only Transmitting the data packet to the second terminal device; wherein the data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device.
  • the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the analysis server. Processing, so that the analysis server determines network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
  • the embodiment of the present application further provides an analysis server, where the analysis server is applied to the network traffic determination system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determination method as shown in FIG. 2 . Analyze the capabilities of the server.
  • the analysis server 400 includes a receiving unit 401 and a processing unit 402, wherein:
  • the receiving unit 401 is configured to receive a tail packet of the plurality of data packets obtained by the forwarding device, where the data block is transmitted by the forwarding device by using the RDMA mode by the first terminal device. a data block for the second terminal device; the tail packet includes a length of the tail packet and a sequence number of the tail packet;
  • the processing unit 402 is configured to determine network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet.
  • the receiving unit 401 is further configured to:
  • the processing unit 402 is configured to: when determining the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, specifically:
  • L is the network traffic corresponding to the data block
  • Len1 is the length of the first packet
  • Len2 is the length of the tail packet
  • N is the number of data packets between the first packet and the tail packet.
  • the processing unit 402 is configured to: when determining network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, specifically:
  • T is the network traffic corresponding to the data block
  • the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP
  • Len is the length of the tail packet
  • K is the data packet before the tail packet. The number.
  • processing unit 402 is further configured to:
  • the receiving unit 401 After the receiving unit 401 receives the first packet of the plurality of data packets, identifying a quintuple and a QP of the first packet and recording; wherein the quintuple and QP of the first packet are used to indicate a quintuple and a QP of the data block to which the plurality of data packets belong;
  • the forwarding device is a switch or a router.
  • the analysis server provided by the embodiment of the present application, after receiving the tail packet in the plurality of data packets obtained by dividing the data packet by the forwarding device, determining, according to the length and the serial number of the tail packet, the corresponding data block Network traffic. In this way, the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save between the forwarding device and the analysis server. Transfer resources.
  • the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • the functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .
  • the embodiment of the present application further provides a forwarding device, where the forwarding device is applied to the network traffic determining system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determining method as shown in FIG. 2 .
  • the function of forwarding devices in the middle Referring to FIG. 5, the forwarding device 500 includes a communication interface 501, a processor 502, and a memory 503, where:
  • the communication interface 501, the processor 502, and the memory 503 are connected to each other.
  • the communication interface 501, the processor 502, and the memory 503 are mutually connected by a bus 504;
  • the bus 504 may be a peripheral component interconnect (PCI) bus or an extended industry standard. Extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA Extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 5, but it does not mean that there is only one bus or one type of bus.
  • the forwarding device 500 implements the RDMA-based network traffic determination method as shown in FIG. 2:
  • the communication interface 501 is configured to receive and send data
  • the processor 502 is configured to control the communication interface 501 to receive a data packet sent by the first terminal device, where the data packet is in a plurality of data packets obtained by dividing the network card of the first terminal device into one data block.
  • a data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device;
  • Determining whether the data packet is a target data packet in the plurality of data packets and if the data packet is a target data packet in the plurality of data packets, copying the data packet, and controlling the communication interface 501 Transmitting the copied data packet to the analysis server, and controlling the communication interface 501 to forward the data packet to the second terminal device; if the data packet is not the target data packet in the multiple data packets, Not performing the process of copying the data packet, and controlling the communication interface 501 to forward the data packet to the second terminal device;
  • the data packet includes a length of the data packet and a sequence number of the data packet.
  • the target data packet is a tail packet of the multiple data packets
  • the processor 502 when determining whether the data packet is a target data packet in the multiple data packets, specifically to:
  • Identifying the value of the opcode opcode in the data packet if the value of the opcode is the value of the opcode corresponding to the tail packet, determining that the data packet is a tail packet; if the value of the opcode is not the corresponding one of the tail packet The value of opcode determines that the packet is not a tail packet.
  • the target data packet is a first packet or a tail packet of the multiple data packets
  • the processor 502 is configured to determine whether the data packet is a target data packet in the multiple data packets. Specifically for:
  • Identifying the value of the opcode in the data packet if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet, It is determined that the data packet is a tail package.
  • the forwarding device 500 is a switch or a router.
  • the memory 503 is configured to store a program or the like.
  • the program can include program code, the program code including computer operating instructions.
  • the memory 503 may include a RAM, and may also include a non-volatile memory, such as at least one disk storage.
  • the processor 502 executes an application stored in the memory 503 to implement the foregoing functions, thereby implementing an RDMA-based network traffic determining method as shown in FIG. 2.
  • the forwarding device receives one of a plurality of data packets obtained by the network card of the first terminal device for one data block, and determines whether the data packet is a target data packet in the multiple data packets. If yes, copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform the process of copying the data packet, only Transmitting the data packet to the second terminal device; wherein the data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device.
  • the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the analysis server. Processing, so that the analysis server determines network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
  • the embodiment of the present application further provides an analysis server, where the analysis server is applied to the network traffic determination system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determination method as shown in FIG. 2 .
  • the function of the analysis server Referring to FIG. 6, the analysis server 600 includes a communication interface 601, a processor 602, and a memory 603, where:
  • the communication interface 601, the processor 602, and the memory 603 are connected to each other.
  • the communication interface 601, the processor 602, and the memory 603 are connected to each other by a bus 604;
  • the bus 604 may be a peripheral component interconnect (PCI) bus or an extended industry standard. Extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect
  • EISA Extended industry standard architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
  • the analysis server 600 implements the RDMA-based network traffic determination method as shown in FIG. 2:
  • the communication interface 601 is configured to receive and send data
  • the processor 602 is configured to control the communication interface 601 to receive a tail packet in a plurality of data packets obtained by dividing the data block by the forwarding device, where the data block is an RDMA mode used by the first terminal device. a data block transmitted by the forwarding device to the second terminal device; the tail packet includes a length of the tail packet and a sequence number of the tail packet;
  • processor 602 is further configured to:
  • the processor 602 is specifically configured to: when determining the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet,
  • L is the network traffic corresponding to the data block
  • Len1 is the length of the first packet
  • Len2 is the length of the tail packet
  • N is the number of data packets between the first packet and the tail packet.
  • the processor 602 is specifically configured to: when determining network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet,
  • T is the network traffic corresponding to the data block
  • the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP
  • Len is the length of the tail packet
  • K is the data packet before the tail packet. The number.
  • processor 602 is further configured to:
  • the communication interface 601 After receiving the first packet of the plurality of data packets, the communication interface 601 identifies and records the quintuple and the QP of the first packet; wherein the quintuple and QP of the first packet are used to indicate a quintuple and a QP of the data block to which the plurality of data packets belong;
  • the forwarding device is a switch or a router.
  • the memory 603 is configured to store a program or the like.
  • the program can include program code, the program code including computer operating instructions.
  • the memory 603 may include a RAM, and may also include a non-volatile memory such as at least one disk storage.
  • the processor 602 executes an application stored in the memory 603 to implement the foregoing functions, thereby implementing an RDMA-based network traffic determining method as shown in FIG. 2.
  • the analysis server provided by the embodiment of the present application, after receiving the tail packet in the plurality of data packets obtained by dividing the data packet by the forwarding device, determining, according to the length and the serial number of the tail packet, the corresponding data block Network traffic. In this way, the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save between the forwarding device and the analysis server. Transfer resources.
  • the forwarding device receives one of a plurality of data packets obtained by dividing the network card of the first terminal device for one data block, and determining the data. Whether the packet is a target data packet in the plurality of data packets, and if so, copying the data packet, transmitting the copied data packet to an analysis server, and forwarding the data packet to the second terminal device; otherwise The forwarding device does not perform the process of copying the data packet, and only forwards the data packet to the second terminal device; wherein the data block is transmitted by the forwarding device by using the RDMA mode in the first terminal device. A data block for the second terminal device.
  • the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the data packet.
  • the processing of the server is analyzed to enable the analysis server to determine network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
  • embodiments of the present application can be provided as a method, system, or computer program product.
  • the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware.
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.

Abstract

A remote direct memory access (RDMA)-based network traffic determination method and device. a forwarding device, after receiving one of a plurality of data packets obtained by a network card of a first terminal device by dividing a data block, determines whether the data packet is a target data packet in the plurality of data packets, and if yes, copies the data packet, sends the copied data packet to an analysis server, and forwards the data packet to a second terminal device; otherwise, the forwarding device does not copy the data packet and forwards the data packet to the second terminal device. The described method may reduce the storage capacity occupied by the analysis server and may save resources for transmission between the forwarding device and the analysis server. The embodiments of the present invention are used to solve the problem in existing technology of the storage capacity of an analysis server being largely occupied when the analysis server analyzes RDMA-based network traffic between terminal devices and the problem of resources for transmission between the forwarding device and the analysis server being wasted.

Description

一种基于RDMA的网络流量确定方法及装置Method and device for determining network traffic based on RDMA
本申请要求于2017年8月14日提交中国专利局、申请号为201710693896.X、发明名称为“一种基于RDMA的网络流量确定方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on August 14, 2017, the Chinese Patent Office, Application No. 201710693896.X, entitled "A RDMA-Based Network Traffic Determination Method and Apparatus", the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种基于远程直接数据存取(remote direct memory access,RDMA)的网络流量确定方法及装置。The present application relates to the field of communications technologies, and in particular, to a method and apparatus for determining network traffic based on remote direct memory access (RDMA).
背景技术Background technique
RDMA技术是通过网络将数据从一个终端设备的存储器直接快速移动到远程的另一个终端的存储器中,以消除对处理器的性能的影响的技术。RDMA的主要过程是:第一终端设备通过自身的网卡直接将自身存储器中的数据发送给网络中的转发设备,所述转发设备将所述数据转发给第二终端设备,所述第二终端设备的网卡直接将接收的数据存储到所述第二终端设备的存储器中,这样无需两个终端设备的处理器参与数据存取过程,以减少对终端设备的处理器性能的影响。在上述过程中,所述转发设备在将接收的数据转发给所述第二终端设备的同时,也会将所述数据复制并发送给分析服务器,以使所述分析服务器根据所述数据确定网络流量,以便网络管理员根据所述分析服务器确定的网络流量进行后续网络管理。RDMA technology is a technique for quickly moving data from a terminal device's memory directly to the memory of another remote terminal through a network to eliminate the impact on the performance of the processor. The main process of the RDMA is: the first terminal device directly sends the data in its own memory to the forwarding device in the network through its own network card, and the forwarding device forwards the data to the second terminal device, the second terminal device The network card directly stores the received data into the memory of the second terminal device, so that the processors of the two terminal devices are not required to participate in the data access process to reduce the impact on the processor performance of the terminal device. In the above process, the forwarding device, when forwarding the received data to the second terminal device, also copies and sends the data to the analysis server, so that the analysis server determines the network according to the data. Traffic, so that the network administrator performs subsequent network management based on the network traffic determined by the analysis server.
通常情况下,第一终端设备将待传输的数据块划分成多个数据包(packet)进行传输。因此,目前通常采用如下方法确定网络流量:转发设备将接收到的多个数据包均复制并发送给分析服务器;所述分析服务器在转发设备发送的多个数据包中确定归属于同一数据块的所有数据包,并将确定的所有数据包的大小总和作为对应该同一数据块的网络流量。Generally, the first terminal device divides the data block to be transmitted into a plurality of data packets for transmission. Therefore, the following method is generally used to determine network traffic: the forwarding device copies and receives the received multiple data packets to the analysis server; the analysis server determines, among the multiple data packets sent by the forwarding device, the data packets belonging to the same data block. All packets, and the sum of the sizes of all the packets determined as the network traffic corresponding to the same data block.
目前,越来越多的终端设备之间基于RDMA传输数据,进而转发设备复制并发送大量的数据包到分析服务器,从而导致对分析服务器的存储容量的大量占用,并且浪费转发设备和分析服务器之间的传输资源。At present, more and more terminal devices transmit data based on RDMA, and the forwarding device copies and sends a large number of data packets to the analysis server, thereby causing a large occupation of the storage capacity of the analysis server, and wasting the forwarding device and the analysis server. Transmission resources between.
发明内容Summary of the invention
本申请提供一种基于RDMA的网络流量确定方法及装置,用以避免现有技术中分析服务器对终端设备之间的基于RDMA的网络流量进行分析时导致的分析服务器的存储容量被大量占用,转发设备和分析服务器之间的传输资源被浪费的问题。The present invention provides an RDMA-based network traffic determination method and apparatus, which are used to avoid the storage capacity of the analysis server caused by the analysis of the RDMA-based network traffic between the terminal devices in the prior art. The problem of transmission resources between the device and the analysis server is wasted.
第一方面,本申请提供了一种基于RDMA的网络流量确定方法。In a first aspect, the present application provides an RDMA-based network traffic determination method.
转发设备接收第一终端设备的网卡对一个数据块划分得到的多个数据包中的一个,并判断所述数据包是否为所述多个数据包中的目标数据包,若所述数据包为所述多个数据包中的目标数据包,所述转发设备则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;若所述数据包不是所述多个数据包中的目标数据包,所述转发设备不执行复制所述数据包的处理, 将所述数据包转发给所述第二终端设备;其中,所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给所述第二终端设备的数据块,所述数据包中包括所述数据包的长度和所述数据包的序列号。Receiving, by the network device of the first terminal device, one of a plurality of data packets obtained by dividing a data block by the network card of the first terminal device, and determining whether the data packet is a target data packet in the multiple data packets, if the data packet is The target data packet of the plurality of data packets, the forwarding device copies the data packet, sends the copied data packet to the analysis server, and forwards the data packet to the second terminal device; The data packet is not the target data packet of the plurality of data packets, and the forwarding device does not perform the process of copying the data packet, and forwards the data packet to the second terminal device; wherein the data block is And the first terminal device uses the RDMA mode to transmit the data block to the second terminal device by using the forwarding device, where the data packet includes a length of the data packet and a sequence number of the data packet.
通过上述方法,转发设备只需复制并发送针对一个数据块划分的多个数据包中的目标数据包到分析服务器,所述转发设备对所述多个数据包中除目标数据包以外的数据包不执行复制并发送给分析服务器的处理,以使所述分析服务器根据目标数据包确定对应该数据块的网络流量,这样可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。Through the above method, the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for one data block to the analysis server, and the forwarding device pairs the data packets other than the target data packet among the plurality of data packets. The process of copying and sending to the analysis server is not performed, so that the analysis server determines the network traffic corresponding to the data block according to the target data packet, thereby reducing the occupation of the storage capacity of the analysis server, and saving the forwarding device and the analysis server. Transfer resources between.
在一个可能的设计中,所述数据包的长度通过所述数据包中的载荷(payload)字段体现,所述数据包的序列号通过所述数据包中的包序列号(packet sequence number,PSN)字段体现。In one possible design, the length of the data packet is represented by a payload field in the data packet, and the serial number of the data packet passes through a packet sequence number (PSN) in the data packet. The field is reflected.
在一个可能的设计中,所述转发设备可以但不限于为交换机或者路由器等。In one possible design, the forwarding device may be, but is not limited to, a switch or a router or the like.
在一个可能的设计中,所述目标数据包可以为所述多个数据包中的尾包,在这种场景下,所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,具体方法可以为:所述转发设备识别所述数据包中的操作码(opcode)的值,若所述opcode的值为尾包对应的opcode的值,则所述转发设备确定所述数据包为尾包;若所述opcode的值不为尾包对应的opcode的值,则所述转发设备确定所述数据包不是尾包。In a possible design, the target data packet may be a tail packet of the plurality of data packets. In this scenario, the forwarding device determines whether the data packet is in the multiple data packets. The target data packet may be: the forwarding device identifies a value of an opcode in the data packet, and if the value of the opcode is a value of an opcode corresponding to the tail packet, the forwarding device determines The data packet is a tail packet; if the value of the opcode is not the value of the opcode corresponding to the tail packet, the forwarding device determines that the data packet is not a tail packet.
通过上述方法,所述转发设备可以准确地识别出所述多个数据包中的尾包,以使所述转发设备复制识别出的尾包并发送给所述分析服务器,进而使所述分析服务器通过所述尾包确定对应所述数据块的网络流量。Through the above method, the forwarding device can accurately identify the tail packets in the plurality of data packets, so that the forwarding device copies the identified tail packets and sends the tail packets to the analysis server, thereby enabling the analysis server. The network traffic corresponding to the data block is determined by the tail packet.
在一个可能的设计中,所述目标数据包可以为所述多个数据包中的首包或尾包,在这种场景下,所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,具体方法可以为:所述转发设备识别所述数据包中的opcode的值,若所述opcode的值为首包对应的opcode的值,则所述转发设备确定所述数据包为首包;若所述opcode的值为尾包对应的opcode的值,则所述转发设备确定所述数据包为尾包。In a possible design, the target data packet may be a first packet or a tail packet of the multiple data packets. In this scenario, the forwarding device determines whether the data packet is the multiple data. The target data packet in the packet may be: the forwarding device identifies the value of the opcode in the data packet, and if the value of the opcode is the value of the opcode corresponding to the first packet, the forwarding device determines the data. The packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet, the forwarding device determines that the data packet is a tail packet.
通过上述方法,所述转发设备可以准确地识别出所述多个数据包中的首包或尾包,以使所述转发设备复制识别出的首包或尾包并发送给所述分析服务器,进而使所述分析服务器后续通过所述首包和尾包确定对应所述数据块的网络流量。The forwarding device can accurately identify the first packet or the tail packet of the plurality of data packets, so that the forwarding device copies the identified first packet or the tail packet and sends the identifier to the analysis server. And causing the analysis server to subsequently determine network traffic corresponding to the data block by using the first packet and the tail packet.
在一个可能的设计中,所述转发设备中配置访问控制列表(access control list,ACL),所述ACL中存储opcode的值与首包的对应关系,以及opcode的值与尾包的对应关系。In a possible design, the forwarding device is configured with an access control list (ACL), where the ACL stores the correspondence between the value of the opcode and the first packet, and the correspondence between the value of the opcode and the tail packet.
通过上述方法,所述转发设备可以通过查询所述ACL中的opcode的值与首包的对应关系,以及opcode的值与尾包的对应关系,判断接收到的数据包是否为首包或尾包。Through the foregoing method, the forwarding device may determine whether the received data packet is the first packet or the tail packet by querying the correspondence between the value of the opcode in the ACL and the first packet, and the correspondence between the value of the opcode and the tail packet.
在一个可能的设计中,RDMA方式可以分为发送(send)、写(write)和读(read)三种,进而所述转发设备可以判断所述数据包为发送首包(send_first)或者发送尾包(send_last);所述转发设备也可以判断所述数据包为写首包(write_first)或者写尾包(write_last);所述转发设备还可以判断所述数据包为读首包(read_first)或者读尾包(read_last)。相应地,所述分析服务器可以统计出被发送的数据块,被写入的数据块或被读出的数据块对应的网络流量。In a possible design, the RDMA mode can be divided into three types: send, write, and read, and the forwarding device can determine that the packet is the first packet (send_first) or the tail. a packet (send_last); the forwarding device may also determine that the data packet is a write first packet (write_first) or a write tail packet (write_last); the forwarding device may further determine that the data packet is a read first packet (read_first) or Read the tail package (read_last). Correspondingly, the analysis server can count the transmitted data block, the written data block or the network traffic corresponding to the read data block.
第二方面,本申请还提供了另一种基于RDMA的网络流量确定方法。In a second aspect, the present application further provides another method for determining network traffic based on RDMA.
分析服务器接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包,所述尾包中包括所述尾包的长度和所述尾包的序列号;然后,所述分析服务器根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量;其中,所述数据块为第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块。The analyzing server receives a tail packet in a plurality of data packets obtained by dividing the data packet by the forwarding device, where the tail packet includes a length of the tail packet and a sequence number of the tail packet; and then the analyzing Determining, by the server, the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet; wherein the data block is transmitted to the second terminal device by using the RDMA mode by using the forwarding device The data block of the terminal device.
通过上述方法,分析服务器只需接收转发设备发来的每个数据块划分得到的多个数据包中的尾包,可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。Through the above method, the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save the forwarding device and the analysis server. Transmission resources between.
在一个可能的设计中,所述分析服务器还可以接收所述转发设备发来的针对所述数据块划分得到的所述多个数据包中的首包;其中,所述首包中包括所述首包的长度和所述首包的序列号。在这种场景下,所述分析服务器根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量,具体可以包括以下步骤:所述分析服务器根据所述尾包的序列号和所述首包的序列号,确定所述首包和所述尾包之间的数据包的个数后,所述分析服务器根据所述首包的长度、所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量。In a possible design, the analysis server may further receive a first packet of the plurality of data packets obtained by the forwarding device for the data block partitioning; wherein the first packet includes the The length of the first packet and the serial number of the first packet. In this scenario, the analyzing server determines the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, and specifically includes the following steps: the analyzing server according to the tail a sequence number of the packet and a sequence number of the first packet, after determining the number of data packets between the first packet and the tail packet, the analysis server is configured according to the length of the first packet, the first packet, and The number of data packets between the tail packets and the length of the tail packets determine the network traffic corresponding to the data blocks.
通过上述方法,所述分析服务器可以根据所述首包和所述尾包确定对应所述数据块的网络流量,并且在此过程中,转发设备只需复制并发送针对数据块划分的多个数据包中的首包和尾包到分析服务器,对多个数据包中除首包和尾包以外的数据包不执行复制并发送给分析服务器的处理,这样可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。Through the above method, the analysis server may determine network traffic corresponding to the data block according to the first packet and the tail packet, and in the process, the forwarding device only needs to copy and send multiple data divided for the data block. The first packet and the tail packet in the packet are sent to the analysis server, and the data packets other than the first packet and the tail packet of the plurality of data packets are not copied and sent to the analysis server, thereby reducing the occupation of the storage capacity of the analysis server. And can save transmission resources between the forwarding device and the analysis server.
在一个可能的设计中,所述分析服务器用所述尾包的序列号减去所述首包的序列号后再减去1,可以得到确定的所述首包和所述尾包之间的数据包的个数。In a possible design, the analysis server subtracts the serial number of the first packet from the serial number of the tail packet and then subtracts 1 to obtain a determined between the first packet and the tail packet. The number of packets.
在一个可能的设计中,所述分析服务器根据所述首包的长度、确定的所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量,可以采用以下公式:In a possible design, the analysis server determines, according to the length of the first packet, the determined number of data packets between the first packet and the tail packet, and the length of the tail packet, The network traffic of the data block can be based on the following formula:
L=Len2+(N+1)*Len1L=Len2+(N+1)*Len1
其中,L为对应所述数据块的网络流量,Len1为所述首包的长度,Len2为所述尾包的长度,N为所述首包和所述尾包之间的数据包的个数。Where L is the network traffic corresponding to the data block, Len1 is the length of the first packet, Len2 is the length of the tail packet, and N is the number of data packets between the first packet and the tail packet. .
在一个可能的设计中,所述分析服务器接收到所述多个数据包中的首包后,识别所述首包的五元组和QP并记录;所述分析服务器根据所述记录的五元组和QP,确定接收到的与所述记录的五元组和QP相同的尾包,并将所述尾包作为所述数据块的所述多个数据包中的尾包;其中,所述首包的五元组和QP用于指示所述多个数据包所属的所述数据块的五元组和QP。In a possible design, after receiving the first packet of the plurality of data packets, the analysis server identifies and records the quintuple and the QP of the first packet; the analysis server is based on the recorded five-element a group and a QP, determining the received tail packet that is the same as the recorded five-tuple and QP, and using the tail packet as a tail packet in the plurality of data packets of the data block; The quintuple and QP of the first packet are used to indicate the quintuple and QP of the data block to which the plurality of data packets belong.
通过上述方法,所述分析服务器可以准确地识别出所述数据块的首包和尾包,以使后续所述分析服务器根据所述首包和所述尾包确定对应所述数据块的网络流量。Through the above method, the analysis server can accurately identify the first packet and the tail packet of the data block, so that the subsequent analysis server determines the network traffic corresponding to the data block according to the first packet and the tail packet. .
在一个可能的设计中,所述分析服务器根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量,具体可以包括以下步骤:In a possible design, the analyzing server determines the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, and specifically includes the following steps:
所述分析服务器识别所述尾包中的五元组和队列对QP,并根据保存的五元组和QP与最大传输单元MTU的值的对应关系,确定所述尾包的五元组和QP对应的 MTU的值;然后,所述分析服务器确定设定的所述多个数据包的起始序列号,并根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数;最后,所述分析服务器根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量。The analysis server identifies a quintuple and a queue pair QP in the tail package, and determines a quintuple and a QP of the tail package according to a correspondence between the saved quintuple and the value of the QP and the maximum transmission unit MTU. a value of the corresponding MTU; then, the analysis server determines a starting sequence number of the set of the plurality of data packets, and according to the sequence number of the tail package and the set start of the plurality of data packets a sequence number, the number of data packets before the tail packet is determined; finally, the analysis server determines, according to the number of data packets before the tail packet, the quintuple of the tail packet, and the value of the MTU corresponding to the QP And the length of the tail packet determines a network traffic corresponding to the data block.
通过上述方法,分析服务器只需接收转发设备发来的每个数据块划分得到的多个数据包中的尾包,可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。Through the above method, the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save the forwarding device and the analysis server. Transmission resources between.
在一个可能的设计中,所述分析服务器确定设定的所述多个数据包的起始序列号的方法可以为:In a possible design, the analyzing server determines a method for setting a starting sequence number of the plurality of data packets:
当所述第一终端设备将设定的多个数据包的起始序列号携带在发送的数据包中时,所述分析服务器通过所述转发设备发来的数据包获取所述起始序列号;When the first terminal device carries the set start sequence number of the plurality of data packets in the sent data packet, the analysis server acquires the start sequence number by using the data packet sent by the forwarding device ;
或者,所述分析服务器获取预存的所述第一终端设备针对一个数据块划分得到多个数据包时设定的起始序列号。Alternatively, the analysis server acquires a pre-stored starting sequence number set when the first terminal device divides a plurality of data packets for one data block.
通过上述方法,所述分析服务器可以准确地确定设定的多个数据包的起始序列号,以使所述分析服务器后续确定所述尾包之前的数据包的个数。Through the above method, the analysis server can accurately determine the starting sequence number of the set plurality of data packets, so that the analysis server subsequently determines the number of data packets before the tail package.
在一个可能的设计中,所述分析服务器用所述尾包的序列号减去设定的所述起始序列号,得到所述尾包之前的数据包的个数。In a possible design, the analysis server subtracts the set starting sequence number from the serial number of the tail package to obtain the number of data packets before the tail package.
在一个可能的设计中,所述分析服务器根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量时,可以采用以下公式:In a possible design, the analysis server determines the corresponding location according to the number of data packets before the tail packet, the quintuple of the tail packet, the value of the MTU corresponding to the QP, and the length of the tail packet. When describing the network traffic of a data block, the following formula can be used:
T=Len+K*MTUT=Len+K*MTU
其中,T为对应所述数据块的网络流量,MTU为所述尾包的五元组和QP对应的MTU的值,Len为所述尾包的长度,K为所述尾包之前的数据包的个数。Wherein, T is the network traffic corresponding to the data block, the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP, Len is the length of the tail packet, and K is the data packet before the tail packet. The number.
第三方面,本申请实施例还提供了一种转发设备,该转发设备具有实现上述方法实例中转发设备行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a third aspect, the embodiment of the present application further provides a forwarding device, where the forwarding device has a function of implementing forwarding device behavior in the foregoing method instance. The functions may be implemented by hardware or by corresponding software implemented by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
在一种可能的设计中,所述转发设备的结构中包括通信接口、处理器和存储器,所述通信接口用于接收和发送数据,所述处理器被配置为支持所述转发设备执行上述第一方面中的方法中相应的功能。所述存储器与所述处理器耦合,其保存所述转发设备必要的程序指令和数据。In a possible design, the structure of the forwarding device includes a communication interface, a processor, and a memory, the communication interface is configured to receive and send data, and the processor is configured to support the forwarding device to perform the foregoing The corresponding function in the method in one aspect. The memory is coupled to the processor, which stores program instructions and data necessary for the forwarding device.
第四方面,本申请实施例还提供了一种分析服务器,该分析服务器具有实现上述方法实例中分析服务器行为的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。In a fourth aspect, an embodiment of the present application further provides an analysis server, where the analysis server has a function of analyzing the behavior of the server in the foregoing method instance. The functions may be implemented by hardware or by corresponding software implemented by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
在一种可能的设计中,所述分析服务器的结构中包括通信接口、处理器和存储器,所述通信接口用于接收和发送数据,所述处理器被配置为支持所述分析服务器执行上述第二方面中的方法中相应的功能。所述存储器与所述处理器耦合,其保存所述分析服务器必要的程序指令和数据。In a possible design, the configuration of the analysis server includes a communication interface, a processor, and a memory, the communication interface is configured to receive and send data, and the processor is configured to support the analysis server to perform the foregoing The corresponding function in the method in the two aspects. The memory is coupled to the processor, which stores program instructions and data necessary for the analysis server.
第五方面,本申请实施例还提供了一种网络流量确定系统,该网络流量确定系统中 包括多个终端设备、多个转发设备和分析服务器,所述多个转发设备中的任一个转发设备为上述第三方面的转发设备,所述分析服务器为上述第四方面的分析服务器。In a fifth aspect, the embodiment of the present application further provides a network traffic determining system, where the network traffic determining system includes multiple terminal devices, multiple forwarding devices, and an analysis server, and any one of the multiple forwarding devices For the forwarding device of the above third aspect, the analysis server is the analysis server of the fourth aspect described above.
第六方面,本申请实施例还提供了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令在被所述计算机调用时用于使所述计算机执行上述任一种方法。In a sixth aspect, the embodiment of the present application further provides a computer storage medium, where the computer storage medium stores computer executable instructions, where the computer executable instructions are used to cause the computer to execute when called by the computer. Any of the above methods.
第七方面,本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一种方法。In a seventh aspect, the embodiment of the present application further provides a computer program product comprising instructions, when executed on a computer, causing the computer to perform any of the above methods.
本申请实施例的技术方案中,转发设备接收第一终端设备的网卡针对一个数据块划分得到的多个数据包中的一个,判断所述数据包是否为所述多个数据包中的目标数据包,若是,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;否则所述转发设备不执行复制所述数据包的处理,仅将所述数据包转发给所述第二终端设备;其中,所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给所述第二终端设备的数据块。在该方法中,转发设备只需复制并发送针对数据块划分的多个数据包中的目标数据包到分析服务器,对多个数据包中除目标数据包以外的数据包不执行复制并发送给分析服务器的处理,以使所述分析服务器根据目标数据包确定对应该数据块的网络流量,这样可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。In the technical solution of the embodiment of the present application, the forwarding device receives one of a plurality of data packets obtained by dividing the network card of the first terminal device for one data block, and determines whether the data packet is target data in the multiple data packets. a packet, if yes, copying the data packet, transmitting the copied data packet to an analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform processing for copying the data packet, Forwarding the data packet to the second terminal device only; wherein the data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device. In the method, the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the data packet. The processing of the server is analyzed to enable the analysis server to determine network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
附图说明DRAWINGS
图1a为本申请提供的数据包的示意图;Figure 1a is a schematic diagram of a data packet provided by the present application;
图1为本申请提供的一种网络流量确定系统的架构示意图;1 is a schematic structural diagram of a network traffic determining system provided by the present application;
图2为本申请提供的一种基于RDMA的网络流量确定方法的流程示意图;2 is a schematic flowchart of a RDMA-based network traffic determining method provided by the present application;
图3为本申请提供的一种转发设备的结构示意图;3 is a schematic structural diagram of a forwarding device provided by the present application;
图4为本申请提供的一种分析服务器的结构示意图;4 is a schematic structural diagram of an analysis server provided by the present application;
图5为本申请提供的一种转发设备的结构图;FIG. 5 is a structural diagram of a forwarding device provided by the present application;
图6为本申请提供的一种分析服务器的结构图。FIG. 6 is a structural diagram of an analysis server provided by the present application.
具体实施方式Detailed ways
下面将结合附图对本申请作进一步地详细描述。The present application will be further described in detail below with reference to the accompanying drawings.
本申请实施例提供一种基于RDMA的网络流量确定方法及装置,用以避免现有技术中分析服务器对终端设备之间的基于RDMA的网络流量进行分析时导致的分析服务器的存储容量被大量占用,转发设备和分析服务器之间的传输资源被浪费的问题。其中,本申请所述方法和装置基于同一发明构思,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。The embodiment of the present application provides a method and an apparatus for determining network traffic based on RDMA, so as to avoid the storage capacity of the analysis server caused by the analysis of the RDMA-based network traffic between the terminal devices by the analysis server in the prior art. The problem that the transmission resources between the forwarding device and the analysis server are wasted. The method and the device of the present application are based on the same inventive concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。Hereinafter, some of the terms in the present application will be explained to be understood by those skilled in the art.
1)、转发设备,为转发数据的设备,例如,交换机、路由器等。1), a forwarding device, a device that forwards data, such as a switch, a router, and the like.
2)、第一终端设备和第二终端设备,为采用RDMA方式传输数据的设备,例如,可以为具有无线连接功能的手持式设备、车载设备、可穿戴设备、计算设备、移动台 (mobile station,MS)或连接到无线调制解调器的其他处理设备等,以及经接入网与一个或多个核心网进行通信的移动终端。2) The first terminal device and the second terminal device are devices that use RDMA to transmit data, for example, a handheld device with a wireless connection function, an in-vehicle device, a wearable device, a computing device, and a mobile station (mobile station) , MS) or other processing device or the like connected to the wireless modem, and a mobile terminal that communicates with one or more core networks via the access network.
3)、分析服务器,可以为用于数据分析的大数据分析平台或主机,用于根据一个数据块的尾包,确定对应所述数据块的网络流量。3) The analysis server may be a big data analysis platform or a host for data analysis, and is configured to determine network traffic corresponding to the data block according to a tail packet of one data block.
4)、第一终端设备的网卡和第二终端设备的网卡,为所述第一终端设备和所述第二终端设备之间采用RDMA方式的通信时,数据发送方和数据接收方的通信执行主体。具体的,两个网卡之间通过自身的队列对(queue pair,QP)进行通信,其中每个网卡的QP分为接收QP和发送QP,分别用于数据接收和发送。4), the network card of the first terminal device and the network card of the second terminal device, when the RDMA communication is used between the first terminal device and the second terminal device, the communication between the data sender and the data receiver is performed. main body. Specifically, the two network cards communicate with each other through a queue pair (QP). The QP of each network card is divided into a receiving QP and a sending QP, which are used for data receiving and sending, respectively.
5)、数据包,为终端设备将待传输的数据块划分得到的,可以分为首包、中间数据包和尾包。图1a为数据包的示意图,其中,所述数据包中包含的载荷(payload)字段表示所述数据包的长度;数据包的基础传输头(Base Transport Header,BTH)中的操作码(opcode)字段标识数据包的类型(即首包、尾包或者中间数据包),QP字段标识需要接收所述数据包的终端设备的网卡的QP,PSN标识所述数据包的序列号。数据包中的其它字段的具体含义,由于在本申请中未具体涉及,因此不再赘述。5) The data packet is obtained by dividing the data block to be transmitted by the terminal device, and can be divided into a first packet, an intermediate data packet, and a tail packet. 1a is a schematic diagram of a data packet, wherein a payload field included in the data packet indicates a length of the data packet; and an opcode in a Base Transport Header (BTH) of the data packet. The field identifies the type of the data packet (ie, the first packet, the tail packet, or the intermediate data packet), and the QP field identifies the QP of the network card of the terminal device that needs to receive the data packet, and the PSN identifies the sequence number of the data packet. The specific meanings of other fields in the data packet are not specifically mentioned in the present application, and therefore will not be described again.
其中,众所周知RDMA方式分为send、write和read三种,所以所述opcode具体可以标识所述数据包是send方式下的首包、中间数据包或者尾包,还是write方式下的首包、中间数据包或者尾包,还是read方式下的首包、中间数据包或者尾包。It is known that the RDMA mode is divided into three types: send, write, and read. Therefore, the opcode can specifically identify whether the data packet is the first packet, the intermediate data packet, or the tail packet in the send mode, or the first packet and the middle in the write mode. The data packet or the tail packet is the first packet, the intermediate data packet or the tail packet in the read mode.
6)、多个,是指两个或两个以上。6), multiple, means two or more.
7)、在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。7) In the description of the present application, the terms "first", "second" and the like are used to distinguish the purpose of the description, and are not to be construed as indicating or implying relative importance, nor in the order of indication or suggestion.
为了更加清晰地描述本申请实施例的技术方案,下面结合附图,对本申请实施例提供的基于RDMA的网络流量确定方法及装置进行详细说明。In order to more clearly describe the technical solutions of the embodiments of the present application, the RDMA-based network traffic determining method and apparatus provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
图1示出了本申请实施例提供的基于RDMA的网络流量确定方法适用的一种可能的网络流量确定系统,所述网络流量确定系统包括:多个终端设备、多个转发设备和分析服务器。其中,所述多个终端设备之间通过所述多个转发设备实现RDMA方式的通信。FIG. 1 shows a possible network traffic determining system applicable to the RDMA-based network traffic determining method provided by the embodiment of the present application, where the network traffic determining system includes: multiple terminal devices, multiple forwarding devices, and an analysis server. The RDMA mode communication is implemented by the multiple forwarding devices between the multiple terminal devices.
所述多个终端设备,如图1所示的终端设备A、终端设备B和终端设备C和终端设备D,包括多个采用RDMA方式通信的终端设备对,即多个发送数据的终端设备和多个接收数据的终端设备,其中,任一个发送数据的终端设备(记为第一终端设备)用于将待传输的数据块划分得到多个数据包,并通过自身的网卡将所述多个数据包发送给所述多个转发设备(如图1所示的转发设备A、转发设备B和转发设备C)中的一个转发设备,以使该转发设备将接收到的所述多个数据包转发给接收数据的终端设备(记为第二终端设备);所述第二终端设备接收该转发设备转发的所述多个数据包后,所述接第二终端设备的网卡将接收的所述多个数据包直接存储到自身的存储器。其中,所述多个数据包中的每个数据包中均包括长度和序列号,所述多个数据包包括一个首包、M个中间数据包和一个尾包,M为大于或者等于0的整数;所述首包的长度和所述M个中间数据包的长度相同,均为所述第一终端设备和所述第二终端设备的传输路径中可以传输的最大传输单元(maximum transmission unit,MTU)的值,所述尾包的长度小于或者等于所述首包的长度。The plurality of terminal devices, such as the terminal device A, the terminal device B, the terminal device C, and the terminal device D, as shown in FIG. 1, include a plurality of terminal device pairs that use RDMA communication, that is, a plurality of terminal devices that transmit data and a plurality of terminal devices that receive data, wherein any one of the terminal devices that transmit data (referred to as the first terminal device) is configured to divide the data block to be transmitted into a plurality of data packets, and use the plurality of data packets by the network card Sending a data packet to one of the plurality of forwarding devices (such as forwarding device A, forwarding device B, and forwarding device C shown in FIG. 1), so that the forwarding device will receive the multiple data packets. Forwarding to the terminal device receiving the data (referred to as the second terminal device); after the second terminal device receives the plurality of data packets forwarded by the forwarding device, the network card that is connected to the second terminal device will receive the Multiple packets are stored directly into their own memory. The data packet includes a length and a sequence number in each of the plurality of data packets, where the plurality of data packets includes a first packet, M intermediate data packets, and a tail packet, where M is greater than or equal to 0. An integer; the length of the first packet is the same as the length of the M intermediate data packets, and is a maximum transmission unit (maximum transmission unit, which can be transmitted in the transmission path of the first terminal device and the second terminal device, The value of the MTU), the length of the tail packet is less than or equal to the length of the first packet.
例如,基于图1所示的网络流量确定系统,假设所述终端设备A和所述终端设备B之间通过所述多个转发设备中的任一个转发设备采用RDMA方式传输数据,所述终端设备C和终端设备D之间通过所述多个转发设备中的任一个转发设备采用RDMA方式传输数据,即所述终端设备A和所述终端设备B为一个采用RDMA方式通信的终端设备对,所述终端设备C和所述终端设备D为一个采用RDMA方式通信的终端设备对。以所述终端设备A和所述终端设备B之间通过所述转发设备A采用RDMA方式传输数据为例,对终端设备之间采用RDMA方式的通信的过程详细说明:所述终端设备A将待传输的数据块划分得到多个数据包,通过自身网卡将所述多个数据包发送给所述转发设备A,所述转发设备A再将所述多个数据包转发给所述终端设备B,所述终端设备B的网卡将所述多个数据包直接存储到自身的存储器。这样,所述终端设备A和所述终端设备B之间完成数据传输。For example, based on the network traffic determining system shown in FIG. 1, it is assumed that the terminal device A and the terminal device B transmit data by using any one of the plurality of forwarding devices by using an RDMA method, and the terminal device Between the C and the terminal device D, the forwarding device uses any one of the plurality of forwarding devices to transmit data by using an RDMA method, that is, the terminal device A and the terminal device B are a terminal device pair that communicates by using RDMA mode. The terminal device C and the terminal device D are a pair of terminal devices that communicate by RDMA. Taking the RDMA method for transmitting data between the terminal device A and the terminal device B through the forwarding device A as an example, the process of using the RDMA mode communication between the terminal devices is described in detail: the terminal device A is to be treated The transmitted data block is divided into a plurality of data packets, and the plurality of data packets are sent to the forwarding device A by the network card, and the forwarding device A forwards the plurality of data packets to the terminal device B. The network card of the terminal device B directly stores the plurality of data packets into its own memory. In this way, data transmission is completed between the terminal device A and the terminal device B.
现有技术中,所述多个转发设备中的任一个转发设备,用于在接收到所述多个终端设备中的任一个终端设备的网卡发送的多个数据包后,将所述数据包转发给另一个终端设备的同时,还要将所述多个数据包复制并发送给所述分析服务器,以使所述分析服务器确定所述多个数据包所属的数据块对应的网络流量。In the prior art, any one of the plurality of forwarding devices is configured to: after receiving a plurality of data packets sent by a network card of any one of the plurality of terminal devices, the data packet While forwarding to another terminal device, the plurality of data packets are also copied and sent to the analysis server, so that the analysis server determines network traffic corresponding to the data block to which the plurality of data packets belong.
而在本申请中,为了减少对所述分析服务器的存储容量的占用,以及节省转发设备和分析服务器之间的传输资源,所述多个转发设备可以不复制所有数据包,只复制多个数据包中的目标数据包。具体的,所述多个转发设备中的任一个转发设备对从第一终端设备接收到每个数据包进行如下判断:判断所述数据包是否为多个数据包中的目标数据包,若是,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;否则不执行复制所述数据包的处理,仅将所述数据包转发给第二终端设备。其中,所述目标数据包可以为所述多个数据包中的尾包,或者为所述多个数据包中的首包和尾包。In the present application, in order to reduce the occupation of the storage capacity of the analysis server and save the transmission resources between the forwarding device and the analysis server, the plurality of forwarding devices may not copy all the data packets, but only copy multiple data. The target packet in the package. Specifically, the forwarding device of the plurality of forwarding devices determines, according to each packet received from the first terminal device, whether the data packet is a target data packet in multiple data packets, and if so, Copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the process of copying the data packet is not performed, and only the data packet is forwarded to Second terminal device. The target data packet may be a tail packet in the multiple data packets, or a first packet and a tail packet in the multiple data packets.
所述分析服务器,用于确定任一个终端设备发送的数据块对应的网络流量,并将确定的网络流量显示在显示界面(如图1中的显示界面)上,以使网络管理员根据所述分析服务器确定的网络流量进行后续网络管理。在本申请中,所述分析服务器确定网络流量具体包括:接收转发设备发送的针对一个数据块划分得到的多个数据包中的目标数据包,并根据所述目标数据包中包括的长度和序列号,确定对应所述数据块的网络流量。The analysis server is configured to determine network traffic corresponding to the data block sent by any one of the terminal devices, and display the determined network traffic on a display interface (such as the display interface in FIG. 1), so that the network administrator according to the Analyze the network traffic determined by the server for subsequent network management. In the present application, the determining, by the analysis server, the network traffic specifically includes: receiving, by the forwarding device, a target data packet in a plurality of data packets obtained by dividing a data block, and according to the length and sequence included in the target data packet. Number, determining the network traffic corresponding to the data block.
通过本申请提供的上述方法,转发设备只将一个数据块划分成的多个数据包中的目标数据包复制并发送给所述分析服务器,而对除目标数据包以外的其他数据包不执行复制并发送给所述分析服务器的处理,从而可以减少对所述分析服务器的存储容量的占用,同时还可以节省所述转发设备和所述分析服务器之间的传输资源。With the above method provided by the present application, the forwarding device copies and transmits the target data packet of the plurality of data packets into one data block to the analysis server, and does not perform replication on other data packets except the target data packet. And sending the processing to the analysis server, so that the occupation of the storage capacity of the analysis server can be reduced, and at the same time, the transmission resource between the forwarding device and the analysis server can be saved.
本申请实施例提供的一种基于RDMA的网络流量确定方法,适用于如图1所示的网络流量确定系统。参阅图2所示,该方法的具体流程包括:An RDMA-based network traffic determining method provided by an embodiment of the present application is applicable to the network traffic determining system shown in FIG. 1. Referring to Figure 2, the specific process of the method includes:
步骤201、转发设备接收第一终端设备发送的数据包,所述数据包为所述第一终端设备的网卡对一个数据块划分得到的多个数据包中的一个;所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块。Step 201: The forwarding device receives a data packet sent by the first terminal device, where the data packet is one of a plurality of data packets obtained by dividing a data block by the network card of the first terminal device; The first terminal device transmits the data block to the second terminal device through the forwarding device in an RDMA manner.
通常情况下,终端设备之间采用RDMA方式传输数据时,待传输的数据块会被划分成多个数据包在网络中传输。具体传输时,作为发送方的第一终端设备的网卡 将针对一个数据块划分得到的多个数据包发送给转发设备,以使转发设备将所述多个数据包转发给另一个终端设备,从而完成数据传输。Generally, when RDMA is used to transmit data between terminal devices, the data block to be transmitted is divided into multiple data packets for transmission in the network. During the specific transmission, the network card of the first terminal device as the sender sends a plurality of data packets divided for one data block to the forwarding device, so that the forwarding device forwards the plurality of data packets to another terminal device, thereby Complete the data transfer.
其中,所述多个数据包中的每个数据包中均包括所述数据包的长度和所述数据包的序列号,具体的,所述数据包的长度通过所述数据包中的载荷(payload)字段(如图1a所示的数据包中的载荷字段)体现,所述数据包的序列号通过所述数据包中的PSN字段(如图1a所示的数据包中的BTH中的PSN字段)体现。Wherein each of the plurality of data packets includes a length of the data packet and a sequence number of the data packet, and specifically, a length of the data packet passes a payload in the data packet ( The payload field (as shown in the payload field in the packet shown in Figure 1a) is embodied, the sequence number of the data packet passing through the PSN field in the data packet (such as the PSN in the BTH in the data packet shown in Figure 1a) Field) embodies.
一种可选的实现方式,所述转发设备可以但不限于为交换机或者路由器等。An optional implementation manner, where the forwarding device can be, but is not limited to, a switch or a router.
步骤202、所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,若所述数据包为所述多个数据包中的目标数据包,则复制所述数据包,执行步骤203,若所述数据包不是所述多个数据包中的目标数据包,不执行复制所述数据包的处理,执行步骤204。Step 202: The forwarding device determines whether the data packet is a target data packet in the multiple data packets, and if the data packet is a target data packet in the multiple data packets, copying the data packet Step 203 is executed. If the data packet is not the target data packet in the plurality of data packets, the process of copying the data packet is not performed, and step 204 is performed.
由于所述多个数据包中的每个数据包中还包括操作码(opcode)字段(如图1a所示的数据包中的BTH中的操作码字段),用于表征每个数据包的数据包类型,即每个数据包中的opcode的值表示所述数据包是首包、中间数据包或者尾包。由于所述目标数据包可以为尾包或者首包或尾包,因此,可选的,当所述目标数据包为所述多个数据包中的尾包时,所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,具体方法可以为:所述转发设备识别所述数据包中的操作码opcode的值,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包;若所述opcode的值不为尾包对应的opcode的值,则确定所述数据包不是尾包。当所述目标数据包为所述多个数据包中的首包或尾包时,所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,可以为:所述转发设备识别所述数据包中的操作码opcode的值,若所述opcode的值为首包对应的opcode的值,则确定所述数据包为首包,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包。Since each of the plurality of data packets further includes an opcode field (the opcode field in the BTH in the data packet as shown in FIG. 1a), the data used to represent each data packet The packet type, that is, the value of opcode in each packet indicates that the packet is a first packet, an intermediate packet, or a trailer. Since the target data packet may be a tail packet or a first packet or a tail packet, optionally, when the target data packet is a tail packet in the multiple data packets, the forwarding device determines the data. Whether the packet is the target data packet in the plurality of data packets, the specific method may be: the forwarding device identifies the value of the opcode opcode in the data packet, if the opcode value is an opcode corresponding to the tail packet The value determines that the data packet is a tail packet; if the value of the opcode is not the value of the opcode corresponding to the tail packet, it is determined that the data packet is not a tail packet. When the target data packet is the first packet or the last packet of the multiple data packets, the forwarding device determines whether the data packet is a target data packet in the multiple data packets, and may be: The forwarding device identifies the value of the opcode opcode in the data packet, and if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet, if the opcode value is an opcode corresponding to the tail packet The value of the packet is determined to be a tail packet.
一种可选的实现方式,所述转发设备中配置ACL,所述ACL中存储opcode的值与首包的对应关系,以及opcode的值与尾包的对应关系。这样所述转发设备可以通过查询所述ACL中的opcode的值与首包的对应关系,以及opcode的值与尾包的对应关系,判断接收到的数据包是否为首包或尾包。An ACL is configured in the forwarding device, where the ACL stores the correspondence between the value of the opcode and the first packet, and the corresponding relationship between the value of the opcode and the tail packet. The forwarding device may determine whether the received data packet is the first packet or the tail packet by querying the correspondence between the value of the opcode in the ACL and the first packet, and the correspondence between the value of the opcode and the tail packet.
通过上述方法,所述转发设备可以成功识别到针对一个数据块划分得到的多个数据包中的尾包,或者首包和尾包,进而后续复制所述尾包,或者所述首包和所述尾包后,将复制得到的数据包发送给所述分析服务器,以使所述分析服务器通过所述尾包,或者所述首包和所述尾包确定对应所述数据块的网络流量。Through the foregoing method, the forwarding device can successfully identify a tail packet, or a first packet and a tail packet, of the plurality of data packets divided for one data block, and then copy the tail packet, or the first packet and the After the tail packet is described, the copied data packet is sent to the analysis server, so that the analysis server determines the network traffic corresponding to the data block by using the tail packet, or the first packet and the tail packet.
由于实际中RDMA方式分为send、write和read三种,在每种方式下的首包对应的opcode的值均不同,尾包对应的opcode的值也均不同,因此,可选的,所述转发设备可以通过识别所述数据包中的opcode判断所述数据包具体为哪种RDMA方式下的首包或者尾包。例如,所述转发设备可以判断所述数据包为发送首包(send_first)或者发送尾包(send_last);可以判断所述数据包为写首包(write_first)或者写尾包(write_last);还可以判断所述数据包为读首包(read_first)或者读尾包(read_last)。Since the actual RDMA mode is divided into three types: send, write, and read, the value of the opcode corresponding to the first packet in each mode is different, and the value of the opcode corresponding to the tail packet is also different. Therefore, optionally, the The forwarding device may determine, by using the opcode in the data packet, which type of RDMA mode the first packet or the tail packet is. For example, the forwarding device may determine that the data packet is a send first packet (send_first) or a send tail packet (send_last); the data packet may be determined to be a write first packet (write_first) or a write tail packet (write_last); The data packet is judged to be a read first packet (read_first) or a read end packet (read_last).
步骤203、所述转发设备将复制得到的数据包发送给分析服务器,并将所述数据包转发给所述第二终端设备。Step 203: The forwarding device sends the copied data packet to an analysis server, and forwards the data packet to the second terminal device.
其中,如图2所示的步骤203a,所述转发设备将所述数据包转发给所述第二终端设备,以使所述第二终端设备的网卡将所述数据包存储到所述第二终端设备的存储器,从而实现了所述第一终端设备和所述第二终端设备采用RDMA方式的数据传输。Wherein, in step 203a shown in FIG. 2, the forwarding device forwards the data packet to the second terminal device, so that the network card of the second terminal device stores the data packet to the second The memory of the terminal device, thereby realizing the data transmission of the first terminal device and the second terminal device by using RDMA mode.
同时,如图2所示的步骤203b,所述转发设备将复制得到的数据包(目标数据包)发送给所述分析服务器,以使所述分析服务器后续只存储针对一个数据块划分得到的多个数据包中的目标数据包,这样所述分析服务器的存储容量的占用可以较少。At the same time, as shown in step 203b of FIG. 2, the forwarding device sends the copied data packet (target data packet) to the analysis server, so that the analysis server subsequently stores only the data partitioned for one data block. The target data packets in the data packets, so that the storage capacity of the analysis server can be less.
步骤204、所述转发设备将所述数据包转发给所述第二终端设备。Step 204: The forwarding device forwards the data packet to the second terminal device.
在步骤204中,所述转发设备向所述第二终端设备发送的所述数据包,是所述第一终端设备的网卡针对一个数据块划分得到的多个数据包中的除目标数据包以外的数据包。这样,由于所述转发设备对所述多个数据包中的除目标数据包以外的数据包不执行复制处理,只将所述多个数据包中的除目标数据包以外的数据包发送给所述第二终端设备,避免了将所述多个数据包中的除目标数据包以外的数据包复制并发送到所述分析服务器,因此可以避免所述分析服务器存储所述多个数据包中的除目标数据包以外的数据包,从而可以减少对所述分析服务器的存储容量的占用,并且可以节省所述转发设备和所述分析服务器之间的传输资源。In step 204, the data packet sent by the forwarding device to the second terminal device is other than the target data packet in the plurality of data packets divided by the network card of the first terminal device for one data block. Packet. In this way, since the forwarding device does not perform the copy processing on the data packets other than the target data packet among the plurality of data packets, only the data packets other than the target data packet of the plurality of data packets are sent to the The second terminal device avoids copying and transmitting data packets other than the target data packet in the plurality of data packets to the analysis server, so that the analysis server can be prevented from storing the plurality of data packets. A data packet other than the target data packet, thereby reducing the occupation of the storage capacity of the analysis server, and saving transmission resources between the forwarding device and the analysis server.
步骤205、所述分析服务器根据所述目标数据包的长度和所述目标数据包的序列号,确定对应所述数据块的网络流量。Step 205: The analysis server determines network traffic corresponding to the data block according to the length of the target data packet and the sequence number of the target data packet.
可选的,所述分析服务器执行步骤205时,可以采用以下两种方法:Optionally, when the analyzing server performs step 205, the following two methods may be used:
其中,第一种方法中,该目标数据包包括所述多个数据包的首包和尾包,所述方法可以分为以下三个步骤:In the first method, the target data packet includes a first packet and a tail packet of the multiple data packets, and the method may be divided into the following three steps:
A1、所述分析服务器接收所述转发设备发来的针对所述数据块划分得到的多个数据包中的首包;其中,所述首包中包括所述首包的长度和所述首包的序列号。A1, the analysis server receives a first packet of the plurality of data packets obtained by the forwarding device for the data block partitioning, where the first packet includes a length of the first packet and the first packet Serial number.
A2、所述分析服务器根据所述尾包的序列号和所述首包的序列号,确定所述首包和所述尾包之间的数据包的个数。A2. The analysis server determines the number of data packets between the first packet and the tail packet according to the sequence number of the tail packet and the sequence number of the first packet.
A3、所述分析服务器根据所述首包的长度、所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量。A3. The analysis server determines network traffic corresponding to the data block according to the length of the first packet, the number of data packets between the first packet and the tail packet, and the length of the tail packet.
第二种方法中,该目标数据包包括所述多个数据包的尾包,所述方法可以分为以下三个步骤:In the second method, the target data packet includes a tail packet of the plurality of data packets, and the method may be divided into the following three steps:
B1、所述分析服务器识别所述尾包中的五元组和QP,并根据保存的五元组和QP与MTU的值的对应关系,确定所述尾包的五元组和QP对应的MTU的值。B1, the analysis server identifies the quintuple and the QP in the tail package, and determines the quintuple of the tail package and the MTU corresponding to the QP according to the saved quintuple and the correspondence between the QP and the MTU value. Value.
其中,所述五元组包括源因特网协议(Internet Protocol,IP)地址、目的IP地址、源端口、目的端口以及传输协议;所述QP为每个数据包中包括的QP字段(如图1a所示的QP字段),用于标识需要接收所述数据包的终端设备的网卡的QP。The quintual includes a source Internet Protocol (IP) address, a destination IP address, a source port, a destination port, and a transmission protocol; the QP is a QP field included in each data packet (as shown in FIG. 1a). The illustrated QP field) is used to identify the QP of the network card of the terminal device that needs to receive the data packet.
B2、所述分析服务器确定设定的所述多个数据包的起始序列号,并根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数。B2. The analysis server determines a starting sequence number of the set of the plurality of data packets, and determines, according to the sequence number of the tail package and the set start sequence number of the multiple data packets. The number of packets before the tail packet.
B3、所述分析服务器根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量。B3. The analysis server determines, according to the number of data packets before the tail packet, the quintuple of the tail packet, the value of the MTU corresponding to the QP, and the length of the tail packet, a network corresponding to the data block. flow.
在一种可选的实现方式中,由于所述多个数据包在发送时是从首包到尾包的顺 序发送,所述转发设备会先识别到所述多个数据包中的首包,然后将所述首包复制并发送给所述分析服务器,因此,在上述第一种方法中,为了确定所述数据块的首包和尾包,所述分析服务器还执行以下操作:In an optional implementation manner, the forwarding device first identifies the first packet of the multiple data packets because the multiple data packets are sent in the order from the first packet to the tail packet. The first packet is then copied and sent to the analysis server. Therefore, in the first method described above, in order to determine the first packet and the tail packet of the data block, the analysis server further performs the following operations:
所述分析服务器接收到所述多个数据包中的首包后,识别所述首包的五元组和QP并记录;其中,所述首包的五元组和QP用于指示所述多个数据包所属的所述数据块的五元组和QP;After receiving the first packet of the plurality of data packets, the analysis server identifies and records the quintuple and the QP of the first packet; wherein the quintuple and the QP of the first packet are used to indicate the multiple The quintuple and QP of the data block to which the data packet belongs;
所述分析服务器根据所述记录的五元组和QP,确定接收到的与所述记录的五元组和QP相同的尾包,并将所述尾包作为所述数据块的所述多个数据包中的尾包。The analyzing server determines, according to the recorded quintuple and QP, the received tail packet that is the same as the recorded quintuple and QP, and uses the tail packet as the multiple of the data block The tail package in the packet.
通过上述方法,所述分析服务器接收到一个数据块的首包后,通过记录所述数据块的五元组和QP(即记录所述数据块的标识),识别到后续转发设备发来的归属于所述数据块的尾包,这样就准确地确定了所述数据块的首包和尾包,进而可以根据所述数据块中的所述首包和所述尾包确定对应所述数据块的网络流量。After the first packet of the data block is received by the analysis server, the quintuple and the QP of the data block (that is, the identifier of the data block are recorded) are recorded, and the attribution sent by the subsequent forwarding device is identified. In the tail packet of the data block, the first packet and the tail packet of the data block are accurately determined, and the corresponding data block can be determined according to the first packet and the tail packet in the data block. Network traffic.
进一步地,所述分析服务器可以通过上述方法确定多个数据块中的每个数据块分别包括的首包和尾包,进而确定对应所述多个数据块中的每个数据块的网络流量。Further, the analysis server may determine, by using the foregoing method, a first packet and a tail packet respectively included in each of the plurality of data blocks, thereby determining network traffic corresponding to each of the plurality of data blocks.
具体的,在上述第一种方法中,所述分析服务器执行步骤A2时,用所述尾包的序列号减去所述首包的序列号后再减去1,可以得到确定的所述首包和所述尾包之间的数据包的个数。Specifically, in the first method, when the analyzing server performs step A2, subtracting 1 from the serial number of the first packet and subtracting 1 from the serial number of the tail packet, the determined first header may be obtained. The number of packets between the packet and the trailer.
众所周知,所述首包的长度与所述首包和所述尾包之间的数据包的长度相同。因此,具体的,所述分析服务器执行步骤A3时,可以采用以下公式:As is well known, the length of the first packet is the same as the length of the data packet between the first packet and the trailer. Therefore, specifically, when the analysis server performs step A3, the following formula may be adopted:
L=Len2+(N+1)*Len1L=Len2+(N+1)*Len1
其中,L为对应所述数据块的网络流量,Len1为所述首包的长度,Len2为所述尾包的长度,N为所述首包和所述尾包之间的数据包的个数。Where L is the network traffic corresponding to the data block, Len1 is the length of the first packet, Len2 is the length of the tail packet, and N is the number of data packets between the first packet and the tail packet. .
可选的,在第一终端设备的网卡针对一个数据块划分得到的多个数据包的起始序列号(即首包的序列号的值)为设定值时,所述分析服务器可以采用上述第二种方法执行步骤205。Optionally, when the starting sequence number of the plurality of data packets (that is, the value of the sequence number of the first packet) of the data packet divided by the network card of the first terminal device is a set value, the analysis server may adopt the foregoing The second method performs step 205.
可选的,在上述第二种方法的步骤B1中,所述分析服务器保存着五元组和QP与MTU的值的对应关系,所述分析服务器根据该对应关系确定所述尾包的五元组和QP对应的MTU的值,即确定了所述数据块的所述多个数据包中首包和中间数据包的长度。例如,所述分析服务器保存的五元组和QP与MTU的值的对应关系可以如下表1所示:Optionally, in step B1 of the foregoing second method, the analysis server stores a correspondence between a quintuple and a value of a QP and an MTU, and the analysis server determines, according to the correspondence, a five-element of the tail package. The value of the MTU corresponding to the group and the QP, that is, the length of the first packet and the intermediate data packet in the plurality of data packets of the data block are determined. For example, the correspondence between the quintuple and the QP and MTU values saved by the analysis server can be as shown in Table 1 below:
表1 五元组和QP与MTU的值的对应关系Table 1 Correspondence between quintuple and QP and MTU values
Figure PCTCN2018096210-appb-000001
Figure PCTCN2018096210-appb-000001
其中,表1中的源IP地址、源端口、目的IP地址、目的端口、传输协议为五元组;源QP和目的QP分别表示为发送数据的终端设备和接收数据的终端设备的网卡中的QP,具体的,所述分析服务器查找所述尾包的五元组和QP对应的MTU的值时,所述分析服务器确定所述尾包中的QP符合所述表1中的源QP和目的QP中的任一个即可。The source IP address, the source port, the destination IP address, the destination port, and the transmission protocol in Table 1 are five-tuples; the source QP and the destination QP are respectively represented in the network card of the terminal device that transmits data and the terminal device that receives the data. QP. Specifically, when the analysis server searches for the value of the quintuple of the tail package and the MTU corresponding to the QP, the analysis server determines that the QP in the tail package meets the source QP and the purpose in the table 1. Any one of QP can be.
一种可选的实现方式,所述分析服务器要实时更新保存的五元组和QP与MTU的值的对应关系。由于通常情况下,第一终端设备和第二终端设备在进行数据传输之前,第一终端设备要先通过转发设备向第二终端设备发送连接请求报文,然后所述第二终端设备通过所述转发设备返回连接应答报文,所述连接请求报文中包括所述第一终端设备和所述第二终端设备之间可以传输的MTU的值,以及所述第一终端设备的网卡的QP;所述连接应答报文中包括所述第二终端设备的网卡的QP。所述转发设备可以将所述连接请求报文和所述连接应答报文复制并发送给所述分析服务器。因此,所述分析服务器可以根据所述连接请求报文的五元组、所述连接请求报文中包括的MTU的值、QP以及所述连接应答报文的五元组和所述连接应答报文中包括的QP,得到五元组和QP(包括第一终端设备的网卡的QP和第二终端设备的网卡的QP)与MTU的值的对应关系,然后将得到的对应关系存储到所述分析服务器中,即完成了五元组和QP与MTU的值的对应关系的更新。In an optional implementation manner, the analysis server needs to update the saved quintuple and the correspondence between the QP and the MTU values in real time. The first terminal device first sends a connection request message to the second terminal device through the forwarding device, and then the second terminal device passes the foregoing, before the first terminal device and the second terminal device perform the data transmission. The forwarding device returns a connection response message, where the connection request message includes a value of an MTU that can be transmitted between the first terminal device and the second terminal device, and a QP of the network card of the first terminal device; The connection response message includes a QP of the network card of the second terminal device. The forwarding device may copy and send the connection request message and the connection response message to the analysis server. Therefore, the analysis server may be configured according to the quintuple of the connection request message, the value of the MTU included in the connection request message, the QP, and the quintuple of the connection response message and the connection response report. The QP included in the text obtains the correspondence between the quintuple and the QP (including the QP of the network card of the first terminal device and the QP of the network card of the second terminal device) and the value of the MTU, and then stores the obtained correspondence relationship into the In the analysis server, the update of the correspondence between the quintuple and the QP and MTU values is completed.
可选的,在上述步骤B2中,所述分析服务器确定设定的所述多个数据包的起始序列号的方法可以为:Optionally, in the foregoing step B2, the method for the analysis server to determine the starting sequence number of the multiple data packets that are set may be:
当所述第一终端设备将设定的多个数据包的起始序列号携带在发送的数据包中时,所述分析服务器通过所述转发设备发来的数据包获取所述起始序列号;或者When the first terminal device carries the set start sequence number of the plurality of data packets in the sent data packet, the analysis server acquires the start sequence number by using the data packet sent by the forwarding device ;or
所述分析服务器获取预存的所述第一终端设备针对一个数据块划分得到多个数据包时设定的起始序列号。The analysis server acquires a pre-stored starting sequence number set when the first terminal device divides a plurality of data packets for one data block.
进一步地,在上述步骤B2中,所述分析服务器根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数,具体方法为:所述分析服务器用所述尾包的序列号减去设定的所述起始序列号,得到所述尾包之前的数据包的个数。Further, in the above step B2, the analysis server determines the number of data packets before the tail package according to the sequence number of the tail package and the set start sequence number of the plurality of data packets. The specific method is: the analysis server subtracts the set start sequence number by using the serial number of the tail package, and obtains the number of data packets before the tail package.
例如,当所述始序列号为0时,所述分析服务器确定的所述尾包之前的数据包的个数等于所述尾包的序列号;当所述始序列号为1时,所述分析服务器确定的所述尾包之前的数据包的个数等于所述尾包的序列号减去1得到的值。For example, when the start sequence number is 0, the number of data packets before the tail package determined by the analysis server is equal to the sequence number of the tail package; when the start sequence number is 1, the The number of data packets before the tail packet determined by the analysis server is equal to the value obtained by subtracting 1 from the sequence number of the tail package.
具体的,所述分析服务器执行上述步骤B3时,可以采用以下公式:Specifically, when the analysis server performs the above step B3, the following formula may be adopted:
T=Len+K*MTUT=Len+K*MTU
其中,T为对应所述数据块的网络流量,MTU为所述尾包的五元组和QP对应的MTU的值度,Len为所述尾包的长度,K为所述尾包之前的数据包的个数。Wherein, T is the network traffic corresponding to the data block, the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP, Len is the length of the tail packet, and K is the data before the tail packet. The number of packages.
采用本申请实施例提供的基于RDMA的网络流量确定方法,转发设备接收第一终端设备的网卡针对一个数据块划分得到的多个数据包中的一个,判断所述数据包是否为所述多个数据包中的目标数据包,若是,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;否则所述转发设备不执行复制所述数据包的处理,仅将所述数据包转发给所述第二终端设备;其中,所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给所述第二终端设备的数据块。在该方法中,转发设备只需复制并发送针对数据块划分的多个数据包中的目标数据包到分析服务器,对多个数据包中除目标数据包以外的数据包不执行复制并发送给分析服务器的处理,以使所述分析服务器根据目标数据包确定对应该数据块的网络流量,这样可以减少对分析服务器的存储容量的占用,并且 可以节省转发设备和分析服务器之间的传输资源。According to the RDMA-based network traffic determining method provided by the embodiment of the present application, the forwarding device receives one of the plurality of data packets obtained by dividing the network card of the first terminal device for one data block, and determines whether the data packet is the plurality of data packets. a target data packet in the data packet, if yes, copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform the copying device The processing of the data packet, the data packet is forwarded only to the second terminal device; wherein the data block is transmitted to the second terminal device by the forwarding device by using the RDMA mode in the first terminal device. Data block. In the method, the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the data packet. The processing of the server is analyzed to enable the analysis server to determine network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
基于以上实施例,本申请实施例还提供了一种转发设备,该转发设备应用于如图1所示的网络流量确定系统,用于实现如图2所示的基于RDMA的网络流量确定方法中转发设备的功能。参阅图3所示,该转发设备300包括:接收单元301、处理单元302和发送单元303,其中:Based on the foregoing embodiment, the embodiment of the present application further provides a forwarding device, where the forwarding device is applied to the network traffic determining system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determining method as shown in FIG. 2 . The function of the forwarding device. Referring to FIG. 3, the forwarding device 300 includes: a receiving unit 301, a processing unit 302, and a sending unit 303, where:
所述接收单元301,用于接收第一终端设备发送的数据包,所述数据包为所述第一终端设备的网卡对一个数据块划分得到的多个数据包中的一个;所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;The receiving unit 301 is configured to receive a data packet sent by the first terminal device, where the data packet is one of a plurality of data packets obtained by dividing the network card of the first terminal device into one data block; the data block And the data block transmitted by the forwarding device to the second terminal device by using the RDMA mode in the RDMA mode;
所述处理单元302,用于判断所述数据包是否为所述多个数据包中的目标数据包,若所述数据包为所述多个数据包中的目标数据包,则复制所述数据包,控制所述发送单元303将复制得到的数据包发送给分析服务器,并控制所述发送单元303将所述数据包转发给所述第二终端设备;若所述数据包不是所述多个数据包中的目标数据包,不执行复制所述数据包的处理,控制所述发送单元303将所述数据包转发给所述第二终端设备;The processing unit 302 is configured to determine whether the data packet is a target data packet in the multiple data packets, and if the data packet is a target data packet in the multiple data packets, copy the data Packet, controlling the sending unit 303 to send the copied data packet to the analysis server, and controlling the sending unit 303 to forward the data packet to the second terminal device; if the data packet is not the plurality of a target data packet in the data packet, the processing of copying the data packet is not performed, and the sending unit 303 is controlled to forward the data packet to the second terminal device;
其中,所述数据包中包括所述数据包的长度和所述数据包的序列号。The data packet includes a length of the data packet and a sequence number of the data packet.
可选的,所述目标数据包为所述多个数据包中的尾包,所述处理单元302,在判断所述数据包是否为所述多个数据包中的目标数据包时,具体用于:Optionally, the target data packet is a tail packet of the multiple data packets, and the processing unit 302, when determining whether the data packet is a target data packet in the multiple data packets, specifically to:
识别所述数据包中的操作码opcode的值,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包;若所述opcode的值不为尾包对应的opcode的值,则确定所述数据包不是尾包。Identifying the value of the opcode opcode in the data packet, if the value of the opcode is the value of the opcode corresponding to the tail packet, determining that the data packet is a tail packet; if the value of the opcode is not the corresponding one of the tail packet The value of opcode determines that the packet is not a tail packet.
可选的,所述目标数据包为所述多个数据包中的首包或尾包,所述处理单元302,在判断所述数据包是否为所述多个数据包中的目标数据包时,具体用于:Optionally, the target data packet is a first packet or a tail packet of the multiple data packets, and the processing unit 302 is configured to determine whether the data packet is a target data packet in the multiple data packets. Specifically for:
识别所述数据包中的opcode的值,若所述opcode的值为首包对应的opcode的值,则确定所述数据包为首包;若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包。Identifying the value of the opcode in the data packet, if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet, It is determined that the data packet is a tail package.
可选的,所述转发设备300为交换机或者路由器。Optionally, the forwarding device 300 is a switch or a router.
采用本申请实施例提供的转发设备,接收第一终端设备的网卡针对一个数据块划分得到的多个数据包中的一个,判断所述数据包是否为所述多个数据包中的目标数据包,若是,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;否则所述转发设备不执行复制所述数据包的处理,仅将所述数据包转发给所述第二终端设备;其中,所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给所述第二终端设备的数据块。这样,转发设备只需复制并发送针对数据块划分的多个数据包中的目标数据包到分析服务器,对多个数据包中除目标数据包以外的数据包不执行复制并发送给分析服务器的处理,以使所述分析服务器根据目标数据包确定对应该数据块的网络流量,这样可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。The forwarding device provided by the embodiment of the present application receives one of a plurality of data packets obtained by the network card of the first terminal device for one data block, and determines whether the data packet is a target data packet in the multiple data packets. If yes, copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform the process of copying the data packet, only Transmitting the data packet to the second terminal device; wherein the data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device. In this way, the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the analysis server. Processing, so that the analysis server determines network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
基于以上实施例,本申请实施例还提供了一种分析服务器,该分析服务器应用于如图1所示的网络流量确定系统,用于实现如图2所示的基于RDMA的网络流量确定方法中分析服务器的功能。参阅图4所示,该分析服务器400包括:接收单元401和处理单元402,其中:Based on the above embodiment, the embodiment of the present application further provides an analysis server, where the analysis server is applied to the network traffic determination system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determination method as shown in FIG. 2 . Analyze the capabilities of the server. Referring to FIG. 4, the analysis server 400 includes a receiving unit 401 and a processing unit 402, wherein:
所述接收单元401,用于接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包,其中,所述数据块为第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;所述尾包中包括所述尾包的长度和所述尾包的序列号;The receiving unit 401 is configured to receive a tail packet of the plurality of data packets obtained by the forwarding device, where the data block is transmitted by the forwarding device by using the RDMA mode by the first terminal device. a data block for the second terminal device; the tail packet includes a length of the tail packet and a sequence number of the tail packet;
所述处理单元402,用于根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量。The processing unit 402 is configured to determine network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet.
可选的,所述接收单元401,还用于:Optionally, the receiving unit 401 is further configured to:
接收所述转发设备发来的针对所述数据块划分得到的多个数据包中的首包;其中,所述首包中包括所述首包的长度和所述首包的序列号;Receiving, by the forwarding device, a first packet of the plurality of data packets obtained by dividing the data block, where the first packet includes a length of the first packet and a sequence number of the first packet;
所述处理单元402,在根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量时,具体用于:The processing unit 402 is configured to: when determining the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, specifically:
根据所述尾包的序列号和所述首包的序列号,确定所述首包和所述尾包之间的数据包的个数;Determining, according to the sequence number of the tail packet and the sequence number of the first packet, the number of data packets between the first packet and the tail packet;
根据所述首包的长度、所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the length of the first packet, the number of data packets between the first packet and the tail packet, and the length of the tail packet.
可选的,所述处理单元402确定对应所述数据块的网络流量时,采用以下公式:Optionally, when the processing unit 402 determines network traffic corresponding to the data block, the following formula is adopted:
L=Len2+(N+1)*Len1L=Len2+(N+1)*Len1
其中,L为对应所述数据块的网络流量,Len1为所述首包的长度,Len2为所述尾包的长度,N为所述首包和所述尾包之间的数据包的个数。Where L is the network traffic corresponding to the data block, Len1 is the length of the first packet, Len2 is the length of the tail packet, and N is the number of data packets between the first packet and the tail packet. .
可选的,所述处理单元402,在根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量时,具体用于:Optionally, the processing unit 402 is configured to: when determining network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, specifically:
识别所述尾包中的五元组和队列对QP,并根据保存的五元组和QP与最大传输单元MTU的值的对应关系,确定所述尾包的五元组和QP对应的MTU的值;Identifying the quintuple and the queue pair QP in the tail packet, and determining the quintuple of the tail package and the MTU corresponding to the QP according to the saved quintuple and the correspondence between the QP and the value of the maximum transmission unit MTU value;
确定设定的所述多个数据包的起始序列号,并根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数;Determining a set start sequence number of the plurality of data packets, and determining a data packet before the tail package according to the sequence number of the tail package and the set start sequence number of the multiple data packets Number of
根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the number of data packets before the tail packet, the value of the MTU of the tail packet and the MTU corresponding to the QP, and the length of the tail packet.
可选的,所述处理单元402确定对应所述数据块的网络流量时,采用以下公式:Optionally, when the processing unit 402 determines network traffic corresponding to the data block, the following formula is adopted:
T=Len+K*MTUT=Len+K*MTU
其中,T为对应所述数据块的网络流量,MTU为所述尾包的五元组和QP对应的MTU的值,Len为所述尾包的长度,K为所述尾包之前的数据包的个数。Wherein, T is the network traffic corresponding to the data block, the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP, Len is the length of the tail packet, and K is the data packet before the tail packet. The number.
可选的,所述处理单元402,还用于:Optionally, the processing unit 402 is further configured to:
在所述接收单元401接收到所述多个数据包中的首包后,识别所述首包的五元组和QP并记录;其中,所述首包的五元组和QP用于指示所述多个数据包所属的所述数据块的五元组和QP;After the receiving unit 401 receives the first packet of the plurality of data packets, identifying a quintuple and a QP of the first packet and recording; wherein the quintuple and QP of the first packet are used to indicate a quintuple and a QP of the data block to which the plurality of data packets belong;
根据所述记录的五元组和QP,确定接收到的与所述记录的五元组和QP相同的尾包,并将所述尾包作为所述数据块的所述多个数据包中的尾包。Determining, according to the recorded quintuple and QP, the same tail packet as the recorded quintuple and QP, and using the tail packet as the plurality of data packets in the data block Tail package.
可选的,所述转发设备为交换机或者路由器。Optionally, the forwarding device is a switch or a router.
采用本申请实施例提供的分析服务器,接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包后,根据所述尾包的长度和序列号,确定对应所述数据块的网络流量。这样,分析服务器只需接收转发设备发来的每个数据块划分得到的多个数据包中的尾包,可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。The analysis server provided by the embodiment of the present application, after receiving the tail packet in the plurality of data packets obtained by dividing the data packet by the forwarding device, determining, according to the length and the serial number of the tail packet, the corresponding data block Network traffic. In this way, the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save between the forwarding device and the analysis server. Transfer resources.
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。在本申请的实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program code. .
基于以上实施例,本申请实施例还提供了一种转发设备,所述转发设备应用于如图1所示的网络流量确定系统,用于实现如图2所示的基于RDMA的网络流量确定方法中转发设备的功能。参阅图5所示,所述转发设备500包括:通信接口501、处理器502以及存储器503,其中:Based on the above embodiment, the embodiment of the present application further provides a forwarding device, where the forwarding device is applied to the network traffic determining system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determining method as shown in FIG. 2 . The function of forwarding devices in the middle. Referring to FIG. 5, the forwarding device 500 includes a communication interface 501, a processor 502, and a memory 503, where:
所述通信接口501、所述处理器502以及所述存储器503之间相互连接。可选的,所述通信接口501、所述处理器502以及所述存储器503通过总线504相互连接;所述总线504可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图5中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication interface 501, the processor 502, and the memory 503 are connected to each other. Optionally, the communication interface 501, the processor 502, and the memory 503 are mutually connected by a bus 504; the bus 504 may be a peripheral component interconnect (PCI) bus or an extended industry standard. Extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 5, but it does not mean that there is only one bus or one type of bus.
所述转发设备500在实现如图2所示的基于RDMA的网络流量确定方法时:The forwarding device 500 implements the RDMA-based network traffic determination method as shown in FIG. 2:
所述通信接口501,用于接收和发送数据;The communication interface 501 is configured to receive and send data;
所述处理器502,用于控制所述通信接口501接收第一终端设备发送的数据包,所述数据包为所述第一终端设备的网卡对一个数据块划分得到的多个数据包中的一个;所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;The processor 502 is configured to control the communication interface 501 to receive a data packet sent by the first terminal device, where the data packet is in a plurality of data packets obtained by dividing the network card of the first terminal device into one data block. a data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device;
判断所述数据包是否为所述多个数据包中的目标数据包,若所述数据包为所述多个数据包中的目标数据包,则复制所述数据包,控制所述通信接口501将复制得 到的数据包发送给分析服务器,并控制所述通信接口501将所述数据包转发给所述第二终端设备;若所述数据包不是所述多个数据包中的目标数据包,不执行复制所述数据包的处理,控制所述通信接口501将所述数据包转发给所述第二终端设备;Determining whether the data packet is a target data packet in the plurality of data packets, and if the data packet is a target data packet in the plurality of data packets, copying the data packet, and controlling the communication interface 501 Transmitting the copied data packet to the analysis server, and controlling the communication interface 501 to forward the data packet to the second terminal device; if the data packet is not the target data packet in the multiple data packets, Not performing the process of copying the data packet, and controlling the communication interface 501 to forward the data packet to the second terminal device;
其中,所述数据包中包括所述数据包的长度和所述数据包的序列号。The data packet includes a length of the data packet and a sequence number of the data packet.
可选的,所述目标数据包为所述多个数据包中的尾包,所述处理器502,在判断所述数据包是否为所述多个数据包中的目标数据包时,具体用于:Optionally, the target data packet is a tail packet of the multiple data packets, and the processor 502, when determining whether the data packet is a target data packet in the multiple data packets, specifically to:
识别所述数据包中的操作码opcode的值,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包;若所述opcode的值不为尾包对应的opcode的值,则确定所述数据包不是尾包。Identifying the value of the opcode opcode in the data packet, if the value of the opcode is the value of the opcode corresponding to the tail packet, determining that the data packet is a tail packet; if the value of the opcode is not the corresponding one of the tail packet The value of opcode determines that the packet is not a tail packet.
可选的,所述目标数据包为所述多个数据包中的首包或尾包,所述处理器502,在判断所述数据包是否为所述多个数据包中的目标数据包时,具体用于:Optionally, the target data packet is a first packet or a tail packet of the multiple data packets, and the processor 502 is configured to determine whether the data packet is a target data packet in the multiple data packets. Specifically for:
识别所述数据包中的opcode的值,若所述opcode的值为首包对应的opcode的值,则确定所述数据包为首包;若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包。Identifying the value of the opcode in the data packet, if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet, It is determined that the data packet is a tail package.
可选的,所述转发设备500为交换机或者路由器。Optionally, the forwarding device 500 is a switch or a router.
所述存储器503,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器503可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器502执行所述存储器503所存放的应用程序,实现上述功能,从而实现如图2所示的基于RDMA的网络流量确定方法。The memory 503 is configured to store a program or the like. In particular, the program can include program code, the program code including computer operating instructions. The memory 503 may include a RAM, and may also include a non-volatile memory, such as at least one disk storage. The processor 502 executes an application stored in the memory 503 to implement the foregoing functions, thereby implementing an RDMA-based network traffic determining method as shown in FIG. 2.
采用本申请实施例提供的转发设备,接收第一终端设备的网卡针对一个数据块划分得到的多个数据包中的一个,判断所述数据包是否为所述多个数据包中的目标数据包,若是,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;否则所述转发设备不执行复制所述数据包的处理,仅将所述数据包转发给所述第二终端设备;其中,所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给所述第二终端设备的数据块。这样,转发设备只需复制并发送针对数据块划分的多个数据包中的目标数据包到分析服务器,对多个数据包中除目标数据包以外的数据包不执行复制并发送给分析服务器的处理,以使所述分析服务器根据目标数据包确定对应该数据块的网络流量,这样可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。The forwarding device provided by the embodiment of the present application receives one of a plurality of data packets obtained by the network card of the first terminal device for one data block, and determines whether the data packet is a target data packet in the multiple data packets. If yes, copying the data packet, transmitting the copied data packet to the analysis server, and forwarding the data packet to the second terminal device; otherwise, the forwarding device does not perform the process of copying the data packet, only Transmitting the data packet to the second terminal device; wherein the data block is a data block that is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device. In this way, the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the analysis server. Processing, so that the analysis server determines network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
基于以上实施例,本申请实施例还提供了一种分析服务器,所述分析服务器应用于如图1所示的网络流量确定系统,用于实现如图2所示的基于RDMA的网络流量确定方法中分析服务器的功能。参阅图6所示,所述分析服务器600包括:通信接口601、处理器602以及存储器603,其中:Based on the above embodiment, the embodiment of the present application further provides an analysis server, where the analysis server is applied to the network traffic determination system shown in FIG. 1 , and is used to implement the RDMA-based network traffic determination method as shown in FIG. 2 . The function of the analysis server. Referring to FIG. 6, the analysis server 600 includes a communication interface 601, a processor 602, and a memory 603, where:
所述通信接口601、所述处理器602以及所述存储器603之间相互连接。可选的,所述通信接口601、所述处理器602以及所述存储器603通过总线604相互连接;所述总线604可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩 展工业标准结构(extended industry standard architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The communication interface 601, the processor 602, and the memory 603 are connected to each other. Optionally, the communication interface 601, the processor 602, and the memory 603 are connected to each other by a bus 604; the bus 604 may be a peripheral component interconnect (PCI) bus or an extended industry standard. Extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
所述分析服务器600在实现如图2所示的基于RDMA的网络流量确定方法时:The analysis server 600 implements the RDMA-based network traffic determination method as shown in FIG. 2:
所述通信接口601,用于接收和发送数据;The communication interface 601 is configured to receive and send data;
所述处理器602,用于控制所述通信接口601接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包,其中,所述数据块为第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;所述尾包中包括所述尾包的长度和所述尾包的序列号;The processor 602 is configured to control the communication interface 601 to receive a tail packet in a plurality of data packets obtained by dividing the data block by the forwarding device, where the data block is an RDMA mode used by the first terminal device. a data block transmitted by the forwarding device to the second terminal device; the tail packet includes a length of the tail packet and a sequence number of the tail packet;
根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet.
可选的,所述处理器602,还用于:Optionally, the processor 602 is further configured to:
控制所述通信接口601接收所述转发设备发来的针对所述数据块划分得到的多个数据包中的首包;其中,所述首包中包括所述首包的长度和所述首包的序列号;Controlling the communication interface 601 to receive a first packet of the plurality of data packets obtained by the forwarding device for the data block partitioning; wherein the first packet includes a length of the first packet and the first packet Serial number;
所述处理器602,在根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量时,具体用于:The processor 602 is specifically configured to: when determining the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet,
根据所述尾包的序列号和所述首包的序列号,确定所述首包和所述尾包之间的数据包的个数;Determining, according to the sequence number of the tail packet and the sequence number of the first packet, the number of data packets between the first packet and the tail packet;
根据所述首包的长度、所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the length of the first packet, the number of data packets between the first packet and the tail packet, and the length of the tail packet.
可选的,所述处理器602确定对应所述数据块的网络流量时,采用以下公式:Optionally, when the processor 602 determines network traffic corresponding to the data block, the following formula is adopted:
L=Len2+(N+1)*Len1L=Len2+(N+1)*Len1
其中,L为对应所述数据块的网络流量,Len1为所述首包的长度,Len2为所述尾包的长度,N为所述首包和所述尾包之间的数据包的个数。Where L is the network traffic corresponding to the data block, Len1 is the length of the first packet, Len2 is the length of the tail packet, and N is the number of data packets between the first packet and the tail packet. .
可选的,所述处理器602,在根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量时,具体用于:Optionally, the processor 602 is specifically configured to: when determining network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet,
识别所述尾包中的五元组和队列对QP,并根据保存的五元组和QP与最大传输单元MTU的值的对应关系,确定所述尾包的五元组和QP对应的MTU的值;Identifying the quintuple and the queue pair QP in the tail packet, and determining the quintuple of the tail package and the MTU corresponding to the QP according to the saved quintuple and the correspondence between the QP and the value of the maximum transmission unit MTU value;
确定设定的所述多个数据包的起始序列号,并根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数;Determining a set start sequence number of the plurality of data packets, and determining a data packet before the tail package according to the sequence number of the tail package and the set start sequence number of the multiple data packets Number of
根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the number of data packets before the tail packet, the value of the MTU of the tail packet and the MTU corresponding to the QP, and the length of the tail packet.
可选的,所述处理器602确定对应所述数据块的网络流量时,采用以下公式:Optionally, when the processor 602 determines network traffic corresponding to the data block, the following formula is adopted:
T=Len+K*MTUT=Len+K*MTU
其中,T为对应所述数据块的网络流量,MTU为所述尾包的五元组和QP对应的MTU的值,Len为所述尾包的长度,K为所述尾包之前的数据包的个数。Wherein, T is the network traffic corresponding to the data block, the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP, Len is the length of the tail packet, and K is the data packet before the tail packet. The number.
可选的,所述处理器602,还用于:Optionally, the processor 602 is further configured to:
控制所述通信接口601接收到所述多个数据包中的首包后,识别所述首包的五元组和QP并记录;其中,所述首包的五元组和QP用于指示所述多个数据包所属的所述数据块的五元组和QP;After receiving the first packet of the plurality of data packets, the communication interface 601 identifies and records the quintuple and the QP of the first packet; wherein the quintuple and QP of the first packet are used to indicate a quintuple and a QP of the data block to which the plurality of data packets belong;
根据所述记录的五元组和QP,确定接收到的与所述记录的五元组和QP相同的尾包,并将所述尾包作为所述数据块的所述多个数据包中的尾包。Determining, according to the recorded quintuple and QP, the same tail packet as the recorded quintuple and QP, and using the tail packet as the plurality of data packets in the data block Tail package.
可选的,所述转发设备为交换机或者路由器。Optionally, the forwarding device is a switch or a router.
所述存储器603,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器603可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器602执行所述存储器603所存放的应用程序,实现上述功能,从而实现如图2所示的基于RDMA的网络流量确定方法。The memory 603 is configured to store a program or the like. In particular, the program can include program code, the program code including computer operating instructions. The memory 603 may include a RAM, and may also include a non-volatile memory such as at least one disk storage. The processor 602 executes an application stored in the memory 603 to implement the foregoing functions, thereby implementing an RDMA-based network traffic determining method as shown in FIG. 2.
采用本申请实施例提供的分析服务器,接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包后,根据所述尾包的长度和序列号,确定对应所述数据块的网络流量。这样,分析服务器只需接收转发设备发来的每个数据块划分得到的多个数据包中的尾包,可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。The analysis server provided by the embodiment of the present application, after receiving the tail packet in the plurality of data packets obtained by dividing the data packet by the forwarding device, determining, according to the length and the serial number of the tail packet, the corresponding data block Network traffic. In this way, the analysis server only needs to receive the tail packets in the plurality of data packets obtained by dividing each data block sent by the forwarding device, which can reduce the occupation of the storage capacity of the analysis server, and can save between the forwarding device and the analysis server. Transfer resources.
综上所述,通过本申请实施例提供的基于RDMA的网络流量确定方法及装置,转发设备接收第一终端设备的网卡针对一个数据块划分得到的多个数据包中的一个,判断所述数据包是否为所述多个数据包中的目标数据包,若是,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给第二终端设备;否则所述转发设备不执行复制所述数据包的处理,仅将所述数据包转发给所述第二终端设备;其中,所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给所述第二终端设备的数据块。在该方法中,转发设备只需复制并发送针对数据块划分的多个数据包中的目标数据包到分析服务器,对多个数据包中除目标数据包以外的数据包不执行复制并发送给分析服务器的处理,以使所述分析服务器根据目标数据包确定对应该数据块的网络流量,这样可以减少对分析服务器的存储容量的占用,并且可以节省转发设备和分析服务器之间的传输资源。In summary, the RDMA-based network traffic determining method and apparatus provided by the embodiment of the present application, the forwarding device receives one of a plurality of data packets obtained by dividing the network card of the first terminal device for one data block, and determining the data. Whether the packet is a target data packet in the plurality of data packets, and if so, copying the data packet, transmitting the copied data packet to an analysis server, and forwarding the data packet to the second terminal device; otherwise The forwarding device does not perform the process of copying the data packet, and only forwards the data packet to the second terminal device; wherein the data block is transmitted by the forwarding device by using the RDMA mode in the first terminal device. A data block for the second terminal device. In the method, the forwarding device only needs to copy and send the target data packet in the plurality of data packets divided for the data block to the analysis server, and the data packets other than the target data packet of the plurality of data packets are not copied and sent to the data packet. The processing of the server is analyzed to enable the analysis server to determine network traffic corresponding to the data block according to the target data packet, which can reduce the occupation of the storage capacity of the analysis server, and can save transmission resources between the forwarding device and the analysis server.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包括有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的精神和范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包括这些改动和变型在内。It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, it is intended that the present invention cover the modifications and variations of the embodiments of the present invention.

Claims (19)

  1. 一种基于远程直接数据存取RDMA的网络流量确定方法,其特征在于,包括:A method for determining network traffic based on remote direct data access RDMA, comprising:
    转发设备接收第一终端设备发送的数据包,所述数据包为所述第一终端设备的网卡对一个数据块划分得到的多个数据包中的一个;所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;The forwarding device receives the data packet sent by the first terminal device, where the data packet is one of a plurality of data packets obtained by dividing the network card of the first terminal device into one data block; the data block is the first terminal The data block transmitted by the device to the second terminal device by using the forwarding device by using the RDMA method;
    所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,若所述数据包为所述多个数据包中的目标数据包,则复制所述数据包,将复制得到的数据包发送给分析服务器,并将所述数据包转发给所述第二终端设备;若所述数据包不是所述多个数据包中的目标数据包,所述转发设备不执行复制所述数据包的处理,将所述数据包转发给所述第二终端设备;Determining, by the forwarding device, whether the data packet is a target data packet in the plurality of data packets, and if the data packet is a target data packet in the plurality of data packets, copying the data packet, and copying the data packet The obtained data packet is sent to the analysis server, and the data packet is forwarded to the second terminal device; if the data packet is not the target data packet in the plurality of data packets, the forwarding device does not perform the copying Processing the data packet, forwarding the data packet to the second terminal device;
    其中,所述数据包中包括所述数据包的长度和所述数据包的序列号。The data packet includes a length of the data packet and a sequence number of the data packet.
  2. 如权利要求1所述的方法,其特征在于,所述目标数据包为所述多个数据包中的尾包,所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,包括:The method according to claim 1, wherein said target data packet is a tail packet of said plurality of data packets, and said forwarding device determines whether said data packet is a target of said plurality of data packets Packets, including:
    所述转发设备识别所述数据包中的操作码opcode的值,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包;若所述opcode的值不为尾包对应的opcode的值,则确定所述数据包不是尾包。The forwarding device identifies the value of the opcode opcode in the data packet. If the value of the opcode is the value of the opcode corresponding to the tail packet, determining that the data packet is a tail packet; if the value of the opcode is not The value of the opcode corresponding to the tail packet determines that the data packet is not a tail packet.
  3. 根据权利要求1所述的方法,其特征在于,所述目标数据包为所述多个数据包中的首包或尾包,所述转发设备判断所述数据包是否为所述多个数据包中的目标数据包,包括:The method according to claim 1, wherein the target data packet is a first packet or a tail packet of the plurality of data packets, and the forwarding device determines whether the data packet is the plurality of data packets. Target packets in, including:
    所述转发设备识别所述数据包中的操作码opcode的值,若所述opcode的值为首包对应的opcode的值,则确定所述数据包为首包,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包。The forwarding device identifies the value of the opcode opcode in the data packet. If the value of the opcode is the value of the opcode corresponding to the first packet, the data packet is determined to be the first packet, and if the value of the opcode is the tail packet, The value of the opcode determines that the packet is a trailer.
  4. 一种基于远程直接数据存取RDMA的网络流量确定方法,其特征在于,包括:A method for determining network traffic based on remote direct data access RDMA, comprising:
    分析服务器接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包,其中,所述数据块为第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;所述尾包中包括所述尾包的长度和所述尾包的序列号;The analysis server receives the tail packet of the plurality of data packets obtained by the forwarding device for the data block, wherein the data block is transmitted by the forwarding device to the second terminal device by using the RDMA mode by the first terminal device. a data block; the tail packet includes a length of the tail packet and a sequence number of the tail packet;
    所述分析服务器根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量。The analysis server determines network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet.
  5. 如权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, wherein the method further comprises:
    所述分析服务器接收所述转发设备发来的针对所述数据块划分得到的所述多个数据包中的首包,所述首包中包括所述首包的长度和所述首包的序列号;The analysis server receives a first packet of the plurality of data packets obtained by the forwarding device for the data block division, where the first packet includes a length of the first packet and a sequence of the first packet number;
    所述分析服务器根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量,包括:The analyzing server determines the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, including:
    所述分析服务器根据所述尾包的序列号和所述首包的序列号,确定所述首包和所述尾包之间的数据包的个数;The analyzing server determines the number of data packets between the first packet and the tail packet according to the sequence number of the tail packet and the sequence number of the first packet;
    所述分析服务器根据所述首包的长度、所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量。The analysis server determines network traffic corresponding to the data block according to the length of the first packet, the number of data packets between the first packet and the tail packet, and the length of the tail packet.
  6. 如权利要求5所述的方法,其特征在于,所述分析服务器确定对应所述数据块的网络流量时,采用以下公式:The method according to claim 5, wherein when the analysis server determines the network traffic corresponding to the data block, the following formula is adopted:
    L=Len2+(N+1)*Len1L=Len2+(N+1)*Len1
    其中,L为对应所述数据块的网络流量,Len1为所述首包的长度,Len2为所述尾包的长度,N为所述首包和所述尾包之间的数据包的个数。Where L is the network traffic corresponding to the data block, Len1 is the length of the first packet, Len2 is the length of the tail packet, and N is the number of data packets between the first packet and the tail packet. .
  7. 如权利要求4所述的方法,其特征在于,所述分析服务器根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量,包括:The method of claim 4, wherein the analyzing server determines network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, including:
    所述分析服务器识别所述尾包中的五元组和队列对QP,并根据保存的五元组和QP与最大传输单元MTU的值的对应关系,确定所述尾包的五元组和QP对应的MTU的值;The analysis server identifies a quintuple and a queue pair QP in the tail package, and determines a quintuple and a QP of the tail package according to a correspondence between the saved quintuple and the value of the QP and the maximum transmission unit MTU. The value of the corresponding MTU;
    所述分析服务器确定设定的所述多个数据包的起始序列号,并根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数;Determining, by the analysis server, a starting sequence number of the plurality of data packets that are set, and determining the tail package according to a sequence number of the tail package and a starting sequence number of the plurality of data packets that are set The number of previous packets;
    所述分析服务器根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量。The analysis server determines the network traffic corresponding to the data block according to the number of data packets before the tail packet, the quintuple of the tail packet, the value of the MTU corresponding to the QP, and the length of the tail packet.
  8. 如权利要求7所述的方法,其特征在于,所述分析服务器确定对应所述数据块的网络流量时,采用以下公式:The method according to claim 7, wherein when the analysis server determines the network traffic corresponding to the data block, the following formula is adopted:
    T=Len+K*MTUT=Len+K*MTU
    其中,T为对应所述数据块的网络流量,MTU为所述尾包的五元组和QP对应的MTU的值,Len为所述尾包的长度,K为所述尾包之前的数据包的个数。Wherein, T is the network traffic corresponding to the data block, the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP, Len is the length of the tail packet, and K is the data packet before the tail packet. The number.
  9. 如权利要求5或6所述的方法,其特征在于,所述方法还包括:The method of claim 5 or claim 6, wherein the method further comprises:
    所述分析服务器接收到所述多个数据包中的首包后,识别所述首包的五元组和QP并记录;其中,所述首包的五元组和QP用于指示所述多个数据包所属的所述数据块的五元组和QP;After receiving the first packet of the plurality of data packets, the analysis server identifies and records the quintuple and the QP of the first packet; wherein the quintuple and the QP of the first packet are used to indicate the multiple The quintuple and QP of the data block to which the data packet belongs;
    所述分析服务器根据所述记录的五元组和QP,确定接收到的与所述记录的五元组和QP相同的尾包,并将所述尾包作为所述数据块的所述多个数据包中的尾包。The analyzing server determines, according to the recorded quintuple and QP, the received tail packet that is the same as the recorded quintuple and QP, and uses the tail packet as the multiple of the data block The tail package in the packet.
  10. 一种转发设备,其特征在于,包括:A forwarding device, comprising:
    存储器,用于存储程序指令;a memory for storing program instructions;
    通信接口,用于接收和发送数据;a communication interface for receiving and transmitting data;
    处理器,用于调用存储在所述存储器中的程序指令以执行下述方法:a processor for invoking program instructions stored in the memory to perform the following method:
    控制所述通信接口接收第一终端设备发送的数据包,所述数据包为所述第一终端设备的网卡对一个数据块划分得到的多个数据包中的一个;所述数据块为所述第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;Controlling, by the communication interface, a data packet sent by the first terminal device, where the data packet is one of a plurality of data packets obtained by dividing a data block by the network card of the first terminal device; The first terminal device uses the RDMA mode to transmit the data block to the second terminal device by using the forwarding device;
    判断所述数据包是否为所述多个数据包中的目标数据包,若所述数据包为所述多个数据包中的目标数据包,则复制所述数据包,控制所述通信接口将复制得到的 数据包发送给分析服务器,并控制所述通信接口将所述数据包转发给所述第二终端设备;若所述数据包不是所述多个数据包中的目标数据包,不执行复制所述数据包的处理,控制所述通信接口将所述数据包转发给所述第二终端设备;Determining whether the data packet is a target data packet in the plurality of data packets, if the data packet is a target data packet in the plurality of data packets, copying the data packet, and controlling the communication interface Copying the obtained data packet to the analysis server, and controlling the communication interface to forward the data packet to the second terminal device; if the data packet is not the target data packet in the plurality of data packets, not executing Copying the data packet, and controlling the communication interface to forward the data packet to the second terminal device;
    其中,所述数据包中包括所述数据包的长度和所述数据包的序列号。The data packet includes a length of the data packet and a sequence number of the data packet.
  11. 如权利要求10所述的转发设备,其特征在于,所述目标数据包为所述多个数据包中的尾包,所述处理器,在判断所述数据包是否为所述多个数据包中的目标数据包时,具体用于:The forwarding device according to claim 10, wherein said target data packet is a tail packet of said plurality of data packets, and said processor determines whether said data packet is said plurality of data packets When the target packet is used, it is specifically used to:
    识别所述数据包中的操作码opcode的值,若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包;若所述opcode的值不为尾包对应的opcode的值,则确定所述数据包不是尾包。Identifying the value of the opcode opcode in the data packet, if the value of the opcode is the value of the opcode corresponding to the tail packet, determining that the data packet is a tail packet; if the value of the opcode is not the corresponding one of the tail packet The value of opcode determines that the packet is not a tail packet.
  12. 如权利要求10所述的转发设备,其特征在于,所述目标数据包为所述多个数据包中的首包或尾包,所述处理器,在判断所述数据包是否为所述多个数据包中的目标数据包时,具体用于:The forwarding device according to claim 10, wherein the target data packet is a first packet or a tail packet of the plurality of data packets, and the processor determines whether the data packet is the plurality of packets When the target packet in the packet is used, it is specifically used to:
    识别所述数据包中的操作码opcode的值,若所述opcode的值为首包对应的opcode的值,则确定所述数据包为首包;若所述opcode的值为尾包对应的opcode的值,则确定所述数据包为尾包。Identifying the value of the opcode opcode in the data packet, if the value of the opcode is the value of the opcode corresponding to the first packet, determining that the data packet is the first packet; if the value of the opcode is the value of the opcode corresponding to the tail packet And determining that the data packet is a tail package.
  13. 一种分析服务器,其特征在于,包括:An analysis server, comprising:
    存储器,用于存储程序指令;a memory for storing program instructions;
    通信接口,用于接收和发送数据;a communication interface for receiving and transmitting data;
    处理器,用于调用存储在所述存储器中的程序指令以执行下述方法:a processor for invoking program instructions stored in the memory to perform the following method:
    控制所述通信接口接收转发设备发来的针对一个数据块划分得到的多个数据包中的尾包,其中,所述数据块为第一终端设备采用RDMA方式通过所述转发设备传输给第二终端设备的数据块;所述尾包中包括所述尾包的长度和所述尾包的序列号;Controlling, by the communication interface, a tail packet of a plurality of data packets obtained by dividing the data packet by the forwarding device, where the data block is transmitted to the second terminal device by using the RDMA mode by using the forwarding device a data block of the terminal device; the tail packet includes a length of the tail packet and a sequence number of the tail packet;
    根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet.
  14. 如权利要求13所述的分析服务器,其特征在于,所述处理器,还用于:The analysis server according to claim 13, wherein the processor is further configured to:
    控制所述通信接口接收所述转发设备发来的针对所述数据块划分得到的多个数据包中的首包;其中,所述首包中包括所述首包的长度和所述首包的序列号;Controlling, by the communication interface, a first packet of the plurality of data packets obtained by the forwarding device for the data block division; wherein the first packet includes a length of the first packet and the first packet serial number;
    所述处理器,在根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量时,具体用于:The processor, when determining the network traffic corresponding to the data block according to the length of the tail packet and the sequence number of the tail packet, specifically used to:
    根据所述尾包的序列号和所述首包的序列号,确定所述首包和所述尾包之间的数据包的个数;Determining, according to the sequence number of the tail packet and the sequence number of the first packet, the number of data packets between the first packet and the tail packet;
    根据所述首包的长度、所述首包和所述尾包之间的数据包的个数、所述尾包的长度,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the length of the first packet, the number of data packets between the first packet and the tail packet, and the length of the tail packet.
  15. 如权利要求14所述的分析服务器,其特征在于,所述处理器确定对应所述数据块的网络流量时,采用以下公式:The analysis server according to claim 14, wherein when the processor determines network traffic corresponding to the data block, the following formula is adopted:
    L=Len2+(N+1)*Len1L=Len2+(N+1)*Len1
    其中,L为对应所述数据块的网络流量,Len1为所述首包的长度,Len2为所述尾包的长度,N为所述首包和所述尾包之间的数据包的个数。Where L is the network traffic corresponding to the data block, Len1 is the length of the first packet, Len2 is the length of the tail packet, and N is the number of data packets between the first packet and the tail packet. .
  16. 如权利要求13所述的分析服务器,其特征在于,所述处理器,在根据所述尾包的长度和所述尾包的序列号,确定对应所述数据块的网络流量时,具体用于:The analysis server according to claim 13, wherein the processor is specifically configured to determine network traffic corresponding to the data block according to a length of the tail packet and a sequence number of the tail packet. :
    识别所述尾包中的五元组和队列对QP,并根据保存的五元组和QP与最大传输单元MTU的值的对应关系,确定所述尾包的五元组和QP对应的MTU的值;Identifying the quintuple and the queue pair QP in the tail packet, and determining the quintuple of the tail package and the MTU corresponding to the QP according to the saved quintuple and the correspondence between the QP and the value of the maximum transmission unit MTU value;
    确定设定的所述多个数据包的起始序列号,并根据所述尾包的序列号和设定的所述多个数据包的起始序列号,确定所述尾包之前的数据包的个数;Determining a set start sequence number of the plurality of data packets, and determining a data packet before the tail package according to the sequence number of the tail package and the set start sequence number of the multiple data packets Number of
    根据所述尾包之前的数据包的个数、所述尾包的五元组和QP对应的MTU的值、所述尾包的长度,确定对应所述数据块的网络流量。And determining network traffic corresponding to the data block according to the number of data packets before the tail packet, the value of the MTU of the tail packet and the MTU corresponding to the QP, and the length of the tail packet.
  17. 如权利要求16所述的分析服务器,其特征在于,所述处理器确定对应所述数据块的网络流量时,采用以下公式:The analysis server according to claim 16, wherein when the processor determines network traffic corresponding to the data block, the following formula is adopted:
    T=Len+K*MTUT=Len+K*MTU
    其中,T为对应所述数据块的网络流量,MTU为所述尾包的五元组和QP对应的MTU的值,Len为所述尾包的长度,K为所述尾包之前的数据包的个数。Wherein, T is the network traffic corresponding to the data block, the MTU is the value of the quintuple of the tail packet and the MTU corresponding to the QP, Len is the length of the tail packet, and K is the data packet before the tail packet. The number.
  18. 如权利要求14或15所述的分析服务器,其特征在于,所述处理器,还用于:The analysis server according to claim 14 or 15, wherein the processor is further configured to:
    控制所述通信接口接收到所述多个数据包中的首包后,识别所述首包的五元组和QP并记录;其中,所述首包的五元组和QP用于指示所述多个数据包所属的所述数据块的五元组和QP;After the first interface of the plurality of data packets is received by the communication interface, the quintuple and the QP of the first package are identified and recorded; wherein the quintuple and the QP of the first package are used to indicate the a quintuple and a QP of the data block to which the plurality of data packets belong;
    根据所述记录的五元组和QP,确定接收到的与所述记录的五元组和QP相同的尾包,并将所述尾包作为所述数据块的所述多个数据包中的尾包。Determining, according to the recorded quintuple and QP, the same tail packet as the recorded quintuple and QP, and using the tail packet as the plurality of data packets in the data block Tail package.
  19. 一种计算机存储介质,其特征在于,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令在被所述计算机调用时用于使所述计算机执行权利要求1-9任一项所述的方法。A computer storage medium, wherein the computer storage medium stores computer executable instructions, the computer executable instructions, when called by the computer, for causing the computer to perform any of claims 1-9 The method described in the item.
PCT/CN2018/096210 2017-08-14 2018-07-19 Rdma-based network traffic determination method and device WO2019033891A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710693896.XA CN109391522B (en) 2017-08-14 2017-08-14 RDMA-based network traffic determination method, forwarding device, analysis server, and storage medium
CN201710693896.X 2017-08-14

Publications (1)

Publication Number Publication Date
WO2019033891A1 true WO2019033891A1 (en) 2019-02-21

Family

ID=65361744

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/096210 WO2019033891A1 (en) 2017-08-14 2018-07-19 Rdma-based network traffic determination method and device

Country Status (2)

Country Link
CN (1) CN109391522B (en)
WO (1) WO2019033891A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641566A (en) * 2019-03-01 2020-09-08 华为技术有限公司 Data processing method, network card and server

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194045B (en) * 2020-01-14 2023-11-17 阿里巴巴集团控股有限公司 Data traffic analysis method, device, storage medium and processor
CN113381939B (en) * 2020-03-10 2022-04-29 阿里巴巴集团控股有限公司 Data transmission method and device, electronic equipment and computer readable storage medium
CN113886295A (en) * 2020-07-02 2022-01-04 北京瀚海云星科技有限公司 Efficient and low-delay transmission method for label data, and related device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999010814A1 (en) * 1997-08-29 1999-03-04 Intel Corporation Link bundling in a network
CN103441937A (en) * 2013-08-21 2013-12-11 曙光信息产业(北京)有限公司 Sending method and receiving method of multicast data
CN105933453A (en) * 2016-06-28 2016-09-07 广州华多网络科技有限公司 Data transmission method and system
CN106411739A (en) * 2015-07-31 2017-02-15 华为技术有限公司 Data forwarding method, apparatus and system
CN106953797A (en) * 2017-04-05 2017-07-14 广东浪潮大数据研究有限公司 A kind of method and apparatus of the RDMA data transfers based on Dynamic link library

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7342934B1 (en) * 2004-03-29 2008-03-11 Sun Microsystems, Inc. System and method for interleaving infiniband sends and RDMA read responses in a single receive queue
US20060067346A1 (en) * 2004-04-05 2006-03-30 Ammasso, Inc. System and method for placement of RDMA payload into application memory of a processor system
US8121135B2 (en) * 2009-06-23 2012-02-21 Juniper Networks, Inc. Discovering path maximum transmission unit size
CN103944775A (en) * 2014-03-14 2014-07-23 广州源典科技有限公司 Network traffic collection analysis and display output method
CN105099730B (en) * 2014-04-23 2018-08-10 北京奇安信科技有限公司 Terminal device, the network flux statistical method based on terminal device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999010814A1 (en) * 1997-08-29 1999-03-04 Intel Corporation Link bundling in a network
CN103441937A (en) * 2013-08-21 2013-12-11 曙光信息产业(北京)有限公司 Sending method and receiving method of multicast data
CN106411739A (en) * 2015-07-31 2017-02-15 华为技术有限公司 Data forwarding method, apparatus and system
CN105933453A (en) * 2016-06-28 2016-09-07 广州华多网络科技有限公司 Data transmission method and system
CN106953797A (en) * 2017-04-05 2017-07-14 广东浪潮大数据研究有限公司 A kind of method and apparatus of the RDMA data transfers based on Dynamic link library

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641566A (en) * 2019-03-01 2020-09-08 华为技术有限公司 Data processing method, network card and server
CN111641566B (en) * 2019-03-01 2021-10-22 华为技术有限公司 Data processing method, network card and server
US11620227B2 (en) 2019-03-01 2023-04-04 Huawei Technologies Co., Ltd. Data processing method, network interface card, and server

Also Published As

Publication number Publication date
CN109391522B (en) 2021-04-20
CN109391522A (en) 2019-02-26

Similar Documents

Publication Publication Date Title
US20220231962A1 (en) System and method for facilitating data request management in a network interface controller (nic)
US9965441B2 (en) Adaptive coalescing of remote direct memory access acknowledgements based on I/O characteristics
US10673760B2 (en) Method, apparatus, and system for load balancing of service chain
US9110703B2 (en) Virtual machine packet processing
WO2019033891A1 (en) Rdma-based network traffic determination method and device
US8996718B2 (en) TCP-aware receive side coalescing
US8005022B2 (en) Host operating system bypass for packets destined for a virtual machine
US9356844B2 (en) Efficient application recognition in network traffic
US10129136B2 (en) Virtual router cluster, data forwarding method and apparatus
WO2023005773A1 (en) Message forwarding method and apparatus based on remote direct data storage, and network card and device
EP3588881A1 (en) Technologies for reordering network packets on egress
WO2015058699A1 (en) Data forwarding
US20210359952A1 (en) Technologies for protocol-agnostic network packet segmentation
US11159443B2 (en) Queue management in a forwarder
US20160241482A1 (en) Packet communication apparatus and packet communication method
WO2020038192A1 (en) Method for link aggregation and related devices
US20190207783A1 (en) Data forwarding method and apparatus based on operating system kernel bridge
CN106603409B (en) Data processing system, method and equipment
CN109417507A (en) The message of section retards accesses
US10554513B2 (en) Technologies for filtering network packets on ingress
US11316916B2 (en) Packet processing method, related device, and computer storage medium
US20160294926A1 (en) Using a single work item to send multiple messages
WO2018057165A1 (en) Technologies for dynamically transitioning network traffic host buffer queues
US10129147B2 (en) Network-on-chip flit transmission method and apparatus
US9736080B2 (en) Determination method, device and storage medium

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18845514

Country of ref document: EP

Kind code of ref document: A1