CN111698167A - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN111698167A
CN111698167A CN202010247821.0A CN202010247821A CN111698167A CN 111698167 A CN111698167 A CN 111698167A CN 202010247821 A CN202010247821 A CN 202010247821A CN 111698167 A CN111698167 A CN 111698167A
Authority
CN
China
Prior art keywords
virtual machine
message
switch
interface corresponding
interface
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202010247821.0A
Other languages
Chinese (zh)
Other versions
CN111698167B (en
Inventor
彭剑远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data Technologies Co Ltd
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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202010247821.0A priority Critical patent/CN111698167B/en
Publication of CN111698167A publication Critical patent/CN111698167A/en
Application granted granted Critical
Publication of CN111698167B publication Critical patent/CN111698167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Landscapes

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

Abstract

The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for processing a packet. The method is applied to an intelligent network card, a switch connected with the intelligent network card maintains the mapping relation between the communication address of each virtual machine and the virtual function VF interface corresponding to each virtual machine, and the method comprises the following steps: receiving a first message sent by a first virtual machine; judging whether a forwarding table item matched with the first message exists locally or not; and when judging that no forwarding table item matched with the first message exists locally, sending the first message to a switch, so that the switch determines a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sending the message to a corresponding second virtual machine through the target VF interface.

Description

Message processing method and device
Technical Field
The present application relates to the field of network communication technologies, and in particular, to a method and an apparatus for processing a packet.
Background
The Smart NIC, i.e., the Smart network card, completely transfers the virtual switch function from the server CPU to the network card, freeing up the expensive computing power of the server CPU to return to the application, thereby better extending the network card functionality and providing higher performance.
The core of the intelligent network card is to assist the CPU to process the network load through FPGA (field programmable gate array), and program the network interface function, and the intelligent network card has the following characteristics: the functions of a data plane and a control plane are customized through FPGA (field programmable gate array) localized programming, so that a CPU (central processing unit) is assisted to process network loads; the system generally comprises a plurality of ports and internal switches, and is used for rapidly forwarding data and intelligently mapping the data to related application programs based on network data packets, application program sockets and the like; network traffic is detected and managed.
The intelligent network card can improve application program and virtualization performance, realize many advantages of Software Defined Networking (SDN) and Network Function Virtualization (NFV), remove network virtualization, load balancing and other low-level functions from a server CPU, and ensure that the maximum processing capacity is provided for the application. Meanwhile, the intelligent network card can also provide distributed computing resources, so that a user can develop own software or provide access service, and specific application programs are accelerated.
At present, the network and the storage offload of the intelligent network card in the market are released to the intelligent network card, so that the main CPU has more capacity for processing virtual machine services. However, the intelligent network card needs to have a special FPGA or ASIC chip to process the network traffic, and forwarding entries such as MAC tables on the FPGA or ASIC chip are not very large, and accordingly, the message processing capability of the intelligent network card is limited.
Disclosure of Invention
The embodiment of the application provides a message processing method and device, which are used for solving the problem that the message processing capacity of an intelligent network card is limited in the prior art.
The embodiment of the application provides the following specific technical scheme:
in a first aspect, the present application provides a message processing method, which is applied to an intelligent network card, where a switch connected to the intelligent network card maintains a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine, and the method includes:
receiving a first message sent by a first virtual machine;
judging whether a forwarding table item matched with the first message exists locally or not;
and when judging that no forwarding table item matched with the first message exists locally, sending the first message to a switch, so that the switch determines a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sending the message to a corresponding second virtual machine through the target VF interface.
Optionally, the step of sending the target packet to the switch includes:
acquiring an identifier of the VF interface corresponding to the first virtual machine, and adding the identifier of the VF interface corresponding to the first virtual machine to the first message to obtain a second message;
and sending the second message to the switch.
Optionally, the method further includes:
when the local start is determined, sending a handshake message to the switch;
and if a response message returned by the switch based on the handshake message is received, reporting the information of each local VF interface to the switch, so that the switch allocates an identifier for uniquely identifying the VF interface for each VF interface.
In a second aspect, the present application provides another packet processing method, which is applied to a switch, where a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine is maintained in the switch, and the method includes:
receiving a first message sent by an intelligent network card, wherein the first message is a message sent by a first virtual machine;
determining a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine;
and sending the message to a corresponding second virtual machine through the target VF interface.
Optionally, the first packet carries an identifier of a VF interface corresponding to the first virtual machine; the method further comprises the following steps:
judging whether a mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine exists in the mapping relation between the communication address of each locally maintained virtual machine and the VF interface corresponding to each virtual machine;
and if the mapping relation does not exist, adding the mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine into the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
In a third aspect, the present application provides a packet processing apparatus, which is applied to an intelligent network card, and a switch connected to the intelligent network card maintains a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine, where the apparatus includes:
the receiving unit is used for receiving a first message sent by a first virtual machine;
a judging unit, configured to judge whether a forwarding table entry matching the first packet exists locally;
and a sending unit, configured to send the first packet to a switch when it is determined that there is no forwarding entry matching with the first packet locally, so that the switch determines, in a mapping relationship between a communication address of each virtual machine and a VF interface corresponding to each virtual machine, a target VF interface corresponding to a target communication address of the first packet, and sends the packet to a corresponding second virtual machine through the target VF interface.
Optionally, when the target packet is sent to the switch, the sending unit is specifically configured to:
acquiring an identifier of the VF interface corresponding to the first virtual machine, and adding the identifier of the VF interface corresponding to the first virtual machine to the first message to obtain a second message;
and sending the second message to the switch.
Optionally, the sending unit is further configured to:
when the local start is determined, sending a handshake message to the switch;
and if a response message returned by the switch based on the handshake message is received, reporting the information of each local VF interface to the switch, so that the switch allocates an identifier for uniquely identifying the VF interface for each VF interface.
In a fourth aspect, the present application provides another packet processing apparatus, which is applied to a switch, where a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine is maintained in the switch, and the apparatus includes:
the receiving unit is used for receiving a first message sent by the intelligent network card, wherein the first message is a message sent by a first virtual machine;
a determining unit, configured to determine, in a mapping relationship between a communication address of each virtual machine and a VF interface corresponding to each virtual machine, a target VF interface corresponding to a destination communication address of the first packet;
and the sending unit is used for sending the message to a corresponding second virtual machine through the target VF interface.
Optionally, the first packet carries an identifier of a VF interface corresponding to the first virtual machine; the device also comprises a judging unit and an adding unit:
the determining unit is configured to determine whether a mapping relationship between a communication address of the first virtual machine and an identifier of a VF interface corresponding to the first virtual machine exists in a mapping relationship between a communication address of each locally maintained virtual machine and the VF interface corresponding to each virtual machine;
if the mapping relation does not exist, the adding unit adds the mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
In a fifth aspect, the present application provides an intelligent network card, including:
a memory for storing program instructions;
and a processor, configured to call the program instructions stored in the memory, and execute any one of the methods according to the first aspect according to the obtained program.
In a sixth aspect, the present application provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any of the first aspects.
In a seventh aspect, the present application provides a switch, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing any method in the second aspect according to the obtained program.
In an eighth aspect, the present application provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any of the second aspects.
The beneficial effect of this application is as follows:
to sum up, according to the message processing method and device provided by the application, when the intelligent network card receives the first message sent by the first virtual machine; judging whether a forwarding table item matched with the first message exists locally or not; and when judging that no forwarding table item matched with the first message exists locally, sending the first message to a switch, so that the switch determines a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sending the message to a corresponding second virtual machine through the target VF interface.
By adopting the message processing method and the message processing device provided by the application, the intelligent network card carries out table look-up forwarding operation on the messages sent to the virtual machines on other servers through the switch, is not limited by the size of the local forwarding table of the intelligent network card, and greatly improves the forwarding capability of the intelligent network card on the basis of not increasing the cost.
Drawings
Fig. 1 is a schematic diagram of a network networking provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another message processing method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another message processing apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an intelligent network card according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a switch according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First, the term "and" in the embodiment of the present application is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
When the present application refers to the ordinal numbers "first", "second", "third" or "fourth", etc., it should be understood that this is done for differentiation only, unless it is clear from the context that the order is actually expressed.
The scheme of the present application will be described in detail by specific examples, but the present application is not limited to the following examples.
Exemplarily, referring to fig. 1, the present application provides a network networking schematic diagram, where the network networking includes a server 1 and a server 2 connected to a switch, respectively, the server 1 is deployed with a virtual machine 1(VM 1) and a virtual machine 2(VM 2), and an intelligent network card 1 on the server 1 is configured with virtual function interfaces 1(VF 1) corresponding to the VM 1 one to one and virtual function interfaces 2(VF 2) corresponding to the VM 2 one to one; a virtual machine 3(VM 3) is deployed on the server 2, and virtual function interfaces 3(VF 3) corresponding to the VM 3 one to one are configured on the intelligent network card 2 on the server 2. In this embodiment of the present application, a mapping relationship between a communication address of each virtual machine and a VF interface corresponding to each virtual machine is maintained in a switch.
The following will describe the method embodiment of the present application in detail by using a specific embodiment, for example, referring to fig. 2, the message processing method provided by the present application is applied to an intelligent network card, a switch connected to the intelligent network card maintains a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine, and the detailed flow of the message processing method is as follows:
step 200: and receiving a first message sent by the first virtual machine.
In this embodiment of the application, before performing step 200, the message processing method may further include: and when the intelligent network card determines to start locally, the intelligent network card sends a handshake message to the switch. And if a response message returned by the switch based on the handshake message is received, reporting the information of each local VF interface to the switch, so that the switch allocates an identifier for uniquely identifying the VF interface for each VF interface.
In practical applications, the intelligent network card may include a plurality of physical ports, and each physical port may be configured with at least one virtual function interface. After the intelligent network card is started, the intelligent network card can respectively send HELLOW messages of 802.1BR to the switch from each physical port, and if response messages of the switch are received, the intelligent network card takes each local VF interface as a remote port of the switch. The intelligent network card can report all local VF interface information to the switch, so that the switch allocates an expansion port number (identifier) to each VF interface, where the expansion port number of one VF interface can be used to uniquely identify the VF interface.
Step 210: and judging whether a forwarding table item matched with the first message exists locally.
In the embodiment of the application, the intelligent network card locally maintains a local forwarding table, that is, messages between VMs in the server are forwarded without being processed by the switch, and when the intelligent network card receives a message sent by a local virtual machine, the intelligent network card can determine whether the destination virtual machine of the message is local according to the destination communication address of the message, and if so, directly forward the message according to the local forwarding table, or if not, send the message to the switch for subsequent forwarding processing.
For example, as shown in fig. 1, VM 1 sends a message 1 to VM 2, then, when receiving the message 1, the intelligent network card determines that the destination MAC address of the message 1 is the MAC address of VM 2, and a forwarding table entry matching the MAC address of VM 2 exists in the local MAC forwarding table, then the intelligent network card directly forwards the message 1 according to the forwarding table entry, and does not need to upload the message 1 to the switch.
Step 220: and when judging that no forwarding table item matched with the first message exists locally, sending the first message to a switch, so that the switch determines a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sending the message to a corresponding second virtual machine through the target VF interface.
In this embodiment, when receiving a message, the intelligent network card determines that a local forwarding table entry matching a destination communication address of the message does not exist in a local forwarding table, and then the message needs to be sent to the switch for processing.
For example, as shown in fig. 1, VM 1 sends a message 2 to VM 3, then, when receiving the message 2, the intelligent network card determines that a destination MAC address of the message 2 is an MAC address of VM 3, and a local MAC forwarding table does not have a forwarding table entry matching the MAC address of VM 3, then, the intelligent network card uploads the message 2 to the switch, and the switch determines a VF interface (VF 3) corresponding to the MAC address of VM 3 according to the MAC address of VM 3 and a mapping relationship between the locally maintained MAC address and VF interface, and sends the message 2 to VF 3, so that the intelligent network card sends the message 2 to VM 3 corresponding to VF 3.
In this embodiment of the application, when the first message is sent to the switch, a preferred implementation manner is to obtain an identifier of a VF interface corresponding to a first virtual machine, and add the identifier of the VF interface corresponding to the first virtual machine to the first message to obtain a second message; and sending the second message to the switch.
That is to say, the switch receives the message reported by the intelligent network card and carries the identification information of the VF corresponding to the source virtual machine, and accordingly, if the switch can perform self-learning of the communication address of the virtual machine and the identification of the VF interface corresponding to the virtual machine. The specific self-learning process of the communication address of the virtual machine and the VF interface identifier corresponding to the virtual machine is described in detail below, and is not described herein again.
In this embodiment, if the received packet is a broadcast packet or a multicast packet, because the broadcast group address or the multicast group address also has at least one corresponding extended port number (at least one VF interface identifier), and the broadcast packet or the multicast packet carries the VF interface identifier corresponding to the source virtual machine, the intelligent network card may also perform source port filtering according to the VF interface identifier corresponding to the source virtual machine, so as to prevent the source virtual machine from receiving the packet sent by the intelligent network card.
Illustratively, referring to fig. 3, another message processing method provided in the present application is applied to a switch, where a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine is maintained in the switch, and a detailed flow of the message processing method is as follows:
step 300: receiving a first message sent by the intelligent network card, wherein the first message is a message sent by the first virtual machine.
In this embodiment, the intelligent network card receives a message, and when it is determined that the destination virtual machine of the message is not local, the intelligent network card sends the message to the switch, so that the switch performs subsequent forwarding processing on the message.
In this embodiment, when receiving a packet (e.g., a first packet), and when determining that the packet is a packet addressed to a virtual machine on another server, the intelligent network card may encapsulate the packet, and specifically, may add an identifier of a VF interface corresponding to a source virtual machine that sends the packet to the packet, to obtain a second packet carrying an identifier of the VF interface corresponding to the source virtual machine that sends the packet.
Then, the packet received by the switch is the packet carrying the VF interface identifier corresponding to the source virtual machine that sent the packet.
Further, the switch may perform learning of a mapping relationship between the communication address of the source virtual machine and the VF interface identifier corresponding to the source virtual machine (forwarding table entry self-learning process).
Specifically, in this embodiment of the present application, the first packet carries an identifier of a VF interface corresponding to the first virtual machine; the method further comprises the following steps: judging whether a mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine exists in the mapping relation between the communication address of each locally maintained virtual machine and the VF interface corresponding to each virtual machine; and if the mapping relation does not exist, adding the mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine into the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
Step 310: and determining a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
As can be seen from the above, the switch may learn a mapping relationship between a communication address of a source virtual machine and a VF interface identifier corresponding to the source virtual machine, so that the switch locally maintains the mapping relationship between the communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine, and then the switch may determine an outgoing interface (VF interface identifier) corresponding to the destination communication address according to a destination communication address of a received packet.
Step 320: and sending the message to a corresponding second virtual machine through the target VF interface.
As can be seen from the above, the intelligent network card only needs to maintain the mapping relationship between the VF interface identifier and the VF locally, that is, the mapping relationship between the VF interface identifier and the virtual machine, and when the intelligent network card receives a message sent by the switch, the intelligent network card can determine the VF interface (or determine the target virtual machine) according to the VF interface identifier carried by the message, thereby completing forwarding of the message.
Based on the foregoing embodiment, referring to fig. 4, a schematic structural diagram of a message processing apparatus provided in an embodiment of the present application is applied to an intelligent network card, a switch connected to the intelligent network card maintains a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine, and the apparatus includes:
a receiving unit 40, configured to receive a first packet sent by a first virtual machine;
a determining unit 41, configured to determine whether a forwarding table entry matching the first packet exists locally;
a sending unit 42, configured to send the first packet to a switch when it is determined that there is no forwarding entry matching with the first packet locally, so that the switch determines, in a mapping relationship between a communication address of each virtual machine and a VF interface corresponding to each virtual machine, a target VF interface corresponding to a destination communication address of the first packet, and sends the packet to a corresponding second virtual machine through the target VF interface.
Optionally, when sending the target packet to the switch, the sending unit 42 is specifically configured to:
acquiring an identifier of the VF interface corresponding to the first virtual machine, and adding the identifier of the VF interface corresponding to the first virtual machine to the first message to obtain a second message;
and sending the second message to the switch.
Optionally, the sending unit 42 is further configured to:
when the local start is determined, sending a handshake message to the switch;
and if a response message returned by the switch based on the handshake message is received, reporting the information of each local VF interface to the switch, so that the switch allocates an identifier for uniquely identifying the VF interface for each VF interface.
Based on the foregoing embodiment, referring to fig. 5, a schematic structural diagram of another packet processing apparatus provided in this embodiment of the present application is applied to a switch, where a mapping relationship between a communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine is maintained in the switch, and the apparatus includes:
the receiving unit 50 is configured to receive a first message sent by the intelligent network card, where the first message is a message sent by a first virtual machine;
a determining unit 51, configured to determine, in a mapping relationship between a communication address of each virtual machine and a VF interface corresponding to each virtual machine, a target VF interface corresponding to a destination communication address of the first packet;
a sending unit 52, configured to send the message to a corresponding second virtual machine through the target VF interface.
Optionally, the first packet carries an identifier of a VF interface corresponding to the first virtual machine; the device also comprises a judging unit and an adding unit:
the determining unit is configured to determine whether a mapping relationship between a communication address of the first virtual machine and an identifier of a VF interface corresponding to the first virtual machine exists in a mapping relationship between a communication address of each locally maintained virtual machine and the VF interface corresponding to each virtual machine;
if the mapping relation does not exist, the adding unit adds the mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
Further, referring to fig. 6, the present application also provides an intelligent network card, which includes a memory 60 and a processor 61, wherein,
a memory 60 for storing program instructions;
and the processor 61 is configured to call the program instructions stored in the memory 60, and execute any one of the above method embodiments applied to the intelligent network card according to the obtained program.
Further, the present application provides a computer storage medium storing computer-executable instructions for causing the computer to perform any of the above method embodiments applied to the intelligent network card.
Referring to fig. 7, the present application further provides a switch comprising a memory 70 and a processor 71, wherein,
a memory 70 for storing program instructions;
and a processor 71, configured to call the program instructions stored in the memory 70, and execute any one of the above method embodiments applied to the switch according to the obtained program.
Further, the present application provides a computer storage medium having stored thereon computer-executable instructions for causing a computer to perform any of the above method embodiments applied to a switch.
To sum up, according to the message processing method and device provided by the application, when the intelligent network card receives the first message sent by the first virtual machine; judging whether a forwarding table item matched with the first message exists locally or not; and when judging that no forwarding table item matched with the first message exists locally, sending the first message to a switch, so that the switch determines a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sending the message to a corresponding second virtual machine through the target VF interface.
By adopting the message processing method and the message processing device provided by the application, the intelligent network card carries out table look-up forwarding operation on the messages sent to the virtual machines on other servers through the switch, is not limited by the size of the local forwarding table of the intelligent network card, and greatly improves the forwarding capability of the intelligent network card on the basis of not increasing the cost.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining 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, and the like) 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 embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams 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 apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.

