CN111224897A - Flow forwarding method and device, switch equipment and intelligent network card - Google Patents

Flow forwarding method and device, switch equipment and intelligent network card Download PDF

Info

Publication number
CN111224897A
CN111224897A CN201811409154.0A CN201811409154A CN111224897A CN 111224897 A CN111224897 A CN 111224897A CN 201811409154 A CN201811409154 A CN 201811409154A CN 111224897 A CN111224897 A CN 111224897A
Authority
CN
China
Prior art keywords
flow
traffic
interface
physical
network card
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.)
Pending
Application number
CN201811409154.0A
Other languages
Chinese (zh)
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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology 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 Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201811409154.0A priority Critical patent/CN111224897A/en
Publication of CN111224897A publication Critical patent/CN111224897A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches

Abstract

The embodiment of the invention provides a flow forwarding method, a flow forwarding device, switch equipment and an intelligent network card, wherein the method is applied to a virtual switch, the virtual switch is installed in the intelligent network card, the intelligent network card is arranged in a physical machine, and the method comprises the following steps: receiving a first flow to be forwarded; and forwarding the first flow to a network controller of the intelligent network card, so that the network controller forwards the first flow to a destination physical machine of the first flow through a physical interface of the intelligent network card. Therefore, by the technical scheme provided by the embodiment of the invention, the performance of the physical machine can be improved in the flow forwarding process.

Description

Flow forwarding method and device, switch equipment and intelligent network card
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a traffic forwarding method and apparatus, a switch device, and an intelligent network card.
Background
The virtual switch works in a two-layer data network, and the two-layer (or partial three-layer) network function of the physical switch is realized in a software mode.
In the prior art, a virtual switch runs in a physical machine and is used for forwarding or monitoring traffic sent to or from the physical machine.
However, because the virtual switch in the prior art runs in the physical machine, the virtual switch occupies a CPU and a memory of the physical machine in the process of forwarding or monitoring the traffic sent to or from the physical machine, thereby causing performance degradation of the physical machine.
Disclosure of Invention
The embodiment of the invention aims to provide a flow forwarding method, a flow forwarding device, switch equipment and an intelligent network card, so that the performance of a physical machine can be improved in the flow forwarding process. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a traffic forwarding method, where the method is applied to a virtual switch, the virtual switch is installed in an intelligent network card, and the intelligent network card is set in a physical machine, and the method includes:
receiving a first flow to be forwarded;
and forwarding the first flow to a network controller of the intelligent network card, so that the network controller forwards the first flow to a destination physical machine of the first flow through a physical interface of the intelligent network card.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the at least one physical interface comprises a first physical interface, the first flow to be forwarded is flow sent by the physical machine through the first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the step of receiving the first traffic to be forwarded includes:
and receiving first flow sent by the physical machine to the first network interface through the first physical interface.
Optionally, the method further includes:
receiving a second flow forwarded by a network controller of the intelligent network card, wherein the second flow is as follows: in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port;
and forwarding the second traffic to a second network interface corresponding to the second traffic, so as to send the second traffic to the physical machine through a second physical interface through the second network interface, where the second physical interface is a physical interface corresponding to the second network interface.
Optionally, the first flow to be forwarded is a flow sent by the physical machine to the network controller of the intelligent network card, and the first flow does not hit the ASAP2A regular flow rate;
the step of receiving the first traffic to be forwarded includes:
and receiving the first flow forwarded by the network controller of the intelligent network card.
Optionally, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card;
the method further comprises the following steps:
receiving a third flow forwarded by a network controller of the intelligent network card, wherein the third flow is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2The user datagram protocol port is a flow of a preset user datagram protocol port;
forwarding the third flow to a third network interface corresponding to the third flow, so as to send the third flow to the physical machine through a third physical interface through the third network interface, where the third physical interface is a physical interface corresponding to the third network interface.
Optionally, the method further includes:
issuing ASAP to the network controller of the intelligent network card2And (4) rules.
In a second aspect, an embodiment of the present invention provides a traffic forwarding method, where the method is applied to an intelligent network card, the intelligent network card is disposed in a physical machine, and a virtual switch is installed in the intelligent network card, and the method includes:
forwarding the first traffic to the virtual switch;
and receiving the first flow forwarded by the virtual switch through a network controller, and forwarding the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the at least one physical interface comprises a first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the first flow is the flow sent by the physical machine to the first network interface through the first physical interface, and the network interface corresponding to the first physical interface is the first network interface;
the step of forwarding the first traffic to the virtual switch comprises:
forwarding the first traffic to the virtual switch over the first network interface.
Optionally, the method further includes:
forwarding, by a network controller, a second traffic to the virtual switch, so that the virtual switch forwards the second traffic to a second network interface corresponding to the second traffic;
sending the second flow to the physical machine through a second physical interface through the second network interface, wherein the second physical interface is a physical interface corresponding to the second network interface;
wherein the second flow rate is: and in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port.
Optionally, the method further includes:
forwarding, by the network controller, a fourth traffic to the physical machine through a third physical interface corresponding to the fourth traffic, where the fourth traffic hits ASAP from among the traffic received by the network controller through the physical interface of the intelligent network card2Regular traffic.
Optionally, the first flow is the flow sent to the network controller of the intelligent network card in the physical machine, which misses the ASAP2A regular flow rate;
the step of forwarding the first traffic to the virtual switch comprises:
forwarding, by the network controller, the first traffic to the virtual switch.
Optionally, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card;
the method further comprises the following steps:
forwarding a third flow to the virtual switch through a network controller, so that the virtual switch forwards the third flow to a third network interface corresponding to the third flow;
sending, by the third network interface, the third flow to the physical machine via a third physical interface, where the third physical interface is a physical interface corresponding to the third network interface;
wherein the third flow rate is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2Regular traffic.
Optionally, the method further includes:
receiving ASAP issued by the virtual switch through a network controller2And (4) rules.
In a third aspect, an embodiment of the present invention provides a traffic forwarding apparatus, where the apparatus is applied to a virtual switch, the virtual switch is installed in an intelligent network card, and the intelligent network card is disposed in a physical machine, and the apparatus includes:
the first traffic receiving module is used for receiving first traffic to be forwarded;
and the first traffic forwarding module is configured to forward the first traffic to a network controller of the intelligent network card, so that the network controller forwards the first traffic to a destination physical machine of the first traffic through a physical interface of the intelligent network card.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the at least one physical interface comprises a first physical interface, the first flow to be forwarded is flow sent by the physical machine through the first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the first traffic receiving module is specifically configured to:
and receiving first flow sent by the physical machine to the first network interface through the first physical interface.
Optionally, the apparatus further comprises:
a second traffic receiving module, configured to receive a second traffic forwarded by a network controller of the intelligent network card, where the second traffic is: in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port;
and the second traffic forwarding module is configured to forward the second traffic to a second network interface corresponding to the second traffic, so that the second traffic is sent to the physical machine through a second physical interface via the second network interface, where the second physical interface is a physical interface corresponding to the second network interface.
Optionally, the first flow to be forwarded is a flow sent by the physical machine to the network controller of the intelligent network card, and the first flow does not hit the ASAP2A regular flow rate;
the first traffic receiving is specifically configured to:
and receiving the first flow forwarded by the network controller of the intelligent network card.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the device further comprises:
a third traffic receiving module, configured to receive a third traffic forwarded by a network controller of the intelligent network card, where the third traffic is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2The user datagram protocol port is a flow of a preset user datagram protocol port;
and a third flow forwarding module, configured to forward the third flow to a third network interface corresponding to the third flow, so as to send the third flow to the physical machine through a third physical interface through the third network interface, where the third physical interface is a physical interface corresponding to the third network interface.
Optionally, the apparatus further comprises:
ASAP2a rule sending module for sending ASAP to the network controller of the intelligent network card2And (4) rules.
In a fourth aspect, an embodiment of the present invention provides a traffic forwarding apparatus, where the apparatus is applied to an intelligent network card, the intelligent network card is disposed in a physical machine, and a virtual switch is installed in the intelligent network card, and the apparatus includes:
a fourth traffic forwarding module, configured to forward the first traffic to the virtual switch;
and the fourth flow receiving module is used for receiving the first flow forwarded by the virtual switch through a network controller and forwarding the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the at least one physical interface comprises a first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the first flow is the flow sent by the physical machine to the first network interface through the first physical interface, and the network interface corresponding to the first physical interface is the first network interface;
the fourth traffic forwarding module is specifically configured to:
forwarding the first traffic to the virtual switch over the first network interface.
Optionally, the apparatus further comprises:
a fifth traffic forwarding module, configured to forward the second traffic to the virtual switch through a network controller, so that the virtual switch forwards the second traffic to a second network interface corresponding to the second traffic;
a sixth traffic forwarding module, configured to send the second traffic to the physical machine through a second physical interface via the second network interface, where the second physical interface is a physical interface corresponding to the second network interface;
wherein the second flow rate is: and in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port.
Optionally, the apparatus further comprises:
a seventh traffic forwarding module, configured to forward, by the network controller, a fourth traffic to the physical machine through a third physical interface corresponding to the fourth traffic, where the fourth traffic is a hit on the ASAP in traffic received by the network controller through the physical interface of the intelligent network card2Regular traffic.
Optionally, the first flow rateThe ASAP is missed in the flow sent to the network controller of the intelligent network card in the physical machine2A regular flow rate;
the fourth traffic forwarding module is specifically configured to:
forwarding, by the network controller, the first traffic to the virtual switch.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the device further comprises:
an eighth traffic forwarding module, configured to forward, by using a network controller, a third traffic to the virtual switch, so that the virtual switch forwards the third traffic to a third network interface corresponding to the third traffic;
a ninth traffic forwarding module, configured to send, through the third network interface, the third traffic to the physical machine through a third physical interface, where the third physical interface is a physical interface corresponding to the third network interface;
wherein the third flow rate is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2Regular traffic.
Optionally, the apparatus further comprises:
ASAP2a rule receiving module, configured to receive, through a network controller, the ASAP issued by the virtual switch2And (4) rules.
In a fifth aspect, an embodiment of the present invention provides a switch device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the flow forwarding method in the first aspect when executing the program stored in the memory.
In a sixth aspect, an embodiment of the present invention further provides an intelligent network card, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the flow forwarding method of the second aspect when executing the program stored in the memory.
In a seventh aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the traffic forwarding method according to the first aspect.
In an eighth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the traffic forwarding method according to the second aspect.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a traffic forwarding method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a first traffic forwarding process according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a second traffic forwarding process according to an embodiment of the present invention;
fig. 4 is a flowchart of another traffic forwarding method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of another first traffic forwarding process provided in the embodiment of the present invention;
fig. 6 is a flowchart of another traffic forwarding method according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a fourth traffic forwarding process according to an embodiment of the present invention;
fig. 8 is a flowchart of another traffic forwarding method according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a traffic forwarding apparatus according to an embodiment of the present invention;
fig. 10 is a schematic diagram of another traffic forwarding device according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a switch device according to an embodiment of the present invention;
fig. 12 is a schematic diagram of an intelligent network card according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
In order to solve the technical problem that the performance of a physical machine is reduced in the process of forwarding the flow by a virtual switch in the prior art, embodiments of the present invention provide a flow forwarding method and apparatus, a switch device, and an intelligent network card, so that the performance of the physical machine can be improved in the process of forwarding the flow.
In a first aspect, a traffic forwarding method applied to a virtual switch according to an embodiment of the present invention is described below.
It should be noted that the traffic forwarding method provided by the embodiment of the present invention is applied to a virtual switch, where the virtual switch is installed in an intelligent network card, and the intelligent network card is set in a physical machine.
The traffic forwarding method provided by the embodiment of the invention can be particularly applied to a bare computer cloud scene, and at least one virtual machine can be arranged in the physical machine, and certainly, the virtual machine can also not be arranged.
Specifically, the intelligent network card may be an MLNX (mllanox) intelligent network card, and the virtual switch is a ddk-vswitch (virtual switch), where the ddk is a Data Plane development kit, and the Data Plane development kit is a Data Plane development kit.
Specifically, the intelligent network card is further provided with a network controller, and the network controller may be a ConnectX-5 network controller.
As shown in fig. 1, the traffic forwarding method provided in the embodiment of the present invention may include the following steps:
s110, receiving a first flow to be forwarded.
Wherein the first flow may be a flow from a physical machine.
In one embodiment, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card; the at least one physical interface comprises a first physical interface, first flow to be forwarded is flow sent by a physical machine through the first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
at this time, the step of receiving the first traffic to be forwarded may include:
and receiving first flow sent by the physical machine to the first network interface through the first physical interface.
In this embodiment, one physical interface or a plurality of physical interfaces are provided in the physical machine. The first physical interface may be any physical interface provided in a physical machine. Correspondingly, the intelligent network card is provided with at least one network interface, wherein the number of the network interfaces is the same as that of the physical interfaces arranged in the physical machine. Moreover, the physical interfaces have a one-to-one correspondence with the network interfaces.
For example, the physical interfaces arranged in the physical machine include a first physical interface, and the intelligent network card is provided with a first network interface, where the first network interface is a network interface corresponding to the first physical interface.
After the physical machine sends the first traffic to the intelligent network card through the first physical interface, the intelligent network card sends the first traffic to the virtual switch through the first network interface, that is, the virtual switch receives the first traffic sent by the physical machine to the first network interface through the first physical interface.
And S120, forwarding the first flow to a network controller of the intelligent network card, so that the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
After receiving the first traffic, the virtual switch may forward the first traffic to the network controller of the intelligent network card, and after receiving the first traffic, the network controller of the intelligent network card forwards the first traffic to a destination physical machine of the first traffic through a physical interface of the intelligent network card.
It is understood that the virtual switch may directly forward the first traffic to the network controller after receiving the first traffic; it is reasonable to forward the first traffic to the network controller after the first traffic is processed. The flow processing on the first flow may be processing such as encapsulation and flow control on the first flow.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
For clarity of the description of the scheme, the detailed description of the traffic forwarding method applied to the virtual switch provided by the embodiment of the present invention will be given below by using specific examples.
As shown in fig. 2, a first physical interface is disposed in the physical machine, a first network interface is disposed on the intelligent network card, the first network interface is a network interface corresponding to the first physical interface, the physical machine sends the first traffic to the intelligent network card through the first physical interface, the intelligent network card sends the first traffic to the virtual switch through the first network interface, the virtual switch receives the first traffic and then sends the first traffic to the network controller, and the network controller forwards the first traffic to a target physical machine of the first traffic through the physical interface of the intelligent network card.
It can be understood that the intelligent network card can receive the first traffic through the network interface, and can also receive the traffic from the outside of the physical machine through its own physical interface. The intelligent network card can screen the traffic externally sent to the Physical interface of the intelligent network card through the network controller, wherein a part of the traffic is directly sent to the Physical interface of the Physical machine, the Physical interface can be a Physical Function (PF) port, and the other part of the traffic is forwarded to the virtual switch and forwarded by the virtual switch.
Specifically, the traffic received by the intelligent network card through its own physical interface can be divided into two parts, wherein one part of the traffic is the traffic of which the user datagram protocol port is a preset user datagram protocol port, and the part of the traffic needs to be forwarded by the virtual switch; the other part of the flow is the flow of which the user datagram protocol port is a preset user datagram protocol port, and the part of the flow does not need to be forwarded by the virtual switch.
In one embodiment, the above-mentioned traffic forwarding may further include the following steps, a1 and a2, respectively.
Step a1, receiving a second traffic forwarded by the network controller of the intelligent network card, where the second traffic is: in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of the preset user datagram protocol port.
Step a2, forwarding the second traffic to a second network interface corresponding to the second traffic, so as to send the second traffic to the physical machine through the second physical interface, where the second physical interface is a physical interface corresponding to the second network interface.
In this embodiment, after receiving the second traffic, the virtual switch may forward the second traffic to a second network interface corresponding to the second traffic, and the intelligent network card may forward the second traffic to the physical machine via the second physical interface through the second network interface. As shown in fig. 3.
In practical application, the intelligent network card can start ASAP2(Accelerated Switching and packet processing) acceleration function, in this case, in combination with SR-IOV technology, the physical interface set in the physical machine and at least one physical interface can directly communicate with the network controller of the intelligent network card. That is, the physical machine may send traffic to the network controller of the intelligent network card through the physical interface.
Also, in one embodiment, the virtual switch may issue an ASAP to the network controller of the smart card2And (4) rules.
The network controller may screen the traffic sent by the physical machine, and a part of the traffic, for example, the traffic sent by the physical machine to the network controller of the smart card, misses the ASAP2And forwarding the regular traffic to the virtual switch by the network controller for processing. Another part of the traffic, i.e. hit ASAP2Regular traffic, network controller directly upon hitting ASAP2The flow is regularly forwarded without the need forForwarding is to be performed by the virtual switch.
As shown in fig. 4, an embodiment of the present invention provides a traffic forwarding method applied to a virtual switch, which may include the following steps:
s410, receiving a first flow forwarded by a network controller of the intelligent network card.
The first flow to be forwarded is the flow sent by the physical machine to the network controller of the intelligent network card, and the ASAP is not hit2Regular traffic. The first flow is the flow which needs to be forwarded through the virtual switch, so that the network controller of the intelligent network card forwards the first flow to the virtual switch, and the virtual switch receives the first flow forwarded by the network controller of the intelligent network card.
S420, forward the first traffic to the network controller of the intelligent network card, so that the network controller forwards the first traffic to the destination physical machine of the first traffic through the physical interface of the intelligent network card.
Since S420 in the embodiment shown in fig. 4 is the same as S120 in the embodiment shown in fig. 1, it is not repeated here.
The traffic forwarding method shown in fig. 5 will be described in detail by using specific examples.
As shown in FIG. 5, FIG. 5 shows an ASAP of the smart network card2(Accelerated Switching and packet processing) acceleration function, the virtual switch forwards a schematic of the first traffic. Specifically, the physical machine sends the first traffic to the network controller of the intelligent network card through the first physical interface, and the first traffic does not hit the ASAP2A regular flow rate; after receiving the first flow, the network controller forwards the first flow to the virtual switch; and after receiving the first flow, the virtual switch forwards the first flow to the network controller again, and the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
It can be understood that the network controller may receive not only the first traffic sent by the physical machine, but also traffic from the physical interface of the intelligent network card, that is, traffic from the external network of the physical machine. And the network controller will screen the external traffic, wherein a part of the traffic is directly sent to the physical interface of the physical machine, and another part of the traffic, referred to as the third traffic herein, will be forwarded to the virtual switch, and forwarded by the virtual switch.
And when the intelligent network card receives the third flow, forwarding the third flow to the virtual switch, wherein the third flow is specifically the flow received by the network controller through the physical interface of the intelligent network card and does not hit the ASAP2And the user datagram protocol port is the flow of the preset user datagram protocol port.
In an embodiment, the method for forwarding traffic applied to the virtual switch may further include the following two steps, step B1 and step B2:
step B1, receiving a third traffic forwarded by the network controller of the intelligent network card, where the third traffic is: the ASAP is missed in the flow received by the network controller through the physical interface of the intelligent network card2The user datagram protocol port is a flow of a preset user datagram protocol port;
step B2, forwarding the third flow to a third network interface corresponding to the third flow, so as to send the third flow to the physical machine through the third physical interface via the third network interface, where the third physical interface is a physical interface corresponding to the third network interface.
In a second aspect, a traffic forwarding method applied to an intelligent network card according to an embodiment of the present invention will be described.
It should be noted that the traffic forwarding method provided by the embodiment of the present invention is applied to an intelligent network card, where the intelligent network card is disposed in a physical machine, and a virtual switch is installed in the intelligent network card. As shown in fig. 6, the traffic forwarding method provided in the embodiment of the present invention may include the following steps:
s610, forwarding the first traffic to the virtual switch.
Wherein the first flow may be a flow from a physical machine.
In one embodiment, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card; the at least one physical interface comprises a first physical interface, and a network interface corresponding to the first physical interface is a first network interface; the first flow is the flow sent by the physical machine to the first network interface through the first physical interface, and the network interface corresponding to the first physical interface is the first network interface;
at this time, the step of forwarding the first traffic to the virtual switch may include:
the first traffic is forwarded to the virtual switch over the first network interface.
In this embodiment, one physical interface or a plurality of physical interfaces are provided in the physical machine. The first physical interface may be any physical interface provided in a physical machine. Correspondingly, the intelligent network card is provided with at least one network interface, wherein the number of the network interfaces is the same as that of the physical interfaces arranged in the physical machine. Moreover, the physical interfaces have a one-to-one correspondence with the network interfaces.
For example, the physical interfaces arranged in the physical machine include a first physical interface, and the intelligent network card is provided with a first network interface, where the first network interface is a network interface corresponding to the first physical interface.
After the physical machine sends the first flow to the intelligent network card through the first physical interface, the intelligent network card sends the first flow to the virtual switch through the first network interface.
S620, receiving the first flow forwarded by the virtual switch through the network controller, and forwarding the first flow to a destination physical machine of the first flow through a physical interface of the intelligent network card.
After receiving the first traffic, the virtual switch may forward the first traffic to the network controller of the intelligent network card, and after receiving the first traffic, the network controller of the intelligent network card forwards the first traffic to a destination physical machine of the first traffic through a physical interface of the intelligent network card.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
It can be understood that the intelligent network card can receive the first traffic through the network interface, and can also receive the traffic through its own physical interface, that is, the traffic from the outside of the physical machine. The flow received by the intelligent network card through a physical interface of the intelligent network card can be divided into two parts, wherein one part of the flow is the flow of which a user datagram protocol port is a preset user datagram protocol port, and the part of the flow needs to be forwarded by a virtual switch; the other part of the flow is the flow of which the user datagram protocol port is a preset user datagram protocol port, and the part of the flow can be directly sent to the physical machine to be processed by the physical machine without being forwarded by the virtual switch.
In one embodiment, the above-mentioned traffic forwarding may further include the following steps, respectively B1 and B2.
And step B1, forwarding the second traffic to the virtual switch through the network controller, so that the virtual switch forwards the second traffic to a second network interface corresponding to the second traffic.
And step B2, sending the second traffic to the physical machine through a second physical interface through the second network interface, where the second physical interface is a physical interface corresponding to the second network interface.
Wherein the second flow rate is: in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of the preset user datagram protocol port.
In practical application, the intelligent network card can start ASAP2(Accelerated Switching and PacketProcessing), in which case the switch and packet processing are AcceleratedAnd by combining the SR-IOV technology, at least one physical interface arranged in the physical machine can directly communicate with the network controller of the intelligent network card. That is, the physical machine may send traffic to the network controller of the intelligent network card through the physical interface.
In one embodiment, the intelligent network card may receive the ASAP delivered by the virtual switch through the network controller2And (4) rules.
The embodiment of the invention provides a flow forwarding method applied to an intelligent network card, which can further comprise the following steps:
forwarding the fourth flow to the physical machine through a third physical interface corresponding to the fourth flow by the network controller, wherein the fourth flow is hit in the ASAP in the flow received by the network controller through the physical interface of the intelligent network card2Regular traffic.
Because the network controller hits ASAP in the flow received by the physical interface of the intelligent network card2The fourth flow of the rule may be directly forwarded to the physical machine through the flow fast channel, and therefore, the intelligent network card may forward the fourth flow to the physical machine through a third physical interface corresponding to the fourth flow. The forwarding efficiency of the traffic can be improved. As shown in fig. 7.
As an implementation mode of the invention, if the first flow is the flow sent to the network controller of the intelligent network card in the physical machine and does not hit the ASAP2A regular flow rate;
as shown in fig. 8, the traffic forwarding method applied to the intelligent network card provided in the embodiment of the present invention may include the following steps:
s810, forwarding the first flow to the virtual switch through a network controller.
The first flow to be forwarded is the flow sent by the physical machine to the network controller of the intelligent network card, and the ASAP is not hit2Regular traffic. It is described that the first traffic is the traffic that needs to be forwarded through the virtual switch, and therefore, the network controller of the intelligent network card forwards the first traffic to the virtual switch.
And S820, receiving the first flow forwarded by the virtual switch through the network controller, and forwarding the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
Since S820 of the embodiment shown in fig. 8 is the same as S620 of the embodiment shown in fig. 6, S820 will not be described again.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
It can be understood that the network controller may receive not only the first traffic sent by the physical machine, but also traffic from the physical interface of the intelligent network card. And when the intelligent network card receives a third flow, forwarding the third flow to the virtual switch, wherein the third flow is the flow which is received by the network controller through the physical interface of the intelligent network card and does not hit the ASAP2And the user datagram protocol port is the flow of the preset user datagram protocol port.
In an embodiment, the physical machine is provided with at least one physical interface, the intelligent network card is provided with a network interface corresponding to the at least one physical interface, and the method for forwarding the traffic applied to the intelligent network card may further include the following two steps, which are step D1 and step D2:
step D1, forwarding the third flow to the virtual switch through the network controller, so that the virtual switch forwards the third flow to a third network interface corresponding to the third flow;
step D2, sending the third flow to the physical machine through a third physical interface through a third network interface, wherein the third physical interface is a physical interface corresponding to the third network interface;
wherein the third flow rate is: the ASAP is missed in the flow received by the network controller through the physical interface of the intelligent network card2Regular traffic.
In a third aspect, an embodiment of the present invention provides a traffic forwarding apparatus, where the apparatus is applied to a virtual switch, the virtual switch is installed in an intelligent network card, and the intelligent network card is disposed in a physical machine, as shown in fig. 9, the apparatus includes:
a first traffic receiving module 910, configured to receive a first traffic to be forwarded;
a first traffic forwarding module 920, configured to forward the first traffic to a network controller of the intelligent network card, so that the network controller forwards the first traffic to a destination physical machine of the first traffic through a physical interface of the intelligent network card.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
Optionally, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card;
the at least one physical interface comprises a first physical interface, the first flow to be forwarded is flow sent by the physical machine through the first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the first traffic receiving module is specifically configured to:
and receiving first flow sent by the physical machine to the first network interface through the first physical interface.
Optionally, the apparatus further comprises:
a second traffic receiving module, configured to receive a second traffic forwarded by a network controller of the intelligent network card, where the second traffic is: in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port;
and the second traffic forwarding module is configured to forward the second traffic to a second network interface corresponding to the second traffic, so that the second traffic is sent to the physical machine through a second physical interface via the second network interface, where the second physical interface is a physical interface corresponding to the second network interface.
Optionally, the first flow to be forwarded is a flow sent by the physical machine to the network controller of the intelligent network card, and the first flow does not hit the ASAP2A regular flow rate;
the first traffic receiving is specifically configured to:
and receiving the first flow forwarded by the network controller of the intelligent network card.
Optionally, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card;
the device further comprises:
a third traffic receiving module, configured to receive a third traffic forwarded by a network controller of the intelligent network card, where the third traffic is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2The user datagram protocol port is a flow of a preset user datagram protocol port;
and a third flow forwarding module, configured to forward the third flow to a third network interface corresponding to the third flow, so as to send the third flow to the physical machine through a third physical interface through the third network interface, where the third physical interface is a physical interface corresponding to the third network interface.
Optionally, the apparatus further comprises:
ASAP2a rule sending module for sending ASAP to the network controller of the intelligent network card2And (4) rules.
In a fourth aspect, an embodiment of the present invention provides a traffic forwarding apparatus, where the apparatus is applied to an intelligent network card, the intelligent network card is disposed in a physical machine, and a virtual switch is installed in the intelligent network card, as shown in fig. 10, the apparatus includes:
a fourth traffic forwarding module 1010, configured to forward the first traffic to the virtual switch;
a fourth traffic receiving module 1020, configured to receive, by a network controller, the first traffic forwarded by the virtual switch, and forward the first traffic to a destination physical machine of the first traffic through a physical interface of the intelligent network card.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
Optionally, at least one physical interface is arranged in the physical machine, and a network interface corresponding to the at least one physical interface is arranged on the intelligent network card;
the at least one physical interface comprises a first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the first flow is the flow sent by the physical machine to the first network interface through the first physical interface, and the network interface corresponding to the first physical interface is the first network interface;
the fourth traffic forwarding module is specifically configured to:
forwarding the first traffic to the virtual switch over the first network interface.
Optionally, the apparatus further comprises:
a fifth traffic forwarding module, configured to forward the second traffic to the virtual switch through a network controller, so that the virtual switch forwards the second traffic to a second network interface corresponding to the second traffic;
a sixth traffic forwarding module, configured to send the second traffic to the physical machine through a second physical interface via the second network interface, where the second physical interface is a physical interface corresponding to the second network interface;
wherein the second flow rate is: and in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port.
Optionally, the apparatus further comprises:
a seventh traffic forwarding module, configured to forward, by the network controller, a fourth traffic to the physical machine through a third physical interface corresponding to the fourth traffic, where the fourth traffic is a hit on the ASAP in traffic received by the network controller through the physical interface of the intelligent network card2Regular traffic.
Optionally, the first flow is the flow sent to the network controller of the intelligent network card in the physical machine, which misses the ASAP2A regular flow rate;
the fourth traffic forwarding module is specifically configured to:
forwarding, by the network controller, the first traffic to the virtual switch.
Alternatively to this, the first and second parts may,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the device further comprises:
an eighth traffic forwarding module, configured to forward, by using a network controller, a third traffic to the virtual switch, so that the virtual switch forwards the third traffic to a third network interface corresponding to the third traffic;
a ninth traffic forwarding module, configured to send, through the third network interface, the third traffic to the physical machine through a third physical interface, where the third physical interface is a physical interface corresponding to the third network interface;
wherein the third flow rate is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2Regular traffic.
Optionally, the apparatus further comprises:
ASAP2a rule receiving module, configured to receive, through a network controller, the ASAP issued by the virtual switch2And (4) rules.
In a fifth aspect, an embodiment of the present invention further provides a switch device, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 complete communication with each other through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the traffic forwarding method according to the first aspect when executing the program stored in the memory 1103.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
The communication bus mentioned in the above switch device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the switch device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In a sixth aspect, an embodiment of the present invention further provides an intelligent network card, as shown in fig. 12, including a processor 1201, a communication interface 1202, a memory 1203, and a communication bus 1204, where the processor 1201, the communication interface 1202, and the memory 1203 complete communication with each other through the communication bus 1204,
a memory 1203 for storing a computer program;
the processor 1201 is configured to implement the traffic forwarding method according to the second aspect when executing the program stored in the memory 1203.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
The communication bus mentioned above for the smart card may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the intelligent network card and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the traffic forwarding method according to the first aspect.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the traffic forwarding method according to the second aspect.
According to the technical scheme provided by the embodiment of the invention, a virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the virtual switch receives a first flow to be forwarded; and after receiving the first flow, the network controller forwards the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card. Therefore, according to the technical scheme provided by the embodiment of the invention, the virtual switch is arranged in the intelligent network card, so that the virtual switch does not occupy a CPU (central processing unit) and a memory of the physical machine in the process of forwarding the flow, and the performance of the physical machine is improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the apparatus, the virtual switch, the smart network card and the storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and the relevant points can be referred to the partial description of the embodiments of the method.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (17)

1. A flow forwarding method is applied to a virtual switch, the virtual switch is installed in an intelligent network card, the intelligent network card is arranged in a physical machine, and the method comprises the following steps:
receiving a first flow to be forwarded;
and forwarding the first flow to a network controller of the intelligent network card, so that the network controller forwards the first flow to a destination physical machine of the first flow through a physical interface of the intelligent network card.
2. The method of claim 1,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the at least one physical interface comprises a first physical interface, the first flow to be forwarded is flow sent by the physical machine through the first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the step of receiving the first traffic to be forwarded includes:
and receiving first flow sent by the physical machine to the first network interface through the first physical interface.
3. The method of claim 2, further comprising:
receiving a second flow forwarded by a network controller of the intelligent network card, wherein the second flow is as follows: in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port;
and forwarding the second traffic to a second network interface corresponding to the second traffic, so as to send the second traffic to the physical machine through a second physical interface through the second network interface, where the second physical interface is a physical interface corresponding to the second network interface.
4. The method according to claim 1, wherein the first traffic to be forwarded is a missing ASAP of traffic sent by the physical machine to the network controller of the intelligent network card2A regular flow rate;
the step of receiving the first traffic to be forwarded includes:
and receiving the first flow forwarded by the network controller of the intelligent network card.
5. The method of claim 4,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the method further comprises the following steps:
receiving a third flow forwarded by a network controller of the intelligent network card, wherein the third flow is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2The user datagram protocol port is a flow of a preset user datagram protocol port;
forwarding the third flow to a third network interface corresponding to the third flow, so as to send the third flow to the physical machine through a third physical interface through the third network interface, where the third physical interface is a physical interface corresponding to the third network interface.
6. The method of claim 4, further comprising:
issuing ASAP to the network controller of the intelligent network card2And (4) rules.
7. A flow forwarding method is applied to an intelligent network card, the intelligent network card is arranged in a physical machine, a virtual switch is installed in the intelligent network card, and the method comprises the following steps:
forwarding the first traffic to the virtual switch;
and receiving the first flow forwarded by the virtual switch through a network controller, and forwarding the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
8. The method of claim 7,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the at least one physical interface comprises a first physical interface, and a network interface corresponding to the first physical interface is a first network interface;
the first flow is the flow sent by the physical machine to the first network interface through the first physical interface, and the network interface corresponding to the first physical interface is the first network interface;
the step of forwarding the first traffic to the virtual switch comprises:
forwarding the first traffic to the virtual switch over the first network interface.
9. The method of claim 8, further comprising:
forwarding, by a network controller, a second traffic to the virtual switch, so that the virtual switch forwards the second traffic to a second network interface corresponding to the second traffic;
sending the second flow to the physical machine through a second physical interface through the second network interface, wherein the second physical interface is a physical interface corresponding to the second network interface;
wherein the second flow rate is: and in the flow received by the network controller through the physical interface of the intelligent network card, the user datagram protocol port is the flow of a preset user datagram protocol port.
10. The method of claim 8, further comprising:
forwarding, by the network controller, a fourth traffic to the physical machine through a third physical interface corresponding to the fourth traffic, where the fourth traffic hits ASAP from among the traffic received by the network controller through the physical interface of the intelligent network card2Regular traffic.
11. The method of claim 7, wherein the first traffic is a missing ASAP traffic of the traffic sent to the network controller of the smart NIC in the physical machine2A regular flow rate;
the step of forwarding the first traffic to the virtual switch comprises:
forwarding, by the network controller, the first traffic to the virtual switch.
12. The method of claim 11,
the intelligent network card is provided with a network interface corresponding to the at least one physical interface;
the method further comprises the following steps:
forwarding a third flow to the virtual switch through a network controller, so that the virtual switch forwards the third flow to a third network interface corresponding to the third flow;
sending, by the third network interface, the third flow to the physical machine via a third physical interface, where the third physical interface is a physical interface corresponding to the third network interface;
wherein the third flow rate is: the network controller misses ASAP in the flow received by the physical interface of the intelligent network card2Regular traffic.
13. The method of claim 11, further comprising:
receiving ASAP issued by the virtual switch through a network controller2And (4) rules.
14. The utility model provides a flow forwarding device, its characterized in that, the device is applied to virtual switch, virtual switch installs in intelligent network card, intelligent network card sets up in the physics machine, the device includes:
the first traffic receiving module is used for receiving first traffic to be forwarded;
and the first traffic forwarding module is configured to forward the first traffic to a network controller of the intelligent network card, so that the network controller forwards the first traffic to a destination physical machine of the first traffic through a physical interface of the intelligent network card.
15. The utility model provides a flow forwarding device, its characterized in that, the device is applied to intelligent network card, intelligent network card sets up in the physics machine, install virtual switch in the intelligent network card, the device includes:
a fourth traffic forwarding module, configured to forward the first traffic to the virtual switch;
and the fourth flow receiving module is used for receiving the first flow forwarded by the virtual switch through a network controller and forwarding the first flow to a target physical machine of the first flow through a physical interface of the intelligent network card.
16. The switch equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the traffic forwarding method of any one of claims 1-6 when executing the program stored in the memory.
17. An intelligent network card is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for finishing mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the traffic forwarding method of any one of claims 7-13 when executing the program stored in the memory.
CN201811409154.0A 2018-11-23 2018-11-23 Flow forwarding method and device, switch equipment and intelligent network card Pending CN111224897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811409154.0A CN111224897A (en) 2018-11-23 2018-11-23 Flow forwarding method and device, switch equipment and intelligent network card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811409154.0A CN111224897A (en) 2018-11-23 2018-11-23 Flow forwarding method and device, switch equipment and intelligent network card

Publications (1)

Publication Number Publication Date
CN111224897A true CN111224897A (en) 2020-06-02

Family

ID=70827422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811409154.0A Pending CN111224897A (en) 2018-11-23 2018-11-23 Flow forwarding method and device, switch equipment and intelligent network card

Country Status (1)

Country Link
CN (1) CN111224897A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438219A (en) * 2020-07-08 2021-09-24 支付宝(杭州)信息技术有限公司 Replay transaction identification method and device based on block chain all-in-one machine
US20210326887A1 (en) * 2020-07-08 2021-10-21 Alipay (Hangzhou) Information Technology Co., Ltd. Methods and apparatuses for transferring transaction based on blockchain integrated station
CN114679349A (en) * 2022-03-29 2022-06-28 新华三技术有限公司 Data communication method and device
CN114793217A (en) * 2022-03-24 2022-07-26 阿里云计算有限公司 Intelligent network card, data forwarding method and device and electronic equipment
CN115633197A (en) * 2022-09-15 2023-01-20 海南乾唐视联信息技术有限公司 Service data distribution system, method, device, electronic equipment and medium
US11665234B2 (en) 2020-07-08 2023-05-30 Alipay (Hangzhou) Information Technology Co., Ltd. Methods and apparatuses for synchronizing data based on blockchain integrated station

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110205904A1 (en) * 2010-02-19 2011-08-25 Fujitsu Limited Relay apparatus, virtual machine system, and relay method
CN103067242A (en) * 2012-12-04 2013-04-24 中国电信股份有限公司云计算分公司 Virtual machine system used for providing network service
CN103581042A (en) * 2013-10-30 2014-02-12 华为技术有限公司 Method and device for sending data package
CN103873374A (en) * 2014-03-27 2014-06-18 杭州华三通信技术有限公司 Message processing method and device in virtualized system
CN104486234A (en) * 2014-11-21 2015-04-01 华为技术有限公司 Method and server for uninstalling service exchanger to physical network card
US9092260B1 (en) * 2010-06-30 2015-07-28 Emc Corporation Sync point coordination providing high throughput job processing across distributed virtual infrastructure
US20150271244A1 (en) * 2014-03-24 2015-09-24 Mellanox Technologies Ltd. Nic with switching functionality between network ports
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
US20160094667A1 (en) * 2014-09-25 2016-03-31 Nrupal R. Jani Technologies for offloading a virtual service endpoint to a network interface card
CN106059881A (en) * 2016-03-28 2016-10-26 北京智梵网络科技有限公司 SDN network and flow leading-in and leading-out method thereof
CN106656724A (en) * 2016-12-20 2017-05-10 上海优刻得信息科技有限公司 Message encapsulation method and equipment
US20170161090A1 (en) * 2015-12-08 2017-06-08 Fujitsu Limited Communication control program, communication control method, and information processing device
US20180123880A1 (en) * 2015-07-03 2018-05-03 Huawei Technologies Co., Ltd. Method for Configuring Network, Network System, and Device
CN107992352A (en) * 2016-10-26 2018-05-04 阿里巴巴集团控股有限公司 For virtualizing the data interactive method and equipment of scene
CN107995129A (en) * 2017-11-30 2018-05-04 锐捷网络股份有限公司 A kind of NFV message forwarding methods and device
CN108475244A (en) * 2015-12-22 2018-08-31 英特尔公司 Accelerate network packet processing

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110205904A1 (en) * 2010-02-19 2011-08-25 Fujitsu Limited Relay apparatus, virtual machine system, and relay method
US9092260B1 (en) * 2010-06-30 2015-07-28 Emc Corporation Sync point coordination providing high throughput job processing across distributed virtual infrastructure
CN103067242A (en) * 2012-12-04 2013-04-24 中国电信股份有限公司云计算分公司 Virtual machine system used for providing network service
CN103581042A (en) * 2013-10-30 2014-02-12 华为技术有限公司 Method and device for sending data package
US20150271244A1 (en) * 2014-03-24 2015-09-24 Mellanox Technologies Ltd. Nic with switching functionality between network ports
CN103873374A (en) * 2014-03-27 2014-06-18 杭州华三通信技术有限公司 Message processing method and device in virtualized system
US20160094667A1 (en) * 2014-09-25 2016-03-31 Nrupal R. Jani Technologies for offloading a virtual service endpoint to a network interface card
CN104486234A (en) * 2014-11-21 2015-04-01 华为技术有限公司 Method and server for uninstalling service exchanger to physical network card
US20180123880A1 (en) * 2015-07-03 2018-05-03 Huawei Technologies Co., Ltd. Method for Configuring Network, Network System, and Device
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
US20170161090A1 (en) * 2015-12-08 2017-06-08 Fujitsu Limited Communication control program, communication control method, and information processing device
CN108475244A (en) * 2015-12-22 2018-08-31 英特尔公司 Accelerate network packet processing
CN106059881A (en) * 2016-03-28 2016-10-26 北京智梵网络科技有限公司 SDN network and flow leading-in and leading-out method thereof
CN107992352A (en) * 2016-10-26 2018-05-04 阿里巴巴集团控股有限公司 For virtualizing the data interactive method and equipment of scene
CN106656724A (en) * 2016-12-20 2017-05-10 上海优刻得信息科技有限公司 Message encapsulation method and equipment
CN107995129A (en) * 2017-11-30 2018-05-04 锐捷网络股份有限公司 A kind of NFV message forwarding methods and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438219A (en) * 2020-07-08 2021-09-24 支付宝(杭州)信息技术有限公司 Replay transaction identification method and device based on block chain all-in-one machine
US20210326887A1 (en) * 2020-07-08 2021-10-21 Alipay (Hangzhou) Information Technology Co., Ltd. Methods and apparatuses for transferring transaction based on blockchain integrated station
US11665234B2 (en) 2020-07-08 2023-05-30 Alipay (Hangzhou) Information Technology Co., Ltd. Methods and apparatuses for synchronizing data based on blockchain integrated station
US11783339B2 (en) 2020-07-08 2023-10-10 Alipay (Hangzhou) Information Technology Co., Ltd. Methods and apparatuses for transferring transaction based on blockchain integrated station
CN114793217A (en) * 2022-03-24 2022-07-26 阿里云计算有限公司 Intelligent network card, data forwarding method and device and electronic equipment
CN114679349A (en) * 2022-03-29 2022-06-28 新华三技术有限公司 Data communication method and device
CN114679349B (en) * 2022-03-29 2023-07-21 新华三技术有限公司 Data communication method and device
CN115633197A (en) * 2022-09-15 2023-01-20 海南乾唐视联信息技术有限公司 Service data distribution system, method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN111224897A (en) Flow forwarding method and device, switch equipment and intelligent network card
CN102402487B (en) Zero copy message reception method and system
EP3226132A1 (en) Virtual machine instance deployment method and apparatus and device
CN104702560A (en) Method and device for preventing message attack
KR101649819B1 (en) Technologies for accelerating network virtualization
CN111181850B (en) Data packet flooding suppression method, device and equipment and computer storage medium
US11316804B2 (en) Forwarding entry update method and apparatus in a memory
US10944716B2 (en) Metering device address management method, collection terminal, and metering device
CN109286584B (en) Fragmentation recombination method, device and equipment in multi-core system
CN111224898A (en) Message forwarding method and device, switch equipment and intelligent network card
WO2022222674A1 (en) Message processing method and apparatus, electronic device, and computer-readable storage medium
CN104426816B (en) A kind of virtual machine communication method and device
CN114827292A (en) Industrial heterogeneous protocol high-speed conversion optimization processing method and system
CN106921588B (en) Flow control method, device and equipment
CN108156247B (en) Data communication method, device, system, terminal and readable storage medium
CN107483369B (en) Message processing method and virtual switch
US20190036827A1 (en) Traffic control method and device in software defined network
CN109495404B (en) Message processing method and device, switch equipment and storage medium
CN110581800B (en) Method and device for creating virtual router interface, storage medium and equipment
CN112152940B (en) Message processing method, device and system
US10321395B2 (en) Data packet processing method and related device
CN112511440B (en) Message forwarding method, system, storage medium and electronic equipment
CN107579875B (en) Network message statistical method and device
CN110808909A (en) Message processing method and device across virtual systems
CN107315645B (en) CPU core configuration method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200602

RJ01 Rejection of invention patent application after publication