[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN116737626B - HCA card control method, system, device, storage medium and electronic device - Google Patents

HCA card control method, system, device, storage medium and electronic device Download PDF

Info

Publication number
CN116737626B
CN116737626B CN202311030380.9A CN202311030380A CN116737626B CN 116737626 B CN116737626 B CN 116737626B CN 202311030380 A CN202311030380 A CN 202311030380A CN 116737626 B CN116737626 B CN 116737626B
Authority
CN
China
Prior art keywords
target
software environment
configuration information
pld
hca card
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311030380.9A
Other languages
Chinese (zh)
Other versions
CN116737626A (en
Inventor
桑学华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202311030380.9A priority Critical patent/CN116737626B/en
Publication of CN116737626A publication Critical patent/CN116737626A/en
Application granted granted Critical
Publication of CN116737626B publication Critical patent/CN116737626B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/387Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1694Configuration of memory controller to different memory types
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4022Coupling between buses using switching circuits, e.g. switching matrix, connection or expansion network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/38Universal adapter
    • G06F2213/3808Network interface controller

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides an HCA card control method, a system, a device, a storage medium and an electronic device, wherein the method comprises the following steps: under the condition that the HCA card is connected with the host, acquiring a current software environment identifier of the host, wherein the current software environment identifier is used for identifying a processor and an operating system in the host; determining target configuration information matched with the current software environment identifier based on a group of software environment configuration information pre-stored in a target memory, wherein the HCA card is provided with the target memory, and the target configuration information is used for representing a target instruction set of an adaptation processor and an operating system; the target instruction set represented by the target configuration information is configured in the PLD such that instructions in the target instruction set are allowed to execute in the HCA card. The embodiment of the application solves the technical problem of poor environmental compatibility of the HCA card in the related technology.

Description

HCA card control method, system, device, storage medium and electronic device
Technical Field
The embodiment of the application relates to the technical field of servers, in particular to an HCA card control method, an HCA card control system, an HCA card control device, a HCA card storage medium and an HCA card electronic device.
Background
The HCA card (Host Channel Adapter) is an adapter for connecting a host computer to a high-speed network. The HCA card can provide high-bandwidth and low-delay data transmission service, and is suitable for scenes such as high-performance computing, cloud computing, big data and the like. However, the existing HCA cards have a problem of poor environmental compatibility, that is, HCA cards have a high dependency on software environments (such as an operating system, a driver, an application program, etc.), and different software environments may cause performance and stability of the HCA card to be degraded. For example, some operating systems may not support certain functions or parameters of the HCA card, some drivers may be defective or incompatible, some applications may not be able to properly invoke interfaces or resources of the HCA card, etc. These problems can affect the proper operation of the HCA card and even lead to failures such as data loss, transmission errors, system crashes, etc. The HCA card in the related art needs to rely on some specific software environments to play its role, which requires the HPC system to cooperate with the specific software environments, which may affect the universality of some storage devices, and it is seen that the HCA card in the related art has a problem of poor environmental compatibility.
Aiming at the technical problem of poor environmental compatibility of the HCA card in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the application provides an HCA card control method, an HCA card control system, an HCA card control device, a storage medium and an electronic device, which are used for at least solving the technical problem of poor environment compatibility of the HCA card in the related technology.
According to an embodiment of the present application, there is provided an HCA card control method including: under the condition that a host channel adapter HCA card is connected with a host, acquiring a current software environment identifier of the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host; determining target configuration information matched with the current software environment identifier based on a group of software environment configuration information pre-stored in a target memory, wherein each piece of software environment configuration information included in the group of software environment configuration information comprises a software environment identifier and configuration information matched with the software environment identifier, the HCA card is provided with the target memory, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system; the target instruction set represented by the target configuration information is configured in a programmable logic device PLD such that instructions in the target instruction set are allowed to be executed in the HCA card on which the PLD is provided.
In one exemplary embodiment, after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, the method further comprises: the target instruction is executed in the HCA card when a target instruction sent by the host to the HCA card is received and the target instruction is an instruction in the target instruction set.
In one exemplary embodiment, executing the target instructions in the HCA card includes: and running a target circuit corresponding to the target instruction in the PLD in the HCA card, wherein the target circuit is used for realizing instruction execution logic of the target instruction.
In one exemplary embodiment, executing the target instructions in the HCA card includes: executing, by a controller in the HCA card, data forwarding logic of the target instruction recorded in the PLD under the condition that the target instruction is used to represent forwarding of data of the target service sent by the host, where the data forwarding logic is used to package routing information of the data of the target service, and send a data packet obtained by the packaging to a packaged target routing address; or under the condition that the target instruction is used for representing and verifying the data of the target service sent by the host, executing the data verification logic of the target instruction recorded in the PLD by a controller in the HCA card, wherein the data verification logic is used for verifying the data of the target service.
In one exemplary embodiment, configuring the target instruction set represented by the target configuration information in a programmable logic device PLD includes: for an ith instruction in the target instruction set, creating a corresponding ith circuit in the PLD, wherein the ith circuit is configured to implement instruction execution logic of the ith instruction, where i is a positive integer greater than or equal to 1.
In an exemplary embodiment, the determining, based on a set of software environment configuration information stored in advance in a target memory, target configuration information matching the current software environment identifier includes: searching whether target software environment configuration information matched with the current software environment identifier exists in the group of software environment configuration information stored in the target memory, and obtaining a searching result; and under the condition that the search result indicates that the target software environment configuration information exists in the set of software environment configuration information, determining the configuration information contained in the target software environment configuration information as the target configuration information, wherein the target software environment configuration information comprises the software environment identifier identical to the current software environment identifier.
In an exemplary embodiment, the method further comprises: and under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, determining preset configuration information as the target configuration information, wherein the preset configuration information is used for indicating the PLD to be configured according to preset parameters.
In an exemplary embodiment, the method further comprises: and adding first configuration information in the target memory under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, wherein the first configuration information comprises the current software environment identifier and preset configuration information matched with the previous software environment identifier.
In an exemplary embodiment, said searching for whether there is target software environment configuration information matching the current software environment identifier in the set of software environment configuration information stored in the target memory, to obtain a search result includes: comparing the current software environment identifier with a group of software environment identifiers in sequence to obtain a comparison result, wherein the comparison result is used for indicating whether the group of software environment identifiers comprise the same software environment identifier as the current software environment identifier or not, and the group of software environment configuration information comprises the group of software environment identifiers; and determining the search result based on the comparison result.
In an exemplary embodiment, the determining the search result based on the comparison result includes: determining that the target software environment configuration information exists in the set of software environment configuration information under the condition that the comparison result indicates that the set of software environment identifiers comprise the same software environment identifier as the current software environment identifier; and under the condition that the comparison result indicates that the set of software environment identifiers does not comprise the same software environment identifier as the current software environment identifier, determining that the search result is that the target software environment configuration information does not exist in the set of software environment configuration information.
In an exemplary embodiment, said configuring said target instruction set represented by said target configuration information in a programmable logic device PLD comprises: and configuring the target instruction set in a target reconfiguration logic unit and a target configuration logic unit, wherein the PLD comprises the target reconfiguration logic unit and the target configuration logic unit.
In one exemplary embodiment, the configuring the target instruction set in the target reconfiguration logic unit and the target configuration logic unit includes: the target reconfiguration logic unit is configured based on a target hardware parameter, and the target reconfiguration logic unit is configured based on a target software parameter, wherein the target configuration information comprises the target hardware parameter and the target software parameter, the target hardware parameter is used for configuring the hardware function of the HCA card, and the target software parameter is used for configuring the software function of the HCA card.
In one exemplary embodiment, the target reconstruction logic unit includes a set of reconstruction logic gates, where the set of reconstruction logic gates is used to reconstruct the PLD; the target configuration logic unit comprises a set of configuration logic gates, wherein the set of configuration logic gates is used for performing configuration logic configuration on the PLD.
In an exemplary embodiment, before determining the target configuration information matching the current software environment identification based on a set of software environment configuration information pre-stored in the target memory, the method further comprises: configuring the set of software environment configuration information; storing the set of software environment configuration information into the target memory.
In an exemplary embodiment, the obtaining the current software environment identifier of the host includes: and acquiring the current software environment identifier through a high-speed serial computer expansion bus standard PCIE interface.
In one exemplary embodiment, after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, the method further comprises: and controlling data transmission between the HCA card and the software environment indicated by the current software environment identifier through the PLD.
There is also provided, in accordance with another embodiment of the present application, an HCA card control system including: the programmable logic device PLD is arranged on the HCA card of the host channel adapter; a controller in communication with the PLD, the controller configured to: acquiring a current software environment identifier of a host under the condition that the HCA card is connected with the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host; determining target configuration information matched with the current software environment identifier based on a group of software environment configuration information pre-stored in a target memory, wherein each piece of software environment configuration information included in the group of software environment configuration information comprises a software environment identifier and configuration information matched with the software environment identifier, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system; configuring the target instruction set represented by the target configuration information in the PLD such that instructions in the target instruction set are allowed to execute in the HCA card; the target memory is communicatively coupled to the controller, the target memory configured to store the set of software environment configuration information.
In one exemplary embodiment, the PLD includes a target reconfiguration logic unit and a target configuration logic unit.
In one exemplary embodiment, the target reconstruction logic unit includes a set of reconstruction logic gates, where the set of reconstruction logic gates is used to reconstruct the PLD; the target configuration logic unit comprises a set of configuration logic gates, wherein the set of configuration logic gates is used for performing configuration logic configuration on the PLD.
In an exemplary embodiment, the target configuration information includes a target hardware parameter and a target software parameter, where the target hardware parameter is used to instruct to configure the target reconfiguration logic unit, and the target software parameter is used to instruct to configure the target reconfiguration logic unit.
In an exemplary embodiment, a PCIE interface of a high-speed serial computer expansion bus standard is provided in the controller, where the controller obtains the current software environment identifier through the PCIE interface.
There is also provided, in accordance with yet another embodiment of the present application, an HCA card control device including: the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a current software environment identifier of a host under the condition that a host channel adapter HCA card is connected with the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host; the HCA card is provided with a target memory, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system; and the processing module is used for configuring the target instruction set represented by the target configuration information in a Programmable Logic Device (PLD) so that the instructions in the target instruction set are allowed to be executed in the HCA card, wherein the PLD is arranged on the HCA card.
According to a further embodiment of the application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the embodiment of the application, under the condition that the HCA card is connected with the host, the current software environment identifier of the host is obtained, wherein the current software environment identifier is used for identifying the processor in the host and the operating system in the host; determining target configuration information matched with the current software environment identifier based on a set of software environment configuration information stored in the target storage, wherein each piece of software environment configuration information included in the set of software environment configuration information comprises the software environment identifier and the configuration information matched with the software environment identifier, and a target memory is arranged on the HCA card, and the target configuration information is used for representing a target instruction set of an adaptation processor and an operating system; and then, configuring a target instruction set represented by the target configuration information in the PLD so that instructions in the target instruction set are allowed to be executed in the HCA card, thereby realizing data transmission between the HCA card and a host identified by the current software environment identifier under the control of the PLD after configuration based on the target configuration information. The aim of controlling the data transmission between the HCA card and the host is realized by determining the target configuration information matched with the current software environment identifier and configuring the target instruction set represented by the target configuration information in the PLD, so that the problem that the HCA card in the related technology can work normally only by depending on or matching with a specific software environment is avoided. Therefore, the technical problem of poor environmental compatibility of the HCA card in the related technology can be solved, and the effect of improving the environmental compatibility of the HCA card is achieved.
Drawings
FIG. 1 is a schematic diagram of a hardware environment of a server of an HCA card control method in accordance with an embodiment of the application;
FIG. 2 is a flow chart of an HCA card control method in accordance with an embodiment of the application;
FIG. 3 is an architecture diagram of an HCA card control system in accordance with an embodiment of the application;
FIG. 4 is a flow chart of a method of improving HCA snap ring environmental compatibility in accordance with an embodiment of the application;
FIG. 5 is a schematic diagram of an apparatus for improving HCA snap ring environmental compatibility in accordance with an embodiment of the application;
FIG. 6 is a schematic diagram of a PLD architecture according to an embodiment of the application;
fig. 7 is a block diagram of an HCA card control device in accordance with an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided by the embodiments of the present application may be performed in a server, a computer terminal, a device terminal, or similar computing apparatus. Taking the example of running on a server, fig. 1 is a schematic diagram of the hardware environment of the server according to the HCA card control method of the embodiment of the present application. As shown in fig. 1, the server may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and in one exemplary embodiment, the server may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative, and is not intended to limit the structure of the server described above. For example, a server may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the HCA card control method in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to a server via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a server. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
In this embodiment, an HCA card control method is provided, and fig. 2 is a flowchart of an HCA card control method according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S202, under the condition that a host channel adapter HCA card is connected with a host, acquiring a current software environment identifier of the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host;
step S204, determining target configuration information matched with the current software environment identifier based on a set of software environment configuration information pre-stored in a target memory, wherein each piece of software environment configuration information included in the set of software environment configuration information comprises a software environment identifier and configuration information matched with the software environment identifier, the HCA card is provided with the target memory, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system;
Step S206, configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, so that the instructions in the target instruction set are allowed to be executed in the HCA card, where the PLD is provided on the HCA card.
Through the steps, under the condition that the HCA card is connected with the host, the current software environment identifier of the host is obtained, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host; determining target configuration information matched with the current software environment identifier based on a set of software environment configuration information stored in the target storage, wherein each piece of software environment configuration information included in the set of software environment configuration information comprises the software environment identifier and the configuration information matched with the software environment identifier, and a target memory is arranged on the HCA card, and the target configuration information is used for representing a target instruction set of an adaptation processor and an operating system; and then, configuring a target instruction set represented by the target configuration information in the PLD so that instructions in the target instruction set are allowed to be executed in the HCA card, thereby realizing data transmission between the HCA card and a host identified by the current software environment identifier under the control of the PLD after configuration based on the target configuration information. The aim of controlling the data transmission between the HCA card and the host is realized by determining the target configuration information matched with the current software environment identifier and configuring the target instruction set represented by the target configuration information in the PLD, so that the problem that the HCA card in the related technology can work normally only by depending on or matching with a specific software environment is avoided. Therefore, the technical problem of poor environmental compatibility of the HCA card in the related technology can be solved, and the effect of improving the environmental compatibility of the HCA card is achieved.
The main execution body of the steps may be a controller, the HCA card, or an HCA card integrated with the controller, or a processor with man-machine interaction capability configured on a storage device, or a processing device or a processing unit with similar processing capability, but is not limited thereto.
In the technical solution provided in step S202, when the HCA card is connected to the host computer, the current software environment identifier of the host computer may be obtained, for example, the current software environment identifier may be obtained through a PCIE (Peripheral Component Interconnect Express ) interface, which is a high-speed serial computer expansion bus standard; the current software environment identification is used to identify the current software environment of the host, e.g., the current software environment identification may be used to identify the processor and operating system of the host. In this step, the current software environment identification of the host may be obtained.
In the technical solution provided in step S204, a set of software environment configuration information may be stored in advance, where a set of software environment configuration information may include one or more software environment configuration information, each software environment configuration information includes a software environment identifier and configuration information matched with the software environment identifier, the configuration information matched with the software environment identifier may include some hardware parameters and/or some software parameters, in an actual application, a set of software environment configuration information may be stored in a target memory, and the HCA card is provided with the target memory; for example, the software environment is identified as an identifier 1 (arm_centos7), the identifier 1 may be represented by other letters or character strings, the identifier 1 represents that the corresponding processor architecture is an aarch64 architecture, the corresponding operating system or software is a Centos v7.1, and the identifier 1 and the corresponding configuration information (hardware parameter is an aarch64 architecture, and software parameter is a Centos v 7.1) may be stored in advance as one software environment configuration information; also, a plurality of software environment configuration information can be configured in advance, and each software environment configuration information comprises a corresponding software environment identifier and configuration information; thus, when the current software environment identifier of the host is obtained in the step S202, the target configuration information matched with the current software environment identifier may be determined according to a set of pre-stored software environment configuration information, where the target configuration information may be used to represent a target instruction set for adapting to the processor and the operating system in the host. Through this step, the purpose of the target configuration information matched with the current software environment identifier can be determined from a set of software environment configuration information.
In the technical solution provided in step S206, the target instruction set indicated by the target configuration information may be configured in the PLD, so that the instructions in the target instruction set are allowed to be executed in the HCA card, thereby realizing the purpose that the processor of the host directly sends the instructions to the HCA card for interaction, for example, the data forwarding logic or the data checking logic or other instruction execution logic may be configured in the PLD, and when the HCA card receives the instructions sent by the host, the purpose of data transmission between the HCA card and the host may be realized. In practical applications, the PLD includes a reconfigurable logic unit and a configurable logic unit, where the reconfigurable logic unit may be configured according to target configuration information, and the configurable logic unit may be configured. Through the step, the PLD can be configured according to the determined target configuration information, so that the purpose of normal data transmission between the HCA card and the current software environment is realized.
In the above embodiment, by acquiring the current software environment identifier and determining the target configuration information matched with the current software environment identifier, and then configuring the target instruction set represented by the target configuration information in the PLD, so that the instructions in the target instruction set are allowed to be executed in the HCA card, the purpose of data transmission between the HCA card and the host is achieved, and the problem that the HCA card in the related art needs to rely on a specific software environment or needs to cooperate with the specific software environment to work normally is avoided. Therefore, the technical problem of poor environmental compatibility of the HCA card in the related technology can be solved, and the effect of improving the environmental compatibility of the HCA card is achieved.
In an alternative embodiment, after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, the method further comprises: the target instruction is executed in the HCA card when a target instruction sent by the host to the HCA card is received and the target instruction is an instruction in the target instruction set.
In the above embodiment, after the target instruction set indicated by the target configuration information is configured in the PLD, when the HCA card receives the target instruction included in the target instruction set sent by the host, the target instruction may be executed in the HCA card, so that the driver may be omitted from being installed in the host, and the purpose that the processor of the host directly sends the instruction to the HCA card for interaction may be achieved.
In an alternative embodiment, executing the target instructions in the HCA card includes: and running a target circuit corresponding to the target instruction in the PLD in the HCA card, wherein the target circuit is used for realizing instruction execution logic of the target instruction.
In the above-described embodiments, the target circuit corresponding to the target instruction in the PLD may be executed in the HCA card, for example, the target circuit is a circuit that executes an instruction of addition or subtraction or other operations, or the target circuit is a circuit that executes logic judgment, or the like, so that the target instruction may be executed according to the configured PLD.
In an alternative embodiment, executing the target instructions in the HCA card includes: executing, by a controller in the HCA card, data forwarding logic of the target instruction recorded in the PLD under the condition that the target instruction is used to represent forwarding of data of the target service sent by the host, where the data forwarding logic is used to package routing information of the data of the target service, and send a data packet obtained by the packaging to a packaged target routing address; or under the condition that the target instruction is used for representing and verifying the data of the target service sent by the host, executing the data verification logic of the target instruction recorded in the PLD by a controller in the HCA card, wherein the data verification logic is used for verifying the data of the target service.
In the above embodiment, optionally, the target instruction set may be configured in the PLD, for example, the data forwarding logic may be configured in the PLD, so that in the case where the target instruction is to represent forwarding of the data of the target service sent by the host, the data forwarding logic of the target instruction recorded in the PLD may be executed by the controller in the HCA card, thereby implementing the forwarding instruction of the data of the target service executed in the HCA card; for example, the data verification logic is configured in the PLD such that, in the case where the target instruction is used to verify the data of the target service transmitted from the host, the data verification logic of the target instruction recorded in the PLD can be executed by the controller in the HCA card, thereby implementing the verification instruction of the data of the target service executed in the HCA card.
In an alternative embodiment, configuring the target instruction set represented by the target configuration information in a programmable logic device PLD includes: for an ith instruction in the target instruction set, creating a corresponding ith circuit in the PLD, wherein the ith circuit is configured to implement instruction execution logic of the ith instruction, where i is a positive integer greater than or equal to 1.
In the above embodiment, for any instruction included in the target instruction set, for example, for the ith instruction, a corresponding ith circuit is created in the PLD, where the ith circuit may be composed of one or more logic gates in the PLD, so as to achieve the purpose of controlling the HCA card to execute the corresponding instruction based on the configured PLD.
In an alternative embodiment, the determining the target configuration information matching the current software environment identifier based on a set of software environment configuration information stored in the target memory includes: searching whether target software environment configuration information matched with the current software environment identifier exists in the group of software environment configuration information stored in the target memory, and obtaining a searching result; and under the condition that the search result indicates that the target software environment configuration information exists in the set of software environment configuration information, determining the configuration information contained in the target software environment configuration information as the target configuration information, wherein the target software environment configuration information comprises the software environment identifier identical to the current software environment identifier.
In the above embodiment, a set of software environment configuration information may be stored in the target memory in advance, and when the current software environment identifier of the host is obtained, whether there is target software environment configuration information matching with the current software environment identifier exists or not may be searched in a set of software environment configuration information stored in the target memory, that is, whether there is software environment configuration information matching with the current software environment identifier exists or not is searched in the target memory, so as to obtain a search result; and when the target software environment configuration information exists in the set of software environment configuration information according to the searching result, determining the configuration information contained in the target software environment configuration information as target configuration information, namely, the target software environment configuration information comprises the same software environment identifier and the same target configuration information as the current software environment identifier. With this embodiment, the objective of matching the current software environment identifier may be achieved by searching for the target configuration information in the set of software environment configuration information stored in the target memory.
In an alternative embodiment, the method further comprises: and under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, determining preset configuration information as the target configuration information, wherein the preset configuration information is used for indicating the PLD to be configured according to preset parameters.
In the above embodiment, when it is determined according to the search result that the target software environment configuration information does not exist in the set of software environment configuration information, that is, when the software environment configuration information matching the current software environment identifier does not exist in the set of software environment configuration information, the preset configuration information may be determined as the target configuration information, and the preset configuration information may also be understood as default configuration information, alternatively, different preset configuration information may be set for different obtained current software environment identifiers, for example, the obtained current software environment identifier is arm_ubuntu22, and if the environment identifier does not exist in the set of software environment configuration information stored in advance, the aarch64 architecture and Ubuntu20.04 operating system may be used as default configuration information corresponding to the same; assuming that the acquired current software environment identifier is x86_fedora38, if the environment identifier does not exist in a set of pre-stored software environment configuration information, taking the x86_64 architecture and the fedora37 operating system as default configuration information corresponding to the X86_64 architecture and the fedora37 operating system; in practical application, the preset configuration information can be set according to the need, and the preset configuration information is used for indicating the configuration of the PLD according to preset parameters. According to the method and the device, when the software environment configuration information matched with the current software environment identifier cannot be found in the target memory, the PLD can be configured according to the preset configuration information.
In an alternative embodiment, the method further comprises: and adding first configuration information in the target memory under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, wherein the first configuration information comprises the current software environment identifier and preset configuration information matched with the previous software environment identifier.
In the above embodiment, when it is determined that the target software environment configuration information does not exist in the set of software environment configuration information according to the search result, that is, when the software environment configuration information matching the current software environment identifier does not exist in the set of software environment configuration information, the acquired current software environment identifier may be added to the target memory, and optionally, the current software environment identifier and the preset configuration information may be stored in the target memory as one configuration information (similar to one software environment configuration information in the set of software environment configuration information). In this way, more configuration information aiming at different software environments can be stored in the target memory, which is beneficial to further expanding the application range of the embodiment.
In an optional embodiment, the searching for whether the target software environment configuration information matched with the current software environment identifier exists in the set of software environment configuration information stored in the target memory, to obtain a searching result includes: comparing the current software environment identifier with a group of software environment identifiers in sequence to obtain a comparison result, wherein the comparison result is used for indicating whether the group of software environment identifiers comprise the same software environment identifier as the current software environment identifier or not, and the group of software environment configuration information comprises the group of software environment identifiers; and determining the search result based on the comparison result.
In the above embodiment, the obtained current software environment identifier may be sequentially compared with a set of software environment identifiers, where a set of software environment configuration information may include a plurality of software environment configuration information, for example, a set of software environment configuration information includes N pieces of software environment configuration information, where N is a positive integer greater than or equal to 1, and because each piece of software environment configuration information includes a piece of software environment identifier and matched configuration information, N pieces of software environment configuration information may be shared with N pieces of software environment identifiers and configuration information corresponding to the N pieces of software environment identifiers respectively, and therefore, the current software environment identifier may be sequentially compared with a set of software environment identifiers (e.g., N pieces) to determine whether a set of software environment identifiers has the same software environment identifier as the current software environment identifier, and the search result may be determined according to the comparison result. By the embodiment, the aim of determining whether the software environment identifier which is the same as the current software environment identifier exists in a group of software environment identifiers which are included in a group of software environment configuration information is fulfilled, and further, the aim of determining whether target software environment configuration information which is matched with the current software environment identifier exists in a group of software environment configuration information is fulfilled.
In an alternative embodiment, said determining said search result based on said comparison result comprises: determining that the target software environment configuration information exists in the set of software environment configuration information under the condition that the comparison result indicates that the set of software environment identifiers comprise the same software environment identifier as the current software environment identifier; and under the condition that the comparison result indicates that the set of software environment identifiers does not comprise the same software environment identifier as the current software environment identifier, determining that the search result is that the target software environment configuration information does not exist in the set of software environment configuration information.
In the above embodiment, when the comparison result indicates that the software environment identifier same as the current software environment identifier exists in the set of software environment identifiers, it may be determined that the search result is that the target software environment configuration information exists in the set of software environment configuration information; and when the comparison result indicates that the software environment identifier which is the same as the current software environment identifier does not exist in the set of software environment identifiers, determining that the search result is that the target software environment configuration information does not exist in the set of software environment configuration information. According to the embodiment, whether the target software environment configuration information matched with the current software environment identifier exists in the set of software environment configuration information or not can be determined according to the comparison result.
In an alternative embodiment, said configuring said target instruction set represented by said target configuration information in a programmable logic device PLD comprises: and configuring the target instruction set in a target reconfiguration logic unit and a target configuration logic unit, wherein the PLD comprises the target reconfiguration logic unit and the target configuration logic unit.
In the above embodiment, the PLD may include a target reconfiguration logic unit and a target configuration logic unit, and the target instruction set represented by the target configuration information may be configured in the target reconfiguration logic unit and the target configuration logic unit, for example, the target reconfiguration logic unit is configured with reconfiguration logic, and the target configuration logic unit is configured with configuration logic, so as to achieve the purpose of normal data transmission between the HCA card and the host identified by the current software environment identifier.
In an alternative embodiment, the configuring the target instruction set in the target reconfiguration logic unit and the target configuration logic unit includes: the target reconfiguration logic unit is configured based on a target hardware parameter, and the target reconfiguration logic unit is configured based on a target software parameter, wherein the target configuration information comprises the target hardware parameter and the target software parameter, the target hardware parameter is used for configuring the hardware function of the HCA card, and the target software parameter is used for configuring the software function of the HCA card.
In the above embodiment, the target configuration information may include a target hardware parameter and a target software parameter, and the target reconfiguration logic unit in the PLD is configured based on the target hardware parameter, and the target configuration logic unit in the PLD is configured based on the target software parameter, so as to implement the hardware function of the HCA card and implement the software function of the HCA card.
In an alternative embodiment, the target reconfiguration logic unit includes a set of reconfiguration logic gates, where the set of reconfiguration logic gates is used to configure the PLD with reconfiguration logic; the target configuration logic unit comprises a set of configuration logic gates, wherein the set of configuration logic gates is used for performing configuration logic configuration on the PLD.
In the above embodiment, the target reconfiguration logic unit may include a set of reconfiguration logic gates, based on which reconfiguration logic configuration of the PLD may be achieved, and the target configuration logic unit may include a set of configuration logic gates, based on which configuration logic configuration of the PLD may be achieved.
In an alternative embodiment, before determining the target configuration information matching the current software environment identification based on a set of software environment configuration information pre-stored in the target memory, the method further comprises: configuring the set of software environment configuration information; storing the set of software environment configuration information into the target memory.
In the above embodiment, a set of software environment configuration information may be preconfigured, for example, a set of software environment configuration information includes a plurality of software environment configuration information, where each software environment configuration information includes one or one software environment identifier and configuration information matched with the software environment identifier, and the configuration information may include one piece of information or a plurality of pieces of information or a set of information, for example, the configuration information may include specific hardware parameters and/or software parameters; and stores a set of software environment configuration information in a target memory, which may be provided in the HCA card in practical applications.
In an alternative embodiment, the obtaining the current software environment identifier of the host includes: and acquiring the current software environment identifier through a high-speed serial computer expansion bus standard PCIE interface.
In the above embodiment, the current software environment identifier of the host may be obtained through a PCIE (Peripheral Component Interconnect Express ) interface, which is a high-speed serial computer expansion bus standard.
In an alternative embodiment, after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, the method further comprises: and controlling data transmission between the HCA card and the software environment indicated by the current software environment identifier through the PLD.
In the above embodiment, after the target instruction set represented by the target configuration information is configured in the PLD, data transmission between the HCA card and the host identified by the current software environment identifier of the host may be controlled by the PLD, that is, the HCA card may be compatible with the current software environment, where the current software environment identifier may be used to identify the processor and the operating system of the host. The problem that the HCA card in the related art needs to rely on a specific software environment or needs to cooperate with the specific software environment to work normally is avoided, for example, some operating systems in the related art may not support certain functions or parameters of the HCA card, some drivers may have defects or incompatibility, some application programs may not call interfaces or resources of the HCA card correctly, and the like.
Also provided in this embodiment is an HCA card control system, fig. 3 is a schematic diagram of an HCA card control system according to an embodiment of the present application, and as shown in fig. 3, the HCA card control system includes:
programmable logic device PLD 302, disposed on host channel adapter HCA card (not shown in FIG. 3);
A controller 304 in communication with the PLD 302, the controller 304 configured to:
acquiring a current software environment identifier of a host under the condition that the HCA card is connected with the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host; determining target configuration information matched with the current software environment identifier based on a set of software environment configuration information stored in a target memory 306 in advance, wherein each piece of software environment configuration information included in the set of software environment configuration information comprises a software environment identifier and configuration information matched with the software environment identifier, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system; configuring the target instruction set represented by the target configuration information in the PLD such that instructions in the target instruction set are allowed to execute in the HCA card;
the target memory 306 is communicatively coupled to the controller 304, the target memory 306 being configured to store the set of software environment configuration information.
With the above embodiment, in the case where the HCA card is connected to the host, the controller 304 may obtain the current software environment identifier of the host, where the current software environment identifier is used to identify the processor in the host and the operating system in the host; determining target configuration information matched with the current software environment identifier based on a group of software environment configuration information pre-stored in a target memory, wherein each piece of software environment configuration information included in the group of software environment configuration information comprises the software environment identifier and the configuration information matched with the software environment identifier, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system; and the target instruction set represented by the target configuration information is configured in the PLD 302 arranged on the HCA card, so that the instructions in the target instruction set are allowed to be executed in the HCA card, and the PLD 302 after being configured based on the target configuration information controls the data transmission between the HCA card and the host identified by the current software environment identifier. Namely, by determining the target configuration information matched with the current software environment identifier and configuring the target instruction set represented by the target configuration information in PLD 302, the purpose of controlling data transmission between the HCA card and the host is achieved, and the problem that the HCA card in the related art can work normally only by depending on or matching with a specific software environment is avoided. Therefore, the technical problem of poor environmental compatibility of the HCA card in the related technology can be solved, and the effect of improving the environmental compatibility of the HCA card is achieved.
In fig. 3, the controller 304 may obtain the current software environment identifier of the host, for example, the current software environment identifier may be obtained through a PCIE (Peripheral Component Interconnect Express ) interface, where the PCIE interface is a high-speed serial computer expansion bus standard; the controller 304 then searches the target memory 306 for the presence of the software environment configuration information matching the current software environment identifier according to the obtained current software environment identifier, a set of software environment configuration information is stored in the target memory 306, each of the set of software environment configuration information includes the software environment identifier and the configuration information matching the software environment identifier, and when the presence of the software environment configuration information matching the current software environment identifier (e.g., may be referred to as the target software environment configuration information) in the target memory 306 is found, that is, the software environment identifier included in the target software environment configuration information is the same as the current software environment identifier, the configuration information included in the target software environment configuration information is determined to be the target configuration information, and the target configuration information is used to represent the target instruction set for adapting the processor and the operating system, and then the controller 304 may configure the PLD 302 according to the target configuration information, for example, the target instruction set represented by the target configuration information may be configured in the PLD 302, so as to achieve the purpose of controlling the data transmission between the HCA card and the host. In practical applications, PLD 302 includes reconfigurable logic units and configurable logic units, where the reconfigurable logic units can be reconfigured according to target configuration information, and the configurable logic units can be configured. Through this step, PLD 302 may be configured according to the determined target configuration information to achieve the normal data transfer between the HCA card and the host identified by the current software environment identifier.
In an alternative embodiment, PLD 302 includes target reconfiguration logic and target configuration logic.
In the above embodiment, the PLD 302 may include a target reconfiguration logic unit and a target configuration logic unit, and specifically, the controller 304 may perform reconfiguration logic configuration on the target reconfiguration logic unit according to the target configuration information, and perform configuration logic configuration on the target configuration logic unit, so as to achieve the purpose of normal data transmission between the HCA card and the current software environment.
In an alternative embodiment, the target reconstruction logic unit includes a set of reconstruction logic gates, wherein the set of reconstruction logic gates is used to reconstruct logic configuration of PLD 302; the target configuration logic unit includes a set of configuration logic gates, where the set of configuration logic gates is used to configure logic for PLD 302.
In the above embodiment, the target reconfiguration logic unit may include a set of reconfiguration logic gates, and in practical applications, the target reconfiguration logic unit may include one or more reconfigurable logic blocks, each reconfigurable logic block may include one or more reconfigurable logic components, each reconfigurable logic component may include one or more reconfigurable logic elements, and each reconfigurable logic element may include one or more reconfigurable logic gates, so that the target reconfiguration logic unit includes a set of reconfiguration logic gates, and the reconfiguration logic configuration of PLD 302 may be implemented based on the set of reconfiguration logic gates; similarly, the target configuration logic may include a set of configuration logic gates, and in practice, the target configuration logic may include one or more configurable logic blocks, each of which may include one or more configurable logic components, each of which may include one or more configurable logic elements, each of which may include one or more configurable logic gates, such that the target configuration logic includes a set of configuration logic gates based on which configuration logic configuration of PLD 302 may be achieved.
In an alternative embodiment, the target configuration information includes a target hardware parameter and a target software parameter, where the target hardware parameter is used to instruct to configure the target reconfiguration logic unit, and the target software parameter is used to instruct to configure the target configuration logic unit.
In the above embodiment, the target configuration information may include a target hardware parameter and a target software parameter, and the target reconfiguration logic unit in the PLD is configured based on the target hardware parameter, and the target configuration logic unit in the PLD is configured based on the target software parameter, so as to implement the hardware function of the HCA card and implement the software function of the HCA card.
In an optional embodiment, a PCIE interface of a high-speed serial computer expansion bus standard is provided in the controller 304, where the controller 304 obtains the current software environment identifier through the PCIE interface.
In the above embodiment, the controller 304 may obtain the current software environment identifier of the host through a PCIE (Peripheral Component Interconnect Express ) interface, which is a high-speed serial computer expansion bus standard.
It should be noted that the HCA card control system in the embodiment of the present application may be disposed on the HCA card, that is, integrated with the HCA card, or may be connected to the HCA card as a separate control unit.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the application. The present application will be specifically described with reference to examples.
FIG. 4 is a flowchart of a method for improving HCA environmental compatibility in accordance with an embodiment of the application, comprising the steps of:
1. providing a Programmable Logic Device (PLD) on the HCA card, the PLD comprising a Reconfigurable Logic Unit (RLU) and a Configurable Logic Unit (CLU);
2. providing a memory (corresponding to the target memory) on the HCA card, the memory storing a plurality of Software Environment Information (SEI), each SEI comprising a Software Environment Identifier (SEID) and a Configuration Information (CI) corresponding to the software environment, wherein the CI comprises a Hardware Parameter (HP) and a Software Parameter (SP);
as shown in table 1, configuration information corresponding to different software environment identifiers is recorded in table 1, for example, configuration information corresponding to identifier 1 (arm_centros 7) includes: the configuration information corresponding to the identifier 14 (x86_redhat 8) includes: the hardware parameter HP is x86_64 architecture, the software parameter SP is redhat v8.5, and table 1 is only an example, and in practical application, other identifiers and configuration information corresponding to the identifiers may be included.
TABLE 1
3. When the HCA card is connected to a host computer, acquiring a Current Software Environment Identifier (CSEID) through a PCIe (PCI-express) interface, and searching SEI matched with the CSEID in a memory;
4. if the matched SEI is found, configuring PLD according to CI in the SEI, wherein RLU carries out reconfiguration logic configuration according to HP, and CLU carries out configuration logic configuration according to SP;
5. if no matched SEI is found, adding a Current Software Environment Identifier (CSEID) acquired by a PCIe interface into a memory, and configuring PLD according to preset Default Configuration Information (DCI);
6. and realizing data transmission between the HCA card and the current software environment through the configured PLD. I.e. after configuration is completed, normal data transmission between the HCA card and the current software environment can be achieved.
It should be noted that, the steps 1 and 2 are not required to be executed each time, and only the steps 3 to 6 are required to be executed after the HCA card is connected with the host, that is, after the HCA card is formally used.
In the above embodiment, when the HCA card is connected to the host computer, the current software environment information is acquired through the PCIe interface, the current system type (e.g., ubuntu, redhat, centos, fedora, etc.) is confirmed, the system version (e.g., ubuntu20.04, redhat8.5, centos8.1, fedor 36) confirms the current CPU architecture (e.g., x86_64, aarch64), the architecture is performed according to the preset default information, the system type and system version are matched, the programmable logic device PLD performs the reconfiguration logic configuration according to the acquired architecture information HP, and the configuration logic configuration is performed according to the OS information SP.
FIG. 5 is a schematic diagram of an apparatus for improving HCA environmental compatibility in accordance with an embodiment of the application, the apparatus comprising: a Programmable Logic Device (PLD), a memory and a controller. The following sections are described:
(1) A Programmable Logic Device (PLD) comprising a Reconfigurable Logic Unit (RLU) and a Configurable Logic Unit (CLU) for performing logic configuration according to different Software Environment Information (SEI) to achieve data transmission between the HCA card and the current software environment;
(2) A memory storing a plurality of Software Environment Information (SEI), each SEI comprising a Software Environment Identification (SEID) and a Configuration Information (CI) corresponding to the software environment, wherein the CI comprises a Hardware Parameter (HP) and a Software Parameter (SP);
(3) The controller is used for acquiring a Current Software Environment Identifier (CSEID) through a PCIe interface, searching SEI matched with the CSEID in a memory, and if the matched SEI is found, configuring the PLD according to the CI in the SEI, wherein the RLU performs reconfiguration logic configuration according to the HP, and the CLU performs configuration logic configuration according to the SP; if no matching SEI is found, adding a Current Software Environment Identifier (CSEID) acquired by the PCIe interface into a memory, and configuring the PLD according to preset Default Configuration Information (DCI).
Fig. 6 is a schematic diagram of the structure of a PLD according to an embodiment of the application, in which a Reconfigurable Logic Unit (RLU) and a Configurable Logic Unit (CLU) included in the PLD are described below, respectively:
(1) A Reconfigurable Logic Unit (RLU) comprising a plurality of Reconfigurable Logic Blocks (RLBs), each RLB comprising a plurality of Reconfigurable Logic Elements (RLEs), each RLC comprising a plurality of Reconfigurable Logic Gates (RLGs), each RLE comprising a plurality of Reconfigurable Logic Gates (RLGs) for performing a reconfiguration logic configuration according to a Hardware Parameter (HP) to implement a hardware function of the HCA card;
(2) A Configurable Logic Unit (CLU) comprising a plurality of Configurable Logic Blocks (CLBs), each CLB comprising a plurality of Configurable Logic Components (CLCs), each CLC comprising a plurality of Configurable Logic Elements (CLE), each CLE comprising a plurality of Configurable Logic Gates (CLG) for configuring logic configurations according to Software Parameters (SP) to implement the software functions of the HCA card.
The embodiment of the application provides a method and a device for improving the environmental compatibility of an HCA card, which can improve the environmental compatibility of the HCA card, reduce the dependence on software environment, improve the performance and the stability of the HCA card and realize more efficient data transmission. The hardware design and the software design of the HCA card are optimized, and the software and hardware interfaces are reasonably arranged, so that a more stable transmission effect is realized.
Compared with the related art, the embodiment of the application has the following beneficial effects: 1) By arranging a Programmable Logic Device (PLD) on the HCA card, logic configuration can be carried out according to different Software Environment Information (SEI), so that the environment compatibility of the HCA card is improved, and the dependence on the software environment is reduced; 2) By arranging a memory on the HCA card, a plurality of pieces of Software Environment Information (SEI) can be stored, and searching and matching are carried out according to the Current Software Environment Identification (CSEID), so that the self-adaptive configuration of the HCA card is realized, and the performance and the stability of the HCA card are improved; 3) By reasonably setting the software and hardware interfaces, the high-efficiency data transmission between the HCA card and the current software environment can be realized, and the transmission effect of the HCA card is improved.
The following description of the relevant terms appearing in the embodiments of the application follows:
HCA: host Channel Adapter, host channel adapter;
PLD: programmable Logic Device, programmable logic devices;
RLU: reconsitution Logic Unit, reconfigurable logic units;
RLB: reconsitution Logic Block, reconfigurable logic blocks;
RLC: reconsitution Logic Cell, reconfigurable logic components;
RLE: reconsitution Logic Element, reconfigurable logic elements;
RLG: reconsitution Logic Gate, reconfigurable logic gates;
CLU: configuration Logic Unit, configurable logic cells;
CLB: configuration Logic Block, configurable logic blocks;
CLC: configuration Logic Cell, configurable logic components;
CLE: configuration Logic Element, configurable logic elements;
CLG: configuration Logic Gate, configurable logic gates;
PCIE: peripheral Component Interconnect Express (peripheral component interconnect express) is a high-speed serial computer expansion bus standard.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the embodiments of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
In this embodiment, there is also provided an HCA card control device, and fig. 7 is a structural diagram of an HCA card control device according to an embodiment of the present application, as shown in fig. 7, the device includes:
an obtaining module 702, configured to obtain, when the host channel adapter HCA card is connected to a host, a current software environment identifier of the host, where the current software environment identifier is used to identify a processor in the host and an operating system in the host;
a first determining module 704, configured to determine, based on a set of software environment configuration information stored in advance in a target memory, target configuration information that matches the current software environment identifier, where each piece of software environment configuration information included in the set of software environment configuration information includes a software environment identifier and configuration information that matches the software environment identifier, where the HCA card is provided with the target memory, and the target configuration information is used to represent a target instruction set that adapts the processor and the operating system;
a processing module 706, configured to configure the target instruction set represented by the target configuration information in a programmable logic device PLD, so that the instructions in the target instruction set are allowed to be executed in the HCA card, where the PLD is disposed on the HCA card.
In an alternative embodiment, the apparatus further comprises: and the execution module is used for executing the target instruction in the HCA card when receiving the target instruction sent by the host to the HCA card and the target instruction is the instruction in the target instruction set after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD.
In an alternative embodiment, the executing module includes: and the operation sub-module is used for operating a target circuit corresponding to the target instruction in the PLD in the HCA card, wherein the target circuit is used for realizing the instruction execution logic of the target instruction.
In an alternative embodiment, the executing module includes: the first execution sub-module is used for executing the data forwarding logic of the target instruction recorded in the PLD through a controller in the HCA card under the condition that the target instruction is used for representing forwarding of the data of the target service sent by the host, wherein the data forwarding logic is used for packaging the routing information of the data of the target service and sending a packaged data packet to a packaged target routing address; or the second execution sub-module is used for executing the data verification logic of the target instruction recorded in the PLD by a controller in the HCA card under the condition that the target instruction is used for representing verifying the data of the target service sent by the host, and the data verification logic is used for verifying the data of the target service.
In an alternative embodiment, the processing module 706 includes: a creation sub-module configured to create, for an ith instruction in the target instruction set, a corresponding ith circuit in the PLD, where the ith circuit is configured to implement instruction execution logic of the ith instruction, where i is a positive integer greater than or equal to 1.
In an alternative embodiment, the first determining module 704 includes: the searching sub-module is used for searching whether target software environment configuration information matched with the current software environment identifier exists in the group of software environment configuration information stored in the target memory, and obtaining a searching result; and the determining submodule is used for determining the configuration information contained in the target software environment configuration information as the target configuration information when the search result indicates that the target software environment configuration information exists in the set of software environment configuration information, wherein the target software environment configuration information comprises the software environment identifier which is the same as the current software environment identifier.
In an alternative embodiment, the apparatus further comprises: and the second determining module is used for determining preset configuration information as the target configuration information under the condition that the search result indicates that the target software environment configuration information does not exist in the group of software environment configuration information, wherein the preset configuration information is used for indicating the PLD to be configured according to preset parameters.
In an alternative embodiment, the apparatus further comprises: and the adding module is used for adding first configuration information into the target memory under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, wherein the first configuration information comprises the current software environment identifier and preset configuration information matched with the previous software environment identifier.
In an alternative embodiment, the searching submodule includes: the comparison unit is used for comparing the current software environment identifier with a group of software environment identifiers in sequence to obtain a comparison result, wherein the comparison result is used for indicating whether the group of software environment identifiers comprise the same software environment identifier as the current software environment identifier or not, and the group of software environment configuration information comprises the group of software environment identifiers; and the determining unit is used for determining the searching result based on the comparison result.
In an alternative embodiment, the determining unit includes: a first determining subunit, configured to determine that, when the comparison result indicates that the set of software environment identifiers includes a software environment identifier that is the same as the current software environment identifier, the search result is that the target software environment configuration information exists in the set of software environment configuration information; and the second determining subunit is used for determining that the search result is that the target software environment configuration information does not exist in the set of software environment configuration information when the comparison result indicates that the set of software environment identifiers does not include the software environment identifier which is the same as the current software environment identifier.
In an alternative embodiment, the processing module 706 includes: and the configuration sub-module is used for configuring the target instruction set in a target reconfiguration logic unit and a target configuration logic unit, wherein the PLD comprises the target reconfiguration logic unit and the target configuration logic unit.
In an alternative embodiment, the configuration submodule includes: the configuration unit is used for configuring the target reconfiguration logic unit based on target hardware parameters and configuring the target configuration logic unit based on target software parameters, wherein the target configuration information comprises the target hardware parameters and the target software parameters, the target hardware parameters are used for configuring hardware functions of the HCA card, and the target software parameters are used for configuring software functions of the HCA card.
In an alternative embodiment, the target reconfiguration logic unit includes a set of reconfiguration logic gates, where the set of reconfiguration logic gates is used to configure the PLD with reconfiguration logic; the target configuration logic unit comprises a set of configuration logic gates, wherein the set of configuration logic gates is used for performing configuration logic configuration on the PLD.
In an alternative embodiment, the apparatus further comprises: a configuration module, configured to configure a set of software environment configuration information before determining target configuration information matching the current software environment identifier based on the set of software environment configuration information pre-stored in a target memory; and the storage module is used for storing the set of software environment configuration information into a target memory, wherein the HCA card is provided with the target memory.
In an alternative embodiment, the acquiring module 702 includes: and the acquisition sub-module is used for acquiring the current software environment identifier through a high-speed serial computer expansion bus standard PCIE interface.
In an alternative embodiment, the apparatus further comprises: and the control module is used for controlling the data transmission between the HCA card and the software environment indicated by the current software environment identifier through the PLD after the target instruction set indicated by the target configuration information is configured in the PLD.
It should be noted that each of the above units or modules may be implemented by software or hardware, and for the latter, may be implemented by, but not limited to: the units or modules are all located in the same processor; alternatively, each of the units or modules described above may be located in a different processor in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the embodiments of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately fabricated into individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated into a single integrated circuit module. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the embodiments of the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.

