CN111865794A - Correlation method, system and equipment of logical port and data transmission system - Google Patents
Correlation method, system and equipment of logical port and data transmission system Download PDFInfo
- Publication number
- CN111865794A CN111865794A CN201910334741.6A CN201910334741A CN111865794A CN 111865794 A CN111865794 A CN 111865794A CN 201910334741 A CN201910334741 A CN 201910334741A CN 111865794 A CN111865794 A CN 111865794A
- Authority
- CN
- China
- Prior art keywords
- port
- target
- dpvs
- load balancing
- logical
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/50—Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/25—Routing or path finding in a switch fabric
- H04L49/253—Routing or path finding in a switch fabric using establishment or release of connections between ports
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a correlation method, a correlation system, correlation equipment and a data transmission system of a logic port, wherein the method is applied to dpvs load balancing equipment, the dpvs load balancing equipment is provided with a virtio port and a plurality of logic ports, and the method comprises the following steps: setting a path label for any target logic port in the plurality of logic ports; generating configuration information of the target logic port according to the port identification of the target logic port, the path label set for the target logic port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing equipment; and analyzing the configuration file added with the configuration information to associate the target logic port to the virtio port. According to the technical scheme provided by the application, the dpvs load balancing equipment can support more logic ports, and the cost of the equipment can be reduced.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, a system, a device, and a data transmission system for associating logical ports.
Background
In an optimization scheme of NFV (Network Function Virtualization), a DPDK (Data Plane Development Kit) software acceleration scheme has become a commonly used basic method.
At present, DPDK-based dpvs load balancing equipment is widely applied to cloud computing network nodes. Referring to fig. 1, when a conventional dpvs load balancing device performs data interaction with ovs (open vswitch, virtual switch), both the dpvs load balancing device and the dpvs load balancing device ovs may have a plurality of logical ports. For example, in fig. 1, a dpvs load balancing device may include two network tenants corresponding to four logical ports dpvs0 to dpvs3, and in ovs, four logical ports lp0 to lp3 may be provided. Wherein, the four pairs of logical ports can transmit and receive data through four physical channels. Thus, for each logical port in the dpvs load balancing device, a separate virtio port needs to be provided.
With the increasing number of network tenants in the dpvs load balancing device, the number of logical ports will also increase. The number of virtio ports required in a dpvs load balancing device would also increase if according to prior art schemes. However, the number of virtio ports of a dpvs load balancing device is typically limited. In addition, the virtio ports can affect the memory overhead of the dpvs load balancing equipment, and when the number of the virtio ports is increased, the memory overhead of the dpvs load balancing equipment is also increased. Therefore, the existing dpvs load balancing device cannot support a large number of logical ports during data transmission with ovs, and the device cost becomes high due to the increased memory overhead.
Disclosure of Invention
The application aims to provide a method, a system, equipment and a data transmission system for associating logical ports, so that dpvs load balancing equipment can support more logical ports and reduce the cost of the equipment.
In order to achieve the above object, an aspect of the present application provides a method for associating logical ports, where the method is applied to a dpvs load balancing device, where the dpvs load balancing device includes a virtio port and a plurality of logical ports, and the method includes: setting a path label for any target logic port in the plurality of logic ports; generating configuration information of the target logic port according to the port identification of the target logic port, the path label set for the target logic port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing equipment; and analyzing the configuration file added with the configuration information to associate the target logic port to the virtio port.
In order to achieve the above object, another aspect of the present application further provides a system for associating logical ports, where the system is applied to a dpvs load balancing device, where the dpvs load balancing device includes a virtio port and a plurality of logical ports, and the system includes: a path tag setting unit, configured to set a path tag for any target logical port in the plurality of logical ports; a configuration information generating unit, configured to generate configuration information of the target logical port according to the port identifier of the target logical port, the path label set for the target logical port, and the port identifier of the virtio port, and write the configuration information into a configuration file of the dpvs load balancing device; and the configuration file analyzing unit is used for analyzing the configuration file added with the configuration information so as to associate the target logic port to the virtio port.
In order to achieve the above object, another aspect of the present application further provides a dpvs load balancing device, where the dpvs load balancing device includes a memory and a processor, the memory is used for storing a computer program, and when the computer program is executed by the processor, the method for associating logical ports as described above is implemented.
Therefore, according to the technical scheme provided by the application, a plurality of logic ports in the dpvs load balancing equipment can be associated to the same virtual port, so that the plurality of logic ports can multiplex the same virtual port to send out a data packet. In order to distinguish the data packets sent out by different logical ports, different path labels can be set for different logical ports. Then, the configuration information of the logical port may be generated according to the port identifier of the logical port, the path label, and the port identifier of the virtio port. The generated configuration information may be added to a configuration file of the dpvs load balancing device. After the dpvs load balancing device analyzes the configuration file, each logical port can be associated to the same virtio port according to the configuration information of each logical port. Subsequently, when a certain logical port needs to send a data packet to the virtual switch, the dpvs load balancing device may add the path label of the logical port to the data packet, so as to distinguish the data packet from data packets of other logical ports. In addition, when the dpvs load balancing device receives a data packet sent by the virtual switch, the corresponding logical port may be queried according to a path label carried in the data packet, so that the received data packet may be forwarded to the corresponding logical port for processing. Therefore, according to the technical scheme provided by the application, the plurality of logic ports are associated to the same virtio port, so that the number of virtio ports required by the dpvs load balancing equipment can be greatly reduced, and the memory overhead of the equipment is saved. In addition, by setting the path label for the logic port, the data packets sent or received by different logic ports can be distinguished. Therefore, even if the same virtio port is shared, the data packet can still be correctly forwarded and processed.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a prior art dpvs load balancing apparatus and ovs system architecture;
FIG. 2 is a system architecture diagram of a dpvs load balancing device and ovs according to an embodiment of the invention;
FIG. 3 is a flow chart of a method for associating logical ports according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of the association of a plurality of virtio ports in an embodiment of the invention;
FIG. 5 is a functional block diagram of a system for associating logical ports in an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a dpvs load balancing device in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The present application provides a method for associating logical ports, which can be applied to the system architecture shown in fig. 2. The system architecture may include a dpvs load balancing device and ovs. In the dpvs load balancing device, an NFV scheme may be implemented, thereby dividing a plurality of network isolation spaces. For example, in fig. 2, two network isolation spaces with space names NS1 and NS2 may be partitioned in a dpvs load balancing device. One or more logical ports may be provided for each network isolation space. For example, the NS1 may be provided with two logical ports identified as dpvs0 and dpvs 1. The NS2 may be provided with two logical ports identified as dpvs2 and dpvs 3.
In this embodiment, the dpvs load balancing device may further include a virtio port, and the dpvs load balancing device may perform data interaction with ovs through the virtio port. As shown in fig. 2, at the software level, the virtio port of the dpvs load balancing device can be driven by virtio _ user. From the perspective of the DPDK, virtio _ user can act as a front-end communication driver, which corresponds to the back-end communication driver at ovs. In fig. 2, the back-end communication driver at ovs may be a vsost _ user, which may drive a physical path port at ovs. Thus, the dpvs load balancing devices ovs can perform data transmission through the physical channels constructed by the virtual _ user and the ghost _ user.
In this embodiment, the dpvs load balancing device and ovs may be modified, so that multiple logical ports can be associated with the same virtual port, thereby saving the virtual ports required by the dpvs load balancing device and ovs, and further saving the memory overhead.
Specifically, at start-up ovs, one or more logical ports of a specified type may be added. The specified type of logical port may be, for example, a dpdkhostsub type of logical port. When a logical port is added, the port name of the logical port may be specified. For example, in actual practice, a logical port may be added by an instruction of ovs-vsctl add-port bridge lp 0. Wherein ovs-vsctl may represent the name of current ovs, add-port bridge may represent a command to add a logical port, and lp0 may be the port name of the added logical port. Further, when a logical port is added, the type of the logical port may be defined as dpdkhostsub by an instruction of dpdkhostsub. In order to enable multiple logical ports to multiplex the same physical path port, and to ensure that packets sent or received by different logical ports can be distinguished from each other when the same physical path port is multiplexed, a path label may be allocated to an added logical port and an associated physical path port may be designated to the added logical port by instructions such as options, dpdk-requirements ═ ptag ═ 1, vdev ═ vhost _ user 0. Where ptag ═ 1 may indicate that the path label of the currently added logical port is 1, and vdev ═ vhost _ user0 may indicate that the currently added logical port is associated to a physical path port named vhost _ user 0.
In the manner described above, a logical port named lp0 may be added at ovs, and the path label of the logical port is 1, and the logical port is associated to the physical path port vhost _ user 0. In practical applications, other logical ports lp1 to lp3 may be added to ovs, and lp1 to lp3 may also assign respective path labels in a similar manner as described above. For example, the path labels of lp 1-lp 3 may be 2, 3, 4, respectively. Moreover, lp 1-lp 3 may also be associated with the above-mentioned physical path port vhost _ user 0. Thus, the four logical ports added at ovs can be multiplexed to the same physical path port, and different logical ports can be distinguished by path labels.
In this embodiment, for a dpvs load balancing device, the association of logical ports may be completed through the steps shown in fig. 3. Referring to fig. 3, the association method applied to the logical port in the dpvs load balancing device may include the following steps.
S1: and aiming at any target logical port in the plurality of logical ports, setting a path label for the target logical port.
S3: and generating configuration information of the target logic port according to the port identification of the target logic port, the path label set for the target logic port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing equipment.
S5: and analyzing the configuration file added with the configuration information to associate the target logic port to the virtio port.
For convenience of description, the technical solution of the present application may be set forth in the present application for any target logical port in a dpvs load balancing device. Those skilled in the art will appreciate that the processing for the target logical port is also applicable to other logical ports on the dpvs load balancing device.
In this embodiment, in order to distinguish different logical ports in the dpvs load balancing device, different path labels may be allocated to the respective logical ports. For example, in fig. 2, four logical ports dpvs0 to dpvs3 may set four different path labels, ptag of 1 to 4, respectively. For the same dpvs load balancing device, the path labels set by each logic port are different, so that the logic ports in the dpvs load balancing device can be distinguished through the path labels.
In this embodiment, after setting a path label for a target logical port of a dpvs load balancing device, configuration information of the target logical port may be generated according to a port identifier of the target logical port, the path label set for the target logical port, and a port identifier of a virtio port on the dpvs load balancing device. Wherein the port identification of the target logical port may be a name of the logical port. For example, in fig. 2, the name dpvs0 may be used. The path tag set for the target logical port may then be the value assigned to ptag. The port identifier of the virtio port may be a drive identifier of a DPDK layer. For example, in fig. 2, the identification of the virtual port of the dpvs load balancing device may be virtual _ user 0.
In one application example, the configuration information for the target logical port may be generated by:
wherein, the device dpvs1 may represent that the current field is configured for the logical port with port id dpvs1, ptag 2 represents that the path label set for the target logical port is 2, and vdev virtual _ user0 may represent that the target logical port is associated to the virtual port with port id virtual _ user 0. In addition, the MAC address of the target logical port can also be noted in this field by MAC xx: xx: xx: xx. In this way, the generated configuration information of the target logical port may include information such as a port identifier of the target logical port, a path tag of the target logical port, a port identifier of a virtio port associated with the target logical port, and a MAC address corresponding to the target logical port.
For each logical port in the dpvs load balancing device, the configuration information of each logical port can be generated in the above manner. In this embodiment, after the configuration information of each logical port is generated, the generated configuration information may be written into a configuration file of the dpvs load balancing device. Therefore, when the dpvs load balancing equipment analyzes the configuration file added with the configuration information, the configuration information of each logic port can be analyzed one by one, so that each logic port can be associated to the same virtio port according to the analyzed content.
In this embodiment, one association table may be maintained in the dpvs load balancing device according to the configuration information generated by each logical port. In the association relationship table, the port identifier of the logical port having the association relationship, the path label of the logical port, and the port identifier of the virtio port may be noted. For example, according to the structure of fig. 2, an association table as shown in table 1 may be constructed.
TABLE 1 Association relation table in dpvs load balancing device
Logical port identification | Path label of logic port | Associating virtio |
dpvs0 | ||
1 | virtio_user0 | |
dpvs1 | 2 | virtio_user0 |
dpvs2 | 3 | virtio_user0 |
dpvs3 | 4 | virtio_user0 |
In this embodiment, after the logical ports are associated with the dpvs load balancing devices and ovs, respectively, data transmission can be performed between the dpvs load balancing devices and ovs. Specifically, in the startup parameters of the dpvs load balancing device, ovs path ports for communicating with the dpvs load balancing device need to be set. Ovs, since multiple logical ports are currently associated to the same physical path port, in the startup parameters of the dpvs load balancing device, the path port to which the virtio port originally points may be modified to the physical path port on the virtual switch. Taking fig. 2 as an example, in the startup parameters of the dpvs load balancing device, the path port pointed by the virtual port virtual _ user0 may be modified to be the vsost _ user0 physical path port on ovs.
When a target logical port in the dpvs load balancing device needs to send a data packet to ovs, the dpvs load balancing device may query a target path label corresponding to the target logical port. For example, assuming that a logical port dpvs0 in the dpvs load balancing device currently needs to send a data packet to ovs, the dpvs load balancing device may query, according to the maintained association table, that a target path label corresponding to dpvs0 is 1. Then, the dpvs load balancing device may add the target path label obtained by the query to the data packet to be sent. Specifically, the data packet sent out by the dpvs load balancing device or the received data packet may include a preset field. The predetermined field may be an unoccupied field in the data packet, and the unoccupied field may be filled with user-defined content. For example, the preset field may be a header field of a data packet, and when the target path tag is added, the target path tag may be added into the header field of the data packet. In practical applications, the predetermined field may also be a tail field of the data packet. Specifically, when the dpvs load balancing device receives and transmits the data packet, the dpvs load balancing device may store the data packet to be transmitted by creating a preset structure. The predetermined structure may be, for example, an mbuf structure. The partial structure of the mbuf structure may be as follows:
struct rte_mbuf
{
void buf_addr;
uint16_t port;
uint32_t pkt_len;
uint16_t data_len;
}
Where buf _ addr may be a content pointer, which may point to the actual content of the data packet. A port may then represent from which port the packet was obtained. pkt _ len may represent the overall length of the packet. data _ len may represent the length of a data body in a data packet.
After the data packet to be sent is stored through the mbuf structure, in order to add the queried target path tag to the data packet, a content pointer buf _ addr in the mbuf structure may be modified, the content pointer points to a preset tail field (tailboom) of the data packet, and then the queried target path tag is added to the preset tail field pointed by the content pointer. Therefore, the target path label of the target logical port can be carried in the data packet to be sent. And then sending ovs a data packet carrying the target path label through the virtio port on the dpvs load balancing device. Of course, since the path port is set in the startup parameter of the dpvs load balancing device, the packet sent by the dpvs load balancing device through the virtual port virtual _ user0 may be received by the physical path port vhost _ user0 of ovs.
In this embodiment, when ovs receives a packet carrying a target path label from a dpvs load balancing device, the target path label carried in the received packet may be analyzed. Specifically, ovs may create the mbuf structure described above when receiving a packet, and store the received packet in the created mbuf structure. Then, by modifying the content pointer therein, the content pointer can be pointed to the preset tail field of the data packet, and the target path label can be read from the preset tail field. After reading the target path label, ovs may query the logical port to which the target path label locally corresponds. For example, assuming that the read target path label is 1, at ovs, the logical port corresponding to the target path label is lp 0. At this point, ovs may send the received packet to the queried logical port for processing of the packet through the logical port.
Of course, ovs may also send packets to the dpvs load balancing device. Specifically, when the logical port in ovs sends a packet to the dpvs load balancing device, the path label of the logical port may also be written in the packet to be sent, and the packet carrying the path label is sent. Therefore, after receiving ovs data packets through the virtio port, the dpvs load balancing device can analyze the path labels carried in the received data packets, then query the logic ports corresponding to the path labels obtained through analysis, and send the received data packets to the queried logic ports.
When the dpvs load balancing device and ovs perform data transmission, both the dpvs load balancing device and ovs may store the received and transmitted data packet through the mbuf structure, and write the path label in the preset tail field of the data packet or parse the path label from the preset tail field of the data packet by modifying the content pointer.
In one embodiment, logical ports may also be dynamically created, deleted, or modified in a dpvs load balancing device. Specifically, when a new logical port needs to be created in the dpvs load balancing device, a port identifier and a path label may be set for the new logical port in the manner described above. Then, according to the port identifier and the path label set for the new logical port and the port identifier of the virtio port, new configuration information corresponding to the new logical port is generated, and the new configuration information is written into a configuration file of the dpvs load balancing device. In order to enable the new logical port to operate normally, the dpvs load balancing device may parse the configuration file to which the new configuration information is added, so as to associate the new logical port to the virtio port.
In another embodiment, when a created target logical port needs to be deleted, the dpvs load balancing device may receive a deletion instruction pointing to the target logical port, and delete the target logical port in the dpvs load balancing device according to the deletion instruction, and may also delete configuration information of the target logical port in a configuration file of the dpvs load balancing device. Then, the dpvs load balancing device may parse the configuration file from which the configuration information of the target logical port is deleted, thereby disassociating the target logical port from the virtio port.
In another embodiment, when a target logical port that has been created needs to be modified, the dpvs load balancing device may receive a modification instruction directed to the target logical port, and reallocate a path label and/or a MAC address to the target logical port according to the modification instruction. And then, according to the distribution result, the configuration information of the target logic port can be regenerated, and the regenerated configuration information is written into a configuration file of the dpvs load balancing equipment. Finally, the dpvs load balancing device may parse the configuration file to which the regenerated configuration information is added, thereby changing the path label and/or the MAC address of the target logical port.
Therefore, the technical scheme provided by the application can dynamically perform operations of adding, deleting and changing the logic port under the condition of not restarting the dpvs load balancing equipment. Of course, the above-mentioned schemes for adding, deleting and changing the logical port can also be applied to ovs, and will not be described herein again.
It should be noted that, in the above embodiments, one virtual port is taken as an example to illustrate the technical solutions, but those skilled in the art should know that, in practical applications, a plurality of virtual ports may be provided in the same dpvs load balancing device or ovs. For each virtio port, multiple logical ports may be associated in the manner described above. Specifically, referring to fig. 4, a dpvs load balancing device may have two virtual ports of virtual _ user1 and virtual _ user2, and ovs may also have two physical path ports of vsost _ user1 and vsost _ user 2. Wherein, in the dpvs load balancing device, the logical ports of dpvs11 and dpvs12 may be associated to virtual _ user1, and the logical ports of dpvs13 and dpvs14 may be associated to virtual _ user 2. Similarly, at ovs, logical ports of lp11 and lp12 may be associated to vsost _ user1, and logical ports of lp13 and lp14 may be associated to vsost _ user 2.
The present application also provides a system associated with a logical port, where the system is applied to the above dpvs load balancing device, and the dpvs load balancing device has a virtio port and a plurality of logical ports, please refer to fig. 5, where the system includes:
a path tag setting unit, configured to set a path tag for any target logical port in the plurality of logical ports;
a configuration information generating unit, configured to generate configuration information of the target logical port according to the port identifier of the target logical port, the path label set for the target logical port, and the port identifier of the virtio port, and write the configuration information into a configuration file of the dpvs load balancing device;
and the configuration file analyzing unit is used for analyzing the configuration file added with the configuration information so as to associate the target logic port to the virtio port.
In one embodiment, the system further comprises:
a path tag query unit, configured to query a target path tag corresponding to the target logical port when the target logical port sends a data packet to a virtual switch;
And the label adding unit is used for adding the target path label obtained by query into the data packet and sending the data packet carrying the target path label to the virtual switch through the virtio port.
In one embodiment, the system further comprises:
a path label analyzing unit, configured to receive the data packet sent by the virtual switch through the virtio port, and analyze a path label carried in the received data packet;
and the logic port query unit is used for querying the logic port corresponding to the path label obtained by analysis and sending the received data packet to the logic port obtained by query.
Referring to fig. 6, the present application further provides a dpvs load balancing apparatus, where the dpvs load balancing apparatus includes a memory and a processor, where the memory is used to store a computer program, and when the computer program is executed by the processor, the method for associating logical ports as described above may be implemented. Specifically, as shown in fig. 6, at the hardware level, the dpvs load balancing device may include a processor, an internal bus, and a memory. The memory may include memory as well as non-volatile memory. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs. It will be understood by those skilled in the art that the structure shown in fig. 6 is merely illustrative and is not intended to limit the structure of the above-described identification device. For example, the dpvs load balancing device may also include more or fewer components than shown in FIG. 6, may also include other Processing hardware, such as a GPU (Graphics Processing Unit), or may have a different configuration than shown in FIG. 6, for example. Of course, this application does not exclude other implementations than a software implementation, such as a logic device or a combination of software and hardware, etc.
In this embodiment, the processor may include a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU), and may also include other single-chip microcomputers, logic gates, integrated circuits, and the like with logic processing capability, or a suitable combination thereof. The memory according to this embodiment may be a storage device for storing information. In a digital system, the device capable of storing binary data may be a memory; in an integrated circuit, a circuit without an actual form and with a storage function can also be a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form may also be called a memory or the like. When the method is implemented, the memory can also be implemented in a cloud memory mode, and the specific implementation mode is not limited in this specification.
It should be noted that, in the dpvs load balancing device in this specification, a specific implementation manner may refer to the description of the method implementation manner, and details are not described here.
The present application further provides a data transmission system, the data transmission system includes a dpvs load balancing device and a virtual switch, the dpvs load balancing device has a virtio port and a plurality of logical ports associated with the virtio port, the virtual switch has a physical path port and a plurality of logical ports associated with the physical path port, the dpvs load balancing device and each of the virtual switches the logical ports each have a path label, wherein:
The dpvs load balancing device is configured to query a first path label corresponding to a first logical port when the first logical port in the dpvs load balancing device sends a first data packet to the virtual switch; adding the first path label obtained by query into the first data packet, and sending the first data packet carrying the first path label to the virtual switch through the virtio port;
the virtual switch is configured to query a second path label corresponding to a second logical port when the second logical port in the virtual switch sends a second data packet to the dpvs load balancing device; and adding the second path label obtained by query to the second data packet, and sending the second data packet carrying the second path label to the dpvs load balancing equipment through the physical path port.
In one embodiment, the dpvs load balancing device is further configured to receive a third data packet sent by the virtual switch through the virtio port, and analyze a third path tag carried in the third data packet; inquiring a third logic port corresponding to the third path label, and sending the received third data packet to the third logic port;
The virtual switch is further configured to receive a fourth data packet sent by the dpvs load balancing device through the physical path port, and analyze a fourth path label carried in the fourth data packet; and inquiring a fourth logic port corresponding to the fourth path label, and sending the received fourth data packet to the fourth logic port.
Therefore, according to the technical scheme provided by the application, a plurality of logic ports in the dpvs load balancing equipment can be associated to the same virtual port, so that the plurality of logic ports can multiplex the same virtual port to send out a data packet. In order to distinguish the data packets sent out by different logical ports, different path labels can be set for different logical ports. Then, the configuration information of the logical port may be generated according to the port identifier of the logical port, the path label, and the port identifier of the virtio port. The generated configuration information may be added to a configuration file of the dpvs load balancing device. After the dpvs load balancing device analyzes the configuration file, each logical port can be associated to the same virtio port according to the configuration information of each logical port. Subsequently, when a certain logical port needs to send a data packet to the virtual switch, the dpvs load balancing device may add the path label of the logical port to the data packet, so as to distinguish the data packet from data packets of other logical ports. In addition, when the dpvs load balancing device receives a data packet sent by the virtual switch, the corresponding logical port may be queried according to a path label carried in the data packet, so that the received data packet may be forwarded to the corresponding logical port for processing. Therefore, according to the technical scheme provided by the application, the plurality of logic ports are associated to the same virtio port, so that the number of virtio ports required by the dpvs load balancing equipment can be greatly reduced, and the memory overhead of the equipment is saved. In addition, by setting the path label for the logic port, the data packets sent or received by different logic ports can be distinguished. Therefore, even if the same virtio port is shared, the data packet can still be correctly forwarded and processed.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (13)
1. A method for associating logical ports is applied to a dpvs load balancing device, wherein the dpvs load balancing device is provided with a virtio port and a plurality of logical ports, and the method comprises the following steps:
Setting a path label for any target logic port in the plurality of logic ports;
generating configuration information of the target logic port according to the port identification of the target logic port, the path label set for the target logic port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing equipment;
and analyzing the configuration file added with the configuration information to associate the target logic port to the virtio port.
2. The method according to claim 1, wherein the configuration information of the target logical port further includes a MAC address corresponding to the target logical port.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when the target logic port sends a data packet to a virtual switch, inquiring a target path label corresponding to the target logic port;
and adding the target path label obtained by query into the data packet, and sending the data packet carrying the target path label to the virtual switch through the virtio port.
4. The method of claim 3, further comprising:
receiving a data packet sent by the virtual switch through the virtio port, and analyzing a path label carried in the received data packet;
and inquiring the logic port corresponding to the path label obtained by analysis, and sending the received data packet to the logic port obtained by inquiry.
5. The method according to claim 4, wherein the data packet sent by the target logical port to the virtual switch and the data packet sent by the virtual switch both include a preset field; accordingly, the method further comprises:
and adding the target path label obtained by query into the preset field of the data packet, and analyzing the carried path label from the received preset field of the data packet.
6. The method of claim 5, wherein the predetermined field is a trailer field in a data packet.
7. The method of claim 1, further comprising:
creating a new logical port, and setting a port identifier and a path label for the new logical port;
Generating new configuration information corresponding to the new logical port according to the port identifier and the path label set for the new logical port and the port identifier of the virtio port, and writing the new configuration information into a configuration file of the dpvs load balancing equipment;
and analyzing the configuration file added with the new configuration information to associate the new logical port to the virtio port.
8. The method of claim 1, further comprising:
receiving a deleting instruction pointing to the target logic port, deleting the target logic port in the dpvs load balancing equipment according to the deleting instruction, and deleting the configuration information of the target logic port in the configuration file of the dpvs load balancing equipment;
and analyzing the configuration file with the configuration information of the target logical port deleted so as to disassociate the target logical port from the virtio port.
9. The method of claim 1, further comprising:
receiving a modification instruction pointing to the target logic port, and reallocating a path label and/or a MAC address to the target logic port according to the modification instruction;
Regenerating the configuration information of the target logic port according to the distribution result, and writing the regenerated configuration information into a configuration file of the dpvs load balancing equipment;
and analyzing the configuration file added with the regenerated configuration information to change the path label and/or the MAC address of the target logical port.
10. A system for associating logical ports is applied to a dpvs load balancing device, the dpvs load balancing device is provided with a virtio port and a plurality of logical ports, and the system comprises:
a path tag setting unit, configured to set a path tag for any target logical port in the plurality of logical ports;
a configuration information generating unit, configured to generate configuration information of the target logical port according to the port identifier of the target logical port, the path label set for the target logical port, and the port identifier of the virtio port, and write the configuration information into a configuration file of the dpvs load balancing device;
and the configuration file analyzing unit is used for analyzing the configuration file added with the configuration information so as to associate the target logic port to the virtio port.
11. The system of claim 10, further comprising:
a path tag query unit, configured to query a target path tag corresponding to the target logical port when the target logical port sends a data packet to a virtual switch;
and the label adding unit is used for adding the target path label obtained by query into the data packet and sending the data packet carrying the target path label to the virtual switch through the virtio port.
12. The system of claim 11, further comprising:
a path label analyzing unit, configured to receive the data packet sent by the virtual switch through the virtio port, and analyze a path label carried in the received data packet;
and the logic port query unit is used for querying the logic port corresponding to the path label obtained by analysis and sending the received data packet to the logic port obtained by query.
13. A dpvs load balancing device, comprising a memory for storing a computer program and a processor, which when executed by the processor, performs the method of any of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910334741.6A CN111865794B (en) | 2019-04-24 | 2019-04-24 | Logical port association method, system, equipment and data transmission system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910334741.6A CN111865794B (en) | 2019-04-24 | 2019-04-24 | Logical port association method, system, equipment and data transmission system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111865794A true CN111865794A (en) | 2020-10-30 |
CN111865794B CN111865794B (en) | 2023-04-21 |
Family
ID=72952435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910334741.6A Active CN111865794B (en) | 2019-04-24 | 2019-04-24 | Logical port association method, system, equipment and data transmission system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111865794B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114301619A (en) * | 2021-11-16 | 2022-04-08 | 北京威努特技术有限公司 | Industrial control firewall without hardware management port and realization method of simulation management port of industrial control firewall |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1617526A (en) * | 2003-07-25 | 2005-05-18 | 国际商业机器公司 | Method and device for emulating multiple logic port on a physical poet |
CN104486124A (en) * | 2014-12-19 | 2015-04-01 | 盛科网络(苏州)有限公司 | Device and method for realizing MLAG (multi-system link aggregation) by logical ports |
CN106856454A (en) * | 2015-12-09 | 2017-06-16 | 北京华为数字技术有限公司 | A kind of method of message forwarding, equipment and system |
US20180123954A1 (en) * | 2016-10-27 | 2018-05-03 | Nicira, Inc. | Virtualization Port Layer Including Physical Switch Port and Logical Switch Port |
-
2019
- 2019-04-24 CN CN201910334741.6A patent/CN111865794B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1617526A (en) * | 2003-07-25 | 2005-05-18 | 国际商业机器公司 | Method and device for emulating multiple logic port on a physical poet |
CN104486124A (en) * | 2014-12-19 | 2015-04-01 | 盛科网络(苏州)有限公司 | Device and method for realizing MLAG (multi-system link aggregation) by logical ports |
CN106856454A (en) * | 2015-12-09 | 2017-06-16 | 北京华为数字技术有限公司 | A kind of method of message forwarding, equipment and system |
US20180123954A1 (en) * | 2016-10-27 | 2018-05-03 | Nicira, Inc. | Virtualization Port Layer Including Physical Switch Port and Logical Switch Port |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114301619A (en) * | 2021-11-16 | 2022-04-08 | 北京威努特技术有限公司 | Industrial control firewall without hardware management port and realization method of simulation management port of industrial control firewall |
CN114301619B (en) * | 2021-11-16 | 2024-01-30 | 北京威努特技术有限公司 | Industrial control firewall without hardware management port and implementation method of simulation management port of industrial control firewall |
Also Published As
Publication number | Publication date |
---|---|
CN111865794B (en) | 2023-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3057272B1 (en) | Technologies for concurrency of cuckoo hashing flow lookup | |
US11829309B2 (en) | Data forwarding chip and server | |
CN108984465B (en) | Message transmission method and device | |
US10831612B2 (en) | Primary node-standby node data transmission method, control node, and database system | |
CN108139966B (en) | Method for managing address conversion bypass cache and multi-core processor | |
US10228869B1 (en) | Controlling shared resources and context data | |
CN110546620B (en) | Data processing method, storage system and switching device | |
CN110119304B (en) | Interrupt processing method and device and server | |
US8862834B2 (en) | Shared memory translation facility | |
CN104468401A (en) | Message processing method and device | |
CN104731635A (en) | Virtual machine access control method and virtual machine access control system | |
US7827343B2 (en) | Method and apparatus for providing accelerator support in a bus protocol | |
CN104216834B (en) | A kind of method of internal storage access, buffer scheduling device and memory modules | |
US10073809B2 (en) | Technologies for scalable remotely accessible memory segments | |
KR20170072645A (en) | Processor and method for processing data thereof | |
CN111865794B (en) | Logical port association method, system, equipment and data transmission system | |
CN117608856A (en) | Memory expansion method, system, terminal and storage medium for NVMe (network video Me) acceleration card | |
CN117880281A (en) | Data transmission method and computing device | |
US11675510B2 (en) | Systems and methods for scalable shared memory among networked devices comprising IP addressable memory blocks | |
CN109656674B (en) | Computer equipment, virtualization chip and data transmission method | |
CN108932149A (en) | Data transmission method and device | |
CN116560785A (en) | Method and device for accessing storage node and computer equipment | |
CN109101188B (en) | Data processing method and device | |
US10613991B2 (en) | Transparent routers to provide services | |
US20180089106A1 (en) | Method and apparatus for replacing data block in cache |
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 |