CN113448634B - ROCE network card resource management method, device, equipment and readable medium - Google Patents

ROCE network card resource management method, device, equipment and readable medium Download PDF

Info

Publication number
CN113448634B
CN113448634B CN202110605690.3A CN202110605690A CN113448634B CN 113448634 B CN113448634 B CN 113448634B CN 202110605690 A CN202110605690 A CN 202110605690A CN 113448634 B CN113448634 B CN 113448634B
Authority
CN
China
Prior art keywords
network card
resources
roce
new
address
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
CN202110605690.3A
Other languages
Chinese (zh)
Other versions
CN113448634A (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.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer 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 Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110605690.3A priority Critical patent/CN113448634B/en
Publication of CN113448634A publication Critical patent/CN113448634A/en
Application granted granted Critical
Publication of CN113448634B publication Critical patent/CN113448634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method, a device, equipment and a readable medium for ROCE network card resource management, wherein the method comprises the following steps: responding to system startup, and checking whether the ROCE network card changes and an initialization result; responding to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized, polling a connection event of the network port and detecting whether the network port of the ROCE network card has new connection; responding to the new connection of the network port of the ROCE network card, applying for the resources required by the new connection and judging whether the IP address of the new connection is a new IP address or not; responding to the fact that the newly connected IP address is a new IP address, establishing a record for the new IP address, counting the applied resources into the total number of the resources, and judging whether the total number of the resources reaches a preset threshold value or not; and responding to the fact that the total number of the resources reaches a preset threshold value, sending a corresponding warning, and deleting the applied resources. By using the scheme of the invention, the problem that an ROCE network card user is complex to use can be solved, manpower and material resources can be saved, and the operation simplicity and reliability of equipment can be improved.

Description

ROCE network card resource management method, device, equipment and readable medium
Technical Field
The field relates to the field of computers, and more particularly to a method, a device, equipment and a readable medium for ROCE network card resource management.
Background
With the development of technologies such as internet, cloud computing, internet of things, and mobile internet, especially with the arrival of mobile internet, the requirement for the transmission performance of the network is higher and higher. Users desire faster and lighter-weight network communications, which places higher demands on the bandwidth and latency of network transmissions. Rdma (remote direct Memory access) technology is called remote direct Memory access (rdma), and is generated to solve the delay of client and server data processing in network transmission. It transfers data directly from the memory of one computer to another without the intervention of both operating systems. This allows high throughput, low latency network communications, particularly suitable for use in massively parallel computer clusters. To be ethernet compatible, RDMA defines both rock (a network protocol that allows Remote Direct Memory Access (RDMA) over ethernet), IWARP implementations over ethernet, making RDMA applicable over traditional ethernet.
However, RDMA is still a new concept for users and operation and maintenance personnel, and cannot be used, managed and monitored by the hands quickly.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a readable medium for managing an ROCE network card resource, where by using the technical solution of the present invention, the problem that an ROCE network card user is complicated to use can be solved, manpower and material resources can be saved, and meanwhile, the simplicity and reliability of operation of a device can be improved.
Based on the above object, an aspect of the embodiments of the present invention provides a method for managing rock network card resources, including the following steps:
responding to the system startup, and checking whether the ROCE network card is changed and whether the initialization is successful;
responding to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized, polling a connection event of the network port and detecting whether the network port of the ROCE network card has new connection;
responding to the new connection of the network port of the ROCE network card, applying for the resources required by the new connection and judging whether the IP address of the new connection is a new IP address or not;
responding to the new IP address of the new connection, establishing a record for the new IP address, counting the applied resources into the total number of the resources, and judging whether the total number of the resources reaches a preset threshold value;
and responding to the fact that the total number of the resources reaches a preset threshold value, sending a corresponding warning, and deleting the applied resources.
According to an embodiment of the present invention, further comprising:
responding to the change of the ROCE network card, and detecting whether the change is a newly-added network card;
and in response to the change that the network card is newly added, reporting the information of the newly added hardware and activating the newly added network card.
According to an embodiment of the present invention, further comprising:
and reporting a warning of hardware loss in response to the fact that the change is not the newly added network card.
According to an embodiment of the present invention, further comprising:
and reporting an initialization failure warning in response to the unsuccessful ROCE network card initialization.
According to an embodiment of the present invention, further comprising:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit.
According to one embodiment of the invention, the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
According to an embodiment of the present invention, further comprising:
responding to the situation that the network port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change or not;
and responding to the change of the new resources connected with the existing resources, and accumulating the corresponding change into the corresponding IP record and the total resource pool.
In another aspect of the embodiments of the present invention, there is also provided an apparatus for ROCE network card resource management, the apparatus including:
The checking module is configured to respond to system startup and check whether the ROCE network card is changed and whether initialization is successful;
the detection module is configured to poll a connection event of the network port and detect whether the network port of the ROCE network card has new connection or not in response to the ROCE network card not changing and the ROCE network card being successfully initialized;
the judging module is configured to respond to the network port of the ROCE network card that a new connection exists, apply for resources required by the new connection and judge whether the IP address of the new connection is a new IP address;
the statistical module is configured to respond to the fact that the newly connected IP address is the new IP address, establish a record for the new IP address, count the applied resources into the total number of the resources and judge whether the total number of the resources reaches a preset threshold value;
and the warning module is configured to send out corresponding warning and delete the applied resources in response to the total number of the resources reaching a preset threshold value.
According to an embodiment of the present invention, the system further comprises an adding module configured to:
responding to the change of the ROCE network card, and detecting whether the change is a newly added network card;
and reporting the information of newly added hardware and activating the newly added network card in response to the fact that the network card is newly added.
According to one embodiment of the invention, the warning module is further configured to:
and reporting a warning of hardware loss in response to the fact that the change is not the newly added network card.
According to one embodiment of the invention, the warning module is further configured to:
and reporting an initialization failure warning in response to the unsuccessful initialization of the ROCE network card.
According to one embodiment of the invention, the system further comprises a setting module configured to:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit.
According to one embodiment of the invention, the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
According to an embodiment of the invention, the apparatus further comprises an accumulation module configured to:
responding to the situation that the network port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change or not;
and responding to the change of the new resources connected with the existing resources, and accumulating the corresponding change into the corresponding IP record and the total resource pool.
In another aspect of an embodiment of the present invention, there is also provided a computer apparatus including:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program realizes the steps of any one of the above methods when executed by a processor.
The invention has the following beneficial technical effects: the method for managing the ROCE network card resources provided by the embodiment of the invention checks whether the ROCE network card is changed and whether the initialization is successful or not by responding to the system startup; responding to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized, polling a connection event of the network port and detecting whether the network port of the ROCE network card has new connection; responding to the new connection of the network port of the ROCE network card, applying for resources required by the new connection and judging whether the IP address of the new connection is a new IP address; responding to the fact that the newly connected IP address is a new IP address, establishing a record for the new IP address, counting the applied resources into the total number of the resources, and judging whether the total number of the resources reaches a preset threshold value or not; the technical scheme of responding to the total number of the resources reaching the preset threshold value, sending out corresponding warning and deleting the applied resources can solve the problem that an ROCE network card user is complex to use, manpower and material resources can be saved, and meanwhile, the operation simplicity and reliability of the equipment are improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for ROCE network card resource management according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an apparatus for ROCE network card resource management according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
Based on the above purpose, a first aspect of the embodiments of the present invention provides an embodiment of a method for managing rock network card resources. Fig. 1 shows a schematic flow diagram of the method.
As shown in fig. 1, the method may comprise the steps of:
s1 responds to the system startup, and checks whether the ROCE network card is changed and whether the initialization is successful.
When the system is started, the hardware configuration of this time and the hardware configuration, the position and other information of the last time are compared to determine whether the information of the network card changes or not, if an ROCE network card is newly added or lost, a lost event needs to be reported to a GUI (graphical user interface), the GUI prompts a user to repair the newly added card according to the fault of the ROCE network card, the GUI activates the card, if the card is lost, the GUI assists the user to repair the fault, corresponding warning can be sent to a worker, and warning information can be sent to a mobile device and an electronic mailbox of the worker through a network.
S2 responds to the condition that the ROCE network card is not changed and the initialization of the ROCE network card is successful, polls the connection event of the network port and detects whether the network port of the ROCE network card has new connection.
And if the ROCE network card is not changed, driving and guiding the ROCE network card to initialize so as to facilitate a user mode program to inquire the state of the ROCE card, checking whether the ROCE network card can be normally loaded, if the loading fails, reporting errors to the GUI, guiding a user to carry out self-diagnosis repair on the GUI, and if the ROCE network card can be successfully initialized, starting to detect whether new connection exists.
S3 responds to the new connection of the ROCE network card, applies for the resource required by the new connection and judges whether the IP address of the new connection is the new IP address.
If a new connection exists, applying for resources required by the connection, wherein the resources comprise a completion queue CQ, a queue pair QP, a protection domain MR and a memory area PD, then checking whether the IP address of the connection is a new IP address, and if the IP address of the connection is not the new IP address, namely the connection from the same IP, accumulating the corresponding resources and accumulating the resources into a total resource pool.
S4, responding to the new IP address, establishing a record for the new IP address, counting the applied resources into the total number of resources, and judging whether the total number of resources reaches a preset threshold value.
And creating a record for the IP, recording legal notes, receiving message numbers, resource application numbers and the like, releasing the applied resources into the total number of the resources, and then judging whether the total number of the resources reaches a preset threshold value.
S5, responding to the total number of the resources reaching the preset threshold value, sending corresponding warning and deleting the applied resources.
If the total number of the resources released by the resources of the new IP application exceeds a preset threshold value, the resources of the IP application need to be deleted, and a corresponding warning is sent out.
By the technical scheme, the problem that an ROCE network card user is complex to use can be solved, manpower and material resources can be saved, and meanwhile, the operation simplicity and reliability of equipment are improved.
In a preferred embodiment of the present invention, further comprising:
responding to the change of the ROCE network card, and detecting whether the change is a newly-added network card;
and reporting the information of newly added hardware and activating the newly added network card in response to the fact that the network card is newly added.
In a preferred embodiment of the present invention, the method further comprises:
and reporting a warning of hardware loss in response to the fact that the change is not the newly added network card. The change of the ROCE network card generally comprises two conditions, namely addition or loss, the loss event is required to be reported to a Graphical User Interface (GUI) when the ROCE network card is lost, the GUI prompts a user to repair the newly added card according to the fault of the ROCE network card so as to activate the card, the user is assisted to repair the fault when the card is lost, a corresponding warning can be sent to an operator, and warning information can be sent to a mobile device and an electronic mailbox of the operator through a network.
In a preferred embodiment of the present invention, the method further comprises:
and reporting an initialization failure warning in response to the unsuccessful initialization of the ROCE network card.
In a preferred embodiment of the present invention, further comprising:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit. The preset threshold value is the maximum resource amount which can be accepted by the ROCE network card port, and if the threshold value is reached, no resource is allowed to be added.
In a preferred embodiment of the invention, the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
In a preferred embodiment of the present invention, further comprising:
responding to the fact that the net port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change or not;
in response to a new resource change for an existing connection, the corresponding change is accumulated into the corresponding IP record and into the total resource pool.
By the technical scheme, the problem that an ROCE network card user is complex to use can be solved, manpower and material resources can be saved, and meanwhile, the operation simplicity and reliability of equipment are improved.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
In view of the foregoing, in a second aspect of the embodiment of the present invention, an apparatus for managing rock network card resources is provided, as shown in fig. 2, the apparatus 200 includes:
and the checking module is configured to respond to system startup and check whether the ROCE network card is changed and whether initialization is successful.
When the system is started, the hardware configuration of this time and the hardware configuration, the position and other information of the last time are compared to determine whether the information of the network card changes or not, if an ROCE network card is newly added or lost, a lost event needs to be reported to a GUI (graphical user interface), the GUI prompts a user to repair the newly added card according to the fault of the ROCE network card, the GUI activates the card, if the card is lost, the GUI assists the user to repair the fault, corresponding warning can be sent to a worker, and warning information can be sent to a mobile device and an electronic mailbox of the worker through a network.
The device also comprises a detection module, wherein the detection module is configured to poll the connection event of the network port and detect whether the network port of the ROCE network card has new connection or not in response to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized.
And if the ROCE network card is not changed, driving and guiding the ROCE network card to initialize so as to facilitate a user mode program to inquire the state of the ROCE card, checking whether the ROCE network card can be normally loaded, if the loading fails, reporting errors to the GUI, guiding a user to carry out self-diagnosis repair on the GUI, and if the ROCE network card can be successfully initialized, starting to detect whether new connection exists.
The device also comprises a judging module which is configured to respond to the new connection of the network interface of the ROCE network card, apply for the resources required by the new connection and judge whether the IP address of the new connection is a new IP address.
If a new connection exists, applying for resources required by the connection, wherein the resources comprise a completion queue CQ, a queue pair QP, a protection domain MR and a memory area PD, then checking whether the IP address of the connection is a new IP address, and if the IP address of the connection is not the new IP address, namely the connection from the same IP, accumulating the corresponding resources and accumulating the resources into a total resource pool.
The device of the invention also comprises a counting module which is configured to respond to the new IP address of the new connection, establish a record for the new IP address, count the applied resources into the total number of resources and judge whether the total number of resources reaches a preset threshold value.
And creating a record for the IP, recording legal notes, receiving message numbers, resource application numbers and the like, releasing the applied resources into the total number of the resources, and then judging whether the total number of the resources reaches a preset threshold value.
The device also comprises a warning module, wherein the warning module is configured to respond to the fact that the total number of the resources reaches a preset threshold value, send out corresponding warning and delete the applied resources.
If the total number of the resources released by the resources of the new IP application exceeds a preset threshold value, the resources of the IP application need to be deleted, and a corresponding warning is sent.
In a preferred embodiment of the present invention, the apparatus further comprises an adding module, wherein the adding module is configured to:
responding to the change of the ROCE network card, and detecting whether the change is a newly-added network card;
and in response to the change that the network card is newly added, reporting the information of the newly added hardware and activating the newly added network card.
In a preferred embodiment of the invention, the warning module is further configured to:
And reporting a warning of hardware loss in response to the fact that the change is not the newly added network card.
In a preferred embodiment of the invention, the warning module is further configured to:
and reporting an initialization failure warning in response to the unsuccessful ROCE network card initialization.
In a preferred embodiment of the present invention, the mobile terminal further comprises a setting module configured to:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit.
In a preferred embodiment of the present invention, the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
In a preferred embodiment of the present invention, the apparatus further comprises an accumulation module configured to:
responding to the situation that the network port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change or not;
in response to a new resource change for an existing connection, the corresponding change is accumulated into the corresponding IP record and into the total resource pool.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor implementing the method of:
Responding to system startup, and checking whether the ROCE network card is changed and whether initialization is successful;
responding to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized, polling a connection event of the network port and detecting whether the network port of the ROCE network card is newly connected or not;
responding to the new connection of the network port of the ROCE network card, applying for resources required by the new connection and judging whether the IP address of the new connection is a new IP address;
responding to the new IP address of the new connection, establishing a record for the new IP address, counting the applied resources into the total number of the resources, and judging whether the total number of the resources reaches a preset threshold value;
and responding to the fact that the total number of the resources reaches a preset threshold value, sending a corresponding warning, and deleting the applied resources.
In a preferred embodiment of the present invention, the method further comprises:
responding to the change of the ROCE network card, and detecting whether the change is a newly added network card;
and in response to the change that the network card is newly added, reporting the information of the newly added hardware and activating the newly added network card.
In a preferred embodiment of the present invention, further comprising:
and reporting a warning of hardware loss in response to the fact that the change is not the newly added network card.
In a preferred embodiment of the present invention, the method further comprises:
And reporting an initialization failure warning in response to the unsuccessful ROCE network card initialization.
In a preferred embodiment of the present invention, the method further comprises:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit.
In a preferred embodiment of the present invention, the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
In a preferred embodiment of the present invention, the method further comprises:
responding to the situation that the network port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change or not;
in response to a new resource change for an existing connection, the corresponding change is accumulated into the corresponding IP record and into the total resource pool.
In view of the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. FIG. 4 is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer readable storage medium S31 has a computer program S32 which, when executed by a processor, performs the method as above, the method comprising the steps of:
responding to the system startup, and checking whether the ROCE network card is changed and whether the initialization is successful;
Responding to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized, polling a connection event of the network port and detecting whether the network port of the ROCE network card has new connection;
responding to the new connection of the network port of the ROCE network card, applying for the resources required by the new connection and judging whether the IP address of the new connection is a new IP address or not;
responding to the fact that the newly connected IP address is a new IP address, establishing a record for the new IP address, counting the applied resources into the total number of the resources, and judging whether the total number of the resources reaches a preset threshold value or not;
and responding to the fact that the total number of the resources reaches a preset threshold value, sending a corresponding warning, and deleting the applied resources.
In a preferred embodiment of the present invention, further comprising:
responding to the change of the ROCE network card, and detecting whether the change is a newly-added network card;
and reporting the information of newly added hardware and activating the newly added network card in response to the fact that the network card is newly added.
In a preferred embodiment of the present invention, further comprising:
and reporting a warning of hardware loss in response to the fact that the change is not the newly added network card.
In a preferred embodiment of the present invention, the method further comprises:
and reporting an initialization failure warning in response to the unsuccessful initialization of the ROCE network card.
In a preferred embodiment of the present invention, the method further comprises:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit.
In a preferred embodiment of the present invention, the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
In a preferred embodiment of the present invention, further comprising:
responding to the situation that the network port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change or not;
in response to a new resource change for an existing connection, the corresponding change is accumulated into the corresponding IP record and into the total resource pool.
Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for managing ROCE network card resources is characterized by comprising the following steps:
responding to the system startup, and checking whether the ROCE network card is changed and whether the initialization is successful;
responding to the condition that the ROCE network card is not changed and the ROCE network card is successfully initialized, polling a connection event of a network port and detecting whether the network port of the ROCE network card is newly connected or not;
responding to the new connection of the network port of the ROCE network card, applying for resources required by the new connection and judging whether the IP address of the new connection is a new IP address or not;
Responding to the new IP address of the new connection, establishing a record for the new IP address, counting the applied resources into the total number of the resources, and judging whether the total number of the resources reaches a preset threshold value;
and responding to the total number of the resources reaching a preset threshold value, sending out a corresponding warning and deleting the applied resources.
2. The method of claim 1, further comprising:
responding to the change of the ROCE network card, and detecting whether the change is a newly added network card;
and reporting the information of newly-added hardware and activating the newly-added network card in response to the fact that the newly-added network card is changed.
3. The method of claim 2, further comprising:
and reporting a warning of hardware loss in response to the fact that the change is not the newly added network card.
4. The method of claim 1, further comprising:
and reporting an initialization failure warning in response to the unsuccessful initialization of the ROCE network card.
5. The method of claim 1, further comprising:
and reading the resource limit of the ROCE network card port, and setting a preset threshold value based on the resource limit.
6. The method of claim 1, wherein the resources required for the connection include a completion queue, a queue pair, a protection domain, and a memory region.
7. The method of claim 1, further comprising:
responding to the situation that the network port of the ROCE network card has no new connection, and detecting whether the existing connection has new resource change;
in response to a new resource change for an existing connection, the corresponding change is accumulated into the corresponding IP record and into the total resource pool.
8. An apparatus for ROCE network card resource management, the apparatus comprising:
the checking module is configured to respond to system startup and check whether the ROCE network card is changed and whether initialization is successful;
the detection module is configured to poll a connection event of an internet access and detect whether the internet access of the ROCE network card has new connection or not in response to the ROCE network card not changing and the ROCE network card being successfully initialized;
the judging module is configured to respond to the situation that a new connection exists at the network port of the ROCE network card, apply for resources required by the new connection and judge whether the IP address of the new connection is a new IP address;
the statistical module is configured to respond to the fact that the newly connected IP address is a new IP address, establish a record for the new IP address, count the applied resources into the total number of the resources and judge whether the total number of the resources reaches a preset threshold value;
And the warning module is configured to send out corresponding warning and delete the applied resources in response to the total number of the resources reaching a preset threshold value.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202110605690.3A 2021-05-31 2021-05-31 ROCE network card resource management method, device, equipment and readable medium Active CN113448634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110605690.3A CN113448634B (en) 2021-05-31 2021-05-31 ROCE network card resource management method, device, equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110605690.3A CN113448634B (en) 2021-05-31 2021-05-31 ROCE network card resource management method, device, equipment and readable medium

Publications (2)

Publication Number Publication Date
CN113448634A CN113448634A (en) 2021-09-28
CN113448634B true CN113448634B (en) 2022-07-19

Family

ID=77810578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110605690.3A Active CN113448634B (en) 2021-05-31 2021-05-31 ROCE network card resource management method, device, equipment and readable medium

Country Status (1)

Country Link
CN (1) CN113448634B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110460457A (en) * 2018-05-08 2019-11-15 大唐移动通信设备有限公司 A kind of data transmission method and device
CN110535811A (en) * 2018-05-25 2019-12-03 中兴通讯股份有限公司 Remote memory management method and system, server-side, client, storage medium
CN112398817A (en) * 2018-01-23 2021-02-23 华为技术有限公司 Data sending method and device
CN112653600A (en) * 2020-12-26 2021-04-13 苏州浪潮智能科技有限公司 Network card performance testing method and device based on USB network card and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112398817A (en) * 2018-01-23 2021-02-23 华为技术有限公司 Data sending method and device
CN110460457A (en) * 2018-05-08 2019-11-15 大唐移动通信设备有限公司 A kind of data transmission method and device
CN110535811A (en) * 2018-05-25 2019-12-03 中兴通讯股份有限公司 Remote memory management method and system, server-side, client, storage medium
CN112653600A (en) * 2020-12-26 2021-04-13 苏州浪潮智能科技有限公司 Network card performance testing method and device based on USB network card and electronic equipment

Also Published As

Publication number Publication date
CN113448634A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
US11119951B2 (en) Updating host discovery records based on target reconfiguration
CN110620890B (en) File uploading method and system
CN108023967B (en) Data balancing method and device and management equipment in distributed storage system
CN108696581B (en) Distributed information caching method and device, computer equipment and storage medium
CN112650576B (en) Resource scheduling method, device, equipment, storage medium and computer program product
US10609123B2 (en) Hybrid quorum policies for durable consensus in distributed systems
CN104426885A (en) Method and device for providing abnormal account
US10432725B2 (en) Server access processing system
US10425475B2 (en) Distributed data management
CN108696831B (en) Short message sending method and device
CN110661673B (en) Heartbeat detection method and device
CN114268957A (en) Abnormal business data processing method, device, server and storage medium
US10218659B1 (en) Persistent connections for email web applications
CN111708664A (en) Log management method, device and medium for client
CN113448634B (en) ROCE network card resource management method, device, equipment and readable medium
WO2024103716A1 (en) Method and apparatus for managing subnets in link, and device and readable medium
KR102275065B1 (en) Apparatus and method for security control
CN113765871B (en) Method and device for managing fort machine
CN112073518B (en) Cloud storage system, cloud storage system management method and central management node
KR101826728B1 (en) Method, system and computer-readable recording medium for managing log data
US20130179537A1 (en) Transmitting of configuration items within a network
CN114003342A (en) Distributed storage method and device, electronic equipment and storage medium
CN110933122B (en) Method, apparatus and computer storage medium for managing server
WO2021247402A1 (en) Unidirectional gateway mediated multiplexing of concurrent data message streams
CN108880994B (en) Method and device for retransmitting mails

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