WO2018094743A1 - Procédé de traitement de paquet et dispositif informatique - Google Patents

Procédé de traitement de paquet et dispositif informatique Download PDF

Info

Publication number
WO2018094743A1
WO2018094743A1 PCT/CN2016/107521 CN2016107521W WO2018094743A1 WO 2018094743 A1 WO2018094743 A1 WO 2018094743A1 CN 2016107521 W CN2016107521 W CN 2016107521W WO 2018094743 A1 WO2018094743 A1 WO 2018094743A1
Authority
WO
WIPO (PCT)
Prior art keywords
port number
service
network card
processor core
mapping relationship
Prior art date
Application number
PCT/CN2016/107521
Other languages
English (en)
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 华为技术有限公司
Priority to PCT/CN2016/107521 priority Critical patent/WO2018094743A1/fr
Priority to CN201680004271.1A priority patent/CN108377671B/zh
Publication of WO2018094743A1 publication Critical patent/WO2018094743A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports

Definitions

  • the present invention relates to the field of information technology and, more particularly, to a method and computer apparatus for processing a message.
  • the NIC is moving toward intelligence, it has provided routing functions based on the specified field in the message network header, and has brought significant performance improvements.
  • the NIC When the NIC is initialized, it specifies the number of queues used by the NIC and gives each queue an index. When the NIC receives the packet, it forwards the packet to the queue of the specified index according to the forwarding flow table.
  • the field field of the general forwarding flow table includes the source Internet Protocol (IP) and destination IP, the source port number and the destination port number, and the mask and matching fields, and the action field after the hit.
  • IP Internet Protocol
  • the Action can be: "Direct to queue i", where i is the index of the queue queue.
  • the port number used can be any port number in the port range (for example, 0-65535).
  • the number of entries in the forwarding flow table is much smaller than the number of port numbers. Therefore, if any port number is used, the NIC may not be able to match the corresponding entry when forwarding the packet to the receiving queue, which may affect the forwarding efficiency of the packet.
  • the embodiment of the invention provides a method and a computer device for processing a message, which can improve the forwarding efficiency of the message.
  • a method for processing a message including:
  • mapping relationship information includes a mapping relationship between the processor core identifier and the port number
  • a method for processing a message according to an embodiment of the present invention by binding a service to a processor core identifier, and The port number corresponding to the service is determined according to the port number, and the to-be-sent packet of the service is processed according to the port number, so that the network card can forward the to-be-received packet of the service to the corresponding network card queue according to the port number, thereby improving the packet. Forwarding efficiency.
  • the mapping relationship information includes a mapping relationship between a processor core identifier, a network card receiving queue, and a port number.
  • the mapping relationship between the processor core identifier, the network card receiving queue, and the port number may be a mapping relationship between the processor core identifier and the network card receiving queue, and a mapping relationship between the network card receiving queue and the port number.
  • each processor core identifier corresponds to a plurality of port numbers.
  • one processor core identifier may correspond to multiple network card queues, and one network card queue may correspond to multiple port numbers.
  • determining the first local port number includes:
  • the first local port number is selected from a plurality of port numbers corresponding to the first processor core identifier.
  • the method further includes:
  • the method further includes:
  • the to-be-sent message includes a link request message of the client
  • the method further includes:
  • the processor core corresponding to the service can be known in advance, so that both the service and the protocol stack can be mapped to the same processor core, thereby improving the processing efficiency of the service packet.
  • the to-be-sent message includes a server-side link accepting message
  • the method further includes:
  • the processor core corresponding to the service can be known in advance, so that both the service and the protocol stack can be mapped to the same processor core, thereby improving the processing efficiency of the service packet.
  • the network card may forward the packet to the specified network card queue according to the forwarding flow table.
  • the forwarding flow table may be generated according to the mapping relationship information.
  • the network card may forward the to-be-received packet of the service to the corresponding receiving queue according to the first local port number, so that the packet can be effectively forwarded.
  • the port number includes a TCP or UDP port number.
  • a method for processing a message including:
  • mapping relationship information includes a mapping relationship between the processor core identifier and the port number
  • the method for processing a message in the embodiment of the present invention by binding the service to the processor core identifier, can enable the network card to forward the packet to the corresponding network card queue, thereby improving the forwarding efficiency of the packet, and on the other hand, Both the service and the protocol stack correspond to the same processor core, thereby improving the processing efficiency of the service packets.
  • the method further includes:
  • the listening port number is a UDP port number.
  • a host comprising a module that performs the method of the first aspect or any possible implementation of the first aspect, or the method of any of the possible implementations of the second aspect or the second aspect Module.
  • a host including a processor and a memory, the memory is for storing an instruction, the processor is configured to execute the instruction, and when the processor executes the instruction stored by the memory, the executing causes the processor Performing the first aspect or any possible implementation of the first aspect, or the method of the second aspect or any possible implementation of the second aspect.
  • a computer device including:
  • a host configured to obtain a first processor core identifier of the service binding, and determine, according to the first processor core identifier and the configured mapping relationship information, a first local port number corresponding to the service, where the mapping relationship information includes The mapping between the processor core identifier and the port number, the first local port number is written in the source port number field of the to-be-sent packet of the service, and the to-be-sent packet is sent to the network card sending queue;
  • the network card is configured to send the to-be-sent packet in the sending queue of the network card.
  • the computer device of the embodiment of the present invention binds the service to the processor core identifier, and determines the port number corresponding to the service according to the port number, and processes the to-be-sent packet of the service according to the port number, so that the network card can be made according to the port number.
  • the packets to be received of the service are forwarded to the corresponding network card queue, so that the forwarding efficiency of the packets can be improved.
  • the mapping relationship information includes a mapping relationship between a processor core identifier, a network card receiving queue, and a port number.
  • each processor core identifier corresponds to a plurality of port numbers.
  • the host is specifically configured to select the first local port number from the plurality of port numbers corresponding to the first processor core identifier.
  • the host is further configured to configure the mapping relationship information.
  • the network card is further configured to receive a to-be-received packet of the service, where the destination port number in the to-be-received packet is the first local port number, and the to-be-received according to the destination port number.
  • the packet is forwarded to the network card receiving queue corresponding to the first local port number;
  • the host is further configured to obtain the to-be-received packet from the network card receiving queue corresponding to the first local port number.
  • the computer device is a client device, and the to-be-sent message includes a link request message;
  • the host is further configured to bind the service to the first processor core identity.
  • the computer device is a server, and the to-be-sent message includes a link accept message;
  • the host is further configured to bind the service to the first processor core identifier according to the listening port number of the service and the mapping relationship information;
  • the network card is further configured to receive a link request message of the service, where the destination port number in the link request message is the listening port number, and forward the to-be-received message to the corresponding listening port number according to the destination port number.
  • NIC receiving queue
  • the host is further configured to obtain the link request message from the network card receiving queue corresponding to the listening port number.
  • a computer device comprising:
  • the host is configured to bind the service to the first processor core identifier according to the listening port number of the service and the configured mapping relationship information, where the mapping relationship information includes a mapping relationship between the processor core identifier and the port number,
  • the first network card receiving queue obtains the to-be-received message of the service, where the first network card receiving queue is the network card receiving queue corresponding to the first processor core identifier;
  • the network card is configured to receive the to-be-received packet, and the destination port number in the to-be-received packet is the listening port number, and the to-be-received packet is forwarded to the first network card receiving queue according to the destination port number.
  • the computer device of the embodiment of the present invention by binding the service to the processor core identifier, can enable the network card to forward the packet to the corresponding network card queue, thereby improving the forwarding efficiency of the packet, and on the other hand, the service and the protocol can be implemented.
  • the stacks all correspond to the same processor core, thereby improving the processing efficiency of the service packets.
  • the host is further configured to: write the listening port number into a source port number field of the to-be-sent packet of the service, and send the to-be-sent packet to the network card sending queue;
  • the network card is further configured to send the to-be-sent packet in the network card sending queue.
  • the computer device is a server.
  • the listening port number is a UDP port number.
  • a computer apparatus comprising the host of the third aspect or the fourth aspect, and a network card.
  • a computer readable medium for storing a computer program, the computer program comprising any of the possible implementations of the first aspect or the first aspect, or the second or second aspect The instructions of the method in any of the possible implementations.
  • FIG. 1 is a schematic diagram of a computer device to which the technical solution of the embodiment of the present invention is applied.
  • FIG. 2 is a schematic diagram of a mapping relationship between a processor core identifier, a network card queue, and a port number according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for processing a message according to an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a method for processing a message according to another embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for processing a message according to still another embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a method for processing a message according to still another embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a method for processing a message according to still another embodiment of the present invention.
  • FIG. 8 is a schematic flowchart of a method for processing a message according to still another embodiment of the present invention.
  • FIG. 9 is a schematic block diagram of a computer device in accordance with an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a computer device to which the technical solution of the embodiment of the present invention is applied.
  • computer device 100 can include a processor 111, a memory 112, and a network card 120.
  • Host 110 e.g., an application in host 110
  • Processor 111 can include multiple processor cores (Cores).
  • Memory 112 can include memory and other memory.
  • the network card 120 supports multiple network card queues, which may also be referred to as queues.
  • the queue includes a send queue and a receive queue.
  • the queue of network card 120 can be configured in memory 112, such as in memory.
  • the network card 120 can obtain the message to be sent from the sending queue or forward the message received by the network card to the receiving queue based on the address of the queue.
  • the network card 120 may forward the packet to the designated network card queue according to the destination IP and the mask and the matching domain of the packet in the packet network header.
  • the network card 120 can forward the message to the designated network card queue according to the forwarding flow table.
  • the forwarding flow table may be configured in the network card 120 or in a memory accessible by the network card 120.
  • a mapping relationship is configured between a processor core identifier (CoreID), a network card queue, and a port number.
  • the forwarding flow table can be generated according to the mapping relationship.
  • FIG. 2 shows a schematic diagram of a mapping relationship between a processor core identifier, a network card queue, and a port number.
  • each network card queue and processor core identifier correspond to multiple port numbers. These multiple port numbers can also be referred to as NIC queues or port resource pools identified by the processor core.
  • the correspondence between the network card queue and the processor core identifier may be one-to-one or not one-to-one, which is not limited by the embodiment of the present invention.
  • the embodiment of the present invention maps the processor core identifier, the network card queue, and the port number.
  • the specific form of the system is not limited. It can be expressed as a mapping relationship between the three, or a mapping relationship between the two. For example, the mapping between the processor core identifier and the NIC queue can be performed. And the mapping relationship between the NIC queue and the port number.
  • the service is bound to the CoreID, so that the port number corresponding to the service can be determined according to the binding relationship.
  • the port number determined in this way can be matched to a specific network card queue, so that the network card can forward packets, which can improve the forwarding efficiency of packets.
  • the service in the embodiment of the present invention may be a Transmission Control Protocol (TCP)/User Data Protocol (UDP) service, and the port number may be a TCP/UDP port number, but the present invention is implemented. This example is not limited to this.
  • FIG. 3 is a schematic flowchart of a method 300 for processing a message according to an embodiment of the present invention.
  • the method 300 can be performed by a host.
  • the host can be a host in the client device or a host in the server.
  • the to-be-sent message of the service may be a link request message and a data message after the link is established;
  • the service-to-send message may be a link-received message and a link-established data message.
  • the link request message may be a message sent by the client to the server for requesting to establish a communication connection with the server.
  • the connection accepting message may be a message sent by the server to the client for establishing a communication connection with the client.
  • the service is bound to the CoreID.
  • the subsequent port number of the service can be determined according to the bound CoreID, and then the packet of the service is processed.
  • the service can be bound to the CoreID before the link class socket (Socket) associated with the service is created; for the server, before or after the listener socket associated with the service is created This service is bundled with CoreID.
  • Socket link class socket
  • the local port number corresponding to the service (represented as the first local port number) may be selected.
  • the first local port number is also the port number of the Socket associated with the service, that is, subsequent packets of the Socket can be transmitted according to the first local port number.
  • the first local port number may be determined according to the first processor core identifier and the configured mapping relationship information.
  • the port number corresponding to the first processor core identifier may be selected as the first local port number according to the configured mapping relationship information.
  • mapping relationship information may be pre-configured in a memory.
  • the mapping relationship information can be obtained by an application in the host.
  • the mapping relationship information may include a mapping relationship between the processor core identifier and the port number.
  • the mapping relationship information may include a mapping relationship between the processor core identifier, the network card receiving queue, and the port number.
  • the mapping relationship information may include a mapping relationship between the processor core identifier and the network card receiving queue, and a mapping relationship between the network card receiving queue and the port number.
  • each processor core identifier can correspond to multiple port numbers.
  • the mapping relationship information may include a mapping relationship as shown in FIG. 2.
  • mapping relationship information does not limit the specific form and content of the mapping relationship information, that is, the mapping relationship information may also adopt other mapping relationships.
  • the first local port number may be selected from multiple port numbers corresponding to the first processor core identifier.
  • the first local port number is the source port number of the to-be-sent packet of the service, and is the destination port number of the to-be-received packet of the service.
  • the host may write the first local port number to the source port number field of the to-be-sent packet, and send the to-be-sent packet to the network card sending queue.
  • the network card sends the to-be-sent packet in the NIC sending queue.
  • the host may obtain the to-be-received packet of the service from the network card receiving queue corresponding to the first local port number, where the to-be-received packet is determined by the network card.
  • the destination port number in the to-be-received packet is forwarded to the network card receiving queue corresponding to the first local port number.
  • the source port number of the to-be-sent packet of the service is the first local port number
  • the destination port number in the to-be-received packet of the service is the first local port number.
  • the network card can forward the to-be-received packet to the network card receiving queue corresponding to the first local port number according to the destination port number in the to-be-received packet, and the host can receive the queue from the network card corresponding to the first local port number. Obtain the pending message of the service.
  • the forwarding flow table of the network card may be configured based on the mapping relationship information described above. For example, multiple port numbers correspond to one NIC queue. Based on the range of the port number, you can calculate the mask and matching field of the forwarding flow table entry. For example, if a port number range is: 1024-2047; then the segmentation The mask is: 0100-0000-0000(1024)->0111-1111-1111 (2047). Therefore, the matching field of the corresponding forwarding flow table entry can be calculated as 0100-0000-0000, and the mask is 0111-1111-1111.
  • the all-matching entry may also be set. When all the entries in the forwarding flow table do not match, the entry is finally matched.
  • the method for processing a message according to the embodiment of the present invention is to bind the service to the processor core identifier, and determine the port number corresponding to the service according to the port number, and process the to-be-sent packet of the service according to the port number, so that the network card can be
  • the port number forwards the to-be-received packet of the service to the corresponding network card queue, thereby improving the forwarding efficiency of the packet.
  • the to-be-sent message includes a link request message of the client.
  • the method 300 may further include:
  • the service is bound to a CoreID, ie, the service is bound to the processor core (Core) of the process running the service.
  • Core processor core
  • the local port number corresponding to the service that is, the Socket port number
  • the link request message is transmitted according to the local port number corresponding to the service.
  • the processor core corresponding to the service can be known in advance, so that both the service and the protocol stack can be mapped to the same processor core, thereby improving the processing efficiency of the service packet.
  • FIG. 5 is a schematic diagram of a processing flow of a client shown from the perspective of a software module.
  • the application creates a link class Socket.
  • An app can also be called an app.
  • the application in the client needs to create a link class Socket when it needs to obtain the service, that is, it needs to communicate with the application in the server.
  • the application calls the application programming interface (API) provided by the operating system to create a TCP-linked Socket.
  • API application programming interface
  • the TCP/UDP protocol stack module determines whether the service is bound to the Core.
  • the TCP/UDP protocol stack module is a module for processing TCP/UDP protocol stacks. It should be understood that since the application, the application's process, or the thread all correspond to the service, the service and Core binding may also be an application, an application's process, or a thread bound to the Core. For example, the TCP/UDP protocol stack module queries the CoreID of the service binding through an API provided by the operating system. If the corresponding CoreID is queried, step 505 is performed, otherwise step 503 is performed.
  • the TCP/UDP protocol stack module feeds back to the application and needs to bind the Core.
  • the TCP/UDP protocol stack module needs to bind a Core by feeding back error information to the application.
  • the application binds the service to a Core.
  • the TCP/UDP protocol stack module notifies the Flow-Director management module to obtain the port number.
  • the flow-director management module may be configured to configure a network card queue, mapping relationship information, and the like.
  • the TCP/UDP protocol stack module informs the Flow-Director management module of the CoreID of the service module binding, and notifies the Flow-Director management module to obtain the Socket port number, that is, the port number corresponding to the service.
  • the Flow-Director management module acquires a port number according to the bound CoreID and the mapping relationship information.
  • the Flow-Director management module obtains the Socket port number according to the binding CoreID and the mapping relationship between the preset CoreID, the NIC queue, and the port number.
  • the TCP/UDP protocol stack module processes the link request message according to the port number.
  • the TCP/UDP protocol stack module writes the port number to the source port number field of the link request message, and sends the link request message to the network card send queue.
  • the port number is used as the destination port number, so that the NIC of the client can forward the packet to the corresponding receiving queue according to the destination port number, so that the packet can be effectively forwarded.
  • the to-be-sent message includes a server-side link accept message.
  • the method 300 may further include:
  • the server side listens for the link request, it needs to create a listener class Socket associated with the service, where the listening port number is a port number known by the client. That is, the listening port number is the destination port number when the client sends the link request message.
  • the server binds the service to the CoreID according to the listening port number. For example, the service is bound to the CoreID according to the listening port number and the configured mapping relationship information.
  • the processor core corresponding to the service can be known in advance, so that both the service and the protocol stack can be mapped to the same processor core, thereby improving the processing efficiency of the service packet.
  • the server can also know the network card receiving queue corresponding to the link request message.
  • the network card of the server side forwards the link request message to the corresponding network card receiving queue according to the destination port number in the link request message, that is, the listening port number.
  • the host on the server side can obtain the link request message from the network card receiving queue corresponding to the listening port number.
  • the server end After obtaining the link request message and accepting the link request, the server end sends a link acceptance message and a data message to the client.
  • the server side needs to determine the next transmission port number, that is, the first local port number described above.
  • the server may determine the first local port number according to the CoreID bound to the service, and then transmit the link acceptance message and the subsequent data packet according to the first local port number.
  • Fig. 7 is a schematic diagram showing the processing flow of the server side from the perspective of a software module.
  • the application creates a listener class Socket.
  • the application calls the API provided by the operating system to create a listener class Socket.
  • the TCP/UDP protocol stack module obtains a CoreID that the service should be bound to the Flow-Director management module.
  • the TCP/UDP protocol stack module passes the listening port number to the Flow-Director management module to obtain the CoreID that the service should bind.
  • the Flow-Director management module acquires a corresponding CoreID according to the listening port number.
  • the Flow-Director management module obtains the corresponding CoreID according to the listening port number and the preset mapping relationship information, that is, the CoreID to which the service should be bound, and feeds back to the TCP/UDP protocol stack module.
  • the TCP/UDP protocol stack module determines whether the service is bound to the Core.
  • the TCP/UDP protocol stack module queries whether the CoreID of the service binding is empty (no binding) through the API provided by the operating system. If it is empty, execute 705, otherwise execute 706.
  • the TCP/UDP protocol stack module binds the service to the Core fed back by the Flow-Director management module.
  • the TCP/UDP protocol stack module feeds back the CoreID that should be bound to the application.
  • the application binds or exits the current process.
  • the TCP/UDP protocol stack module notifies the Flow-director management module to obtain a data transmission port number.
  • the TCP/UDP protocol stack module When a client actively links to the server, and the server accepts the link request, the TCP/UDP protocol stack module notifies the FlowID of the Flow-director management module service binding to obtain the data transmission port number.
  • the flow-director management module returns a port number corresponding to the CoreID according to the bound CoreID and the preset mapping relationship information.
  • the TCP/UDP protocol stack module processes the packet of the service according to the port number.
  • the TCP/UDP protocol stack module processes the link acceptance message and the subsequent data message according to the port number. For example, the TCP/UDP protocol stack module writes the port number to the source port number field of the message and sends the message to the network card send queue.
  • the port number is used as the destination port number, so that the network card of the server can forward the packet to the corresponding receiving queue according to the destination port number, so that the packet can be reported.
  • the effective forwarding of the text is used as the destination port number, so that the network card of the server can forward the packet to the corresponding receiving queue according to the destination port number, so that the packet can be reported.
  • the transmission port number that is, the first local port number described above, may be no longer selected, but the listening port number is always used. This case will be described below.
  • FIG. 8 is a schematic flowchart of a method 800 for processing a message according to another embodiment of the present invention.
  • the method 800 can be performed by a host.
  • This host can be a host in the server.
  • the listening port number is the port number known to the client.
  • the server can bind the service to the CoreID according to the listening port number.
  • the service may be bound to the first processor core identifier according to the listening port number and the configured mapping relationship information.
  • mapping relationship information refer to the foregoing embodiment, and for brevity, no further details are provided herein.
  • the server can obtain the to-be-received packet of the service, that is, the network card receiving queue corresponding to the request packet sent by the client.
  • the NIC of the server forwards the request packet to the corresponding network card receiving queue according to the destination port number in the request packet, that is, the listening port number, that is, the first network card receiving queue.
  • the host on the server side can obtain the to-be-received packet from the first NIC receiving queue.
  • the server may further send a to-be-sent packet of the service according to the listening port number, that is, send a response packet of the service to the client.
  • the host on the server side can write the listening port number to the source port number field of the to-be-sent packet of the service; and send the to-be-sent packet to the network card sending queue.
  • the network card sends the to-be-sent packet in the NIC sending queue.
  • the method for processing a message in the embodiment of the present invention by binding the service to the processor core identifier, can enable the network card to forward the packet to the corresponding network card queue, thereby improving the forwarding efficiency of the packet, and on the other hand, Both the service and the protocol stack correspond to the same processor core, thereby improving the processing efficiency of the service packets.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • a method of processing a message according to an embodiment of the present invention is described in detail above, and a computer device according to an embodiment of the present invention will be described below.
  • FIG. 9 shows a schematic block diagram of a computer device 900 in accordance with an embodiment of the present invention.
  • the computer device 900 can include a host 910 and a network card 920.
  • the host 910 is configured to obtain a first processor core identifier of the service binding, and the configured mapping relationship information, and determine, according to the first processor core identifier, a first local port number corresponding to the service, where the mapping relationship information is The mapping between the processor core identifier and the port number is performed, and the first local port number is written into the source port number field of the to-be-sent packet of the service, and the to-be-sent packet is sent to the network card sending queue.
  • the network card 920 is configured to send the to-be-sent packet in the network card sending queue.
  • the computer device of the embodiment of the present invention binds the service to the processor core identifier, and accordingly The port number corresponding to the service is determined, and the to-be-sent packet of the service is processed according to the port number, so that the network card can forward the to-be-received packet of the service to the corresponding network card queue according to the port number, thereby improving the forwarding efficiency of the packet. .
  • the mapping relationship information includes a mapping relationship between a processor core identifier, a network card receiving queue, and a port number.
  • each processor core identifier corresponds to a plurality of port numbers.
  • the host 910 is specifically configured to select the first local port number from the plurality of port numbers corresponding to the first processor core identifier.
  • the host 910 is further configured to: configure the mapping relationship information.
  • the network card 920 is further configured to receive a to-be-received packet of the service, where the destination port number in the to-be-received packet is the first local port number, according to the destination port. No. forwarding the to-be-received packet to the network card receiving queue corresponding to the first local port number;
  • the host 910 is further configured to obtain the to-be-received packet from the network card receiving queue corresponding to the first local port number.
  • the computer device 900 is a client device, and the to-be-sent message includes a link request message;
  • the host 910 is further configured to bind the service to the first processor core identifier.
  • the computer device 900 is a server, and the to-be-sent message includes a link accepting message;
  • the host 910 is further configured to bind the service to the first processor core identifier according to the listening port number of the service and the mapping relationship information;
  • the network card 920 is further configured to: receive a link request message of the service, where the destination port number in the link request message is the listening port number, and forward the to-be-received message to the listening port number according to the destination port number.
  • Network card receiving queue
  • the host 910 is further configured to obtain the link request message from the network card receiving queue corresponding to the listening port number.
  • the host 910 is configured to bind the service to the first processor core identifier according to the listening port number of the service and the configured mapping relationship information, where the mapping relationship information includes a processor.
  • the mapping between the core identifier and the port number, the packet to be received of the service is obtained from the first network card receiving queue, where the first network card receiving queue is the first processor core identifier pair The appropriate network card receiving queue;
  • the network card 920 is configured to receive the to-be-received packet, and the destination port number in the to-be-received packet is the listening port number, and forward the to-be-received packet to the first network card receiving queue according to the destination port number.
  • the computer device of the embodiment of the present invention by binding the service to the processor core identifier, can enable the network card to forward the packet to the corresponding network card queue, thereby improving the forwarding efficiency of the packet, and on the other hand, the service and the protocol can be implemented.
  • the stacks all correspond to the same processor core, thereby improving the processing efficiency of the service packets.
  • the host 910 is further configured to: write the listening port number to a source port number field of the to-be-sent packet of the service, and send the to-be-sent packet to the network card sending queue;
  • the network card 920 is further configured to send the to-be-sent packet in the network card sending queue.
  • host 910 can include a processor and a memory.
  • the memory is for storing a program
  • the processor is for executing a program for performing the method in the foregoing embodiments of the present invention.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative
  • the division of the unit is only a logical function division, and the actual implementation may have another division manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be Ignore, or not execute.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention 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.
  • the technical solution of the present invention contributes in essence or 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.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • 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. .

Landscapes

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

Abstract

Un mode de réalisation de la présente invention concerne un procédé de traitement d'un paquet, et un dispositif informatique. Le procédé consiste : à acquérir un premier identifiant de cœur de processeur auquel un service est lié ; à déterminer, en fonction du premier identifiant de cœur de processeur et des informations de relation de mappage configurées, un premier numéro de port local correspondant au service, les informations de relation de mappage comprenant une relation de mappage entre l'identifiant de cœur de processeur et le numéro de port ; à écrire le premier numéro de port local sur un segment de numéro de port source dans un paquet du service à transmettre ; et à transmettre le paquet à transmettre à une file d'attente de transmission d'une carte de réseau. Le procédé de traitement d'un paquet et le dispositif informatique décrits dans le mode de réalisation de la présente invention peuvent augmenter l'efficacité de transfert de paquets.
PCT/CN2016/107521 2016-11-28 2016-11-28 Procédé de traitement de paquet et dispositif informatique WO2018094743A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/107521 WO2018094743A1 (fr) 2016-11-28 2016-11-28 Procédé de traitement de paquet et dispositif informatique
CN201680004271.1A CN108377671B (zh) 2016-11-28 2016-11-28 处理报文的方法和计算机设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/107521 WO2018094743A1 (fr) 2016-11-28 2016-11-28 Procédé de traitement de paquet et dispositif informatique

Publications (1)

Publication Number Publication Date
WO2018094743A1 true WO2018094743A1 (fr) 2018-05-31

Family

ID=62194612

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107521 WO2018094743A1 (fr) 2016-11-28 2016-11-28 Procédé de traitement de paquet et dispositif informatique

Country Status (2)

Country Link
CN (1) CN108377671B (fr)
WO (1) WO2018094743A1 (fr)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111049750A (zh) * 2019-12-05 2020-04-21 东软集团股份有限公司 一种报文转发方法、系统及设备
CN111756649A (zh) * 2020-05-29 2020-10-09 浪潮电子信息产业股份有限公司 一种数据传输方法、装置、设备及计算机可读存储介质
CN112162901A (zh) * 2020-09-21 2021-01-01 东软集团股份有限公司 Cpu利用率的确定方法、系统、存储介质和电子设备
CN113938400A (zh) * 2021-08-27 2022-01-14 曙光网络科技有限公司 流表管理和维护的方法、设备以及存储介质
CN114205185A (zh) * 2020-09-16 2022-03-18 厦门网宿有限公司 一种控制报文的代理方法及装置
CN114978953A (zh) * 2022-07-27 2022-08-30 北京立华莱康平台科技有限公司 一种网卡识别方法、装置及计算机可读介质

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110768999B (zh) * 2019-10-31 2022-01-25 杭州迪普科技股份有限公司 一种设备非法外联的检测方法及装置
CN111917735A (zh) * 2020-07-12 2020-11-10 中信银行股份有限公司 通讯报文的生成与处理方法、装置及电子设备
CN114448916B (zh) * 2021-12-24 2024-08-20 锐捷网络股份有限公司 Tipc报文处理方法、装置、设备和存储介质
CN114979286B (zh) * 2022-05-11 2023-09-19 咪咕文化科技有限公司 容器服务的访问控制方法、装置、设备及计算机存储介质
CN115037708B (zh) * 2022-08-10 2022-11-18 深圳星云智联科技有限公司 一种报文处理方法、系统、装置及计算机可读存储介质
CN116055586B (zh) * 2022-08-15 2023-09-01 荣耀终端有限公司 分片报文的匹配方法、路由器及存储介质
CN115118685B (zh) * 2022-08-30 2022-11-25 无锡沐创集成电路设计有限公司 数据包处理方法、装置、系统、电子设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101299773A (zh) * 2008-06-02 2008-11-05 华为技术有限公司 一种实现网络地址转换的方法、处理器和系统
CN101822022A (zh) * 2007-10-12 2010-09-01 爱立信电话股份有限公司 用户设备中对三重播放服务的支持
US20140204954A1 (en) * 2013-01-22 2014-07-24 Verax Technology Holdings, Inc. Communications gateway for transmitting and receiving information associated with at least one service class
CN105991473A (zh) * 2015-03-30 2016-10-05 杭州迪普科技有限公司 一种数据流转发方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8009682B2 (en) * 2009-05-05 2011-08-30 Citrix Systems, Inc. Systems and methods for packet steering in a multi-core architecture
US8788570B2 (en) * 2009-06-22 2014-07-22 Citrix Systems, Inc. Systems and methods for retaining source IP in a load balancing multi-core environment
CN101626324B (zh) * 2009-08-19 2011-12-07 杭州华三通信技术有限公司 转发路径检测方法和设备
CN103841018B (zh) * 2012-11-26 2017-04-19 华为技术有限公司 一种基于内容网多端口的转发方法及路由器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101822022A (zh) * 2007-10-12 2010-09-01 爱立信电话股份有限公司 用户设备中对三重播放服务的支持
CN101299773A (zh) * 2008-06-02 2008-11-05 华为技术有限公司 一种实现网络地址转换的方法、处理器和系统
US20140204954A1 (en) * 2013-01-22 2014-07-24 Verax Technology Holdings, Inc. Communications gateway for transmitting and receiving information associated with at least one service class
CN105991473A (zh) * 2015-03-30 2016-10-05 杭州迪普科技有限公司 一种数据流转发方法及装置

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111049750A (zh) * 2019-12-05 2020-04-21 东软集团股份有限公司 一种报文转发方法、系统及设备
CN111049750B (zh) * 2019-12-05 2022-12-09 东软集团股份有限公司 一种报文转发方法、系统及设备
CN111756649A (zh) * 2020-05-29 2020-10-09 浪潮电子信息产业股份有限公司 一种数据传输方法、装置、设备及计算机可读存储介质
CN114205185A (zh) * 2020-09-16 2022-03-18 厦门网宿有限公司 一种控制报文的代理方法及装置
CN114205185B (zh) * 2020-09-16 2023-03-24 厦门网宿有限公司 一种控制报文的代理方法及装置
CN112162901A (zh) * 2020-09-21 2021-01-01 东软集团股份有限公司 Cpu利用率的确定方法、系统、存储介质和电子设备
CN113938400A (zh) * 2021-08-27 2022-01-14 曙光网络科技有限公司 流表管理和维护的方法、设备以及存储介质
CN113938400B (zh) * 2021-08-27 2023-06-27 曙光网络科技有限公司 流表管理和维护的方法、设备以及存储介质
CN114978953A (zh) * 2022-07-27 2022-08-30 北京立华莱康平台科技有限公司 一种网卡识别方法、装置及计算机可读介质
CN114978953B (zh) * 2022-07-27 2022-10-21 北京立华莱康平台科技有限公司 一种网卡识别方法、装置及计算机可读介质

Also Published As

Publication number Publication date
CN108377671A (zh) 2018-08-07
CN108377671B (zh) 2020-11-20

Similar Documents

Publication Publication Date Title
WO2018094743A1 (fr) Procédé de traitement de paquet et dispositif informatique
US10652367B2 (en) Reducing network latency
CN113326228B (zh) 基于远程直接数据存储的报文转发方法、装置及设备
CN105553977B (zh) 请求消息的处理、发送方法及装置
US11277350B2 (en) Communication of a large message using multiple network interface controllers
US20120331160A1 (en) Multi-path transmission control protocol proxy service
US20100027539A1 (en) Remote message routing device and methods thereof
JP2019134461A (ja) ミドルウェアおよびアプリケーションの実行のための設計されたシステムに対するサービス妨害(dos:denial of service)攻撃を防止するためのシステムおよび方法、ならびに、ミドルウェアおよびアプリケーションの実行のための設計されたシステムにおいてサブネットアドミニストレータ(sa:subnet administrator)アクセスに基づいて信頼性のある接続(rc:reliable connection)をサポートするためのシステムおよび方法
JP2018139448A5 (fr)
JP2017520214A (ja) フローエントリ構成の方法、装置及びシステム
US10880369B2 (en) Session persistence method, device, and storage medium
WO2015114473A1 (fr) Procédé et appareil d'équilibrage de charge sensible à la localisation basé sur un hachage
CN105847142B (zh) 一种报文传输方法及装置
CN106101007B (zh) 处理报文的方法及装置
US9948568B2 (en) Packet size control using maximum transmission units for facilitating packet transmission
JP2016509822A (ja) イーサネットパケットの転送
WO2013178099A1 (fr) Système, procédé, client et centre de service pour la réalisation de bureau à distance
CN110417632B (zh) 一种网络通信方法、系统及服务器
US9331935B2 (en) Network device selection
WO2019033891A1 (fr) Procédé et dispositif de détermination de trafic réseau basé rdma
US20200028779A1 (en) Packet processing method and apparatus
US10218820B2 (en) Method and apparatus for processing data packet based on parallel protocol stack instances
US20160099891A1 (en) Packet processing method, apparatus and system
WO2024037366A1 (fr) Procédé d'émission de règle de transfert, et carte d'interface réseau intelligente et support de stockage
WO2020248906A1 (fr) Procédé et appareil de transmission de données sécurisées pour réseau d'identification par fusion intelligente

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

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

Country of ref document: EP

Kind code of ref document: A1