Logic port management method and device, equipment and medium
By obtaining the port information of the network card logical port and calling the corresponding interface for configuration, the problem of cumbersome logical port management of the smart network card is solved, the simple creation and configuration of the logical port is realized, and the scalability and network performance are improved.
Patent Information
- Application Number
- CN202310233570.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2024-09-10
AI Technical Summary
In the existing technology, the logical port management process of smart network cards is cumbersome and needs to be configured by adding interfaces, resulting in poor scalability and difficulty in decoupling the network card from the virtualization software switch, affecting network bandwidth and throughput.
By responding to the network card logical port creation event, obtain the port information, call the corresponding interface to send a query request to the network card management module, obtain the PCI information of the physical port, and send management instructions to the virtualization software switch to determine the logical port number and realize the creation of the logical port. and configuration to avoid directly managing the network card logical port through OVS.
It simplifies the configuration process of the network card logical port, improves the scalability, realizes the decoupling of the network card and the virtualization software switch, and improves the network bandwidth and throughput.
Smart Images

Figure CN118626424A
Abstract
Description
Technical Field
[0001] The present invention relates to a method for managing a logical port, and in particular to a method, a device, an electronic device and a computer storage medium for managing a logical port. Background Art
[0002] With the development of Internet technology, the growth of central processing unit (CPU) computing power cannot keep up with the growth rate of data center network transmission. The increase of network port bandwidth will cause an unbearable load on CPU resources, leaving little CPU resources for running applications. In addition, under high bandwidth and newer transmission systems, network function processing is also becoming more and more complex. Therefore, the need to offload network functions to programmable hardware is becoming more and more urgent. Smart NICs are equipped with computing power, which can offload high-performance data processing functions in the network that are not suitable for CPU processing to Smart NICs for execution, improve data processing capabilities, and release CPU computing resources.
[0003] In order to improve the network quality of the smart network card and the bandwidth of the network port, multiple network ports in the smart network card can be bound (bonded) together to form a single logical port, thereby improving the network throughput and availability of the smart network card. In the related art, it is generally based on the virtualization software switch (OpenVirtual Switch, OVS), and the driver module in the network card is used to bind multiple network ports of the network card to form a logical port, and configure multiple network ports corresponding to the logical port. However, since the network card and OVS are decoupled designs, OVS cannot directly manage the logical port of the network card, and needs to add an interface to manage it through the newly added interface, which is a cumbersome process. Summary of the invention
[0004] The present invention mainly provides a logical port management method, device, electronic equipment and computer storage medium.
[0005] An embodiment of the present invention provides a method for managing a logical port, which is applied to a cloud platform; the method comprises: in response to a creation event of a logical port of a network card, obtaining port information of the logical port; the port information comprises a working type of the logical port and at least two physical ports corresponding to the logical port; calling an interface corresponding to the working type of the logical port, and sending a request for querying first information to a management module of the network card; the first information comprises Peripheral Component Interconnect (PCI) information of each of the physical ports corresponding to the logical port; receiving a feedback message carrying the first information sent by the management module of the network card; sending a management instruction carrying the first information to a virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0006] In the above scheme, the calling of the interface corresponding to the working type of the logical port sends a request for querying the first information to the management module of the network card, including: when the working type of the logical port is user state, calling the first interface sends a request for querying the first information to the management module of the network card.
[0007] It can be seen that when the working type of the logical port of the network card is user state, there is no need to add an interface for configuring the logical port of the network card. The cloud platform can send a request for querying the first information to the management module of the network card by calling a pre-set first interface, which can effectively improve the expansion capability of the network card.
[0008] In the above scheme, the method also includes: calling the interface corresponding to the working type of the logical port, and sending a configuration request carrying configuration parameters to the management module of the network card; the configuration request is used to instruct the management module of the network card to determine the working mode of the logical port based on the configuration parameters.
[0009] It can be seen that the cloud platform channel calls the interface corresponding to the working type of the logical port and sends a configuration request carrying configuration parameters to the management module of the network card, so as to configure the logical port of the network card without the need to configure the logical port of the network card through OVS, making the configuration process of the logical port of the network card relatively simple.
[0010] In the above scheme, the calling of the interface corresponding to the working type of the logical port to send a configuration request carrying configuration parameters to the management module of the network card includes: when the working type of the logical port is user state, calling the first interface to send a configuration request carrying configuration parameters to the management module of the network card; when the working type of the logical port is kernel state, calling the second interface to send a configuration request carrying the configuration parameters to the management module of the network card; the first interface is different from the second interface.
[0011] It can be seen that when the working type of the logical port is user state, the cloud platform sends a configuration request carrying configuration parameters to the management module of the network card by calling the first interface. When the working type of the logical port is kernel state, the cloud platform sends a configuration request carrying configuration parameters to the management module of the network card by calling the second interface. That is, different interfaces can be used to configure the logical port of the network card according to the working type of the logical port, without the need to configure the logical port of the network card through OVS, making the configuration process of the logical port of the network card simpler.
[0012] In the above solution, the configuration parameters include at least one of the following: link aggregation control protocol parameters and attribute information of each of the physical ports.
[0013] It can be seen that the cloud platform sends a configuration request carrying configuration parameters to the management module of the network card. Here, the configuration parameters include link aggregation control protocol parameters and / or attribute information of each physical port, which can determine the working mode of the logical port, that is, realize the management of the logical port of the network card.
[0014] An embodiment of the present invention also provides a logical port management method, which is applied to a virtualized software switch; the method includes: receiving a management instruction carrying first information sent by a cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card; in response to the management instruction, sending a work instruction carrying the first information to a driver module of the network card; the work instruction is used to instruct the driver module of the network card to create a virtual device based on the first information; the virtual device communicates based on the logical port; receiving a registration request for the virtual device sent by the driver module of the network card; in response to the registration request, assigning a port number to the logical port, and adding the port number to the bridge of the virtualized software switch.
[0015] In the above solution, sending the working instruction carrying the first information to the driver module of the network card includes: transparently transmitting the working instruction carrying the first information to the driver module of the network card.
[0016] It can be seen that OVS transparently transmits the first information to the driver module of the network card, and there is no need to process the first information, which is conducive to the decoupling of the network card and OVS.
[0017] An embodiment of the present invention also provides a logical port management method, which is applied to a network card; the method includes: receiving a request for querying first information sent by a cloud platform through the management module of the network card; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card; in response to the request for querying the first information, sending a feedback message carrying the first information to the cloud platform through the management module of the network card; the feedback message is used to instruct the cloud platform to send a management instruction carrying the first information to a virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0018] In the above scheme, the method also includes: receiving a work instruction carrying the first information sent by the virtualization software switch through the driver module of the network card; in response to the work instruction, creating a virtual device based on the first information through the management and control module of the network card; the virtual device communicates based on the logical port; and sending a registration request for the virtual device to the virtualization software switch through the management module of the network card.
[0019] It can be seen that the virtualization software switch does not need to process the first information by sending the first information to the driver module of the network card, that is, only the driver module of the network card manages the logical port of the network card, and the virtualization software switch does not need to manage the logical port of the network card, nor does it need to obtain the working type of the logical port, which is conducive to the decoupling of the network card and the virtualization software switch, and can effectively improve the expansion capability of the logical port of the network card.
[0020] The embodiment of the present invention also provides a management system for logical ports, and the management system for logical ports includes: a cloud platform, an OVS, and a network card. The workflow of the management system for the logical port may include: the cloud platform obtains the port information of the logical port in response to the creation event of the logical port of the network card; the cloud platform calls the interface corresponding to the working type of the logical port, and sends a request for querying the first information to the management module of the network card; the network card responds to the request for querying the first information, and sends a feedback message carrying the first information to the cloud platform through the management module of the network card; the cloud platform receives the feedback message carrying the first information sent by the management module of the network card, and sends a management instruction carrying the first information to the OVS; the OVS responds to the management instruction and sends a work instruction carrying the first information to the driver module of the network card; the network card responds to the work instruction, creates a Vdev based on the first information through the management module of the network card, and sends a registration request for the Vdev to the OVS through the management module of the network card; the OVS responds to the registration request, assigns a port number to the logical port, and adds the port number to the bridge of the OVS.
[0021] The embodiment of the present invention further provides a logical port management device, which is applied to a cloud platform; the logical port management device at least includes:
[0022] A first acquisition module, configured to acquire port information of a logical port in response to a creation event of the logical port of the network card; the port information includes a working type of the logical port and at least two physical ports corresponding to the logical port;
[0023] A first sending module, configured to call an interface corresponding to the working type of the logical port, and send a request for querying first information to the management module of the network card; the first information includes peripheral component interconnect standard PCI information of each physical port corresponding to the logical port;
[0024] A first receiving module, configured to receive a feedback message carrying the first information and sent by the management module of the network card;
[0025] The first processing module is used to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0026] The embodiment of the present invention further provides a logical port management device, which is applied to a virtualized software switch; the logical port management device at least includes:
[0027] A second receiving module is used to receive a management instruction carrying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card;
[0028] A second sending module is used to send a work instruction carrying the first information to the driver module of the network card in response to the management instruction; the work instruction is used to instruct the driver module of the network card to create a virtual device based on the first information; the virtual device communicates based on the logical port;
[0029] A third receiving module, configured to receive a registration request for the virtual device sent by the driver module of the network card;
[0030] The second processing module is used to allocate a port number to the logical port in response to the registration request, and add the port number to the bridge of the virtualization software switch.
[0031] The embodiment of the present invention further provides a logical port management device, which is applied to a network card; the logical port management device at least includes:
[0032] A fourth receiving module, configured to receive, through the management module of the network card, a request for querying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card;
[0033] A third sending module is used to respond to the request for querying the first information and send a feedback message carrying the first information to the cloud platform through the management module of the network card; the feedback message is used to instruct the cloud platform to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0034] An embodiment of the present invention also provides an electronic device, including a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor, wherein when the first processor executes the program, any one of the above-mentioned methods for managing logical ports applied to a cloud platform is implemented.
[0035] An embodiment of the present invention also provides an electronic device, including a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, wherein when the second processor executes the program, any one of the above-mentioned methods for managing logical ports applied to a virtualized software switch is implemented.
[0036] An embodiment of the present invention also provides an electronic device, comprising a third memory, a third processor, and a computer program stored in the third memory and executable on the third processor, wherein when the third processor executes the program, any one of the above-mentioned management methods for the logical port applied to the network card is implemented.
[0037] An embodiment of the present invention further provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned logical port management methods is implemented.
[0038] A logical port management method, device, electronic device and computer storage medium provided based on an embodiment of the present invention, the method comprising: in response to a creation event of a logical port of a network card, obtaining port information of the logical port; the port information comprises the working type of the logical port and at least two physical ports corresponding to the logical port; calling an interface corresponding to the working type of the logical port, and sending a request for querying first information to a management module of the network card; the first information comprises the peripheral component interconnect standard PCI information of each of the physical ports corresponding to the logical port; receiving a feedback message carrying the first information sent by the management module of the network card; sending a management instruction carrying the first information to a virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0039] It can be seen that in the embodiment of the present invention, the cloud platform can send a request for querying the first information to the management module of the network card by calling the interface corresponding to the working type of the logical port of the network card, so as to obtain the first information, that is, the PCI information of each physical port corresponding to the logical port. The first information is sent to the virtualization software switch, so that the virtualization software switch determines the port number of the logical port according to the first information, and the logical port can be created by adding the port number to the bridge of the virtualization software switch, and the process is relatively simple.
[0040] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a schematic diagram of managing logical ports in a user-mode processing mode in the related art;
[0042] Figure 2 A schematic diagram of a flow chart of a first logical port management method provided by an embodiment of the present invention;
[0043] Figure 3A schematic diagram of a flow chart of a second logical port management method provided by an embodiment of the present invention;
[0044] Figure 4 A flow chart of a method for managing a third logical port provided by an embodiment of the present invention
[0045] Figure 5 A schematic diagram of a logical port management method provided by an embodiment of the present invention;
[0046] Figure 6 A schematic diagram of a workflow of a management system of a logical port provided by an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of a first logical port management device provided by an embodiment of the present invention;
[0048] Figure 8 A schematic diagram of a second logical port management device provided by an embodiment of the present invention;
[0049] Fig. 9 A schematic diagram of a third logical port management device provided by an embodiment of the present invention;
[0050] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In the related art, in order to improve the network quality of the network card and the bandwidth of the network port, multiple network ports in the network card can be bound and aggregated together based on OVS to form a logical port. The working types of the logical port of the network card include user state and kernel state, wherein the working type of the logical port is kernel state, which means: after the data packet reaches the network card through the logical port connected to OVS, the network card sends an interrupt notification to the CPU, the CPU copies the data packet to the kernel space, and the application copies the data from the kernel space to the user space, thereby processing the data; the working type of the logical port is user state, which means: based on the data plane development framework (DataPlane DevelopmentKit, DPDK), the data transmission process in the network card is accelerated, and the difference between it and the kernel state working state is that the data packet received from the logical port connected to OVS does not need to be copied to the kernel space, and the data packet can directly reach the user space through the DPDK driver.
[0052] When the working type of the logical port of the network card is user mode, DPDK provides Net-bonding driver devices and virtual devices (Virtual Device, Vdev) for managing logical ports and protocol processing. Figure 1This is a schematic diagram of managing logical ports in a user-mode processing method in the related art, see Figure 1 The logical port management module in the cloud platform is used to obtain whether the working type of the logical port of the network card is user state or kernel state, and send the obtained working type of the logical port of the network card to the logical port management module in OVS; the bond parameter configuration module in the cloud platform is used to set the relevant configuration parameters of the logical port, such as the working mode of the logical port, the information of the member port corresponding to the logical port, and the Link Aggregation Control Protocol (LACP) parameters. The bond parameter configuration module sends the relevant configuration parameters of the logical port to OVS.
[0053] See also Figure 1 The logical port management module in OVS sends the working type of the logical port of the network card to Vdev in DPDK by calling the RTE-VDEV interface of DPDK; OVS calls the rte_eth_bond_ops interface of DPDK based on the OVS-appctl command line to send the relevant configuration parameters of the logical port to the Net-bonding driver device in DPDK. The logical port management module in the Net-bonding driver device manages the LACP parameters of the logical port and the information of the member ports corresponding to the logical port.
[0054] The Net-bonding driver device and Vdev are used to manage logical ports and process protocols. However, there is currently no interface in the Net-bonding driver device that supports configuring the LACP parameters of the logical port and the information of the member ports corresponding to the logical port into the network card. Therefore, it is necessary to add an interface in DPDK and send the LACP parameters of the logical port and the information of the member ports corresponding to the logical port to Vdev in DPDK through the newly added interface. In this way, the LACP parameters of the logical port and the information of the member ports corresponding to the logical port can be configured into the logical port management module in the network card based on Vdev.
[0055] It can be seen that in the related technology, when the logical port of the network card is in a user-state working state, the process of configuring the logical port of the network card is relatively cumbersome, which makes the expansion capability of the logical port of the network card poor. If the logical port of the network card needs to be expanded later, such as increasing the number of member ports, changing the operation mode of the network card, etc., it is necessary to expand it accordingly in the cloud platform, OVS, and DPDK.
[0056] In addition, when DPDK manages the logical port of the network card, it needs to apply the patch (DPDK-patch) provided by the network card. Here, the DPDK-patch provided by the network card is used to expand the core data structure of DPDK. However, due to the change of DPDK version, this may cause a conflict between the core data structure of DPDK and DPDK-patch. When a conflict occurs, the problematic code needs to be modified, but because the code in DPDK-patch is not exposed to DPDK, DPDK may not be able to maintain the code in DPDK-patch; if DPDK-patch is exposed to DPDK, it may affect the security information of the network card.
[0057] In view of the above technical problems, a technical solution of an embodiment of the present invention is proposed. The following is a further detailed description of the embodiment of the present invention in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the embodiments provided below are partial embodiments for implementing the present invention, rather than providing all embodiments for implementing the present invention. In the absence of conflict, the technical solutions recorded in the embodiments of the present invention can be implemented in any combination.
[0058] It should be noted that, in the embodiments of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other related elements (such as steps in a method or units in a device, for example, a unit may be a part of a circuit, a part of a processor, a part of a program or software, etc.) in the method or apparatus including the element.
[0059] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0060] For example, a method for managing a logical port provided by an embodiment of the present invention includes a series of steps, but the method for managing a logical port provided by an embodiment of the present invention is not limited to the recorded steps. Similarly, a management device for a logical port provided by an embodiment of the present invention includes a series of modules, but the management device for a logical port provided by an embodiment of the present invention is not limited to the modules explicitly recorded, and may also include modules required to obtain relevant information or perform processing based on the information.
[0061] The embodiment of the present invention provides a logical port management method, which is applied to a cloud platform. Figure 2 A flow chart of a method for managing a logical port provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the process may include:
[0062] Step 201: In response to a creation event of a logical port of a network card, obtain port information of the logical port; the port information includes a working type of the logical port and at least two physical ports corresponding to the logical port.
[0063] In the embodiment of the present invention, the working type of the logical port of the network card represents the way in which the logical port of the network card processes data. The working type of the logical port of the network card includes user mode and kernel mode.
[0064] In the embodiment of the present invention, the logical port of the network card is a port to be created, and the logical port of the network card is a port formed by binding at least two physical ports, and the binding can achieve the purposes of link redundancy, bandwidth multiplication, load balancing, etc. The logical port of the network card is a virtual port, and the at least two physical ports are physical ports. The at least two bound physical ports are member ports of the logical port of the network card, that is, the logical port of the network card is composed of at least two physical ports.
[0065] Exemplarily, the two physical ports of the network card are port 1 and port 2, and the bandwidth of port 1 and port 2 are both 6.0 Gbit / s. If port 1 and port 2 are bound to form a logical port of the network card, the bandwidth of the logical port of the network card is 12.0 Gbit / s. Port 1 and port 2 are called two member ports of the logical port of the network card.
[0066] Step 202: calling an interface corresponding to the working type of the logical port, and sending a request for querying first information to the management module of the network card; the first information includes the peripheral component interconnect standard PCI information of each physical port corresponding to the logical port.
[0067] In the embodiment of the present invention, the PCI information represents identification information of the physical port. Each physical port has unique PCI information. Therefore, the corresponding physical port can be determined according to the PCI information.
[0068] In the embodiment of the present invention, the cloud platform obtains the first information in different ways according to the different working types of the logical port of the network card. According to the working type of the logical port, the corresponding interface is called to send a request for querying the first information to the management module of the network card. Here, the management module of the network card can be used to query the PCI information of at least two physical ports of the network card.
[0069] Step 203: Receive a feedback message carrying first information sent by the management module of the network card.
[0070] In an embodiment of the present invention, after receiving a request for querying the first information sent by the cloud platform, the management module of the network card queries and obtains the PCI information of each physical port corresponding to the logical port, thereby obtaining the first information and sending a feedback message carrying the first information to the cloud platform.
[0071] Step 204: Send a management instruction carrying the first information to the virtualized software switch; the management instruction is used to instruct the virtualized software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualized software switch.
[0072] In the embodiment of the present invention, after obtaining the feedback message carrying the first information sent by the management module of the network card, the cloud platform sends the management instruction carrying the first information to the OVS, and the OVS can obtain the first information.
[0073] In the embodiment of the present invention, DPDK is introduced in OVS, OVS calls the DPDK-RTE interface of DPDK, and transparently transmits the first information to the driver module of the network card through the RTE-VDEV interface in the DPDK-RTE interface. After obtaining the first information, the driver module of the network card creates a Vdev based on logical port communication according to the first information. The driver module of the network card sends a registration request for Vdev to OVS.
[0074] In an embodiment of the present invention, after receiving the registration request sent by the driver module of the network card, OVS registers Vdev in the rte-eth-dev data structure of DPDK, and DPDK assigns a corresponding port number to the logical port of the network card, and records the port number of the logical port as Port ID, wherein the port number of the logical port represents the identification information of the logical port.
[0075] In the embodiment of the present invention, DPDK sends the port number to OVS, and OVS adds the port number to the OVS bridge, that is, the logical port is used as the port for the network card to access OVS, thereby realizing the creation of the logical port of the network card.
[0076] It can be seen that in the embodiment of the present invention, the cloud platform can call the corresponding interface to obtain the first information based on the port information of the logical port of the network card, where the first information includes the peripheral component interconnection standard PCI information of each physical port corresponding to the logical port. The PCI information of at least two physical ports is sent to OVS, and OVS calls the DPDK-RTE interface to pass the PCI information of at least two physical ports to the driver module of the network card, so that the driver module of the network card creates Vdev after obtaining the first information, and registers Vdev in the rte-eth-dev data structure of DPDK. DPDK assigns the corresponding port number to the logical port of the network card and sends it to OVS. Then, OVS can create the logical port of the network card by adding the port number to the OVS bridge.
[0077] It can be seen that in the process of creating the logical port of the network card, OVS transmits the first information to the driver module of the network card through the DPDK RTE interface, and there is no need to process the first information, that is, only the driver module of the network card manages the logical port of the network card, and OVS does not need to manage the logical port of the network card, nor does it need to obtain the working type of the logical port, which is conducive to the decoupling of the network card and OVS, and can effectively improve the expansion capability of the logical port of the network card. In addition, based on the management of the logical port of the network card by the driver module of the network card, DPDK does not need to manage the logical port. Therefore, the DPDK does not need to be marked with the DPDK-patch provided by the network card end, and there will be no conflict between the DPDK data structure and the DPDK-patch.
[0078] In some implementations, calling an interface corresponding to the working type of the logical port to send a request for querying the first information to the management module of the network card includes:
[0079] When the working type of the logical port is user mode, a first interface is called to send a request for querying first information to a management module of the network card.
[0080] In some embodiments, the first interface may be a pre-set interface. When the working type of the logical port of the network card is user mode, the cloud platform may call the pre-set first interface through the bondetl command line to send a request for querying the first information to the management module of the network card.
[0081] In some embodiments, when the working type of the logical port of the network card is kernel state, the cloud platform can use the ip link command line to call the second interface to obtain PCI information of at least two physical ports, where the second interface is a pre-set interface, and the second interface is another interface different from the first interface.
[0082] In some embodiments, when the working type of the logical port of the network card is kernel state, the cloud platform can also use the ip link command line to call the second interface to configure the link aggregation control protocol inside the logical port, and configure the attribute information of at least two physical ports corresponding to the logical port. Here, the attribute information of the physical port can be the bandwidth of the port, the rate of the port, etc.
[0083] It can be seen that when the working type of the logical port of the network card is user state, there is no need to add an interface for configuring the logical port of the network card. The cloud platform can send a request for querying the first information to the management module of the network card by calling a pre-set first interface, which can effectively improve the expansion capability of the network card.
[0084] In some embodiments, the method further comprises:
[0085] An interface corresponding to the working type of the logical port is called to send a configuration request carrying configuration parameters to the management module of the network card; the configuration request is used to instruct the management module of the network card to determine the working mode of the logical port based on the configuration parameters.
[0086] In some implementations, calling an interface corresponding to the working type of the logical port to send a configuration request carrying configuration parameters to a management module of the network card includes:
[0087] When the working type of the logical port is user mode, calling the first interface to send a configuration request carrying configuration parameters to the management module of the network card;
[0088] When the working type of the logical port is kernel mode, a second interface is called to send a configuration request carrying the configuration parameters to a management module of the network card; the first interface is different from the second interface.
[0089] In some embodiments, according to the different working types of the logical port of the network card, the cloud platform calls different interfaces to send a configuration request carrying configuration parameters to the management module of the network card. Here, the configuration request is used to instruct the management module of the network card to determine the working mode of the logical port based on the configuration parameters.
[0090] In some embodiments, when the working type of the logical port of the network card is user mode, the cloud platform can call a preset first interface through the bondetl command line to send a configuration request carrying configuration parameters to the management module of the network card.
[0091] In some embodiments, when the working type of the logical port of the network card is kernel mode, the cloud platform can use the ip link command line to call the second interface to send a configuration request carrying configuration parameters to the management module of the network card.
[0092] It can be seen that when the working type of the logical port of the network card is user state, the cloud platform can send a configuration request carrying configuration parameters to the management module of the network card by calling the pre-set first interface, so as to configure the logical port of the network card without the need to configure the logical port of the network card through OVS, making the configuration process of the logical port of the network card relatively simple.
[0093] In some implementations, the configuration parameters include at least one of the following: link aggregation control protocol parameters and attribute information of each of the physical ports.
[0094] In some embodiments, Link Aggregation Control Protocol (LACP) is a protocol for implementing dynamic link aggregation, and at least two physical ports are bound to form a logical port based on LACP. At least two physical ports exchange aggregation information between at least two physical ports based on LACPDU (LACP Data Unit) protocol messages, where the aggregation information can be system MAC address (Media Access Control Address), port priority and other information. At least two physical ports are bound to form a logical port based on the aggregation information.
[0095] In some embodiments, the cloud platform can send a configuration request carrying LACP parameters to the management module of the network card through a pre-set first interface, so that the management module of the network card determines the working mode of the logical port of the network card according to the LACP parameters. Exemplarily, the working mode of the logical port may include: active-standby working mode and load balancing working mode.
[0096] In some embodiments, the management module of the network card may also modify or delete existing LACP parameters in the network card according to the LACP parameters sent by the cloud platform.
[0097] In some embodiments, the attribute information of the physical port may be the rate of the port, the bandwidth of the port, etc. The attribute information of each member port of the logical port of the network card must be consistent. For example, when the rates of each member port of the logical port are inconsistent, the member port with a lower rate may be congested or lose packets during actual use. Therefore, it is necessary to ensure that the attribute information of at least two physical ports must be consistent.
[0098] In some embodiments, a configuration request carrying attribute information of each physical port may be sent to a management module of the network card through a preset first interface, and the management module of the network card determines the working mode of the logical port of the network card according to the attribute information of each physical port.
[0099] In some embodiments, the management module of the network card may also modify the attribute information of each existing physical port in the network card according to the attribute information of each physical port sent by the cloud platform.
[0100] It can be seen that the cloud platform sends a configuration request carrying configuration parameters to the management module of the network card. Here, the configuration parameters include link aggregation control protocol parameters and / or attribute information of each physical port, which can determine the working mode of the logical port, that is, realize the management of the logical port of the network card.
[0101] The embodiment of the present invention also provides a method for managing a logical port, which is applied to a virtualized software switch. Figure 3 A flow chart of a second logical port management method provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the process may include:
[0102] Step 301: Receive a management instruction carrying first information sent by a cloud platform; the first information includes PCI information of each physical port of at least two physical ports corresponding to a logical port of a network card.
[0103] In an embodiment of the present invention, after acquiring the first information, the cloud platform sends a management instruction carrying the first information to the OVS, wherein the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card.
[0104] Step 302: In response to the management instruction, a work instruction carrying the first information is sent to the driver module of the network card; the work instruction is used to instruct the driver module of the network card to create a virtual device based on the first information; the virtual device communicates based on the logical port.
[0105] In an embodiment of the present invention, after receiving the management instruction carrying the first information sent by the cloud platform, OVS calls the DPDK-RTE interface of DPDK, and sends a work instruction carrying the first information to the driver module of the network card through the RTE-VDEV interface in the DPDK-RTE interface.
[0106] In the embodiment of the present invention, after acquiring the first information, the driver module of the network card creates a Vdev based on logical port communication according to the first information. The driver module of the network card sends a registration request for the Vdev to the OVS.
[0107] Step 303: Receive a registration request for the virtual device sent by the driver module of the network card.
[0108] Step 304: In response to the registration request, assign a port number to the logical port, and add the port number to the bridge of the virtualization software switch.
[0109] In an embodiment of the present invention, OVS registers Vdev in the rte-eth-dev data structure of DPDK, and DPDK assigns a port number to the logical port corresponding to Vdev, and records the port number of the logical port as Port ID, wherein the port number of the logical port represents the identification information of the logical port.
[0110] In the embodiment of the present invention, OVS adds the port number of the logical port to the OVS bridge according to the port number of the logical port, that is, the logical port is used as the port for the network card to access the OVS, thereby realizing the creation of the logical port of the network card.
[0111] It can be seen that in the embodiment of the present invention, in the process of creating the logical port of the network card, OVS sends the first information to the driver module of the network card without any processing of the first information, that is, only the driver module of the network card manages the logical port of the network card, and OVS does not need to manage the logical port of the network card, nor does it need to obtain the working type of the logical port, which is conducive to the decoupling of the network card and OVS, and can effectively improve the expansion capability of the logical port of the network card.
[0112] In some implementations, sending a work instruction carrying the first information to a driver module of the network card includes:
[0113] The working instruction carrying the first information is transparently transmitted to a driver module of the network card.
[0114] It can be seen that OVS transparently transmits the first information to the driver module of the network card, and there is no need to process the first information, which is conducive to the decoupling of the network card and OVS.
[0115] The embodiment of the present invention also provides a method for managing a logical port, which is applied to a network card. Figure 4 A schematic diagram of a flow chart of a third logical port management method provided by an embodiment of the present invention, such as Figure 4 As shown, the process may include:
[0116] Step 401: Receive a request for querying first information sent by a cloud platform through a management module of the network card; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card.
[0117] In an embodiment of the present invention, the cloud platform calls the corresponding interface according to the working type of the logical port and sends a request for querying the first information to the management module of the network card. Here, the management module of the network card can be used to query the PCI information of at least two physical ports of the network card.
[0118] Step 402: In response to a request to query the first information, a feedback message carrying the first information is sent to the cloud platform through the management module of the network card; the feedback message is used to instruct the cloud platform to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0119] In an embodiment of the present invention, after receiving a request for querying the first information sent by the cloud platform, the management module of the network card queries and obtains the PCI information of each physical port corresponding to the logical port, thereby obtaining the first information and sending a feedback message carrying the first information to the cloud platform.
[0120] It can be seen that OVS does not need to manage the logical ports of the network card, nor does it need to obtain the working type of the logical port. The logical ports of the network card are only managed by the driver module of the network card, which is conducive to the decoupling of the network card and OVS, and can effectively improve the expansion capability of the logical ports of the network card.
[0121] In some embodiments, the method further comprises:
[0122] Receiving, through the driver module of the network card, a working instruction carrying the first information sent by the virtualization software switch;
[0123] In response to the work instruction, a virtual device is created based on the first information by a management and control module of the network card; the virtual device communicates based on the logical port;
[0124] A registration request for the virtual device is sent to the virtualization software switch through the management module of the network card.
[0125] In some embodiments, the driver module of the network card receives a work instruction carrying the first information sent by OVS, that is, the driver module of the network card can create a Vdev based on the logical port communication according to the first information, and the driver module of the network card sends a registration request for Vdev to OVS, so that after receiving the registration request sent by the driver module of the network card, OVS registers Vdev in the rte-eth-dev data structure of DPDK, and DPDK assigns a corresponding port number to the logical port of the network card, and records the port number of the logical port as Port ID, wherein the port number of the logical port represents the identification information of the logical port. DPDK sends the port number to OVS, and OVS adds the port number to the OVS bridge, that is, the logical port is used as the port for the network card to access OVS, thereby realizing the creation of the logical port of the network card.
[0126] It can be seen that OVS does not need to process the first information by sending it to the driver module of the network card, that is, only the driver module of the network card manages the logical port of the network card, and OVS does not need to manage the logical port of the network card, nor does it need to obtain the working type of the logical port, which is conducive to the decoupling of the network card and OVS, and can effectively improve the expansion capability of the logical port of the network card.
[0127] Figure 5 A schematic diagram of a logical port management method provided by an embodiment of the present invention is shown in FIG. Figure 5 In response to the creation event of the logical port of the network card, the cloud platform obtains the port information of the logical port, where the port information includes the working type of the logical port and at least two physical ports corresponding to the logical port. The bond parameter configuration module in the cloud platform calls the interface corresponding to the working type of the logical port and sends a request for querying the first information to the management module of the network card, where the first information includes the peripheral component interconnect standard PCI information of each physical port corresponding to the logical port.
[0128] In an embodiment of the present invention, when the working type of the logical port is user state, the cloud platform sends a request for querying the first information to the management module of the network card by calling a pre-set first interface. This method is applicable to the communication method of Socket or Netlink; when the working state of the logical port of the network card is kernel state, the cloud platform uses the iplinkXXX command line to call the second interface to send a request for querying the first information to the management module of the network card. This method is only applicable to the communication method of Netlink.
[0129] In an embodiment of the present invention, after receiving a request for querying the first information sent by the cloud platform, the management module of the network card determines the peripheral component interconnection standard PCI information of each physical port corresponding to the logical port, that is, the first information, and sends a feedback message carrying the first information to the cloud platform.
[0130] In an embodiment of the present invention, a bond parameter configuration module in the cloud platform is used to set relevant configuration parameters of the logical port. When the working type of the logical port is user state, the cloud platform can configure the LACP parameters of the logical port through a pre-set first interface, as well as configure the attribute information of each physical port corresponding to the logical port; when the working type of the logical port is kernel state, the cloud platform can configure the LACP parameters of the logical port by calling the second interface, as well as configure the attribute information of each physical port corresponding to the logical port.
[0131] In an embodiment of the present invention, after obtaining the first information, the cloud platform sends the first information to the logical port management module of OVS. The logical port management module of OVS calls the RTE-VDEV interface in the DPDK-RTE interface set of DPDK to transparently transmit the PCI information of at least two physical ports to the driver module of the network card.
[0132] In an embodiment of the present invention, after obtaining the first information, the driver module of the network card creates a Vdev according to the first information, and registers the created Vdev in the rte-eth-dev data structure of the DPDK. The DPDK assigns a port number to the logical port corresponding to the Vdev, and records the port number of the logical port as Port ID, wherein the port number of the logical port represents the identification information of the logical port.
[0133] In an embodiment of the present invention, DPDK sends the port number of the logical port to the logical port management module of OVS, and the logical port management module of OVS adds the port number to the OVS bridge, that is, the logical port serves as the port for the network card to access OVS, thereby realizing the configuration of the logical port of the network card.
[0134] Based on the same technical concept as the above embodiments, the embodiment of the present invention provides a management system for logical ports. Figure 6 A schematic diagram of the workflow of a logical port management system provided by an embodiment of the present invention is shown in FIG. Figure 6 The management system of the logical port includes: cloud platform, OVS and network card. The workflow of the management system of the logical port may include:
[0135] Step 601: The cloud platform obtains port information of the logical port in response to a creation event of the logical port of the network card.
[0136] In the embodiment of the present invention, the port information includes the working type of the logical port and at least two physical ports corresponding to the logical port.
[0137] Step 602: The cloud platform calls the interface corresponding to the working type of the logical port and sends a request for querying the first information to the management module of the network card.
[0138] In an embodiment of the present invention, the first information includes PCI information of each physical port corresponding to the logical port. The cloud platform can call the first interface to send a request to query the first information to the management module of the network card when the working type of the logical port is user mode.
[0139] In an embodiment of the present invention, the cloud platform can also call the interface corresponding to the working type of the logical port, and send a configuration request carrying configuration parameters to the management module of the network card. Here, the configuration request is used to instruct the management module of the network card to determine the working mode of the logical port based on the configuration parameters. The configuration parameters include at least one of the following: link aggregation control protocol parameters and attribute information of each of the physical ports.
[0140] Exemplarily, when the working type of the logical port is user state, the cloud platform can call the first interface to send a configuration request carrying configuration parameters to the management module of the network card; when the working type of the logical port is kernel state, the cloud platform can call the second interface to send a configuration request carrying configuration parameters to the management module of the network card, wherein the first interface is different from the second interface.
[0141] Step 603: In response to the request for querying the first information, the network card sends a feedback message carrying the first information to the cloud platform through the management module of the network card.
[0142] Step 604: The cloud platform receives a feedback message carrying the first information sent by the management module of the network card, and sends a management instruction carrying the first information to the OVS.
[0143] Step 605: In response to the management instruction, the OVS sends a work instruction carrying the first information to the driver module of the network card.
[0144] In the embodiment of the present invention, the OVS transparently transmits the working instruction carrying the first information to the driver module of the network card.
[0145] Step 606: The network card responds to the work instruction, creates a Vdev based on the first information through the management and control module of the network card, and sends a registration request for the Vdev to OVS through the management module of the network card.
[0146] Step 607: In response to the registration request, the OVS allocates a port number to the logical port and adds the port number to the OVS bridge.
[0147] Based on the same technical concept as the above embodiments, see Figure 7 The first logical port management device provided in the embodiment of the present invention is applied to a cloud platform; the logical port management device at least includes:
[0148] A first acquisition module 701 is used to acquire port information of a logical port in response to a creation event of the logical port of the network card; the port information includes a working type of the logical port and at least two physical ports corresponding to the logical port;
[0149] A first sending module 702 is used to call an interface corresponding to the working type of the logical port to send a request for querying first information to the management module of the network card; the first information includes peripheral component interconnect standard PCI information of each physical port corresponding to the logical port;
[0150] A first receiving module 703, configured to receive a feedback message carrying the first information sent by the management module of the network card;
[0151] The first processing module 704 is used to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0152] In one implementation, the first sending module 702 is configured to call an interface corresponding to the working type of the logical port to send a request for querying the first information to the management module of the network card, including:
[0153] When the working type of the logical port is user mode, a first interface is called to send a request for querying first information to a management module of the network card.
[0154] In one implementation, the device further includes: a first configuration module; the first configuration module is used to:
[0155] An interface corresponding to the working type of the logical port is called to send a configuration request carrying configuration parameters to the management module of the network card; the configuration request is used to instruct the management module of the network card to determine the working mode of the logical port based on the configuration parameters.
[0156] In one implementation, the first configuration module is configured to call an interface corresponding to the working type of the logical port and send a configuration request carrying configuration parameters to the management module of the network card, including:
[0157] When the working type of the logical port is user mode, calling the first interface to send a configuration request carrying configuration parameters to the management module of the network card;
[0158] When the working type of the logical port is kernel mode, a second interface is called to send a configuration request carrying the configuration parameters to a management module of the network card; the first interface is different from the second interface.
[0159] In one implementation, the configuration parameters include at least one of the following: link aggregation control protocol parameters and attribute information of each of the physical ports.
[0160] In practical applications, the first acquisition module 701, the first sending module 702, the first receiving module 703 and the first processing module 704 can all be implemented using a processor of an electronic device. The above processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor, and the embodiment of the present invention does not limit this.
[0161] Based on the same technical concept as the above embodiments, see Figure 8 The second logical port management device provided in the embodiment of the present invention is applied to a virtualized software switch; the logical port management device at least includes:
[0162] The second receiving module 801 is used to receive a management instruction carrying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card;
[0163] A second sending module 802 is used to send a work instruction carrying the first information to the driver module of the network card in response to the management instruction; the work instruction is used to instruct the driver module of the network card to create a virtual device based on the first information; the virtual device communicates based on the logical port;
[0164] A third receiving module 803 is used to receive a registration request for the virtual device sent by the driver module of the network card;
[0165] The second processing module 804 is configured to allocate a port number to the logical port in response to the registration request, and add the port number to the bridge of the virtualization software switch.
[0166] In one implementation, the first sending module 802 is used to send a work instruction carrying the first information to a driver module of the network card, including:
[0167] The working instruction carrying the first information is transparently transmitted to a driver module of the network card.
[0168] In actual applications, the second receiving module 801, the second sending module 802, the third receiving module 803 and the second processing module 804 can all be implemented using a processor of an electronic device. The above processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor, and the embodiment of the present invention is not limited to this.
[0169] Based on the same technical concept as the above embodiments, see Fig. 9The third logical port management device provided in the embodiment of the present invention is applied to a network card; the logical port management device at least includes:
[0170] The fourth receiving module 901 is used to receive a request for querying first information sent by the cloud platform through the management module of the network card; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card;
[0171] The third sending module 902 is used to respond to the request for querying the first information and send a feedback message carrying the first information to the cloud platform through the management module of the network card; the feedback message is used to instruct the cloud platform to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
[0172] In one implementation, the device further includes a registration module; the registration module is used to:
[0173] Receiving, through the driver module of the network card, a working instruction carrying the first information sent by the virtualization software switch;
[0174] In response to the work instruction, a virtual device is created based on the first information by a management and control module of the network card; the virtual device communicates based on the logical port;
[0175] A registration request for the virtual device is sent to the virtualization software switch through the management module of the network card.
[0176] It should be noted that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0177] It should be noted that, in the embodiment of the present invention, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a terminal, server, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0178] Correspondingly, an embodiment of the present invention further provides a computer program product, wherein the computer program product includes computer executable instructions, and the computer executable instructions are used to implement any one of the logical port management methods provided by the embodiments of the present invention.
[0179] Accordingly, an embodiment of the present invention further provides a computer storage medium, on which computer executable instructions are stored. The computer executable instructions are used to implement any one of the logical port management methods provided in the above embodiments.
[0180] In some embodiments, the functions or modules included in the device provided by the embodiments of the present invention can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0181] Based on the same technical concept as the above embodiments, see Fig.10 , the first electronic device provided by the embodiment of the present invention, the electronic device 1010 may include: a memory 1011 and a processor 1012, where the electronic device 1010 may be a first electronic device, the memory 1011 may be a first memory, and the processor 1012 may be a first processor; wherein,
[0182] A first memory for storing computer programs and data;
[0183] The first processor is used to execute the computer program stored in the first memory to implement any one of the logical port management methods in the foregoing embodiments.
[0184] Based on the same technical concept as the above embodiments, the second electronic device provided by the embodiment of the present invention is Fig.10, the electronic device 1010 may be a second electronic device, the memory 1011 may be a second memory, and the processor 1012 may be a second processor; wherein,
[0185] A second memory for storing computer programs and data;
[0186] The second processor is used to execute the computer program stored in the second memory to implement any one of the methods for managing logical ports of a virtualized software switch in the foregoing embodiments.
[0187] Based on the same technical concept as the above embodiments, the third electronic device provided by the embodiment of the present invention is Fig.10 , the electronic device 1010 may be a third electronic device, the memory 1011 may be a third memory, and the processor 1012 may be a third processor; wherein,
[0188] A third memory for storing computer programs and data;
[0189] The third processor is used to execute the computer program stored in the third memory to implement any one of the management methods for the logical port of the network card in the foregoing embodiments.
[0190] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar parts can be referenced to each other, and for the sake of brevity, they will not be repeated in this article.
[0191] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0192] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0193] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0194] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0195] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple grid units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0196] In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0197] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps including the above method embodiment.
[0198] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for managing a logical port, characterized in that: Applied to a cloud platform; the method comprises: In response to a creation event of a logical port of the network card, obtaining port information of the logical port; the port information includes a working type of the logical port and at least two physical ports corresponding to the logical port; Calling an interface corresponding to the working type of the logical port, and sending a request for querying first information to the management module of the network card; the first information includes peripheral component interconnect standard PCI information of each physical port corresponding to the logical port; Receiving a feedback message carrying the first information sent by the management module of the network card; A management instruction carrying the first information is sent to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
2. The method according to claim 1, characterized in that The calling of the interface corresponding to the working type of the logical port to send a request for querying the first information to the management module of the network card includes: When the working type of the logical port is user mode, a first interface is called to send a request for querying first information to a management module of the network card.
3. The method according to claim 2, characterized in that The method further comprises: An interface corresponding to the working type of the logical port is called to send a configuration request carrying configuration parameters to the management module of the network card; the configuration request is used to instruct the management module of the network card to determine the working mode of the logical port based on the configuration parameters.
4. The method according to claim 3, characterized in that The calling of the interface corresponding to the working type of the logical port to send a configuration request carrying configuration parameters to the management module of the network card includes: When the working type of the logical port is user mode, calling the first interface to send a configuration request carrying configuration parameters to the management module of the network card; When the working type of the logical port is kernel mode, a second interface is called to send a configuration request carrying the configuration parameters to a management module of the network card; the first interface is different from the second interface.
5. The method according to claim 3 or 4, characterized in that: The configuration parameters include at least one of the following: link aggregation control protocol parameters and attribute information of each of the physical ports.
6. A method for managing a logical port, characterized in that: Applied to a virtualized software switch; the method comprises: Receiving a management instruction carrying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card; In response to the management instruction, a working instruction carrying the first information is sent to a driver module of the network card; the working instruction is used to instruct the driver module of the network card to create a virtual device based on the first information; the virtual device communicates based on the logical port; Receiving a registration request for the virtual device sent by a driver module of the network card; In response to the registration request, a port number is assigned to the logical port, and the port number is added to a bridge of the virtualization software switch.
7. The method according to claim 6, characterized in that The sending a working instruction carrying the first information to the driver module of the network card includes: The working instruction carrying the first information is transparently transmitted to a driver module of the network card.
8. A method for managing a logical port, characterized in that: Applied to a network card; the method comprises: Receiving, through the management module of the network card, a request for querying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card; In response to the request for querying the first information, a feedback message carrying the first information is sent to the cloud platform through the management module of the network card; the feedback message is used to instruct the cloud platform to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
9. The method according to claim 8, characterized in that The method further comprises: Receiving, through the driver module of the network card, a working instruction carrying the first information sent by the virtualization software switch; In response to the work instruction, a virtual device is created based on the first information by a management and control module of the network card; the virtual device communicates based on the logical port; A registration request for the virtual device is sent to the virtualization software switch through the management module of the network card.
10. A logical port management device, characterized in that: Applied to the cloud platform; the management device of the logical port at least includes: A first acquisition module, configured to acquire port information of a logical port in response to a creation event of the logical port of the network card; the port information includes a working type of the logical port and at least two physical ports corresponding to the logical port; A first sending module, configured to call an interface corresponding to the working type of the logical port, and send a request for querying first information to the management module of the network card; the first information includes peripheral component interconnect standard PCI information of each physical port corresponding to the logical port; A first receiving module, configured to receive a feedback message carrying the first information and sent by the management module of the network card; The first processing module is used to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
11. A logical port management device, characterized in that: Applied to a virtualized software switch; the management device of the logical port at least comprises: A second receiving module is used to receive a management instruction carrying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card; A second sending module is used to send a work instruction carrying the first information to the driver module of the network card in response to the management instruction; the work instruction is used to instruct the driver module of the network card to create a virtual device based on the first information; the virtual device communicates based on the logical port; A third receiving module, configured to receive a registration request for the virtual device sent by the driver module of the network card; The second processing module is used to allocate a port number to the logical port in response to the registration request, and add the port number to the bridge of the virtualization software switch.
12. A logical port management device, characterized in that: Applied to a network card; the management device of the logical port at least comprises: A fourth receiving module, configured to receive, through the management module of the network card, a request for querying first information sent by the cloud platform; the first information includes PCI information of each of the at least two physical ports corresponding to the logical port of the network card; A third sending module is used to respond to the request for querying the first information and send a feedback message carrying the first information to the cloud platform through the management module of the network card; the feedback message is used to instruct the cloud platform to send a management instruction carrying the first information to the virtualization software switch; the management instruction is used to instruct the virtualization software switch to determine the port number of the logical port based on the first information, and add the port number to the bridge of the virtualization software switch.
13. An electronic device, characterized in that: The electronic device includes a first memory, a first processor, and a computer program stored in the first memory and executable on the first processor, and the first processor implements the logical port management method described in any one of claims 1 to 5 when executing the program.
14. An electronic device, characterized in that: The electronic device includes a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, and the second processor implements the logical port management method described in claim 6 or 7 when executing the program.
15. An electronic device, characterized in that: The electronic device includes a third memory, a third processor, and a computer program stored in the third memory and executable on the third processor. When the third processor executes the program, the logical port management method described in claim 8 or 9 is implemented.
16. A computer storage medium storing a computer program; characterized in that: After being executed, the computer program can implement the logical port management method described in any one of claims 1 to 5, or the logical port management method described in claim 6 or 7, or the logical port management method described in claim 8 or 9.
Citation Information
Cited By
Message forwarding system, equipment and cluster
CN119299367A