Claims (10)

1. A message processing method is applied to an intelligent network card, and a switch connected with the intelligent network card maintains the mapping relation between the communication address of each virtual machine and a virtual function VF interface corresponding to each virtual machine, wherein the method comprises the following steps:
receiving a first message sent by a first virtual machine;
judging whether a forwarding table item matched with the first message exists locally or not;
when judging that no forwarding table item matched with the first message exists locally, sending the first message to a switch, so that the switch determines a target VF interface corresponding to a target communication address of the first message in a mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sends the message to a corresponding second virtual machine through the target VF interface.
2. The method of claim 1, wherein sending the target message to a switch comprises:
acquiring an identifier of a VF interface corresponding to the first virtual machine, and adding the identifier of the VF interface corresponding to the first virtual machine to the first message to obtain a second message;
and sending the second message to a switch.
3. The method of claim 1, wherein the method further comprises:
when the local start is determined, sending a handshake message to the switch;
and if a response message returned by the switch based on the handshake message is received, reporting the information of each local VF interface to the switch, so that the switch allocates an identifier for uniquely identifying the VF interface for each VF interface.
4. A message processing method is applied to a switch, wherein a mapping relationship between a communication address of each virtual machine and a Virtual Function (VF) interface corresponding to each virtual machine is maintained in the switch, and the method comprises the following steps:
receiving a first message sent by an intelligent network card, wherein the first message is a message sent by a first virtual machine;
determining a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine;
and sending the message to a corresponding second virtual machine through the target VF interface.
5. The method according to claim 4, wherein the first packet carries an identifier of a VF interface corresponding to the first virtual machine; the method further comprises the following steps:
judging whether a mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine exists in the mapping relation between the communication address of each locally maintained virtual machine and the VF interface corresponding to each virtual machine;
and if the mapping relation does not exist, adding the mapping relation between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine into the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
6. A message processing device is applied to an intelligent network card, a switch connected with the intelligent network card maintains the mapping relationship between the communication address of each virtual machine and the virtual function VF interface corresponding to each virtual machine, and the device comprises:
the receiving unit is used for receiving a first message sent by a first virtual machine;
the judging unit is used for judging whether a forwarding table item matched with the first message exists locally or not;
and the sending unit is used for sending the first message to the switch when it is determined that no forwarding table item matched with the first message exists locally, so that the switch determines a target VF interface corresponding to the target communication address of the first message in the mapping relation between the communication address of each virtual machine and the VF interface corresponding to each virtual machine, and sends the message to a corresponding second virtual machine through the target VF interface.
7. The apparatus according to claim 6, wherein when sending the target packet to the switch, the sending unit is specifically configured to:
acquiring an identifier of a VF interface corresponding to the first virtual machine, and adding the identifier of the VF interface corresponding to the first virtual machine to the first message to obtain a second message;
and sending the second message to a switch.
8. The apparatus of claim 6, wherein the sending unit is further configured to:
when the local start is determined, sending a handshake message to the switch;
and if a response message returned by the switch based on the handshake message is received, reporting the information of each local VF interface to the switch, so that the switch allocates an identifier for uniquely identifying the VF interface for each VF interface.
9. A message processing device is applied to a switch, wherein a mapping relationship between a communication address of each virtual machine and a Virtual Function (VF) interface corresponding to each virtual machine is maintained in the switch, and the device comprises:
the receiving unit is used for receiving a first message sent by the intelligent network card, wherein the first message is a message sent by a first virtual machine;
a determining unit, configured to determine, in a mapping relationship between a communication address of each virtual machine and a VF interface corresponding to each virtual machine, a target VF interface corresponding to a destination communication address of the first packet;
and the sending unit is used for sending the message to the corresponding second virtual machine through the target VF interface.
10. The apparatus according to claim 9, wherein the first packet carries an identifier of a VF interface corresponding to the first virtual machine; the device also comprises a judging unit and an adding unit:
the determining unit is configured to determine whether a mapping relationship between a communication address of the first virtual machine and an identifier of a VF interface corresponding to the first virtual machine exists in a mapping relationship between the communication address of each locally maintained virtual machine and the VF interface corresponding to each virtual machine;
if the mapping relationship does not exist, the adding unit adds the mapping relationship between the communication address of the first virtual machine and the identifier of the VF interface corresponding to the first virtual machine in the mapping relationship between the communication address of each virtual machine and the VF interface corresponding to each virtual machine.
CN202010247821.0A 2020-04-01 2020-04-01 Message processing method and device Active CN111698167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010247821.0A CN111698167B (en) 2020-04-01 2020-04-01 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010247821.0A CN111698167B (en) 2020-04-01 2020-04-01 Message processing method and device

Publications (2)

Publication Number Publication Date
CN111698167A true CN111698167A (en) 2020-09-22
CN111698167B CN111698167B (en) 2023-04-07

Family

ID=72476315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010247821.0A Active CN111698167B (en) 2020-04-01 2020-04-01 Message processing method and device

Country Status (1)

Country Link
CN (1) CN111698167B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367267A (en) * 2020-09-30 2021-02-12 新华三大数据技术有限公司 Virtual machine management method and device
CN112910802A (en) * 2021-01-13 2021-06-04 新华三大数据技术有限公司 Message processing method and device
CN114327262A (en) * 2021-12-10 2022-04-12 山东云海国创云计算装备产业创新中心有限公司 Method and device for maintaining port mapping for intelligent network card
CN114363256A (en) * 2020-09-28 2022-04-15 华为云计算技术有限公司 Network card-based message analysis method and related device
CN114598645A (en) * 2022-01-30 2022-06-07 阿里云计算有限公司 Control method and device of flow table item

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468462A (en) * 2013-09-12 2015-03-25 杭州华三通信技术有限公司 Method and apparatus for forwarding message of distributed virtual switch system
CN105207873A (en) * 2015-08-31 2015-12-30 华为技术有限公司 Message processing method and apparatus
CN105245456A (en) * 2015-10-20 2016-01-13 浪潮(北京)电子信息产业有限公司 Method and system for unloading SDN virtual network function in cloud server
WO2016008394A1 (en) * 2014-07-14 2016-01-21 Hangzhou H3C Technologies Co., Ltd. Packets processing
WO2016106718A1 (en) * 2014-12-31 2016-07-07 华为技术有限公司 Network control method and virtual switch
CN107395508A (en) * 2016-05-17 2017-11-24 华为技术有限公司 The method and apparatus to E-Packet
CN107995129A (en) * 2017-11-30 2018-05-04 锐捷网络股份有限公司 A kind of NFV message forwarding methods and device
CN108092923A (en) * 2016-11-23 2018-05-29 阿里巴巴集团控股有限公司 Message processing method and device based on SR-IOV
CN110554977A (en) * 2018-05-30 2019-12-10 阿里巴巴集团控股有限公司 Data caching method, data processing method, computer device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468462A (en) * 2013-09-12 2015-03-25 杭州华三通信技术有限公司 Method and apparatus for forwarding message of distributed virtual switch system
WO2016008394A1 (en) * 2014-07-14 2016-01-21 Hangzhou H3C Technologies Co., Ltd. Packets processing
WO2016106718A1 (en) * 2014-12-31 2016-07-07 华为技术有限公司 Network control method and virtual switch
CN105207873A (en) * 2015-08-31 2015-12-30 华为技术有限公司 Message processing method and apparatus
CN105245456A (en) * 2015-10-20 2016-01-13 浪潮(北京)电子信息产业有限公司 Method and system for unloading SDN virtual network function in cloud server
CN107395508A (en) * 2016-05-17 2017-11-24 华为技术有限公司 The method and apparatus to E-Packet
CN108092923A (en) * 2016-11-23 2018-05-29 阿里巴巴集团控股有限公司 Message processing method and device based on SR-IOV
CN107995129A (en) * 2017-11-30 2018-05-04 锐捷网络股份有限公司 A kind of NFV message forwarding methods and device
CN110554977A (en) * 2018-05-30 2019-12-10 阿里巴巴集团控股有限公司 Data caching method, data processing method, computer device and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363256A (en) * 2020-09-28 2022-04-15 华为云计算技术有限公司 Network card-based message analysis method and related device
CN112367267A (en) * 2020-09-30 2021-02-12 新华三大数据技术有限公司 Virtual machine management method and device
CN112367267B (en) * 2020-09-30 2022-03-29 新华三大数据技术有限公司 Virtual machine management method and device
CN112910802A (en) * 2021-01-13 2021-06-04 新华三大数据技术有限公司 Message processing method and device
CN112910802B (en) * 2021-01-13 2022-05-24 新华三大数据技术有限公司 Message processing method and device
CN114327262A (en) * 2021-12-10 2022-04-12 山东云海国创云计算装备产业创新中心有限公司 Method and device for maintaining port mapping for intelligent network card
CN114327262B (en) * 2021-12-10 2024-03-08 山东云海国创云计算装备产业创新中心有限公司 Method and device for maintaining port mapping of intelligent network card
CN114598645A (en) * 2022-01-30 2022-06-07 阿里云计算有限公司 Control method and device of flow table item

Also Published As

Publication number Publication date
CN111698167B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN111698167B (en) Message processing method and device
CN104734931B (en) Link establishing method and device between a kind of virtual network function
US9141420B2 (en) Overload control in a cloud computing environment
US10698741B2 (en) Resource allocation method for VNF and apparatus
CN107707622B (en) Method and device for accessing desktop cloud virtual machine and desktop cloud controller
US10693785B2 (en) Method and system for forwarding data, virtual load balancer, and readable storage medium
CN109561054B (en) Data transmission method, controller and access device
US10129148B2 (en) Table-based load balancing for bonded network interfaces
CN107534577B (en) Method and equipment for instantiating network service
CN112583655B (en) Data transmission method and device, electronic equipment and readable storage medium
CN110928637A (en) Load balancing method and system
CN109194589B (en) MDC (media data center) implementation method and device
CN105657078B (en) A kind of data transmission method, device and multitiered network manager
CN111092828B (en) Network operation method, device, equipment and storage medium
CN114785737A (en) Message processing method, gateway device, server and storage medium
CN109150720B (en) Service chain message forwarding method, device, equipment and computer readable storage medium
CN104426816A (en) Virtual machine communication method and device
CN109618015B (en) Data center-based de-stacking implementation method and device
CN111294316B (en) Network isolation method and device based on user mode protocol stack virtual router
CN111262771B (en) Virtual private cloud communication system, system configuration method and controller
CN109525479B (en) Message processing method and device
CN114629744B (en) Data access method, system and related device based on macvlan host network
CN114679370B (en) Server hosting method, device, system and storage medium
CN112422457B (en) Message processing method and device and computer storage medium
CN111294221B (en) Network isolation configuration method and device based on haproxy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant