A method, device, equipment and medium for passing through a Mellanox IB network card

By building and pushing the Mellanox IB network interface card image, installing drivers, and starting related services, the problem of OpenStack cloud platform being unable to directly access IB network interfaces was solved, enabling more powerful cloud platform computing capabilities.

CN116506447BActive Publication Date: 2025-11-28JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310495538.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-27
Publication Date
2025-11-28
Estimated Expiration
2043-04-27

AI Technical Summary

Technical Problem

Currently, the OpenStack cloud platform cannot achieve pass-through of Mylanox IB network cards, which prevents cloud hosts from directly using high-performance IB network cards, thus limiting computing power.

Method used

Build the images that the Melos IB network interface card (NIC) depends on and push the images to the image repository on the cloud platform; add a switch to enable Melos IB NIC passthrough in the global control file; install the driver for the Melos IB NIC and enable the corresponding function; start the eswitchd pod service and mlnx pod service on the cloud platform to enable Melos IB NIC passthrough.

Benefits of technology

This enables direct connection of Mellanox IB network cards to the cloud platform, thereby enhancing the computing power of the cloud platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116506447B_ABST
    Figure CN116506447B_ABST
Patent Text Reader

Abstract

The application provides a method, device and equipment for passing through Mellanox IB network cards and a readable medium, and the method comprises the following steps: constructing an image relied on by the Mellanox IB network card, and pushing the image to a storage of an image warehouse of a cloud platform; adding a switch for starting the Mellanox IB network card in a global control file of the cloud platform, and starting an image service on a computing node; installing a driver of the Mellanox IB network card into the computing node, and starting corresponding functions in the computing node; starting eswitchd pod service and mlnx pod service in the cloud platform to realize the passing through of the Mellanox IB network card. Through the scheme of the application, the Mellanox IB network card can pass through on the cloud platform, and the cloud platform can provide stronger computing capacity.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computers, and more particularly to a Mellanox IB card pass-through method, device, equipment and readable medium. BACKGROUND

[0002] IB card (IB card is also called HCA-Host Channel Adapter, host channel adapter) provides the highest performance and most scalable interconnection solution for server and storage system. Especially in high-performance computing, Web 2.0, cloud computing, big data, financial services, virtualization data center and storage applications will obtain obvious performance improvement, thereby shortening the completion time and reducing the cost of the whole process. The current OpenStack cloud platform card pass-through running on k8s has the following problems: the current OpenStack cloud platform passes through the sriov service to the ordinary Ethernet card for virtual machine use, but the IB card with more powerful computing performance cannot be passed through, resulting in that the cloud host cannot directly use the IB card. SUMMARY

[0003] Therefore, the purpose of the embodiments of the present application is to provide a Mellanox IB card pass-through method, device, equipment and readable medium, which can realize the pass-through of Mellanox IB card on the cloud platform and provide stronger computing power for the cloud platform by using the technical solutions of the present application.

[0004] Based on the above purpose, one aspect of an embodiment of the present application provides a Mellanox IB card pass-through method, comprising the following steps:

[0005] Constructing an image dependent on the Mellanox IB card and pushing the image to the image repository of the cloud platform for storage;

[0006] Adding a switch for starting the Mellanox IB card pass-through in the global control file of the cloud platform, and starting the image service on the computing node;

[0007] Installing the driver of the Mellanox IB card into the computing node, and starting the corresponding function in the computing node;

[0008] Starting the eswitchd pod service and mlnx pod service in the cloud platform to realize the Mellanox IB card pass-through.

[0009] According to an embodiment of the present application, the image is an eswitchd image and a neutron-mlnx-agent image.

[0010] According to an embodiment of the present application, constructing an image dependent on the Mellanox IB card and pushing the image to the image repository of the cloud platform for storage comprises:

[0011] Select centos8.2 as the container base image;

[0012] Install the networking-mlnx function code and libvirt tool installation package in the base image;