Claims (23)

1. An HCA card control method, comprising:
under the condition that a host channel adapter HCA card is connected with a host, acquiring a current software environment identifier of the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host;
determining target configuration information matched with the current software environment identifier based on a group of software environment configuration information pre-stored in a target memory, wherein each piece of software environment configuration information included in the group of software environment configuration information comprises a software environment identifier and configuration information matched with the software environment identifier, the HCA card is provided with the target memory, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system;
configuring the target instruction set represented by the target configuration information in a Programmable Logic Device (PLD) so that instructions in the target instruction set are allowed to be executed in the HCA card, wherein the PLD is arranged on the HCA card;
wherein configuring the target instruction set represented by the target configuration information in a programmable logic device PLD includes: for an ith instruction in the target instruction set, creating a corresponding ith circuit in the PLD, wherein the ith circuit is configured to implement instruction execution logic of the ith instruction, where i is a positive integer greater than or equal to 1.
2. The method of claim 1, wherein after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, the method further comprises:
the target instruction is executed in the HCA card when a target instruction sent by the host to the HCA card is received and the target instruction is an instruction in the target instruction set.
3. The method of claim 2, wherein executing the target instruction in the HCA card comprises:
and running a target circuit corresponding to the target instruction in the PLD in the HCA card, wherein the target circuit is used for realizing instruction execution logic of the target instruction.
4. The method of claim 2, wherein executing the target instruction in the HCA card comprises:
executing, by a controller in the HCA card, data forwarding logic of the target instruction recorded in the PLD under the condition that the target instruction is used to represent forwarding of data of the target service sent by the host, where the data forwarding logic is used to package routing information of the data of the target service, and send a data packet obtained by the packaging to a packaged target routing address; or alternatively
And under the condition that the target instruction is used for representing and verifying the data of the target service sent by the host, executing the data verification logic of the target instruction recorded in the PLD by a controller in the HCA card, wherein the data verification logic is used for verifying the data of the target service.
5. The method of claim 1, wherein the determining target configuration information matching the current software environment identification based on a set of software environment configuration information pre-stored in a target memory comprises:
searching whether target software environment configuration information matched with the current software environment identifier exists in the group of software environment configuration information stored in the target memory, and obtaining a searching result;
and under the condition that the search result indicates that the target software environment configuration information exists in the set of software environment configuration information, determining the configuration information contained in the target software environment configuration information as the target configuration information, wherein the target software environment configuration information comprises the software environment identifier identical to the current software environment identifier.
6. The method of claim 5, wherein the method further comprises:
and under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, determining preset configuration information as the target configuration information, wherein the preset configuration information is used for indicating the PLD to be configured according to preset parameters.
7. The method of claim 5, wherein the method further comprises:
and adding first configuration information in the target memory under the condition that the search result indicates that the target software environment configuration information does not exist in the set of software environment configuration information, wherein the first configuration information comprises the current software environment identifier and preset configuration information matched with the previous software environment identifier.
8. The method of claim 5, wherein searching for whether there is target software environment configuration information matching the current software environment identifier in the set of software environment configuration information stored in the target memory, to obtain a search result, comprises:
comparing the current software environment identifier with a group of software environment identifiers in sequence to obtain a comparison result, wherein the comparison result is used for indicating whether the group of software environment identifiers comprise the same software environment identifier as the current software environment identifier or not, and the group of software environment configuration information comprises the group of software environment identifiers;
And determining the search result based on the comparison result.
9. The method of claim 8, wherein the determining the search result based on the comparison result comprises:
determining that the target software environment configuration information exists in the set of software environment configuration information under the condition that the comparison result indicates that the set of software environment identifiers comprise the same software environment identifier as the current software environment identifier;
and under the condition that the comparison result indicates that the set of software environment identifiers does not comprise the same software environment identifier as the current software environment identifier, determining that the search result is that the target software environment configuration information does not exist in the set of software environment configuration information.
10. The method of claim 1, wherein configuring the target instruction set represented by the target configuration information in a programmable logic device PLD comprises:
and configuring the target instruction set in a target reconfiguration logic unit and a target configuration logic unit, wherein the PLD comprises the target reconfiguration logic unit and the target configuration logic unit.
11. The method of claim 10, wherein configuring the target instruction set in a target reconstruction logic unit and a target configuration logic unit comprises:
the target reconfiguration logic unit is configured based on a target hardware parameter, and the target reconfiguration logic unit is configured based on a target software parameter, wherein the target configuration information comprises the target hardware parameter and the target software parameter, the target hardware parameter is used for configuring the hardware function of the HCA card, and the target software parameter is used for configuring the software function of the HCA card.
12. The method of claim 10, wherein the step of determining the position of the first electrode is performed,
the target reconstruction logic unit comprises a set of reconstruction logic gates, wherein the set of reconstruction logic gates is used for performing reconstruction logic configuration on the PLD;
the target configuration logic unit comprises a set of configuration logic gates, wherein the set of configuration logic gates is used for performing configuration logic configuration on the PLD.
13. The method of claim 1, wherein prior to determining target configuration information matching the current software environment identification based on a set of software environment configuration information pre-stored in a target memory, the method further comprises:
Configuring the set of software environment configuration information;
storing the set of software environment configuration information into the target memory.
14. The method of claim 1, wherein the obtaining the current software environment identification of the host comprises:
and acquiring the current software environment identifier through a high-speed serial computer expansion bus standard PCIE interface.
15. The method of claim 1, wherein after configuring the target instruction set represented by the target configuration information in a programmable logic device PLD, the method further comprises:
and controlling data transmission between the HCA card and the software environment indicated by the current software environment identifier through the PLD.
16. An HCA card control system, comprising:
the programmable logic device PLD is arranged on the HCA card of the host channel adapter;
a controller in communication with the PLD, the controller configured to:
acquiring a current software environment identifier of a host under the condition that the HCA card is connected with the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host; determining target configuration information matched with the current software environment identifier based on a group of software environment configuration information pre-stored in a target memory, wherein each piece of software environment configuration information included in the group of software environment configuration information comprises a software environment identifier and configuration information matched with the software environment identifier, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system; configuring the target instruction set represented by the target configuration information in the PLD such that instructions in the target instruction set are allowed to execute in the HCA card;
The target memory is in communication connection with the controller and is configured to store the set of software environment configuration information;
wherein the controller is configured to configure the target instruction set represented by the target configuration information in the PLD by: for an ith instruction in the target instruction set, creating a corresponding ith circuit in the PLD, wherein the ith circuit is configured to implement instruction execution logic of the ith instruction, where i is a positive integer greater than or equal to 1.
17. The HCA card control system of claim 16, wherein the PLD comprises a target reconfiguration logic unit and a target configuration logic unit.
18. The HCA card control system of claim 17, characterized in that,
the target reconstruction logic unit comprises a set of reconstruction logic gates, wherein the set of reconstruction logic gates is used for performing reconstruction logic configuration on the PLD;
the target configuration logic unit comprises a set of configuration logic gates, wherein the set of configuration logic gates is used for performing configuration logic configuration on the PLD.
19. The HCA card control system of claim 17, characterized in that,
The target configuration information comprises target hardware parameters and target software parameters, wherein the target hardware parameters are used for indicating the configuration of the target reconfiguration logic unit, and the target software parameters are used for indicating the configuration of the target configuration logic unit.
20. The HCA card control system of claim 16, characterized in that,
and a high-speed serial computer expansion bus standard PCIE interface is arranged in the controller, wherein the controller acquires the current software environment identifier through the PCIE interface.
21. An HCA card control device, comprising:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a current software environment identifier of a host under the condition that a host channel adapter HCA card is connected with the host, wherein the current software environment identifier is used for identifying a processor in the host and an operating system in the host;
the HCA card is provided with a target memory, and the target configuration information is used for representing a target instruction set for adapting the processor and the operating system;
A processing module, configured to configure the target instruction set represented by the target configuration information in a programmable logic device PLD, so that instructions in the target instruction set are allowed to be executed in the HCA card, where the HCA card is provided with the PLD;
wherein the processing module is configured to configure the target instruction set represented by the target configuration information in a programmable logic device PLD by: for an ith instruction in the target instruction set, creating a corresponding ith circuit in the PLD, wherein the ith circuit is configured to implement instruction execution logic of the ith instruction, where i is a positive integer greater than or equal to 1.
22. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 15.
23. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method as claimed in any one of claims 1 to 15 when the computer program is executed.
CN202311030380.9A 2023-08-16 2023-08-16 HCA card control method, system, device, storage medium and electronic device Active CN116737626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311030380.9A CN116737626B (en) 2023-08-16 2023-08-16 HCA card control method, system, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311030380.9A CN116737626B (en) 2023-08-16 2023-08-16 HCA card control method, system, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN116737626A CN116737626A (en) 2023-09-12
CN116737626B true CN116737626B (en) 2023-11-10

Family

ID=87904800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311030380.9A Active CN116737626B (en) 2023-08-16 2023-08-16 HCA card control method, system, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116737626B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102455774A (en) * 2010-10-18 2012-05-16 无锡江南计算技术研究所 Host with host channel adapter equipment and sleeping and awakening method thereof
CN102906693A (en) * 2010-06-23 2013-01-30 国际商业机器公司 Store/store block instructions for communicating with adapters
CN110008159A (en) * 2019-04-11 2019-07-12 苏州浪潮智能科技有限公司 PCIE width automatic adaptation method, device and electronic equipment and storage medium
CN115687806A (en) * 2022-09-27 2023-02-03 海尔优家智能科技(北京)有限公司 Method and device for determining target equipment list, storage medium and electronic device
CN116049000A (en) * 2023-01-19 2023-05-02 中国人民财产保险股份有限公司 Environment parameter configuration method, device, equipment, storage medium and product

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6748499B2 (en) * 2001-11-15 2004-06-08 International Business Machines Corporation Sharing memory tables between host channel adapters
US9128740B2 (en) * 2013-07-22 2015-09-08 International Business Machines Corporation Operating system virtualization for host channel adapters

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102906693A (en) * 2010-06-23 2013-01-30 国际商业机器公司 Store/store block instructions for communicating with adapters
CN102455774A (en) * 2010-10-18 2012-05-16 无锡江南计算技术研究所 Host with host channel adapter equipment and sleeping and awakening method thereof
CN110008159A (en) * 2019-04-11 2019-07-12 苏州浪潮智能科技有限公司 PCIE width automatic adaptation method, device and electronic equipment and storage medium
CN115687806A (en) * 2022-09-27 2023-02-03 海尔优家智能科技(北京)有限公司 Method and device for determining target equipment list, storage medium and electronic device
CN116049000A (en) * 2023-01-19 2023-05-02 中国人民财产保险股份有限公司 Environment parameter configuration method, device, equipment, storage medium and product

Also Published As

Publication number Publication date
CN116737626A (en) 2023-09-12

Similar Documents

Publication Publication Date Title
US9720678B2 (en) Network switching method, version upgrade method, and terminal device
CN105373404A (en) Software mirror image burning method and equipment
EP3497889B1 (en) Device virtualization for containers
CN103595769B (en) Method and device for achieving file uploading through SDK
CN113296859B (en) Page loading method and device, storage medium and electronic device
CN116737626B (en) HCA card control method, system, device, storage medium and electronic device
CN111008220A (en) Dynamic identification method and device of data source, storage medium and electronic device
CN112650710B (en) Data migration sending method and device, storage medium and electronic device
CN103034545B (en) Communication means between communications framework based on ACE and method and functional module
CN110276212B (en) Data processing method and device, storage medium and electronic device
CN113434184A (en) Equipment upgrading method and device, storage medium and electronic device
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN115022424B (en) Hydropower LCU controller network card virtual control method, system, equipment and medium thereof
CN111131324A (en) Login method and device of business system, storage medium and electronic device
CN112388625A (en) Task issuing method and device and task executing method and device
CN102413488B (en) Information interacting method in automatic drive test system and equipment
CN110580172B (en) Configuration rule verification method and device, storage medium and electronic device
CN111427603B (en) Application program upgrading method and device
CN107608809B (en) Exception handling method and device
CN112866034B (en) Unmanned aerial vehicle cruise control method and device and cloud server
CN114090074A (en) Method and device for configuring operating environment, storage medium and electronic device
CN103973581A (en) Method, device and system for processing message data
CN113076128B (en) Method, device, electronic equipment and storage medium for robot configuration
CN109426547B (en) Thermal migration method, device and system of virtual machine
CN111669355B (en) Method for batch processing of nginx network isolation space and nginx server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant