CN111865794B - Logical port association method, system, equipment and data transmission system - Google Patents

Logical port association method, system, equipment and data transmission system Download PDF

Info

Publication number
CN111865794B
CN111865794B CN201910334741.6A CN201910334741A CN111865794B CN 111865794 B CN111865794 B CN 111865794B CN 201910334741 A CN201910334741 A CN 201910334741A CN 111865794 B CN111865794 B CN 111865794B
Authority
CN
China
Prior art keywords
port
dpvs
target
load balancing
data packet
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.)
Active
Application number
CN201910334741.6A
Other languages
Chinese (zh)
Other versions
CN111865794A (en
Inventor
李竞佳
曹志文
范少卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Wangsu Co Ltd
Original Assignee
Xiamen Wangsu 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 Xiamen Wangsu Co Ltd filed Critical Xiamen Wangsu Co Ltd
Priority to CN201910334741.6A priority Critical patent/CN111865794B/en
Publication of CN111865794A publication Critical patent/CN111865794A/en
Application granted granted Critical
Publication of CN111865794B publication Critical patent/CN111865794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/50Routing or path finding of packets in data switching networks using label swapping, e.g. multi-protocol label switch [MPLS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/253Routing or path finding in a switch fabric using establishment or release of connections between ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

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 method, a system, equipment and a data transmission system for associating logical ports, wherein the method is applied to dpvs load balancing equipment, the dpvs load balancing equipment is provided with a virtual port and a plurality of logical ports, and the method comprises the following steps: setting a path label for any target logical port in the plurality of logical ports; generating configuration information of the target logical port according to the port identification of the target logical port, a path label set for the target logical port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing device; and analyzing the configuration file added with the configuration information to associate the target logical port to the virtio port. According to the technical scheme, the dpvs load balancing equipment can support more logic ports, and the cost of the equipment can be reduced.

Description

Logical port association method, system, equipment and data transmission system
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, a system, an apparatus, and a data transmission system for associating logical ports.
Background
In the optimization scheme of NFV (network function virtualization ), DPDK (data plane development kit, data Plane Development Kit) software acceleration scheme has become a popular basic method.
At present, dpvs load balancing equipment based on DPDK is widely applied in cloud computing network nodes. Referring to fig. 1, when a conventional dpvs load balancing device performs data interaction with ovs (open switch), the dpvs load balancing device and ovs may each have multiple logical ports. For example, in fig. 1, two network tenants corresponding to four logical ports of dpvs0 to dpvs3 may be provided in the dpvs load balancing apparatus, and in addition, four logical ports of lp0 to lp3 may be provided in ovs. Wherein, the four pairs of logical ports can transmit and receive data through four physical channels. Thus, a separate virtio port needs to be set for each logical port in the dpvs load balancing device.
With the increasing number of network tenants in the dpvs load balancing device, the number of logical ports increases. The number of virtio ports required in dpvs load balancing devices is also increasing if the prior art scheme is followed. However, the number of virtio ports of dpvs load balancing devices is typically limited. In addition, the virtio ports affect the memory overhead of the dpvs load balancing device, and when the number of the virtio ports increases, the memory overhead of the dpvs load balancing device also increases. Therefore, the existing dpvs load balancing device cannot support a large number of logical ports when transmitting data with ovs, and the cost of the device is high due to the increased memory overhead.
Disclosure of Invention
The invention aims to provide a logical port association method, a logical port association system, a logical port association device and a data transmission system, so that dpvs load balancing equipment can support more logical ports and the cost of the equipment can be reduced.
In order to achieve the above objective, 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 is provided with a virtual port and a plurality of logical ports, and the method includes: setting a path label for any target logical port in the plurality of logical ports; generating configuration information of the target logical port according to the port identification of the target logical port, a path label set for the target logical port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing device; and analyzing the configuration file added with the configuration information to associate the target logical port to the virtio port.
In order to achieve the above objective, 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 is provided with a virtual 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 of 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, a path tag 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 analysis unit is used for analyzing the configuration file added with the configuration information so as to associate the target logical port to the virtio port.
In order to achieve the above objective, 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, where the memory is configured to store a computer program, and when the computer program is executed by the processor, the method for associating logical ports is implemented.
Therefore, according to the technical scheme provided by the application, the multiple logical ports in the dpvs load balancing device can be all associated to the same virtio port, so that the multiple logical ports can multiplex the same virtio port to send out data packets. In order to distinguish the data packets sent out by different logic ports, different path labels can be set for different logic ports. Configuration information for the logical port may then be generated based on the port identification of the logical port, the path label, and the port identification of the virtio port. The generated configuration information can 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 can add the path label of the logical port to the data packet, so as to distinguish the data packet from the data packets of other logical ports. In addition, when the dpvs load balancing device receives a data packet sent by the virtual switch, the dpvs load balancing device can generally query a corresponding logic port according to a path tag carried in the data packet, so that the received data packet can be forwarded to the corresponding logic port for processing. From the above, according to the technical scheme provided by the application, the multiple logical ports are associated to the same virtio port, so that the number of virtio ports required by the dpvs load balancing device can be greatly reduced, and the memory overhead of the device is further saved. In addition, by setting a path tag for the logical port, data packets sent or received by different logical ports can be distinguished. Thus, even if the same virtio port is shared, the data packet can be correctly forwarded and processed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a prior art dpvs load balancing apparatus and a system architecture of ovs;
FIG. 2 is a schematic diagram of a system architecture of a dpvs load balancing apparatus and ovs in an embodiment of the present invention;
FIG. 3 is a flow chart of a method of association of logical ports in an embodiment of the invention;
FIG. 4 is a schematic diagram of the association of multiple virtio ports in an embodiment of the present invention;
FIG. 5 is a functional block diagram of a logical port association system in accordance with an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a dpvs load balancing apparatus in an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
The present application provides a method for associating logical ports, which can be applied to a system architecture as 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 partitioning 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 isolated space. For example, NS1 may be provided with two logical ports with port identifications dpvs0 and dpvs 1. NS2 may be provided with two logical ports with port designations dpvs2 and dpvs 3.
In this embodiment, the dpvs load balancing device may further include a virtio port, through which the dpvs load balancing device may perform data interaction with ovs. As shown in fig. 2, at the software level, the virtio port of the dpvs load balancing device may be driven by a virtio_user. From the DPDK perspective, the virtio_user may act as a front-end communication driver, corresponding to the back-end communication driver on ovs. In fig. 2, the backend communication driver on ovs may be a vhost_user, which may drive the physical path port on ovs. Thus, the dpvs load balancing device and ovs can perform data transmission through the physical channels constructed by the virtio_user and the vhost_user.
In this embodiment, the dpvs load balancing device and the ovs may be modified respectively, so that multiple logical ports can be associated to the same virtual port, thereby saving the dpvs load balancing device and the virtual port required by ovs, and further saving the memory overhead.
Specifically, at boot ovs, one or more logical ports of a specified type may be added. The specified type of logical port may be, for example, a dpdkvhostsub 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 such as ovs-vsctl add-port bridge lp0. Where 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 adding a logical port, the type of the logical port may be defined as dpdkvhostsub by an instruction such as type=dpdkvhostsub. 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 one another when multiplexing the same physical path port, the added logical ports may be assigned a path label by an instruction such as options dpdk-devargs= "ptag=1, vdev=vhost_user0" and the added logical ports assigned an associated physical path port. Where ptag=1 may represent that the path label of the currently added logical port is 1 and vdev=vhost_user0 may represent that the currently added logical port is associated to a physical path port named vhost_user0.
In the manner described above, a logical port named lp0 may be added in ovs, and the path tag of the logical port is 1, and the logical port is associated to the physical path port vhost_user0. In practical applications, other logical ports lp1 to lp3 may be added to ovs, and lp1 to lp3 may also be assigned respective path labels in a similar manner as described above. For example, the path labels of lp1 to lp3 may be 2, 3, 4, respectively. Also, lp1 to lp3 may be associated with the physical path port vhost_user0 described above. Thus, the four logical ports added at ovs can multiplex the same physical path port, and different logical ports can be distinguished by path labels.
In this embodiment, for the dpvs load balancing apparatus, the association of logical ports may be completed through the steps shown in fig. 3. Referring to fig. 3, the association method of logical ports applied to the dpvs load balancing apparatus may include the following steps.
S1: and setting a path label for any target logical port in the plurality of logical ports.
S3: generating configuration information of the target logical port according to the port identification of the target logical port, the path label set for the target logical port and the port identification of the virtio port, and writing the configuration information into the configuration file of the dpvs load balancing device.
S5: and analyzing the configuration file added with the configuration information to associate the target logical port to the virtio port.
For convenience of description, the technical solution of the present application may be described in this application with respect to any target logical port in the dpvs load balancing device. Those skilled in the art will appreciate that the manner of processing for the target logical port is equally applicable to other logical ports on the dpvs load balancing apparatus.
In this embodiment, in order to distinguish between different logical ports in the dpvs load balancing apparatus, different path labels may be allocated to each logical port. For example, in fig. 2, four logical ports dpvs0 through dpvs3, four different path tags with ptag=1 through 4 may be set, respectively. The path labels set by the logic ports are different for the same dpvs load balancing device, 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 tag 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 tag 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 the name of the logical port. For example, in fig. 2, the name may be dpvs 0. 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 the DPDK layer. For example, in fig. 2, the identification of the virtio port of the dpvs load balancing device may be virtio_user0.
In one application example, the configuration information for the target logical port may be generated by the following fields:
Figure BDA0002038808600000061
wherein the device dpvs1 may characterize that the current field is configured for the logical port whose port identifier is dpvs1, and ptag 2 indicates that the path tag set for the target logical port is 2,vdev virtio_user0 may characterize that the target logical port is associated with the virtual port whose port identifier is virtual_user0. In addition, the MAC address of the target logical port may also be noted in this field by MAC xx: 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 the virtual port to which the target logical port is associated, and a MAC address corresponding to the target logical port.
For each logic port in the dpvs load balancing device, the respective configuration information can be generated in the mode. In this embodiment, after generating the configuration information of each logical port, the generated configuration information may be written into the configuration file of the dpvs load balancing device. Therefore, when the dpvs load balancing device analyzes the configuration file added with the configuration information, the configuration information of each logic port can be analyzed one by one, and each logic port can be associated to the same virtio port according to the analyzed content.
In this embodiment, according to the configuration information generated by each logical port, a table of association relationships may be maintained in the dpvs load balancing device. In the association table, the port identifier of the logical port, the path label of the logical port, and the port identifier of the virtio port having the association relationship can be noted. For example, according to the structure of fig. 2, an association relationship table as shown in table 1 may be constructed.
Table 1 association table in dpvs load balancing apparatus
Logical port identification Logic for logic controlPath label for port Associating virtio port identification
dpvs0
1 virtio_user0
dpvs1 2 virtio_user0
dpvs2 3 virtio_user0
dpvs3 4 virtio_user0
In this embodiment, after the association of the logical ports is completed for the dpvs load balancing device and ovs, data transmission can be performed between the dpvs load balancing device and ovs. Specifically, in the start-up parameter of the dpvs load balancing apparatus, a path port of ovs communicating with the dpvs load balancing apparatus needs to be set. Since ovs currently associates multiple logical ports to the same physical path port, in the start-up 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 start-up parameter of the dpvs load balancing device, the path port pointed to by the virtio port virtio_user0 may be modified to be a vhost_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 can query a target path label corresponding to the target logical port. For example, assuming that the logic port dpvs0 in the dpvs load balancing device currently needs to send a data packet to ovs, the dpvs load balancing device may query that the target path label corresponding to dpvs0 is 1 according to the maintained association table. And then, the dpvs load balancing device can add the target path label obtained by the query into the data packet to be sent. Specifically, the data packet sent by the dpvs load balancing device or the received data packet may include a preset field. The preset field may be an unoccupied field in the data packet, and the field may be filled with user-defined content. For example, the preset field may be a header field of the data packet, and then when the target path tag is added, the target path tag may be added to the header field of the data packet. In practical applications, the preset field may also be a tail field of the data packet. Specifically, when the dpvs load balancing device receives and transmits a data packet, the data packet to be transmitted can be stored by creating a preset structure body. The predetermined structure may be, for example, an mbuf structure. The partial constitution of the mbuf structure can 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 which port the packet is derived from. pkt _ len may represent the overall length of the packet. data_len may represent the length of the data body in the data packet.
After the data packet to be sent is stored through the mbuf structure body, in order to add the target path label obtained by query in the data packet, a content pointer buf_addr in the mbuf structure body can be modified, the content pointer points to a preset tail field (tailroom) of the data packet, and then the target path label obtained by query is added into the preset tail field pointed by the content pointer. In this way, the target path label of the target logical port can be carried in the data packet to be sent. And subsequently, sending the data packet carrying the target path label to ovs through a virtio port on the dpvs load balancing device. Of course, since the path port is set in the start-up parameter of the dpvs load balancing device, the data packet sent by the dpvs load balancing device through the virtio port virtio_user0 can be received by the physical path port vhost_user0 of ovs.
In this embodiment, after ovs receives a data packet carrying a target path label sent by a dpvs load balancing device, the target path label carried in the received data packet may be parsed. Specifically, ovs, when receiving a packet, may create the above mbuf structure, and store the received packet by the created mbuf structure. Then, by modifying the content pointer therein, the content pointer may be directed to a preset tail field of the data packet, and the target path tag may be read from the preset tail field. After reading the target path tag, ovs can query the logical port corresponding to the target path tag locally. For example, assuming that the read target path tag is 1, in ovs, the logical port corresponding to the target path tag is lp0. At this point, ovs may send the received packet to the queried logical port to process the packet through the logical port.
Of course, ovs could also send packets to the dpvs load balancing device. Specifically, when the logical port in ovs sends a data packet to the dpvs load balancing device, the path label of the logical port can be written in the data packet to be sent, and the data packet carrying the path label can be sent. Thus, after the dpvs load balancing device receives the data packet sent by ovs through the virtio port, the path tag carried in the received data packet can be analyzed, then the logic port corresponding to the analyzed path tag can be queried, and the received data packet is sent to the queried logic port.
When the dpvs load balancing device and the ovs perform data transmission, the dpvs load balancing device and the ovs can store the received and transmitted data packet through the mbuf structure body, 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 the dpvs load balancing apparatus. Specifically, when a new logical port needs to be created in the dpvs load balancing apparatus, a port identifier and a path tag may be set for the new logical port in the manner described above. And then generating new configuration information corresponding to the new logical port according to the port identification and the path label set for the new logical port and the port identification of the virtio port, and writing the new configuration information into the configuration file of the dpvs load balancing device. In order to enable the new logical port to operate normally, the dpvs load balancing device can parse the configuration file added with the new configuration information, so that the new logical port is associated to the virtio port.
In another embodiment, when the created target logical port needs to be deleted, the dpvs load balancing device may receive a deletion instruction pointing to the target logical port, delete the target logical port in the dpvs load balancing device according to the deletion instruction, and simultaneously 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 change needs to be made to an already created target logical port, the dpvs load balancing device may receive a modification instruction directed to the target logical port, and reassign a path tag and/or MAC address for the target logical port according to the modification instruction. And then, regenerating the configuration information of the target logical port according to the allocation result, and writing the regenerated configuration information into the configuration file of the dpvs load balancing equipment. Finally, the dpvs load balancing device can parse the configuration file added with the regenerated configuration information, thereby changing the path label and/or the MAC address of the target logical port.
From the above, the technical solution provided by the present application can dynamically perform operations of adding, deleting and modifying logical ports without restarting the dpvs load balancing device. Of course, the above schemes for adding, deleting and modifying logical ports can be applied to ovs as well, and will not be described herein.
It should be noted that, in the above embodiments, a virtio port is taken as an example to describe the technical solution, however, those skilled in the art should know that, in practical application, the same dpvs load balancing device or ovs may have a plurality of virtio ports. For each virtio port, multiple logical ports may be associated in the manner described above. Specifically, referring to fig. 4, two virtio ports of virtio_user1 and virtio_user2 may be provided in the dpvs load balancing device, and two physical path ports of vhost_user1 and vhost_user2 may also be provided in ovs. In the dpvs load balancing device, the logical ports of dpvs11 and dpvs12 may be associated with virtio_user1, and the logical ports of dpvs13 and dpvs14 may be associated with virtio_user2. Similarly, in ovs, logical ports of lp11 and lp12 may be associated to vhost_user1 and logical ports of lp13 and lp14 may be associated to vhost_user2.
The present application also provides a system for associating logical ports, where the system is applied to the dpvs load balancing device, and the dpvs load balancing device is provided with a virtio port and a plurality of logical ports, referring to fig. 5, and the system includes:
a path tag setting unit, configured to set a path tag for any target logical port of 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, a path tag 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 analysis unit is used for analyzing the configuration file added with the configuration information so as to associate the target logical port to the virtio port.
In one embodiment, the system further comprises:
the path label inquiring unit is used for inquiring the target path label corresponding to the target logic port when the target logic port sends the data packet to the virtual switch;
the label adding unit is used for adding the target path label obtained by inquiry 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:
the path label analyzing unit is used for receiving the data packet sent by the virtual switch through the virtio port and analyzing the 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 device, where the dpvs load balancing device includes a memory and a processor, where the memory is configured to store a computer program, and when the computer program is executed by the processor, the method for associating logical ports may be implemented as described above. Specifically, as shown in fig. 6, at the hardware level, the dpvs load balancing apparatus may include a processor, an internal bus, and a memory. The memory may include memory and non-volatile memory. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs. It will be appreciated by those skilled in the art that the configuration shown in fig. 6 is merely illustrative and is not intended to limit the configuration of the identification device described above. For example, the dpvs load balancing apparatus may also include more or fewer components than shown in fig. 6, for example may also include other processing hardware, such as a GPU (Graphics Processing Unit, image processor), or have a different configuration than shown in fig. 6. Of course, in addition to software implementations, this application does not exclude other implementations, such as a logic device or a combination of hardware and software, etc.
In this embodiment, the processor may include a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU), and of course, may also include other singlechips, logic gates, integrated circuits, etc. with logic processing capability, or a suitable combination thereof. The memory according to the present embodiment may be a memory device for storing information. In a digital system, the device capable of holding binary data may be a memory; in the integrated circuit, a circuit with a memory function without physical form can also be a memory, such as a RAM, a FIFO, etc.; in the system, a storage device having a physical form may also be called a memory or the like. When the cloud storage is realized, the memory can also be realized in a cloud storage mode, and the specific realization mode is not limited in the specification.
It should be noted that, in the dpvs load balancing device in the present specification, a specific implementation manner may refer to description of a method embodiment, which is not described herein in detail.
The application also provides a data transmission system, which comprises a dpvs load balancing device and a virtual switch, wherein the dpvs load balancing device is provided with a virtio port and a plurality of logic ports associated with the virtio port, the virtual switch is provided with a physical path port and a plurality of logic ports associated with the physical path port, and each of the dpvs load balancing device and the virtual switch is provided with a path tag, wherein:
the dpvs load balancing device is configured to query a first path tag corresponding to a first logical port in the dpvs load balancing device when the first logical port sends a first data packet to the virtual switch; adding the first path label obtained by inquiry 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 the 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 parse a third path label carried in the third data packet; querying a third logic port corresponding to the third path tag, 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 parse a fourth path label carried in the fourth data packet; and querying 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, the multiple logical ports in the dpvs load balancing device can be all associated to the same virtio port, so that the multiple logical ports can multiplex the same virtio port to send out data packets. In order to distinguish the data packets sent out by different logic ports, different path labels can be set for different logic ports. Configuration information for the logical port may then be generated based on the port identification of the logical port, the path label, and the port identification of the virtio port. The generated configuration information can 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 can add the path label of the logical port to the data packet, so as to distinguish the data packet from the data packets of other logical ports. In addition, when the dpvs load balancing device receives a data packet sent by the virtual switch, the dpvs load balancing device can generally query a corresponding logic port according to a path tag carried in the data packet, so that the received data packet can be forwarded to the corresponding logic port for processing. From the above, according to the technical scheme provided by the application, the multiple logical ports are associated to the same virtio port, so that the number of virtio ports required by the dpvs load balancing device can be greatly reduced, and the memory overhead of the device is further saved. In addition, by setting a path tag for the logical port, data packets sent or received by different logical ports can be distinguished. Thus, even if the same virtio port is shared, the data packet can be correctly forwarded and processed.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or may be implemented by hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (12)

1. A method for associating logical ports, wherein the method is applied to a dpvs load balancing device, the dpvs load balancing device is provided with at least one virtual port and a plurality of logical ports, and the method comprises:
setting a path label for any target logical port in the plurality of logical ports;
generating configuration information of the target logical port according to the port identification of the target logical port, a path label set for the target logical port and the port identification of the virtio port, and writing the configuration information into a configuration file of the dpvs load balancing device;
analyzing the configuration file added with the configuration information to associate the target logical port to the virtio port, and maintaining an association table in the dpvs load balancing device based on the configuration information, wherein the association table notes the association among the port identification of the target logical port, the path label of the target logical port and the port identification of the virtio port;
the dpvs load balancing equipment and the virtual switch perform data transmission according to the virtio port and the association relation table;
when the target logic port sends a data packet to the virtual switch, inquiring a target path label corresponding to the target logic port;
the data packet sent by the target logical port to the virtual switch comprises a preset field, and the preset field is a tail field in the data packet;
accordingly, the method further comprises:
and adding the target path label obtained by inquiry into the preset field of the data packet.
2. The method of 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:
and sending the data packet carrying the target path label to the virtual switch through the virtio port.
4. A method according to claim 3, characterized in that the method further comprises:
receiving a data packet sent by the virtual switch through the virtio port, and analyzing a path tag 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 of claim 4, wherein the data packet sent by the virtual switch includes a preset field; accordingly, the method further comprises:
and analyzing the carried path label from the received preset field of the data packet.
6. The method according to claim 1, wherein the method further comprises:
creating a new logical port, and setting a port identifier and a path tag for the new logical port;
generating new configuration information corresponding to the new logical port according to a port identifier and a path tag which are set for the new logical port and a port identifier of the virtio port, and writing the new configuration information into a configuration file of the dpvs load balancing device;
and analyzing the configuration file added with the new configuration information to associate the new logical port to the virtio port.
7. The method according to claim 1, wherein the method further comprises:
receiving a deleting instruction pointing to the target logical port, deleting the target logical port in the dpvs load balancing equipment according to the deleting instruction, and deleting configuration information of the target logical port in a configuration file of the dpvs load balancing equipment;
and analyzing the configuration file from which the configuration information of the target logical port is deleted, so as to disassociate the target logical port from the virtio port.
8. The method according to claim 1, wherein the method further comprises:
receiving a modification instruction pointing to the target logic port, and reassigning a path tag and/or a MAC address for the target logic port according to the modification instruction;
regenerating configuration information of the target logical port according to an allocation result, and writing the regenerated configuration information into a configuration file of the dpvs load balancing device;
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.
9. A system for associating logical ports, wherein the system is applied to a dpvs load balancing device, the dpvs load balancing device is provided with at least one virtual 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 of 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, a path tag 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;
a configuration file analyzing unit, configured to analyze a configuration file added with the configuration information, so as to associate the target logical port to the virtio port, and maintain an association table in the dpvs load balancing device based on the configuration information, where the association table notes an association among a port identifier of the target logical port, a path tag of the target logical port, and a port identifier of the virtio port; the dpvs load balancing equipment and the virtual switch perform data transmission according to the virtio port and the association relation table;
the path label inquiring unit is used for inquiring the target path label corresponding to the target logic port when the target logic port sends a data packet to the virtual switch; the data packet sent by the target logical port to the virtual switch comprises a preset field, and the preset field is a tail field in the data packet; and adding the target path label obtained by inquiry into the preset field of the data packet.
10. The system of claim 9, wherein the system further comprises:
the label adding unit is used for adding the target path label obtained by inquiry into the data packet and sending the data packet carrying the target path label to the virtual switch through the virtio port.
11. The system of claim 10, wherein the system further comprises:
the path label analyzing unit is used for receiving the data packet sent by the virtual switch through the virtio port and analyzing the 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.
12. A dpvs load balancing apparatus, comprising a memory and a processor, wherein the memory is configured to store a computer program, and the computer program is configured to implement the method according to any one of claims 1 to 8 when executed by the processor.
CN201910334741.6A 2019-04-24 2019-04-24 Logical port association method, system, equipment and data transmission system Active CN111865794B (en)

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 CN111865794A (en) 2020-10-30
CN111865794B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050018669A1 (en) * 2003-07-25 2005-01-27 International Business Machines Corporation Infiniband subnet management queue pair emulation for multiple logical ports on a single physical port
CN104486124B (en) * 2014-12-19 2018-09-04 盛科网络(苏州)有限公司 The device and method of multisystem link aggregation is realized using logic port
CN106856454A (en) * 2015-12-09 2017-06-16 北京华为数字技术有限公司 A kind of method of message forwarding, equipment and system
US10135726B2 (en) * 2016-10-27 2018-11-20 Vmware, Inc. Virtualization port layer including physical switch port and logical switch port

Also Published As

Publication number Publication date
CN111865794A (en) 2020-10-30

Similar Documents

Publication Publication Date Title
EP3057272B1 (en) Technologies for concurrency of cuckoo hashing flow lookup
US7330918B2 (en) Buffer memory management method and system
JP5594171B2 (en) Communication processing apparatus, address learning program, and address learning method
US20110134928A1 (en) Transmitting a packet
US10348603B1 (en) Adaptive forwarding tables
EP3451592B1 (en) Packet transmission between vxlan domains
US10397116B1 (en) Access control based on range-matching
US9906449B2 (en) System and method for reduced forwarding information storage
US9584481B2 (en) Host providing system and communication control method
CN104468401A (en) Message processing method and device
US11201760B2 (en) Data forwarding method and apparatus based on operating system kernel bridge
CN109240800B (en) Hypervisor-based multi-system shared memory management method
CN115858160B (en) Remote direct memory access virtualized resource allocation method and device and storage medium
CN108337116B (en) Message order-preserving method and device
CN115426312A (en) Method and device for managing, optimizing and forwarding identifiers in large-scale multi-modal network
CN108259348B (en) Message transmission method and device
CN106878052B (en) User migration method and device
US8762485B2 (en) Information system having computer and storage apparatus coupled to network
CN111865794B (en) Logical port association method, system, equipment and data transmission system
US6996664B2 (en) Ternary content addressable memory with enhanced priority matching
US7773590B2 (en) Combined interface and non-interface specific associative memory lookup operations for processing of packets
CN108965093B (en) VLAN (virtual local area network) distribution method and device
EP3534576B1 (en) Packet transmission
CN112817516A (en) Data read-write control method, device, equipment and storage medium
CN111294316A (en) Network isolation method and device based on user mode protocol stack virtual router

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