WO2024011854A1 - Message transmission method and apparatus - Google Patents
Message transmission method and apparatus Download PDFInfo
- Publication number
- WO2024011854A1 WO2024011854A1 PCT/CN2022/141471 CN2022141471W WO2024011854A1 WO 2024011854 A1 WO2024011854 A1 WO 2024011854A1 CN 2022141471 W CN2022141471 W CN 2022141471W WO 2024011854 A1 WO2024011854 A1 WO 2024011854A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- network card
- queue
- tuple information
- card queue
- message
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000005540 biological transmission Effects 0.000 title claims abstract description 15
- 230000015654 memory Effects 0.000 claims description 35
- 238000012545 processing Methods 0.000 claims description 22
- 238000004891 communication Methods 0.000 claims description 17
- 230000008569 process Effects 0.000 description 27
- 238000010586 diagram Methods 0.000 description 13
- 238000005516 engineering process Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 7
- 230000001360 synchronised effect Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000001934 delay Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/302—Route determination based on requested QoS
- H04L45/306—Route determination based on the nature of the carried application
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Definitions
- the present application relates to the field of computer technology, and specifically to a message transmission method and device.
- the network card After receiving the message, the network card carries the message in the network card queue and sends it to the central processing unit (Central Processing Unit, CPU) for processing.
- CPU Central Processing Unit
- service packets and control packets are often mixed and processed in each network card queue and CPU.
- Embodiments of the present application provide a message transmission method and device to solve the technical problem in the prior art that control messages and service messages cannot be distinguished, resulting in delay and loss of control messages.
- the specific method is as follows:
- the network card receives the first service message and the first control message; wherein the first service message includes the first five-tuple information, and the type of the destination address in the first five-tuple information is a virtual network address.
- VIP Virtual Internet Protocol
- the first control message includes the second 5-tuple information, and the type of the destination address in the second 5-tuple information is not VIP
- the network card converts the first service to The message is distributed to the first network card queue; the network card distributes the first control message to the second network card queue based on the second five-tuple information; wherein the first network card queue is used to transmit the service message to the first CPU;
- the second network card queue transmits the control packet to the second CPU.
- the network card can distinguish business packets and control packets based on the type of destination address (for example, the destination address of the business packet is VIP, and the destination address of the control packet is other types of addresses besides VIP), and then
- the business packets and control packets are distributed to different network card queues, which realizes the separation of business packets and control packets at the network card, so that the business packets and control packets are carried in different network card queues respectively. And they are processed by different CPUs respectively, thereby avoiding problems such as delay and loss of control packet transmission caused by the surge of business packets in the existing technology.
- the first network card queue is one of multiple network card queues, and the multiple network card queues do not include the second network card queue.
- Each network card queue in multiple network card queues is used to transmit service packets.
- the network card distributes the first service message to the first network card queue based on the first 5-tuple information, including: the network card calculates the hash value h of the first 5-tuple information; the network card calculates the hash value h of the first 5-tuple information; The hash value h of the information is modulated by: h% N to obtain the first value; N is the preset value; the network card determines the identity of the first network card queue from the redirection table based on the first value; wherein, the redirection table includes N entries; each entry in the N entries corresponds to the identifier of a network card queue; the first value is used to indicate one of the N entries; the network card sends the first service packet according to the identifier of the first network card queue. Distributed to the first network card queue.
- the first service message is distributed to the first network card queue based on the redirection table, and the service message is bound to the network card queue containing only service messages, so that the service message can be processed quickly and effectively.
- the network card distributes the first control message to the second network card queue based on the second five-tuple information, including: the network card determines that the destination address in the second five-tuple information is a preset Internet Protocol (Internet) Protocol, IP) address, destination port number are the preset port number, protocol number is the preset protocol number; the network card distributes the first control message to the second network card queue.
- Internet Internet Protocol
- IP Internet Protocol
- the first control message is distributed to the second network card queue, so that the control message can be processed quickly and effectively.
- the network card distributes the first control message to the second network card queue based on the second five-tuple information, which also includes: the network card configures a preset IP address and a preset based on the message indicator Flow Director or the general flow Rte_Flow. port number and preset protocol number.
- This method uses Flow Director or Rte_Flow to configure the matching rules of control packets.
- the implementation is simple and efficient, and improves the reliability of the solution.
- inventions of the present application provide a communication device.
- the device may be a network card or a chip in the network card.
- the device includes a method for executing the above first aspect or any of the optional implementations of the first aspect.
- the module/unit/technical means of the method are not limited to any of the optional implementations of the first aspect.
- the device may include:
- the transceiver module is configured to receive the first service message and the first control message; wherein the first service message includes the first five-tuple information, the type of the destination address in the first five-tuple information is VIP, and the first five-tuple information is VIP.
- a control message includes the second 5-tuple information, and the type of the destination address in the second 5-tuple information is not VIP;
- the processing module is configured to distribute the first service message to the first network card queue based on the first five-tuple information; and distribute the first control message to the second network card queue based on the second five-tuple information; wherein, The first network card queue is used to transmit service packets to the first CPU; the second network card queue is used to transmit control packets to the second CPU.
- the first network card queue is one of multiple network card queues.
- the multiple network card queues do not include the second network card queue.
- Each network card queue in the multiple network card queues is used to transmit service packets.
- the processing module distributes the first service message to the first network card queue based on the first five-tuple information
- it is specifically used to: calculate the hash value h of the first five-tuple information;
- the hash value h of the tuple information is modulated by: h% N to obtain the first value; where N is the preset value; the identity of the first network card queue is determined from the redirection table based on the first value; where, in the redirection table It includes N entries; each entry in the N entries corresponds to the identifier of a network card queue; the first value is used to indicate one of the N entries; the first service packet is processed according to the identifier of the first network card queue. Distributed to the first network card queue.
- the processing module distributes the first control message to the second network card queue based on the second five-tuple information
- it is specifically used to: determine that the destination address in the second five-tuple information is the preset IP address;
- the destination port number is a preset port number and the protocol number is a preset protocol number; the first control message is distributed to the second network card queue.
- the processing module is also used to configure a preset IP address, a preset port number, and a preset protocol number based on the message indicator Flow Director or the general flow Rte_Flow.
- a communication device including: at least one processor; and a memory and a communication interface communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by at least one processor, and at least one The processor executes instructions stored in the memory, causing the device to execute the method described in the first aspect or any optional implementation manner of the first aspect through the communication interface.
- a computer-readable storage medium is provided.
- the computer-readable storage medium is used to store instructions.
- the instructions are executed, the first aspect or any optional implementation of the first aspect is implemented.
- the method described in is implemented.
- Figure 1 is a schematic diagram of a possible application scenario provided by the embodiment of the present application.
- Figure 2 is a schematic diagram of separating service messages and control messages
- Figure 3 is a flow chart of a message transmission method provided by an embodiment of the present application.
- Figure 4 is a schematic diagram of separating service messages and control provided by an embodiment of the present application.
- Figure 5 is a schematic structural diagram of a communication device provided by an embodiment of the present application.
- Figure 6 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
- Embodiments of the present application can be used for various types of network cards, such as network cards that support Data Plane Development Kit (DPDK) services, or other devices. As long as the device has a need to transmit messages to the CPU, the technical solutions in the embodiments of the present application can be adopted. For ease of description, this article takes a network card that supports DPDK as an example.
- DPDK Data Plane Development Kit
- DPDK application services use kernel bypass technology, and independent application protocol stack traffic passes through the network card and directly enters the application program for processing, without going through the operating system kernel Linux network protocol stack.
- Business traffic specifically refers to the service traffic processed by the application, which is generally VIP service traffic
- control traffic specifically refers to all non-VIP service traffic including all host IPs, Border Gateway Protocol (BGP)/Shortest Path First (Open Shortest) Path First, OSPF)/health check and other traffic
- BGP Border Gateway Protocol
- OSPF Open Shortest Path First
- FIG. 1 is a schematic diagram of a scenario applicable to the embodiment of the present application.
- the DPDK network card can receive messages (the types of messages include business messages and control messages) and distribute the messages to the network card queue. , where different network card queues correspond to different CPU cores. After the CPU core receives the message, it processes the message and transmits the processed message to the corresponding process. It is understandable that different CPU cores in this article can be integrated on different CPU physical entities, or can be integrated in different CPU physical entities. For the convenience of description, this article uses the example that one CPU core is a CPU for description.
- One possible implementation is to separate business packets and control packets at the CPU.
- there may be both business packets and control packets in the same network card queue and the same CPU may process both business packets and control packets.
- the first network card queue also processes control packets.
- the first network card queue carries both business packets and control packets.
- CPU1 processes both business packets and control packets.
- the technical solution of the embodiment of the present application is provided to realize the separation of service messages and control messages at the network card, so that the service messages and control messages are carried in different network card queues respectively, and are respectively carried by different network card queues.
- the CPU performs processing to avoid problems such as delay and loss of control messages.
- FIG 3 is a flow chart of a message transmission method provided by an embodiment of the present application.
- the method is applied to the scenario shown in Figure 1 as an example.
- the specific steps of the method are as follows:
- Step S301 The network card receives the first service message and the first control message.
- packets carry five-tuple information, including source address, destination address, source port number, destination port number, and protocol number.
- the embodiments of this application do not limit the type of packets.
- this article takes IP packets as an example.
- the source address, destination address, source port number, and destination port number are: source IP address, destination IP address, source Transmission Control Protocol (TCP)/User Datagram Protocol (UDP) ) port number, destination TCP/UDP port number.
- TCP Transmission Control Protocol
- UDP User Datagram Protocol
- the first service packet carries the first five-tuple information
- the first control packet carries the second five-tuple information
- the type of the destination address in the first quintuple information is VIP; the type of the destination address in the second quintuple information is not VIP, or it is an address of other types besides VIP, such as Host Identification Protocol ( Host Identity Protocol, HIP) address.
- Host Identification Protocol Host Identity Protocol, HIP
- Step S302 The network card distributes the first service packet to the first network card queue based on the first five-tuple information; the network card distributes the first control packet to the second network card queue based on the second five-tuple information.
- the first network card queue is used to transmit service packets (not to transmit control packets), and the second network card queue is used to transmit control packets (not to transmit business packets).
- the network card determines that the message type of the first service message is a service message based on the type of the destination address in the first five-tuple information (ie, VIP), and distributes it to the network card queue used to transmit the service message. superior. Based on the type of the destination address (such as HIP) in the second five-tuple information, the network card determines that the message type of the second service message is a control message, and distributes it to the network card queue used to transmit the control message.
- VIP type of the destination address in the first five-tuple information
- the network card determines that the message type of the second service message is a control message, and distributes it to the network card queue used to transmit the control message.
- the number of network card queues used to transmit service packets in the network is one, such as the first network card queue, and the network card directly distributes the first service packet to the first network card queue.
- the number of network card queues used to transmit service packets in the network is multiple (for example, the first network card queue is one of the network card queue groups, and the network card queue group includes multiple network card queues, and multiple network card queues are included in the network card queue group. (the network card queue group does not include the second network card queue), the network card needs to further determine the first network card queue from these multiple network card queues, and then the network card distributes the first service packet to the first network card queue.
- the network card determines the first network card queue from multiple network card queues, including: the DPDK network card calculates the hash value of the first five-tuple information and obtains the hash value h; and then performs the hash value h on the hash value h. Calculate the remainder: h%N to obtain the first value, where N is a preset value; then determine the identity of the first network card queue from the redirection table based on the first value; wherein the redirection table includes N entries; Each entry among the N entries corresponds to the identifier of a network card queue; the first value is used to indicate one of the N entries. Furthermore, the network card can distribute the first service packet to the first network card queue according to the identifier of the first network card queue. This method determines the first network card queue by querying the redirection table, and is simple and easy to implement.
- the process of the network card distributing the first service message to the first network card queue can be implemented based on RSS.
- RSS is a technology that can distribute the message by performing hash calculation on the five-tuple information, which can be implemented Forward different packets to multiple different CPUs in a load-balanced manner.
- different network cards have different default redirection table lengths, in specific applications, if the number of business processes does not match the length of the redirection table (that is, the number of table entries), you need to modify the redirection table. Perform a reset before using.
- the length of the redirection table corresponding to the 82599 model network card is 64, and the entries in the redirection table are taken from 0 to 63; the number of business processes is 16, so 16 network card queues need to be configured, and the values of the network card queue numbers are in order is 0 to 15; perform remainder calculation on each entry in the redirection table based on the number of processes, that is, take the remainder of 16 from 0 to 63, and write the remainder result as the network card queue number corresponding to each entry in the redirection table to get the reset redirection table.
- the network card queue numbers corresponding to the 0 to 15 table entries are 0 to 15
- the network card queue numbers corresponding to the 16 to 31 table entries are 0 to 15,..., and so on, so that the reset redirection table
- the network card queue number corresponding to each entry is one from 0 to 15.
- the second step is to calculate the hash value of the first service message. Assume that the hash value is 63. The remainder of the hash value 63 is taken according to the length of the redirection table, that is, the remainder is 63% 64. The remainder result is 63. The query is repeated. If there is an entry corresponding to 63 in the configured RSS redirection table, and the network card queue number corresponding to this entry is 15, it is determined that the first service packet will be distributed to the network card queue number 15.
- the network card distributes the first control message to the second network card queue based on the second five-tuple information, including: the network card determines that the destination address in the second five-tuple information is the preset destination address; The destination port number is a preset port number and the protocol number is a preset protocol number; the network card binds the first control message to the second network card queue, and the second network card queue transmits the first control message to the second CPU.
- the process of the network card distributing the first control message to the second network card queue can be implemented based on Flow Director or Rte_Flow.
- Flow Director or Rte_Flow is a network card queue that can match special fields in the message and decide to transmit the message. Technology in which special fields can be used as packet matching rules.
- SHIP Match ⁇ hip,0,0 ⁇ .
- BGP uses port 179 for the TCP protocol
- the TCP protocol has a field of 6 in the IP header.
- S HIP traffic includes S BGP traffic.
- the S BGP configuration here shows how users can customize the port configuration.
- S HIP traffic also includes Secure Shell Protocol (Secure Shell, SSH) remote login traffic.
- SSH Secure Shell Protocol
- control traffic sent to OSPF, BGP and the management port host IP can be received by the second network card queue.
- the above example takes the number of network card queues used to transmit control messages as 1.
- the number of network card queues used to transmit control messages can also be multiple, thereby further improving the transmission efficiency of control messages. .
- the first network card queue corresponds to the first CPU
- the first network card queue is used to transmit service packets to the first CPU
- the first forwarding process binds the first CPU to process the first service packet
- the second network card queue corresponds to The second CPU and the second network card queue transmit the control packet to the second CPU
- the first control process binds the second CPU to process the first control packet.
- NIC queue 0 to NIC queue n correspond to CPU0 to CPUn respectively, in which NIC queue 0 to NIC queue n-1 are used to carry service packets, and NIC queue n is specially used to carry control packets.
- the business packets and control packets can be separated at the network card, so that the business packets and control packets are carried in different network card queues and processed by different CPUs respectively to avoid business packets
- the surge will cause problems such as packet transmission delays and loss.
- an embodiment of the present application provides a communication device 500 , which may be the above-mentioned network card, etc.
- the device includes modules/units/technical means for executing the method shown in FIG. 3 .
- the device includes:
- the transceiver module 501 is used to receive the first service message and the first control message; wherein the first service message includes the first five-tuple information, and the destination address in the first five-tuple information is Virtual network address VIP, the first control message includes second five-tuple information, and the destination address in the second five-tuple information is Host Identification Protocol HIP;
- the processing module 502 is configured to distribute the first service message to the first network card queue based on the first five-tuple information; the network card distributes the third service message based on the second five-tuple information. A control packet is distributed to the second network card queue.
- an embodiment of the present application also provides a communication device 600, including:
- the memory 602 is located outside the communication device 600 .
- the electronic device 600 includes the memory 602, the memory 602 is connected to the at least one processor 601, and the memory 602 stores instructions that can be executed by the at least one processor 601.
- Figure 6 shows in dashed lines that memory 602 is optional for electronic device 600.
- the processor 601 and the memory 602 may be coupled through an interface circuit, or may be integrated together, without limitation here.
- the specific connection medium between the above-mentioned processor 601, memory 602 and communication interface 603 is not limited in the embodiment of the present application.
- the processor 601, the memory 602 and the communication interface 603 are connected through a bus 604 in Figure 6.
- the bus is represented by a thick line in Figure 6.
- the connection between other components is only schematically explained. , is not limited.
- the bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 6, but it does not mean that there is only one bus or one type of bus.
- the processor mentioned in the embodiments of this application can be implemented by hardware or software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software code stored in memory.
- the processor can be a central processing unit (Central Processing Unit, CPU), or other general-purpose processor, digital signal processor (Digital Signal Processor, DSP), or application specific integrated circuit (Application Specific Integrated Circuit, ASIC) , off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
- CPU Central Processing Unit
- DSP Digital Signal Processor
- ASIC Application Specific Integrated Circuit
- a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
- non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which is used as an external cache.
- RAM Random Access Memory
- RAM static random access memory
- DRAM dynamic random access memory
- DRAM synchronous dynamic random access memory
- SDRAM double data rate synchronous dynamic random access memory
- Double Data Eate SDRAM, DDR SDRAM enhanced synchronous dynamic random access memory
- Enhanced SDRAM, ESDRAM synchronous link dynamic random access memory
- Synchlink DRAM, SLDRAM direct memory bus random access memory
- Direct Rambus RAM Direct Rambus RAM
- the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component
- the memory storage module
- Embodiments of the present application also provide a computer-readable storage medium, which is used to store instructions. When the instructions are executed, the computer executes the method steps performed by the above-mentioned network card.
- embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may 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.) having computer-usable program code embodied therein.
- computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
- These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
- the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
- These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
- Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Provided in the present application are a message transmission method and apparatus, which are used for solving the problems, such as a transmission delay and loss, of a control message. The method comprises: when receiving service messages and control messages, a network card distributing the service messages and the control messages to different network card queues, for example, distributing a first service message to a first network card queue, and distributing a first control message to a second network card queue. In this way, control messages and service messages can be separated at a network card, such that the service messages and the control messages are respectively borne in different network card queues, and are respectively processed by different CPUs, thereby avoiding the problems, such as a transmission delay and loss, of a control message as a result of a sharp increase in the number of the service messages.
Description
本申请涉及计算机技术领域,并具体涉及到一种报文传输方法及装置。The present application relates to the field of computer technology, and specifically to a message transmission method and device.
现有技术中,网卡在收到报文后,将报文承载在网卡队列中发送给中央处理器(Central Processing Unit,CPU)处理。然而,现有技术,业务报文和控制报文经常混合在各网卡队列和CPU中处理。In the existing technology, after receiving the message, the network card carries the message in the network card queue and sends it to the central processing unit (Central Processing Unit, CPU) for processing. However, in the existing technology, service packets and control packets are often mixed and processed in each network card queue and CPU.
当网卡队列中的业务报文激增而业务报文和控制报文共享一个网卡队列和CPU时,会导致控制报文传输延迟、丢失等问题。When the number of business packets in the network card queue increases and the business packets and control packets share the same network card queue and CPU, problems such as control packet transmission delays and loss may occur.
本申请实施例提供一种报文传输方法及装置,用以解决现有技术控制报文与业务报文不能区分导致控制报文延迟、丢失等的技术问题,具体方法如下:Embodiments of the present application provide a message transmission method and device to solve the technical problem in the prior art that control messages and service messages cannot be distinguished, resulting in delay and loss of control messages. The specific method is as follows:
第一方面,网卡接收第一业务报文和第一控制报文;其中,第一业务报文中包括第一五元组信息,第一五元组信息中的目的地址的类型为虚拟网络地址(Virtual Internet Protocol,VIP),第一控制报文中包括第二五元组信息,第二五元组信息中的目的地址的类型不是VIP;网卡基于第一五元组信息,将第一业务报文分发到第一网卡队列上;网卡基于第二五元组信息将第一控制报文分发到第二网卡队列上;其中,第一网卡队列用于将业务报文传输到第一CPU;第二网卡队列将控制报文传输到第二CPU。In the first aspect, the network card receives the first service message and the first control message; wherein the first service message includes the first five-tuple information, and the type of the destination address in the first five-tuple information is a virtual network address. (Virtual Internet Protocol, VIP), the first control message includes the second 5-tuple information, and the type of the destination address in the second 5-tuple information is not VIP; the network card converts the first service to The message is distributed to the first network card queue; the network card distributes the first control message to the second network card queue based on the second five-tuple information; wherein the first network card queue is used to transmit the service message to the first CPU; The second network card queue transmits the control packet to the second CPU.
在本方案中,网卡可以根据目的地址的类型区分业务报文与控制报文(如业务报文的目的地址是VIP,控制报文的目的地址是除了VIP之外的其它类型的地址),进而将业务报文与控制报文被分发到了不同的网卡队列中,实现了在网卡处将业务报文和控制报文进行分离,使得业务报文和控制报文分别承载在不同的网卡队列中,并且分别由不同的CPU进行处理,从而可以避免现有技术业务报文激增会导致控制报文传输延迟、丢失等问题。In this solution, the network card can distinguish business packets and control packets based on the type of destination address (for example, the destination address of the business packet is VIP, and the destination address of the control packet is other types of addresses besides VIP), and then The business packets and control packets are distributed to different network card queues, which realizes the separation of business packets and control packets at the network card, so that the business packets and control packets are carried in different network card queues respectively. And they are processed by different CPUs respectively, thereby avoiding problems such as delay and loss of control packet transmission caused by the surge of business packets in the existing technology.
可选的,第一网卡队列为多个网卡队列中的一个,多个网卡队列中不包括第二网卡队列。多个网卡队列中的每个网卡队列用于传输业务报文。Optionally, the first network card queue is one of multiple network card queues, and the multiple network card queues do not include the second network card queue. Each network card queue in multiple network card queues is used to transmit service packets.
通过本方式,为业务报文分配多个网卡队列,可以保证业务报文的传输效率。Through this method, multiple network card queues are allocated for business packets, which can ensure the transmission efficiency of business packets.
可选的,网卡基于第一五元组信息,将第一业务报文分发到第一网卡队列上,包括:网卡计算第一五元组信息的哈希值h;网卡对第一五元组信息的哈希值h取余:h%N,得到第一值;其中N为预设值;网卡根据第一值从重定向表中确定出第一网卡队列的标识;其 中,重定向表中包括N个表项;N个表项中的每个表项对应一个网卡队列的标识;第一值用于指示N个表项中的一个;网卡根据第一网卡队列的标识将第一业务报文分发到第一网卡队列上。Optionally, the network card distributes the first service message to the first network card queue based on the first 5-tuple information, including: the network card calculates the hash value h of the first 5-tuple information; the network card calculates the hash value h of the first 5-tuple information; The hash value h of the information is modulated by: h% N to obtain the first value; N is the preset value; the network card determines the identity of the first network card queue from the redirection table based on the first value; wherein, the redirection table includes N entries; each entry in the N entries corresponds to the identifier of a network card queue; the first value is used to indicate one of the N entries; the network card sends the first service packet according to the identifier of the first network card queue. Distributed to the first network card queue.
通过本方式,基于重定向表将第一业务报文分发到第一网卡队列上,绑定业务报文到只含有业务报文的网卡队列中,使业务报文的处理可以快速、有效。Through this method, the first service message is distributed to the first network card queue based on the redirection table, and the service message is bound to the network card queue containing only service messages, so that the service message can be processed quickly and effectively.
可选的,网卡基于第二五元组信息将第一控制报文分发到第二网卡队列上,包括:网卡确定第二五元组信息中的目的地址为预设的网际互连协议(Internet Protocol,IP)地址、目的端口号为预设的端口号、协议号为预设的协议号;网卡将第一控制报文分发到第二网卡队列上。Optionally, the network card distributes the first control message to the second network card queue based on the second five-tuple information, including: the network card determines that the destination address in the second five-tuple information is a preset Internet Protocol (Internet) Protocol, IP) address, destination port number are the preset port number, protocol number is the preset protocol number; the network card distributes the first control message to the second network card queue.
通过本方式,通过匹配目的地址、目的端口号以及协议号,实现将第一控制报文分发到第二网卡队列上,使控制报文的处理可以快速、有效。Through this method, by matching the destination address, destination port number and protocol number, the first control message is distributed to the second network card queue, so that the control message can be processed quickly and effectively.
可选的,网卡基于第二五元组信息将第一控制报文分发到第二网卡队列上,还包括:网卡基于报文指示器Flow Director或通用流Rte_Flow配置预设的IP地址、预设的端口号、预设的协议号。Optionally, the network card distributes the first control message to the second network card queue based on the second five-tuple information, which also includes: the network card configures a preset IP address and a preset based on the message indicator Flow Director or the general flow Rte_Flow. port number and preset protocol number.
该方式利用Flow Director或Rte_Flow配置控制报文的匹配规则,实现方式简单、高效,提高了方案的可靠性。This method uses Flow Director or Rte_Flow to configure the matching rules of control packets. The implementation is simple and efficient, and improves the reliability of the solution.
第二方面,本申请实施例提供一种通信装置,该装置可以是网卡,也可是网卡中的芯片,该装置包括用于执行上述第一方面或第一方面任一种可选的实施方式中的方法的模块/单元/技术手段。In a second aspect, embodiments of the present application provide a communication device. The device may be a network card or a chip in the network card. The device includes a method for executing the above first aspect or any of the optional implementations of the first aspect. The module/unit/technical means of the method.
示例性的,该装置可以包括:By way of example, the device may include:
收发模块,用于接收第一业务报文和第一控制报文;其中,第一业务报文中包括第一五元组信息,第一五元组信息中的目的地址的类型为VIP,第一控制报文中包括第二五元组信息,第二五元组信息中的目的地址的类型不是VIP;The transceiver module is configured to receive the first service message and the first control message; wherein the first service message includes the first five-tuple information, the type of the destination address in the first five-tuple information is VIP, and the first five-tuple information is VIP. A control message includes the second 5-tuple information, and the type of the destination address in the second 5-tuple information is not VIP;
处理模块,用于基于第一五元组信息,将第一业务报文分发到第一网卡队列上;基于第二五元组信息将第一控制报文分发到第二网卡队列上;其中,第一网卡队列用于将业务报文传输到第一CPU;第二网卡队列将控制报文传输到第二CPU。The processing module is configured to distribute the first service message to the first network card queue based on the first five-tuple information; and distribute the first control message to the second network card queue based on the second five-tuple information; wherein, The first network card queue is used to transmit service packets to the first CPU; the second network card queue is used to transmit control packets to the second CPU.
可选的,第一网卡队列为多个网卡队列中的一个,多个网卡队列中不包括第二网卡队列,多个网卡队列中的每个网卡队列用于传输业务报文。Optionally, the first network card queue is one of multiple network card queues. The multiple network card queues do not include the second network card queue. Each network card queue in the multiple network card queues is used to transmit service packets.
可选的,处理模块基于第一五元组信息,将第一业务报文分发到第一网卡队列上时,具体用于:计算第一五元组信息的哈希值h;对第一五元组信息的哈希值h取余:h%N,得到 第一值;其中N为预设值;根据第一值从重定向表中确定出第一网卡队列的标识;其中,重定向表中包括N个表项;N个表项中的每个表项对应一个网卡队列的标识;第一值用于指示N个表项中的一个;根据第一网卡队列的标识将第一业务报文分发到第一网卡队列上。Optionally, when the processing module distributes the first service message to the first network card queue based on the first five-tuple information, it is specifically used to: calculate the hash value h of the first five-tuple information; The hash value h of the tuple information is modulated by: h% N to obtain the first value; where N is the preset value; the identity of the first network card queue is determined from the redirection table based on the first value; where, in the redirection table It includes N entries; each entry in the N entries corresponds to the identifier of a network card queue; the first value is used to indicate one of the N entries; the first service packet is processed according to the identifier of the first network card queue. Distributed to the first network card queue.
可选的,处理模块基于第二五元组信息将第一控制报文分发到第二网卡队列上时,具体用于:确定第二五元组信息中的目的地址为预设的IP地址、目的端口号为预设的端口号、协议号为预设的协议号;将第一控制报文分发到第二网卡队列上。Optionally, when the processing module distributes the first control message to the second network card queue based on the second five-tuple information, it is specifically used to: determine that the destination address in the second five-tuple information is the preset IP address; The destination port number is a preset port number and the protocol number is a preset protocol number; the first control message is distributed to the second network card queue.
可选的,处理模块还用于:基于报文指示器Flow Director或通用流Rte_Flow配置预设的IP地址、预设的端口号、预设的协议号。Optionally, the processing module is also used to configure a preset IP address, a preset port number, and a preset protocol number based on the message indicator Flow Director or the general flow Rte_Flow.
第三方面,提供一种通信装置,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器、通信接口;其中,存储器存储有可被至少一个处理器执行的指令,至少一个处理器通过执行所述存储器存储的指令,使得所述装置通过通信接口执行如第一方面或第一方面任一种可选的实施方式中所述的方法。In a third aspect, a communication device is provided, including: at least one processor; and a memory and a communication interface communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by at least one processor, and at least one The processor executes instructions stored in the memory, causing the device to execute the method described in the first aspect or any optional implementation manner of the first aspect through the communication interface.
第四方面,提供一种计算机可读存储介质,所述计算机可读存储介质用于存储指令,当所述指令被执行时,使如第一方面或第一方面任一种可选的实施方式中所述的方法被实现。In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium is used to store instructions. When the instructions are executed, the first aspect or any optional implementation of the first aspect is implemented. The method described in is implemented.
本申请实施例中第二、第三、第四方面中提供的一个或多个技术方案所具有的技术效果或优点,均可以由第一方面中提供的对应的一个或多个技术方案所具有的技术效果或优点对应解释,此处不再赘述。The technical effects or advantages of one or more technical solutions provided in the second, third, and fourth aspects of the embodiments of this application can all be possessed by the corresponding one or more technical solutions provided in the first aspect. The corresponding explanation of technical effects or advantages will not be repeated here.
图1为本申请实施例提供的一种可能的应用场景示意图;Figure 1 is a schematic diagram of a possible application scenario provided by the embodiment of the present application;
图2为一种分离业务报文和控制报文的示意图;Figure 2 is a schematic diagram of separating service messages and control messages;
图3为本申请实施例提供的一种报文传输方法的流程图;Figure 3 is a flow chart of a message transmission method provided by an embodiment of the present application;
图4为本申请实施例提供的一种分离业务报文和控制的示意图;Figure 4 is a schematic diagram of separating service messages and control provided by an embodiment of the present application;
图5为本申请实施例提供的一种通信装置的结构示意图;Figure 5 is a schematic structural diagram of a communication device provided by an embodiment of the present application;
图6为本申请实施例提供的另一种通信装置的结构示意图。Figure 6 is a schematic structural diagram of another communication device provided by an embodiment of the present application.
为了更好的理解上述技术方案,下面通过附图以及具体实施例对本申请技术方案做详细的说明,应当理解本申请实施例以及实施例中的具体特征是对本申请技术方案的详细的说明,而不是对本申请技术方案的限定,在不冲突的情况下,本申请实施例以及实施例中的技术特征可以相互组合。In order to better understand the above technical solution, the technical solution of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are a detailed description of the technical solution of the present application, and This is not intended to limit the technical solution of the present application. If there is no conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
需要理解的是,在本申请实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。在本申请实施例的描述中“多个”,是指两个或两个以上。It should be understood that in the description of the embodiments of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating. Or suggestive order. In the description of the embodiments of this application, "multiple" means two or more.
本申请实施例中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。The term "and/or" in the embodiment of this application is only an association relationship describing associated objects, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, and A and A exist simultaneously. B, there are three situations of B alone. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship.
为了便于理解本申请实施例的方案,下面先介绍本申请实施例可能的应用场景。In order to facilitate understanding of the solutions of the embodiments of the present application, possible application scenarios of the embodiments of the present application are first introduced below.
本申请实施例可以用于各种类型的网卡,例如支持数据平面开发套件(Data Plane Development Kit,DPDK)服务的网卡,或者其它装置。只要该装置存在将报文传输到CPU的需求,则均可以采用本申请实施例的技术方案。为了便于描述,本文以支持DPDK的网卡为例进行阐述。Embodiments of the present application can be used for various types of network cards, such as network cards that support Data Plane Development Kit (DPDK) services, or other devices. As long as the device has a need to transmit messages to the CPU, the technical solutions in the embodiments of the present application can be adopted. For ease of description, this article takes a network card that supports DPDK as an example.
基于DPDK开发的应用服务大部分使用网卡多队列、多核CPU绑定队列等技术提高网络吞吐性能。DPDK应用服务使用内核旁路技术,有独立应用协议栈流量经过网卡直接进入应用程序处理,而不经过操作系统内核Linux网络协议栈。业务流量(特指应用程序处理的服务流量一般是VIP服务流量)和控制流量(特指所有非VIP服务流量包括所有主机IP、边界网关协议(Border Gateway Protocol,BGP)/最短路径优先(Open Shortest Path First,OSPF)/健康检查等流量)都混合在各自不同网卡队列接收处理。Most application services developed based on DPDK use network card multi-queue, multi-core CPU bound queue and other technologies to improve network throughput performance. DPDK application services use kernel bypass technology, and independent application protocol stack traffic passes through the network card and directly enters the application program for processing, without going through the operating system kernel Linux network protocol stack. Business traffic (specifically refers to the service traffic processed by the application, which is generally VIP service traffic) and control traffic (specifically refers to all non-VIP service traffic including all host IPs, Border Gateway Protocol (BGP)/Shortest Path First (Open Shortest) Path First, OSPF)/health check and other traffic) are mixed in different network card queues for reception and processing.
示例性的,参见图1,为本申请实施例适用的一种场景示意图,DPDK网卡上可以接收报文(报文的类型包括业务报文和控制报文),将报文分发到网卡队列上,其中,不同的网卡队列对应不同的CPU核。CPU核收到报文之后,处理报文,并将处理好的报文传输到对应的进程中。可以理解的,本文中不同的CPU核可以集成在不同的CPU物理实体上,也可以集成在不同的CPU物理实体,为了便于描述,本文以一个CPU核就是一个CPU为例进行描述。For example, see Figure 1, which is a schematic diagram of a scenario applicable to the embodiment of the present application. The DPDK network card can receive messages (the types of messages include business messages and control messages) and distribute the messages to the network card queue. , where different network card queues correspond to different CPU cores. After the CPU core receives the message, it processes the message and transmits the processed message to the corresponding process. It is understandable that different CPU cores in this article can be integrated on different CPU physical entities, or can be integrated in different CPU physical entities. For the convenience of description, this article uses the example that one CPU core is a CPU for description.
其中,对于不同类型的报文,需要被传输到不同的进程中,例如业务报文需要被传输到转发进程中,控制报文则需要被传输到控制包进程中。Among them, different types of messages need to be transmitted to different processes. For example, business messages need to be transmitted to the forwarding process, and control messages need to be transmitted to the control packet process.
一种可能的实现方式,是在CPU处对业务报文和控制报文进行分离,换而言之,同一网卡队列中可能同时存在业务报文和控制报文,同一个CPU可能既处理业务报文又处理控制报文,如图2所示,第一网卡队列中同时承载有业务报文和控制报文,CPU1既处理业务报文,又处理控制报文。One possible implementation is to separate business packets and control packets at the CPU. In other words, there may be both business packets and control packets in the same network card queue, and the same CPU may process both business packets and control packets. The first network card queue also processes control packets. As shown in Figure 2, the first network card queue carries both business packets and control packets. CPU1 processes both business packets and control packets.
然而,实际应用中,业务报文的流量是动态变化的,当业务报文激增而业务报文和控制 报文共享网卡队列时,网卡会出现控制报文延迟、丢失等问题,进而影响到业务的正常运行。However, in actual applications, the traffic of business packets changes dynamically. When business packets surge and business packets and control packets share the network card queue, problems such as delay and loss of control packets will occur in the network card, which in turn affects the business. of normal operation.
鉴于此,提供本申请实施例技术方案,用于实现在网卡处将业务报文和控制报文进行分离,使得业务报文和控制报文分别承载在不同的网卡队列中,以及分别由不同的CPU进行处理,进而可以避免控制报文延迟、丢失等问题。In view of this, the technical solution of the embodiment of the present application is provided to realize the separation of service messages and control messages at the network card, so that the service messages and control messages are carried in different network card queues respectively, and are respectively carried by different network card queues. The CPU performs processing to avoid problems such as delay and loss of control messages.
参见图3,为本申请实施例提供的一种报文传输的方法的流程图,该方法以应用于图1所示的场景为例,该方法具体步骤如下:Refer to Figure 3, which is a flow chart of a message transmission method provided by an embodiment of the present application. The method is applied to the scenario shown in Figure 1 as an example. The specific steps of the method are as follows:
步骤S301:网卡接收第一业务报文和第一控制报文。Step S301: The network card receives the first service message and the first control message.
一般的,报文中都携带有五元组信息,包括源地址,目的地址,源端口号,目的端口号,协议号。本申请实施例不限制报文的类型,为了便于描述,本文以IP报文为例。相应的,源地址、目的地址,源端口号,目的端口号,分别为:源IP地址、目的IP地址,源传输控制协议(Transmission Control Protocol,TCP)/用户数据报协议(User Datagram Protocol,UDP)端口号,目的TCP/UDP端口号。Generally, packets carry five-tuple information, including source address, destination address, source port number, destination port number, and protocol number. The embodiments of this application do not limit the type of packets. For convenience of description, this article takes IP packets as an example. Correspondingly, the source address, destination address, source port number, and destination port number are: source IP address, destination IP address, source Transmission Control Protocol (TCP)/User Datagram Protocol (UDP) ) port number, destination TCP/UDP port number.
在本申请实施例中,第一业务报文携带第一五元组信息,第一控制报文携带第二五元组信息。In this embodiment of the present application, the first service packet carries the first five-tuple information, and the first control packet carries the second five-tuple information.
其中,第一五元组信息中的目的地址的类型为VIP;第二五元组信息中的目的地址的类型不是VIP,或者说是除了VIP之外的其它类型的地址,比如主机标识协议(Host Identity Protocol,HIP)地址。例如,第一业务报文的五元组信息可以表示为S1=(SIP,VIP,SPORT,DPORT,PROTO),其中SIP,VIP,SPORT,DPORT,PROTO分别代表第一业务报文的源IP地址、目的IP地址、源端口号、目的端口号、协议号;第一控制报文的五元组信息可以表示为S2=(SIP,HIP,SPORT,DPORT,PROTO),其中SIP,VIP,SPORT,DPORT,PROTO分别代表第二业务报文的源IP地址、目的IP地址、源端口号、目的端口号、协议号,其中协议号可以是传输层协议的协议号。Among them, the type of the destination address in the first quintuple information is VIP; the type of the destination address in the second quintuple information is not VIP, or it is an address of other types besides VIP, such as Host Identification Protocol ( Host Identity Protocol, HIP) address. For example, the five-tuple information of the first service message can be expressed as S1 = (SIP, VIP, SPORT, DPORT, PROTO), where SIP, VIP, SPORT, DPORT, and PROTO respectively represent the source IP address of the first service message. , destination IP address, source port number, destination port number, protocol number; the five-tuple information of the first control message can be expressed as S2 = (SIP, HIP, SPORT, DPORT, PROTO), where SIP, VIP, SPORT, DPORT and PROTO respectively represent the source IP address, destination IP address, source port number, destination port number, and protocol number of the second service message, where the protocol number can be the protocol number of the transport layer protocol.
步骤S302:网卡基于第一五元组信息,将第一业务报文分发到第一网卡队列上;网卡基于第二五元组信息将第一控制报文分发到第二网卡队列上。Step S302: The network card distributes the first service packet to the first network card queue based on the first five-tuple information; the network card distributes the first control packet to the second network card queue based on the second five-tuple information.
其中,第一网卡队列用于传输业务报文(不传输控制报文),第二网卡队列用于传输控制报文(不传输业务报文)。Among them, the first network card queue is used to transmit service packets (not to transmit control packets), and the second network card queue is used to transmit control packets (not to transmit business packets).
具体的,网卡基于第一五元组信息中的目的地址的类型(即VIP),确定第一业务报文的报文类型是业务报文,将其分发到用于传输业务报文的网卡队列上。网卡基于第二五元组信息中的目的地址的类型(如HIP),确定第二业务报文的报文类型是控制报文,将其分发 到用于传输控制报文的网卡队列上。Specifically, the network card determines that the message type of the first service message is a service message based on the type of the destination address in the first five-tuple information (ie, VIP), and distributes it to the network card queue used to transmit the service message. superior. Based on the type of the destination address (such as HIP) in the second five-tuple information, the network card determines that the message type of the second service message is a control message, and distributes it to the network card queue used to transmit the control message.
一种可能的实现方式中,网络中用于传输业务报文的网卡队列的数量为一个,例如第一网卡队列,则网卡直接将第一业务报文分发到第一网卡队列上。In one possible implementation, the number of network card queues used to transmit service packets in the network is one, such as the first network card queue, and the network card directly distributes the first service packet to the first network card queue.
一种可能的实现方式中,网络中用于传输业务报文的网卡队列的数量为多个(例如第一网卡队列为网卡队列组中的一个,网卡队列组中包括多个网卡队列,多个网卡队列组中不包括第二网卡队列),则网卡需要进一步从这多个网卡队列中确定出第一网卡队列,然后网卡将第一业务报文分发到第一网卡队列上。In a possible implementation, the number of network card queues used to transmit service packets in the network is multiple (for example, the first network card queue is one of the network card queue groups, and the network card queue group includes multiple network card queues, and multiple network card queues are included in the network card queue group. (the network card queue group does not include the second network card queue), the network card needs to further determine the first network card queue from these multiple network card queues, and then the network card distributes the first service packet to the first network card queue.
一种可能的设计中,网卡从多个网卡队列中确定出第一网卡队列,包括:DPDK网卡计算第一五元组信息的哈希值,得到哈希值h;然后对哈希值h进行取余计算:h%N,得到第一值,其中N为预设值;然后根据第一值从重定向表中确定出第一网卡队列的标识;其中,重定向表中包括N个表项;N个表项中的每个表项对应一个网卡队列的标识;第一值用于指示N个表项中的一个。进而,网卡可以根据第一网卡队列的标识将第一业务报文分发到第一网卡队列上。该方式通过查询重定向表确定第一网卡队列,实现方式简单,易实施。In one possible design, the network card determines the first network card queue from multiple network card queues, including: the DPDK network card calculates the hash value of the first five-tuple information and obtains the hash value h; and then performs the hash value h on the hash value h. Calculate the remainder: h%N to obtain the first value, where N is a preset value; then determine the identity of the first network card queue from the redirection table based on the first value; wherein the redirection table includes N entries; Each entry among the N entries corresponds to the identifier of a network card queue; the first value is used to indicate one of the N entries. Furthermore, the network card can distribute the first service packet to the first network card queue according to the identifier of the first network card queue. This method determines the first network card queue by querying the redirection table, and is simple and easy to implement.
在具体实现时,网卡将第一业务报文分发到第一网卡队列的过程可以基于RSS实现,RSS是一种可以通过对五元组信息进行哈希计算对报文进行分发的技术,可以实现将不同的报文负载均衡地转发到多个不同的CPU上。考虑到不同的网卡,其默认的重定向表的长度不同,因此在具体应用时,如果业务进程的个数与重定向表的长度(即表项的数量)不匹配,则需要对重定向表进行重置后再使用。In specific implementation, the process of the network card distributing the first service message to the first network card queue can be implemented based on RSS. RSS is a technology that can distribute the message by performing hash calculation on the five-tuple information, which can be implemented Forward different packets to multiple different CPUs in a load-balanced manner. Considering that different network cards have different default redirection table lengths, in specific applications, if the number of business processes does not match the length of the redirection table (that is, the number of table entries), you need to modify the redirection table. Perform a reset before using.
示例性的,以82599型号的网卡、业务进程的数量为16为例:For example, taking the 82599 model network card and the number of service processes as 16:
第一步,82599型号的网卡对应重定向表长度为64,重定向表的表项从0取到63;业务进程个数为16,则需要配置16个网卡队列,网卡队列号的取值依次为0到15;根据进程个数对重定向表中的各个表项进行取余计算,即0到63分别对16取余,将取余结果作为各个表项对应的网卡队列号写入重定向表中,得到重置的重定向表。根据取余结果,第0到15表项对应的网卡队列号为0到15,第16到31表项对应的网卡队列号0到15,……,以此类推,使重置的重定向表中每个的表项对应的网卡队列号时为0到15中的一个。In the first step, the length of the redirection table corresponding to the 82599 model network card is 64, and the entries in the redirection table are taken from 0 to 63; the number of business processes is 16, so 16 network card queues need to be configured, and the values of the network card queue numbers are in order is 0 to 15; perform remainder calculation on each entry in the redirection table based on the number of processes, that is, take the remainder of 16 from 0 to 63, and write the remainder result as the network card queue number corresponding to each entry in the redirection table to get the reset redirection table. According to the remainder result, the network card queue numbers corresponding to the 0 to 15 table entries are 0 to 15, the network card queue numbers corresponding to the 16 to 31 table entries are 0 to 15,..., and so on, so that the reset redirection table The network card queue number corresponding to each entry is one from 0 to 15.
第二步,计算第一业务报文的哈希值,假设哈希值为63,根据重定向表长度对哈希值63取余,即63%64取余,取余结果为63,查询重置的RSS重定向表中对应63的表项,该表项对应的网卡队列号为15,则确定第一业务报文会分发到15号的网卡队列上。The second step is to calculate the hash value of the first service message. Assume that the hash value is 63. The remainder of the hash value 63 is taken according to the length of the redirection table, that is, the remainder is 63% 64. The remainder result is 63. The query is repeated. If there is an entry corresponding to 63 in the configured RSS redirection table, and the network card queue number corresponding to this entry is 15, it is determined that the first service packet will be distributed to the network card queue number 15.
一种可能的设计中,网卡基于第二五元组信息将第一控制报文分发到第二网卡队列上, 包括:网卡确定第二五元组信息中的目的地址为预设的目的地址、目的端口号为预设的端口号、协议号为预设的协议号;网卡将第一控制报文绑定第二网卡队列,第二网卡队列将第一控制报文传输给第二CPU。In one possible design, the network card distributes the first control message to the second network card queue based on the second five-tuple information, including: the network card determines that the destination address in the second five-tuple information is the preset destination address; The destination port number is a preset port number and the protocol number is a preset protocol number; the network card binds the first control message to the second network card queue, and the second network card queue transmits the first control message to the second CPU.
在具体实现时,网卡将第一控制报文分发到第二网卡队列的过程可以基于Flow Director或Rte_Flow实现,Flow Director或Rte_Flow是一种可以匹配报文中特殊字段,决定传输报文的网卡队列的技术,其中特殊字段可以作为报文匹配规则。In specific implementation, the process of the network card distributing the first control message to the second network card queue can be implemented based on Flow Director or Rte_Flow. Flow Director or Rte_Flow is a network card queue that can match special fields in the message and decide to transmit the message. Technology in which special fields can be used as packet matching rules.
具体的,基于Flow Director或Rte_Flow在网卡上配置报文匹配规则,报文匹配规则包括控制报文对应的目的地址,目的端口号,协议号,用S=Match{DIP,DPORT,PROTO}表示。Specifically, configure message matching rules on the network card based on Flow Director or Rte_Flow. The message matching rules include the destination address, destination port number, and protocol number corresponding to the control message, represented by S=Match{DIP,DPORT,PROTO}.
例如:For example:
S
OSPF=Match{224.0.0.5,0,0};
S OSPF =Match{224.0.0.5,0,0};
S
BGP=Match{hip,179,6};
S BGP =Match{hip,179,6};
S
HIP=Match{hip,0,0}。
SHIP =Match{hip,0,0}.
其中DPORT=0,表示所有端口,PROTO=0表示所有协议,BGP为TCP协议使用179端口,TCP协议在IP报头中字段为6。Among them, DPORT=0 means all ports, PROTO=0 means all protocols, BGP uses port 179 for the TCP protocol, and the TCP protocol has a field of 6 in the IP header.
其中S
HIP流量包含S
BGP流量,这里S
BGP配置展示用户可自定义配置端口的方法,S
HIP流量也包括安全外壳协议(Secure Shell,SSH)远程登陆流量。
Among them, S HIP traffic includes S BGP traffic. The S BGP configuration here shows how users can customize the port configuration. S HIP traffic also includes Secure Shell Protocol (Secure Shell, SSH) remote login traffic.
设置完成匹配发往OSPF,BGP和管理口主机IP的控制流量就可以被第二网卡队列接收。After the setting is completed, the control traffic sent to OSPF, BGP and the management port host IP can be received by the second network card queue.
可以理解的,以上是以用于传输控制报文的网卡队列数量为1为例,实际应用中用于传输控制报文的网卡队列数量也可以为多个,进而进一步提高控制报文的传输效率。It can be understood that the above example takes the number of network card queues used to transmit control messages as 1. In actual applications, the number of network card queues used to transmit control messages can also be multiple, thereby further improving the transmission efficiency of control messages. .
进一步的,本申请实施例中的不同的网卡队列绑定不同的CPU,不同的CPU将报文传输给不同的进程。示例性的,第一网卡队列对应第一CPU,第一网卡队列用于将业务报文传输到第一CPU,第一转发进程绑定第一CPU处理第一业务报文;第二网卡队列对应第二CPU,第二网卡队列将控制报文传输到第二CPU,第一控制进程绑定第二CPU处理第一控制报文。Furthermore, different network card queues in the embodiment of this application are bound to different CPUs, and different CPUs transmit messages to different processes. Exemplarily, the first network card queue corresponds to the first CPU, the first network card queue is used to transmit service packets to the first CPU, and the first forwarding process binds the first CPU to process the first service packet; the second network card queue corresponds to The second CPU and the second network card queue transmit the control packet to the second CPU, and the first control process binds the second CPU to process the first control packet.
例如,参见图4,网卡队列0~网卡队列n,分别对应CPU0~CPUn,其中网卡队列0~网卡队列n-1用于承载业务报文,网卡队列n专门用于承载控制报文。For example, see Figure 4, NIC queue 0 to NIC queue n correspond to CPU0 to CPUn respectively, in which NIC queue 0 to NIC queue n-1 are used to carry service packets, and NIC queue n is specially used to carry control packets.
通过上述方案,可以实现在网卡处将业务报文和控制报文进行分离,使得业务报文和控制报文分别承载在不同的网卡队列中,并且分别由不同的CPU进行处理,避免业务报文激 增会导致报文传输延迟、丢失等问题。Through the above solution, the business packets and control packets can be separated at the network card, so that the business packets and control packets are carried in different network card queues and processed by different CPUs respectively to avoid business packets The surge will cause problems such as packet transmission delays and loss.
以上介绍了本申请实施例提供的方法,以下介绍本申请实施例提供的装置。The method provided by the embodiment of the present application is introduced above, and the device provided by the embodiment of the present application is introduced below.
参见图5,本申请实施例提供一种通信装置500,该装置可以是上文中网卡等,该装置包括用于执行图3所示的方法的模块/单元/技术手段。Referring to FIG. 5 , an embodiment of the present application provides a communication device 500 , which may be the above-mentioned network card, etc. The device includes modules/units/technical means for executing the method shown in FIG. 3 .
示例性的,该装置包括:By way of example, the device includes:
收发模501,用于接收第一业务报文和第一控制报文;其中,所述第一业务报文中包括第一五元组信息,所述第一五元组信息中的目的地址为虚拟网络地址VIP,所述第一控制报文中包括第二五元组信息,所述第二五元组信息中的目的地址为主机标识协议HIP;The transceiver module 501 is used to receive the first service message and the first control message; wherein the first service message includes the first five-tuple information, and the destination address in the first five-tuple information is Virtual network address VIP, the first control message includes second five-tuple information, and the destination address in the second five-tuple information is Host Identification Protocol HIP;
处理模块502,用于基于所述第一五元组信息,将所述第一业务报文分发到所述第一网卡队列上;所述网卡基于所述第二五元组信息将所述第一控制报文分发到第二网卡队列上。The processing module 502 is configured to distribute the first service message to the first network card queue based on the first five-tuple information; the network card distributes the third service message based on the second five-tuple information. A control packet is distributed to the second network card queue.
应理解,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be understood that all relevant content of each step involved in the above method embodiments can be quoted from the functional description of the corresponding functional module, and will not be described again here.
作为上述装置一种可能的产品形态,参见图6,本申请实施例还提供一种通信装置600,包括:As a possible product form of the above device, referring to Figure 6, an embodiment of the present application also provides a communication device 600, including:
至少一个处理器601;以及与所述至少一个处理器601通信连接的通信接口603;所述至少一个处理器601通过执行存储器602存储的指令,使得所述电子设备600通过所述通信接口603执行上述方法实施例中网卡所执行的方法步骤。At least one processor 601; and a communication interface 603 communicatively connected to the at least one processor 601; the at least one processor 601 causes the electronic device 600 to execute through the communication interface 603 by executing instructions stored in the memory 602 The method steps performed by the network card in the above method embodiment.
可选的,所述存储器602位于所述通信装置600之外。Optionally, the memory 602 is located outside the communication device 600 .
可选的,所述电子设备600包括所述存储器602,所述存储器602与所述至少一个处理器601相连,所述存储器602存储有可被所述至少一个处理器601执行的指令。附图6用虚线表示存储器602对于电子设备600是可选的。Optionally, the electronic device 600 includes the memory 602, the memory 602 is connected to the at least one processor 601, and the memory 602 stores instructions that can be executed by the at least one processor 601. Figure 6 shows in dashed lines that memory 602 is optional for electronic device 600.
其中,所述处理器601和所述存储器602可以通过接口电路耦合,也可以集成在一起,这里不做限制。The processor 601 and the memory 602 may be coupled through an interface circuit, or may be integrated together, without limitation here.
本申请实施例中不限定上述处理器601、存储器602以及通信接口603之间的具体连接介质。本申请实施例在图6中以处理器601、存储器602以及通信接口603之间通过总线604连接,总线在图6中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。应理解,本申请实施例中提及的处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储 器中存储的软件代码来实现。The specific connection medium between the above-mentioned processor 601, memory 602 and communication interface 603 is not limited in the embodiment of the present application. In the embodiment of the present application, the processor 601, the memory 602 and the communication interface 603 are connected through a bus 604 in Figure 6. The bus is represented by a thick line in Figure 6. The connection between other components is only schematically explained. , is not limited. The bus can be divided into address bus, data bus, control bus, etc. For ease of presentation, only one thick line is used in Figure 6, but it does not mean that there is only one bus or one type of bus. It should be understood that the processor mentioned in the embodiments of this application can be implemented by hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in memory.
示例性的,处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。For example, the processor can be a central processing unit (Central Processing Unit, CPU), or other general-purpose processor, digital signal processor (Digital Signal Processor, DSP), or application specific integrated circuit (Application Specific Integrated Circuit, ASIC) , off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Eate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。It should be understood that the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electrically removable memory. Erase programmable read-only memory (Electrically EPROM, EEPROM) or flash memory. Volatile memory may be Random Access Memory (RAM), which is used as an external cache. By way of illustration, but not limitation, many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Eate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (Synchlink DRAM, SLDRAM) ) and direct memory bus random access memory (Direct Rambus RAM, DR RAM).
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated in the processor.
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质用于存储指令,当所述指令被执行时,使得计算机执行上述网卡所执行的方法步骤。Embodiments of the present application also provide a computer-readable storage medium, which is used to store instructions. When the instructions are executed, the computer executes the method steps performed by the above-mentioned network card.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will understand that embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, the present application may 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.) having computer-usable program code embodied therein.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方 框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the present application. It will be understood that each process and/or block in the flowchart illustrations and/or block diagrams, and combinations of processes and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a use A device for realizing the functions specified in one process or multiple processes of the flowchart and/or one block or multiple blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions The device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device. Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. In this way, if these modifications and variations of the present application fall within the scope of the claims of the present application and equivalent technologies, the present application is also intended to include these modifications and variations.
Claims (10)
- 一种报文传输方法,其特征在于,包括:A message transmission method, characterized by including:网卡接收第一业务报文和第一控制报文;其中,所述第一业务报文中包括第一五元组信息,所述第一五元组信息中的目的地址的类型为虚拟网络地址VIP,所述第一控制报文中包括第二五元组信息,所述第二五元组信息中的目的地址的类型不是VIP;The network card receives the first service message and the first control message; wherein the first service message includes first five-tuple information, and the type of the destination address in the first five-tuple information is a virtual network address. VIP, the first control message includes second five-tuple information, and the type of the destination address in the second five-tuple information is not VIP;所述网卡基于所述第一五元组信息,将所述第一业务报文分发到第一网卡队列上;所述网卡基于所述第二五元组信息将所述第一控制报文分发到第二网卡队列上;The network card distributes the first service message to the first network card queue based on the first five-tuple information; the network card distributes the first control message based on the second five-tuple information. Go to the second network card queue;其中,所述第一网卡队列用于将业务报文传输到第一中央处理器CPU;所述第二网卡队列将控制报文传输到第二CPU。The first network card queue is used to transmit service packets to the first central processing unit CPU; the second network card queue is used to transmit control packets to the second CPU.
- 如权利要求1所述的方法,其特征在于,所述第一网卡队列为多个网卡队列中的一个,所述多个网卡队列中不包括所述第二网卡队列,所述多个网卡队列中的每个网卡队列用于传输业务报文。The method of claim 1, wherein the first network card queue is one of multiple network card queues, the multiple network card queues do not include the second network card queue, and the multiple network card queues Each network card queue in is used to transmit service packets.
- 如权利要求1或2所述的方法,其特征在于,所述网卡基于所述第一五元组信息,将所述第一业务报文分发到所述第一网卡队列上,包括:The method of claim 1 or 2, wherein the network card distributes the first service message to the first network card queue based on the first five-tuple information, including:所述网卡计算所述第一五元组信息的哈希值h;The network card calculates the hash value h of the first five-tuple information;所述网卡对所述第一五元组信息的哈希值h取余:h%N,得到第一值;其中N为预设值;The network card takes the remainder of the hash value h of the first five-tuple information: h% N to obtain the first value; where N is a preset value;所述网卡根据所述第一值从重定向表中确定出所述第一网卡队列的标识;其中,所述重定向表中包括N个表项;所述N个表项中的每个表项对应一个网卡队列的标识;所述第一值用于指示所述N个表项中的一个;The network card determines the identity of the first network card queue from the redirection table according to the first value; wherein the redirection table includes N entries; each entry in the N entries Corresponding to the identifier of a network card queue; the first value is used to indicate one of the N entries;所述网卡根据所述第一网卡队列的标识将所述第一业务报文分发到所述第一网卡队列上。The network card distributes the first service packet to the first network card queue according to the identifier of the first network card queue.
- 如权利要求1或2所述的方法,其特征在于,所述网卡基于所述第二五元组信息将所述第一控制报文分发到第二网卡队列上,包括:The method of claim 1 or 2, wherein the network card distributes the first control message to the second network card queue based on the second five-tuple information, including:所述网卡确定所述第二五元组信息中的目的地址为预设的网际互连协议IP地址、目的端口号为预设的端口号、协议号为预设的协议号;The network card determines that the destination address in the second quintuple information is the preset Internet Protocol IP address, the destination port number is the preset port number, and the protocol number is the preset protocol number;所述网卡将所述第一控制报文分发到第二网卡队列上。The network card distributes the first control message to the second network card queue.
- 如权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, further comprising:所述网卡基于报文指示器Flow Director或通用流Rte_Flow配置所述预设的IP地址、所述预设的端口号、所述预设的协议号。The network card configures the preset IP address, the preset port number, and the preset protocol number based on the message indicator Flow Director or the general flow Rte_Flow.
- 一种通信装置,其特征在于,包括:A communication device, characterized by including:收发模块,用于接收第一业务报文和第一控制报文;其中,所述第一业务报文中包括第一五元组信息,所述第一五元组信息中的目的地址的类型为VIP,所述第一控制报文中包括第二五元组信息,所述第二五元组信息中的目的地址的类型不是VIP;A transceiver module, configured to receive a first service message and a first control message; wherein the first service message includes first five-tuple information, and the type of the destination address in the first five-tuple information It is VIP, the first control message includes second five-tuple information, and the type of the destination address in the second five-tuple information is not VIP;处理模块,用于基于所述第一五元组信息,将所述第一业务报文分发到所述第一网卡队列上;基于所述第二五元组信息将所述第一控制报文分发到第二网卡 队列上;A processing module configured to distribute the first service message to the first network card queue based on the first five-tuple information; and distribute the first control message based on the second five-tuple information. Distributed to the second network card queue;其中,所述第一网卡队列用于将业务报文传输到第一CPU;所述第二网卡队列将控制报文传输到第二CPU。The first network card queue is used to transmit service packets to the first CPU; the second network card queue is used to transmit control packets to the second CPU.
- 如权利要求6所述的装置,其特征在于,所述处理模块在基于所述第一五元组信息,将所述第一业务报文分发到所述第一网卡队列上时,具体用于:The device of claim 6, wherein the processing module is specifically configured to distribute the first service message to the first network card queue based on the first five-tuple information. :计算所述第一五元组信息的哈希值h;Calculate the hash value h of the first quintuple information;对所述第一五元组信息的哈希值h取余:h%N,得到第一值;其中N为预设值;Take the modulus of the hash value h of the first quintuple information: h% N to obtain the first value; where N is the preset value;根据所述第一值从重定向表中确定出所述第一网卡队列的标识;其中,所述重定向表中包括N个表项;所述N个表项中的每个表项对应一个网卡队列的标识;所述第一值用于指示所述N个表项中的一个;Determine the identity of the first network card queue from the redirection table according to the first value; wherein the redirection table includes N entries; each entry in the N entries corresponds to a network card The identifier of the queue; the first value is used to indicate one of the N entries;根据所述第一网卡队列的标识将所述第一业务报文分发到所述第一网卡队列上。Distribute the first service packet to the first network card queue according to the identifier of the first network card queue.
- 如权利要求6所述的装置,其特征在于,所述处理模块在基于所述第二五元组信息将所述第一控制报文分发到第二网卡队列上时,具体用于:The device of claim 6, wherein the processing module, when distributing the first control message to the second network card queue based on the second quintuple information, is specifically used to:确定所述第二五元组信息中的目的地址为预设的IP地址、目的端口号为预设的端口号、协议号为预设的协议号;Determine that the destination address in the second quintuple information is the preset IP address, the destination port number is the preset port number, and the protocol number is the preset protocol number;将所述第一控制报文分发到第二网卡队列上。Distribute the first control message to the second network card queue.
- 一种通信装置,其特征在于,包括:A communication device, characterized by including:至少一个处理器;以及与所述至少一个处理器通信连接的存储器、通信接口;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述至少一个处理器通过执行所述存储器存储的指令,使得所述装置通过所述通信接口执行如权利要求1-5中任一项所述的方法。At least one processor; and a memory and a communication interface communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the The memory stores instructions that enable the device to execute the method according to any one of claims 1-5 through the communication interface.
- 一种计算机可读存储介质,其特征在于,包括程序或指令,当所述程序或指令在计算机上运行时,使得如权利要求1-5中任一项所述的方法被执行。A computer-readable storage medium, characterized by including a program or instructions, which when the program or instructions are run on a computer, causes the method according to any one of claims 1 to 5 to be executed.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210832763.7A CN115242711A (en) | 2022-07-14 | 2022-07-14 | Message transmission method and device |
CN202210832763.7 | 2022-07-14 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024011854A1 true WO2024011854A1 (en) | 2024-01-18 |
Family
ID=83673147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/141471 WO2024011854A1 (en) | 2022-07-14 | 2022-12-23 | Message transmission method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115242711A (en) |
WO (1) | WO2024011854A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118200421A (en) * | 2024-05-20 | 2024-06-14 | 北京安博通科技股份有限公司 | Message processing method, device, electronic equipment and medium |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115242711A (en) * | 2022-07-14 | 2022-10-25 | 天翼云科技有限公司 | Message transmission method and device |
CN116668375B (en) * | 2023-07-31 | 2023-11-21 | 新华三技术有限公司 | Message distribution method, device, network equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9948579B1 (en) * | 2015-03-30 | 2018-04-17 | Juniper Networks, Inc. | NIC-based packet assignment for virtual networks |
CN109729021A (en) * | 2018-12-27 | 2019-05-07 | 北京天融信网络安全技术有限公司 | A kind of message processing method and electronic equipment |
CN112152940A (en) * | 2019-06-28 | 2020-12-29 | 华为技术有限公司 | Message processing method, device and system |
WO2021238248A1 (en) * | 2020-05-27 | 2021-12-02 | 广东浪潮智慧计算技术有限公司 | Network traffic classification processing method and apparatus, device, and medium |
CN114006863A (en) * | 2021-11-02 | 2022-02-01 | 北京科东电力控制系统有限责任公司 | Multi-core load balancing cooperative processing method and device and storage medium |
CN115242711A (en) * | 2022-07-14 | 2022-10-25 | 天翼云科技有限公司 | Message transmission method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106385378A (en) * | 2016-08-31 | 2017-02-08 | 北京神州绿盟信息安全科技股份有限公司 | Processing method and device for controlling message in in-band management control |
CN109246023A (en) * | 2018-11-16 | 2019-01-18 | 锐捷网络股份有限公司 | Flow control methods, the network equipment and storage medium |
CN112929277B (en) * | 2019-12-06 | 2024-03-05 | 华为云计算技术有限公司 | Message processing method and device |
CN114553780A (en) * | 2020-11-11 | 2022-05-27 | 北京华为数字技术有限公司 | Load balancing method and device and network card |
CN112422453B (en) * | 2020-12-09 | 2022-05-24 | 新华三信息技术有限公司 | Message processing method, device, medium and equipment |
CN112737967B (en) * | 2020-12-25 | 2022-12-06 | 江苏省未来网络创新研究院 | Method for realizing IPv4 GRE message load balancing based on Flow Director |
-
2022
- 2022-07-14 CN CN202210832763.7A patent/CN115242711A/en active Pending
- 2022-12-23 WO PCT/CN2022/141471 patent/WO2024011854A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9948579B1 (en) * | 2015-03-30 | 2018-04-17 | Juniper Networks, Inc. | NIC-based packet assignment for virtual networks |
CN109729021A (en) * | 2018-12-27 | 2019-05-07 | 北京天融信网络安全技术有限公司 | A kind of message processing method and electronic equipment |
CN112152940A (en) * | 2019-06-28 | 2020-12-29 | 华为技术有限公司 | Message processing method, device and system |
WO2021238248A1 (en) * | 2020-05-27 | 2021-12-02 | 广东浪潮智慧计算技术有限公司 | Network traffic classification processing method and apparatus, device, and medium |
CN114006863A (en) * | 2021-11-02 | 2022-02-01 | 北京科东电力控制系统有限责任公司 | Multi-core load balancing cooperative processing method and device and storage medium |
CN115242711A (en) * | 2022-07-14 | 2022-10-25 | 天翼云科技有限公司 | Message transmission method and device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118200421A (en) * | 2024-05-20 | 2024-06-14 | 北京安博通科技股份有限公司 | Message processing method, device, electronic equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN115242711A (en) | 2022-10-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2024011854A1 (en) | Message transmission method and apparatus | |
US20220311544A1 (en) | System and method for facilitating efficient packet forwarding in a network interface controller (nic) | |
US10880204B1 (en) | Low latency access for storage using multiple paths | |
EP2928134B1 (en) | High-performance, scalable and packet drop-free data center switch fabric | |
EP2928136B1 (en) | Host network accelerator for data center overlay network | |
EP2928135B1 (en) | Pcie-based host network accelerators (hnas) for data center overlay network | |
US7996569B2 (en) | Method and system for zero copy in a virtualized network environment | |
US7613813B2 (en) | Method and apparatus for reducing host overhead in a socket server implementation | |
CN113326228B (en) | Message forwarding method, device and equipment based on remote direct data storage | |
WO2015067118A1 (en) | Multiple protocol stack load balancing method and apparatus | |
US10387358B2 (en) | Multi-PCIe socket NIC OS interface | |
CN108432194A (en) | A kind of method, host and the system of congestion processing | |
US11303571B2 (en) | Data communication method and data communications network | |
WO2017162117A1 (en) | Accurate speed limiting method and apparatus for cluster | |
WO2018113622A1 (en) | Virtual machine-based method and device for sending and receiving data packet | |
US11740920B2 (en) | Methods and systems for migrating virtual functions in association with virtual machines | |
WO2023186046A1 (en) | Method and apparatus for transmitting message | |
WO2019033891A1 (en) | Rdma-based network traffic determination method and device | |
US10616116B1 (en) | Network traffic load balancing using rotating hash | |
US11444886B1 (en) | Out of order packet buffer selection | |
US20230074989A1 (en) | Out-of-order packet processing | |
US10805436B2 (en) | Deliver an ingress packet to a queue at a gateway device | |
US20050125539A1 (en) | Multi-threaded accept mechanism in a vertical perimeter communication environment | |
US12093571B1 (en) | Accelerating request/response protocols | |
WO2023005723A1 (en) | Packet transmission method and communication apparatus |
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: 22950961 Country of ref document: EP Kind code of ref document: A1 |