[0013] Use the networking-mlnx function code and libvirt tool to make eswitchd image and neutron-mlnx-agent image.

[0014] According to one embodiment of the present application, in the global control file of the cloud platform, a switch for starting the Mellanox IB card pass-through is added, and the image service on the computing node is started, including:

[0015] A switch for starting the Mellanox IB card pass-through is added in the global control file of the cloud platform;

[0016] The eswitchd service and the neutron-mlnx-agent service on the computing node with the Mellanox IB card installed are started through the inventory configuration file.

[0017] According to one embodiment of the present application, the driver of the Mellanox IB card is installed into the computing node, and the corresponding function is started in the computing node, including:

[0018] In response to the cloud platform starting the Mellanox IB card pass-through service, the mlnxofedinstall driver of the Mellanox IB card is installed on the computing node with the Mellanox IB card installed;

[0019] The grub configuration file in the operating system is modified to start the iommu (input / output storage management unit);

[0020] The sriov (single-root I / O virtualization) function of the Mellanox card is started, the installed driver is started, and the number of vf (Virtual Function) is parsed.

[0021] According to one embodiment of the present application, the eswitchd pod service and the mlnx pod service are started in the cloud platform to realize the Mellanox IB card pass-through, including:

[0022] The eswitchd configuration file and the mlnx configuration file are mapped as configmap;

[0023] The eswitchd configmap is mounted to start the eswitchd pod service;

[0024] In response to the eswitchd pod service being normal, the mlnx configmap is mounted to start the mlnx pod service.

[0025] According to one embodiment of the present application, further comprising:

[0026] PCIE information of the Mellanox IB network card is acquired.

[0027] The Mellanox IB network card is configured to release the Mellanox IB network card according to the PCIE information.

[0028] Another aspect of the embodiment of the present application further provides a device for Mellanox IB network card pass-through, the device comprising:

[0029] A building module configured to build an image relied on by the Mellanox IB network card and push the image to an image repository of a cloud platform for storage.

[0030] A starting module configured to add a switch for starting the Mellanox IB network card pass-through in a global control file of the cloud platform and start an image service on a computing node.

[0031] An installing module configured to install a driver of the Mellanox IB network card into the computing node and enable a corresponding function in the computing node.

[0032] An executing module configured to start eswitchd pod service and mlnx pod service in the cloud platform to realize the Mellanox IB network card pass-through.

[0033] Another aspect of the embodiment of the present application further provides a computer device, comprising:

[0034] At least one processor; and

[0035] A memory storing computer instructions executable on the processor, the instructions being executed by the processor to implement the steps of any of the above methods.

[0036] Another aspect of the embodiment of the present application further provides a computer readable storage medium storing a computer program, the computer program being executed by the processor to implement the steps of any of the above methods.

[0037] The method for passing through the Mellanox IB network card provided by the embodiment of the present application has the following beneficial technical effects: the method for passing through the Mellanox IB network card provided by the embodiment of the present application constructs the image relied on by the Mellanox IB network card, and pushes the image to the image warehouse of the cloud platform for storage; a switch for starting the Mellanox IB network card passing through is added to the global control file of the cloud platform, and the image service is started on the computing node; the driver of the Mellanox IB network card is installed into the computing node, and the corresponding function is started in the computing node; the eswitchd pod service and the mlnx pod service are started in the cloud platform to realize the technical scheme of the Mellanox IB network card passing through, the Mellanox IB network card passing through on the cloud platform can be realized, and the cloud platform can be provided with stronger computing capability. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other embodiments can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0039] Figure 1 A schematic flowchart of the method for passing through the Mellanox IB network card according to one embodiment of the present application is shown.

[0040] Figure 2 A schematic diagram of constructing the image according to one embodiment of the present application is shown.

[0041] Figure 3 A schematic diagram of the device for passing through the Mellanox IB network card according to one embodiment of the present application is shown.

[0042] Figure 4 A schematic diagram of the computer device according to one embodiment of the present application is shown.

[0043] Figure 5 A schematic diagram of the computer readable storage medium according to one embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] In order to make the objects, technical solutions and advantages of the present application clearer, the embodiments of the present application are further described in detail below with reference to the drawings.

[0045] Based on the above purpose, the first aspect of the embodiments of the present application proposes one embodiment of a method for passing through the Mellanox IB network card. Figure 1 A schematic flowchart of the method is shown.

[0046] As shown in the method shown in the Figure 1 may include the following steps:

[0047] S1 constructs an image dependent on the Mellanox IB network card, and pushes the image to the image warehouse of the cloud platform for storage. The image dependent on the Mellanox IB network card is an eswitchd image and a neutron-mlnx-agent image, when constructing the image, centos8.2 is selected as a container base image, networking-mlnx function code and a libvirt tool installation package are installed in the base image, the eswitchd image and the neutron-mlnx-agent image are made by using the networking-mlnx function code and the libvirt tool, and the constructed image is pushed to the image warehouse of the cloud platform for storage.

[0048] S2 adds a switch for starting the Mellanox IB network card pass-through in a global control file of the cloud platform, and starts an image service on a computing node. A switch for starting the Mellanox IB network card pass-through is added in the global control file of the cloud platform, the Mellanox IB network card pass-through can be started or not started through the switch, then the eswitchd service and the neutron-mlnx-agent service are started on the computing node on which the Mellanox IB network card is installed through an inventory configuration file.

[0049] S3 installs a driver of the Mellanox IB network card into a computing node, and enables corresponding functions in the computing node. When the cloud platform starts the Mellanox IB network card pass-through service, the mlnxofedinstall driver of the Mellanox IB network card is installed on the computing node on which the Mellanox IB network card is installed, the grub configuration file in the operating system is modified to enable the iommu, then the sriov function of the Mellanox network card is enabled, the installed driver is started, and the number of vfs is parsed, the number of vfs is the maximum number of virtualized network cards supported, and the number of the virtualized network cards can be set in use.

[0050] S4 starts the eswitchd pod service and the mlnx pod service in the cloud platform to realize the Mellanox IB network card pass-through. The eswitchd configuration file and the mlnx configuration file are mapped into configmap, the eswitchd configmap is mounted to start the eswitchd pod service, after the eswitchd pod service is normal, the mlnx configmap is mounted to start the mlnx pod service, and after the two container services are normally enabled, the Mellanox IB network card pass-through on the cloud platform can be realized.

[0051] By using the technical solution of the application, the Mellanox IB network card pass-through on the cloud platform can be realized, and the cloud platform can be provided with stronger computing capability.

[0052] In a preferred embodiment of the present application, the mirror images are eswitchd mirror images and neutron-mlnx-agent mirror images.

[0053] In a preferred embodiment of the present application, as shown in Figure 2 the eswitchd mirror image and the neutron-mlnx-agent mirror image are constructed and pushed into the image repository of the cloud platform.

[0054] centos8.2 is selected as the container base image;

[0055] The networking-mlnx function code and the libvirt tool installation package are installed in the base image;

[0056] The eswitchd mirror image and the neutron-mlnx-agent mirror image are made using the networking-mlnx function code and the libvirt tool.

[0057] In a preferred embodiment of the present application, the switch for starting Mellanox IB card pass-through is added in the global control file of the cloud platform, and the mirror image service is started on the compute node.

[0058] The switch for starting Mellanox IB card pass-through is added in the global control file of the cloud platform;

[0059] The eswitchd service and the neutron-mlnx-agent service are started on the compute node with the Mellanox IB card through the inventory configuration file.

[0060] In a preferred embodiment of the present application, the driver of the Mellanox IB card is installed in the compute node, and the corresponding function is enabled in the compute node.

[0061] In response to the cloud platform enabling the Mellanox IB card pass-through service, the mlnxofedinstall driver of the Mellanox IB card is installed on the compute node with the Mellanox IB card.

[0062] The grub configuration file in the operating system is modified to enable iommu;

[0063] The sriov function of the Mellanox card is enabled, the installed driver is started, and the number of vfs is parsed.

[0064] In a preferred embodiment of the present application, the eswitchd pod service and the mlnx pod service are started in the cloud platform to realize the Mellanox IB card pass-through.

[0065] Map eswitchd configmap and mlnx configmap to configmap;

[0066] Mount eswitchd configmap to start eswitchd pod service;

[0067] In response to eswitchd pod service normal, mount mlnx configmap to start mlnx pod service.

[0068] In a preferred embodiment of the present application, further comprising:

[0069] Obtain PCIE information of the Mellanox IB network card;

[0070] Configure the compute node to release the Mellanox IB network card according to the PCIE information. The Mellanox IB network card information can be obtained only after the Mellanox IB network card is released. Configuration is required when releasing, and the PCIE information of the Mellanox IB network card is required in the configuration information.

[0071] By using the technical solution of the present application, the Mellanox IB network card can be directly passed through on the cloud platform, and the cloud platform can be provided with stronger computing power.

[0072] It should be noted that those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct related hardware to complete. The above-mentioned program can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiments. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effect as the corresponding any method embodiments.

[0073] In addition, the method disclosed in the embodiments of the present application can also be implemented as a computer program executed by a CPU, which can be stored in a computer readable storage medium. When the computer program is executed by the CPU, the above-mentioned functions defined in the method disclosed in the embodiments of the present application are executed.

[0074] Based on the above-mentioned purpose, a second aspect of the embodiments of the present application proposes a device for passing through a Mellanox IB network card, as shown in Figure 3 The device 200 comprises:

[0075] A building module configured to build an image dependent on the Mellanox IB network card, and push the image to the image repository of the cloud platform for storage;

[0076] The starting module is configured to add a switch for starting the Mellanox IB card pass-through in a global control file of the cloud platform, and start an image service on the computing node;

[0077] The installation module is configured to install a driver of the Mellanox IB card into the computing node, and start a corresponding function in the computing node;

[0078] The execution module is configured to start eswitchd pod service and mlnx pod service in the cloud platform to realize the Mellanox IB card pass-through.

[0079] In a preferred embodiment of the present application, the image is an eswitchd image and a neutron-mlnx-agent image.

[0080] In a preferred embodiment of the present application, the construction module is further configured to:

[0081] Centos8.2 is selected as a container base image;

[0082] The networking-mlnx function code and the libvirt tool installation package are installed in the base image;

[0083] The eswitchd image and the neutron-mlnx-agent image are made by using the networking-mlnx function code and the libvirt tool.

[0084] In a preferred embodiment of the present application, the starting module is further configured to:

[0085] A switch for starting the Mellanox IB card pass-through is added in a global control file of the cloud platform;

[0086] The eswitchd service and the neutron-mlnx-agent service are started on the computing node with the Mellanox IB card by using an inventory configuration file.

[0087] In a preferred embodiment of the present application, the installation module is further configured to:

[0088] In response to the cloud platform starting the Mellanox IB card pass-through service, the mlnxofedinstall driver of the Mellanox IB card is installed on the computing node with the Mellanox IB card;

[0089] The grub configuration file in the operating system is modified to start the iommu;

[0090] The sriov function of the Mellanox card is started, the installed driver is started, and the number of vfs is parsed.

[0091] In a preferred embodiment of the present application, the execution module is further configured to:

[0092] Map the eswitchd configuration file and the mlnx configuration file into a configmap;

[0093] Mount the eswitchd configmap to start the eswitchd pod service;

[0094] In response to the eswitchd pod service being normal, mount the mlnx configmap to start the mlnx pod service.

[0095] In a preferred embodiment of the present application, it further comprises an acquisition module configured to:

[0096] Acquire the PCIE information of the Mellanox IB network card;

[0097] Configure the Mellanox IB network card to be released by the computing node according to the PCIE information.

[0098] By using the technical solution of the present application, the Mellanox IB network card can be directly passed through on the cloud platform, and the cloud platform can be provided with stronger computing power.

[0099] Based on the above purpose, a third aspect of the embodiments of the present application provides a computer device. Figure 4 The embodiment of the computer device provided by the present application is shown in the schematic diagram. As shown in the figure, Figure 4 The embodiment of the present application comprises the following devices: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions being executed by the processor to implement the following method:

[0100] Build an image dependent on the Mellanox IB network card, and push the image to the image repository of the cloud platform for storage;

[0101] Add a switch to start the Mellanox IB network card direct pass-through in the global control file of the cloud platform, and start the image service on the computing node;

[0102] Install the driver of the Mellanox IB network card into the computing node, and enable the corresponding function in the computing node;

[0103] Start the eswitchd pod service and the mlnx pod service in the cloud platform to realize the Mellanox IB network card direct pass-through.

[0104] In a preferred embodiment of the present application, the image is an eswitchd image and a neutron-mlnx-agent image.

[0105] In a preferred embodiment of the present application, the image dependent on the Mellanox IB network card is constructed and pushed into the image warehouse of the cloud platform for storage, including:

[0106] Centos8.2 is selected as the container base image;

[0107] The networking-mlnx function code and the libvirt tool installation package are installed in the base image;

[0108] The eswitchd image and the neutron-mlnx-agent image are made using the networking-mlnx function code and the libvirt tool.

[0109] In a preferred embodiment of the present application, the switch for starting the Mellanox IB network card pass-through is added in the global control file of the cloud platform, and the image service is started on the computing node, including:

[0110] A switch for starting the Mellanox IB network card pass-through is added in the global control file of the cloud platform;

[0111] The eswitchd service and the neutron-mlnx-agent service are started on the computing node with the Mellanox IB network card through the inventory configuration file.

[0112] In a preferred embodiment of the present application, the driver of the Mellanox IB network card is installed into the computing node, and the corresponding function is started in the computing node, including:

[0113] In response to the cloud platform starting the Mellanox IB network card pass-through service, the mlnxofedinstall driver of the Mellanox IB network card is installed on the computing node with the Mellanox IB network card;

[0114] The grub configuration file in the operating system is modified to start the iommu;

[0115] The sriov function of the Mellanox network card is started, the installed driver is started, and the number of vfs is parsed.

[0116] In a preferred embodiment of the present application, the eswitchd pod service and the mlnx pod service are started in the cloud platform to realize the Mellanox IB network card pass-through, including:

[0117] The eswitchd configuration file and the mlnx configuration file are mapped as configmap;

[0118] Mount the eswitchd configmap to start the eswitchd pod service;

[0119] In response to the eswitchd pod service being normal, mount the mlnx configmap to start the mlnx pod service.

[0120] In a preferred embodiment of the present application, further comprising:

[0121] Obtain the PCIE information of the Mellanox IB network card;

[0122] Configure the Mellanox IB network card to be released by the computing node according to the PCIE information.

[0123] By using the technical solution of the present application, the Mellanox IB network card can be directly passed through on the cloud platform, and the cloud platform can be provided with stronger computing capability.

[0124] Based on the above purpose, a fourth aspect of the embodiments of the present application proposes a computer readable storage medium. Figure 5 The computer readable storage medium provided by the present application is shown in the schematic diagram of the embodiment of the computer readable storage medium. Figure 5 As shown, the computer readable storage medium 31 stores a computer program 32 which performs the following method when executed by a processor:

[0125] Build an image dependent on the Mellanox IB network card, and push the image to the image repository of the cloud platform for storage;

[0126] Add a switch for starting the Mellanox IB network card direct pass-through in the global control file of the cloud platform, and start the image service on the computing node;

[0127] Install the driver of the Mellanox IB network card into the computing node, and enable the corresponding function in the computing node;

[0128] Start the eswitchd pod service and the mlnx pod service in the cloud platform to realize the Mellanox IB network card direct pass-through.

[0129] In a preferred embodiment of the present application, the image is an eswitchd image and a neutron-mlnx-agent image.

[0130] In a preferred embodiment of the present application, building the image dependent on the Mellanox IB network card, and pushing the image to the image repository of the cloud platform for storage comprises:

[0131] Select centos8.2 as the container base image;

[0132] Install the networking-mlnx function code and the libvirt tool installation package in the base image;

[0133] Use the networking-mlnx function code and the libvirt tool to make eswitchd images and neutron-mlnx-agent images.

[0134] In a preferred embodiment of the present application, a switch for starting the Mellanox IB card pass-through is added in the global control file of the cloud platform, and the image service is started on the computing node, including:

[0135] A switch for starting the Mellanox IB card pass-through is added in the global control file of the cloud platform;

[0136] The eswitchd service and the neutron-mlnx-agent service are specified to be started on the computing node with the Mellanox IB card through the inventory configuration file.

[0137] In a preferred embodiment of the present application, the driver of the Mellanox IB card is installed into the computing node, and the corresponding function is enabled in the computing node, including:

[0138] In response to the cloud platform enabling the Mellanox IB card pass-through service, the mlnxofedinstall driver of the Mellanox IB card is installed on the computing node with the Mellanox IB card;

[0139] The grub configuration file in the operating system is modified to enable the iommu;

[0140] The sriov function of the Mellanox card is enabled, the installed driver is started, and the number of vfs is parsed.

[0141] In a preferred embodiment of the present application, the eswitchd pod service and the mlnx pod service are started in the cloud platform to realize the Mellanox IB card pass-through, including:

[0142] The eswitchd configuration file and the mlnx configuration file are mapped as configmap;

[0143] The eswitchd configmap is mounted to start the eswitchd pod service;

[0144] In response to the eswitchd pod service being normal, the mlnx configmap is mounted to start the mlnx pod service.

[0145] In a preferred embodiment of the present application, it further includes:

[0146] Obtain PCIE information of the Mellanox IB network card;

[0147] Configure the computing node to release the Mellanox IB network card according to the PCIE information.

[0148] By using the technical solution of the present application, the Mellanox IB network card can be directly connected to the cloud platform, and the cloud platform can be provided with stronger computing capability.

[0149] In addition, the method disclosed by the embodiment of the present application can also be implemented as a computer program executed by a processor, which can be stored in a computer readable storage medium. When the computer program is executed by the processor, the above-mentioned functions defined in the method disclosed by the embodiment of the present application are executed.

[0150] In addition, the above-mentioned method steps and system units can also be implemented by using a controller and a computer readable storage medium for storing a computer program for enabling the controller to realize the above-mentioned steps or unit functions.

[0151] Those skilled in the art will also appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein can be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the functions described in various ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments disclosed herein.

[0152] In one or more exemplary designs, the functions described can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code means in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or other wire-based, fiber-based, or wireless technologies, then the coaxial cable, fiber optic cable, twisted pair, DSL, or other wire-based, fiber-based, or wireless technologies are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0153] The foregoing is a summary of the example embodiments disclosed herein, but it should be noted that various changes and modifications can be made without departing from the scope of the embodiments disclosed by the claims. The functions, steps and / or actions of the method claims described herein need not be performed in any particular order. Furthermore, although elements of the embodiments disclosed herein can be described or claimed in individual form, other embodiments can also include a plurality of those elements in combination.

[0154] It should be understood that, as used herein, "a" or "an" can mean one or more things unless context clearly indicates otherwise. It should also be understood that "and / or" as used herein means any and all possible combinations of one or more of the associated listed items.

[0155] The above example embodiment numbers are merely for description, and do not represent the advantages or disadvantages of the embodiments.

[0156] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0157] Those skilled in the art shall understand that the above discussion of any embodiment is only exemplary, and is not intended to imply that the scope (including claims) of the embodiments of the present application is limited to these examples; the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes of different aspects of the embodiments of the present application as above. In order to be brief, they are not provided in details. Therefore, any omission, modification, equivalent replacement, improvement, etc. made in the spirit and principle of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.

Claims

1. A method for passing through Intel IB NIC, characterized in that, The method comprises the following steps: An image dependent on the Mellanox IB network card is constructed, and the image is pushed into an image warehouse of a cloud platform for storage, wherein the image is an eswitchd image and a neutron-mlnx-agent image; A switch for starting the Mellanox IB network card is added in a global control file of the cloud platform, and an image service is started on a computing node; A driver of the Mellanox IB network card is installed into the computing node, and a corresponding function is started in the computing node; The eswitchd pod service and the mlnx pod service are started in the cloud platform to realize the Mellanox IB network card; The eswitchd config file and the mlnx config file are mapped as configmap, the eswitchd configmap is mounted to start the eswitchd pod service, and the mlnx configmap is mounted to start the mlnx pod service in response to the eswitchd pod service being normal.

2. The method of claim 1, wherein, The method of constructing the image dependent on the Mellanox IB network card and pushing the image into the image warehouse of the cloud platform for storage comprises: Centos8.2 is selected as a container base image; The networking-mlnx function code and a libvirt tool installation package are installed in the base image; The eswitchd image and the neutron-mlnx-agent image are made by using the networking-mlnx function code and the libvirt tool.

3. The method of claim 2, wherein, The method of adding the switch for starting the Mellanox IB network card in the global control file of the cloud platform and starting the image service on the computing node comprises: A switch for starting the Mellanox IB network card is added in the global control file of the cloud platform; The eswitchd service and the neutron-mlnx-agent service are started on the computing node on which the Mellanox IB network card is installed by using an inventory configuration file.

4. The method of claim 1, wherein, The method of installing the driver of the Mellanox IB network card into the computing node and starting the corresponding function in the computing node comprises: In response to the cloud platform starting the Mellanox IB network card service, the mlnxofedinstall driver of the Mellanox IB network card is installed on the computing node on which the Mellanox IB network card is installed; The grub configuration file in the operating system is modified to start the iommu; The sriov function of the Mellanox network card is started, the installed driver is started, and the number of vfs is parsed.

5. The method of claim 1, wherein, The method further comprises: PCIE information of the Mellanox IB network card is acquired; The computing node is configured to release the Mellanox IB network card according to the PCIE information.

6. A device for direct pass-through of a Mellanox IB network card, characterized in that, The device comprises: a construction module configured to construct an image dependent on the Mellanox IB network card and push the image into an image warehouse of a cloud platform for storage, wherein the image is an eswitchd image and a neutron-mlnx-agent image; The startup module is configured to add a switch to enable pass-through of the Mylanox IB network card in the global control file of the cloud platform and to start the image service on the compute node. The installation module is configured to install the driver for the Mellanox IB network card into the compute node and enable the corresponding function in the compute node. The execution module is configured to start the eswitchd pod service and the mlnx pod service in the cloud platform to achieve pass-through of the Mylanix IB network interface card; The installation module is further configured to map the eswitchd configuration file and the mlnx configuration file to a configmap; mount the eswitchd configmap to start the eswitchd pod service; and, in response to the eswitchd pod service being normal, mount the mlnx configmap to start the mlnx pod service.

7. A computer device, comprising: include: At least one processor; as well as A memory storing computer instructions executable on the processor, which, when executed by the processor, implement the steps of the method according to any one of claims 1-5.

8. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 7. When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Vpp service containerized deployment method, device, terminal and storage medium

    CN112463168A

  • Method and equipment for configuring network card of cloud host

    CN112671561A