A hot upgrade method, device and medium for congestion control

By loading hot patch files into the RDMA network card and generating a patch function table, and modifying the global function table pointer, the problem of mixing old and new versions of functions in the hot upgrade of the RDMA network card congestion control algorithm is solved, and an efficient and stable hot upgrade process is achieved.

CN122160254APending Publication Date: 2026-06-05SHANGHAI YUNMAI XINLIAN TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI YUNMAI XINLIAN TECH CO LTD
Filing Date
2026-05-11
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The existing hot upgrade method for RDMA network card congestion control algorithms cannot guarantee the atomicity of the overall switch, which can easily lead to the mixing of old and new version functions, causing logical conflicts and system crashes. Moreover, the cumbersome modification operations reduce the efficiency of hot upgrades.

Method used

By obtaining the hot patch file of the congestion control algorithm, using the network card's basic firmware to load it into a preset storage area in memory, a patch function table is generated, and the global function table pointer is modified to the memory address of the patch function table, ensuring that the new version of the congestion control function is called when a congestion event occurs on the target network.

Benefits of technology

It achieves atomic switching of global function table pointers, avoids logical conflicts caused by mixing old and new versions of functions, improves the efficiency of hot upgrades and system responsiveness, and reduces synchronization overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160254A_ABST
    Figure CN122160254A_ABST
Patent Text Reader

Abstract

The application provides a hot upgrade method, device and medium for congestion control, and relates to the field of hot upgrade; the method comprises the following steps: loading a hot patch file corresponding to a congestion control algorithm obtained by a network card basic firmware into a preset storage area of a memory; after the loading is completed, determining a target network congestion event based on the hot patch file, and generating a patch function table comprising a pointer pointing to a new version of a congestion control function; modifying the value of a global function table pointer in the network card basic firmware to the memory address of the patch function table; the value of the global function table pointer is initially the memory address of an initial function table comprising a pointer pointing to an old version of a congestion control function; when the target network congestion event occurs, the network card basic firmware calls a new version of a congestion control function related to the target network congestion event through the global function table pointer and the pointer in the patch function table; the response capability and effective throughput of the system during the hot upgrade are ensured, and the efficiency of the hot upgrade is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of thermal upgrades, and in particular to a thermal upgrade method, apparatus and medium for congestion control. Background Technology

[0002] Remote Direct Memory Access (RDMA) is a direct memory access technology that transfers data directly from the memory of one computer to another without the intervention of the operating systems of both computers, thus significantly improving data transfer efficiency. However, RDMA is highly sensitive to network packet loss. Therefore, it relies on congestion control algorithms to prevent network congestion and packet loss, creating a lossless network environment for RDMA. As the network environment changes, the congestion control algorithm needs to be continuously iterated and updated. Currently, congestion control algorithms deployed in RDMA network cards are typically updated using a hot upgrade method. Existing hot upgrade methods achieve this by directly modifying the function reference address in memory, that is, directly changing the pointer address in memory that points to the old version of the congestion control function to the entry address of the new version of the congestion control function in memory, thereby executing the new version of the congestion control function in subsequent calls.

[0003] However, hot upgrades using the above methods require modification of each new congestion control function, making it impossible to guarantee the atomicity of the overall switch. During modification, a partial update state may occur, where some congestion control functions in the congestion control algorithm are updated while others are not. If a network congestion event occurs and the congestion control function is called at this time, the old and new versions of the function will be executed together, easily leading to parameter mismatches or logical conflicts, which can cause system crashes or network malfunctions. To mitigate these risks, it is usually necessary to lock and suspend all calls to congestion control functions during the update period, introducing additional synchronization overhead and reducing the system's responsiveness and effective throughput during hot upgrades. Furthermore, the tedious, step-by-step modification operation significantly reduces the efficiency of hot upgrades. Summary of the Invention

[0004] To address the aforementioned technical problem, the technical solution adopted in this application is as follows: According to a first aspect of the present invention, a hot upgrade method for congestion control is provided, the method comprising the following steps: S1. Obtain the hot patch file corresponding to the congestion control algorithm, and load the hot patch file into the preset storage area of ​​memory through the network card basic firmware.

[0005] S2. After the hot patch file is loaded, the target network congestion event is determined based on the hot patch file, and a patch function table is generated; the target network congestion event is the network congestion event corresponding to the new version of the congestion control function included in the hot patch file; the patch function table includes pointers to the new version of the congestion control function.

[0006] S3. Modify the value of the global function table pointer in the network card's basic firmware to the memory address of the patch function table; the initial value of the global function table pointer is the memory address of the initial function table; the initial function table includes pointers to the old congestion control functions.

[0007] S4. When a target network congestion event occurs, the network card's basic firmware calls the new version of the congestion control function related to the target network congestion event through pointers in the global function table and the patch function table.

[0008] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the method described above.

[0009] According to a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.

[0010] This application has at least the following beneficial effects: This application provides a hot-upgrade method, device, and medium for congestion control. The method involves obtaining a hot patch file corresponding to a congestion control algorithm and loading it into a preset storage area in memory using the network interface card (NIC) firmware. After the hot patch file is loaded, a target network congestion event is determined based on the hot patch file, and a patch function table is generated. The patch function table includes pointers to new congestion control functions. The value of the global function table pointer in the NIC firmware is modified to the memory address of the patch function table. The initial value of the global function table pointer is the memory address of the initial function table, which includes pointers to older congestion control functions. When a target network congestion event occurs, the NIC firmware calls the new congestion control function related to the target network congestion event using the pointers in the global function table and the patch function table. As can be seen, this invention transforms the discrete function update method into a table-level atomic switching method by introducing a global function table pointer. Since modifying the value of the global function table pointer only requires a single atomic assignment operation, it fundamentally eliminates the non-atomic risk in the update process, ensuring that all subsequent requests can consistently access the new version of the congestion control function. This avoids logical conflicts and system crashes caused by mixing the old and new versions of the congestion control function. Furthermore, it eliminates the need to lock and pause all calls to the congestion control function during the update, avoiding additional synchronization overhead. This ensures the system's responsiveness and effective throughput during hot upgrades, significantly improving the efficiency of hot upgrades. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart of a hot upgrade method for congestion control provided in an embodiment of this application. Detailed Implementation

[0013] The technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] It is worth noting that in the following description, specific details such as particular system structures and techniques are set forth for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary details.

[0015] It should be understood that in this application specification and the appended claims, the terms "comprising," "including," "including but not limited to," "including but not limited to," "mainly composed of," or "mainly made of" all indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.

[0016] It should be understood that in this application specification and the appended claims, the use of the terms "consisting of" or "component of" indicates the presence of the described feature, integral, step, operation, element and / or component, but excludes the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0017] It should be understood that, in this specification and the appended claims, the term "and" indicates a combination in which multiple of the associated listed items exist simultaneously. For example, "A, B, C, and D" means a combination in which "A and B and C and D exist simultaneously".

[0018] It should be understood that in this application specification and the appended claims, the use of the term "or" indicates a combination in which one of the associated listed items exists alone. For example, "A, B, C or D" refers to the four combinations of "A alone", "B alone", "C alone", and "D alone".

[0019] It should be understood that, in this application specification and the appended claims, the term "and / or" indicates any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. For example, "A and / or B" refers to the three combinations of "A alone," "B alone," or "A and B simultaneously." For example, "A, B, and / or C" refers to the seven combinations of "A alone," "B alone," "C alone," "A and B simultaneously," "A and C simultaneously," "B and C simultaneously," and "A, B, and C simultaneously."

[0020] It should be understood that, in this specification and the appended claims, the term "if" is used to indicate, depending on the context, "in the case of," "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0021] It should be understood that in this application specification and the appended claims, the terms "greater than", "less than", "exceeding", etc. are understood to exclude the number itself; and the terms "above", "below", "within", etc. are understood to include the number itself.

[0022] It should be understood that in this application specification and the appended claims, the terms "the," "the," "the," "the," "the," "the described," "the mentioned," etc., may be understood, depending on the context, to refer to the content mentioned above.

[0023] It should be understood that in this application specification and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance, nor are they used to describe a specific order or sequence.

[0024] It should be understood that in this application specification and appended claims, the designations such as "S100," "S200," and "S300" are used only for distinguishing descriptions and should not be construed as indicating or implying a specific order or sequence of execution of steps or processes. For example, "S100, acquire data A; S200, acquire data B; S300, acquire C based on A and B;" is merely an example providing a feasible execution order, not a necessary one. Those skilled in the art can determine the actual and feasible execution order based on the function and internal logic of each step. For example, "step S100 is executed before step S200, then step S300 is executed," "step S200 is executed before step S100, then step S300 is executed," or "steps S100 and S200 are executed in parallel, then step S300 is executed."

[0025] It should be understood that in this application specification and appended claims, if numbering or quantity in the form of “f(i); i=1, 2, ..., n;” is used, the specific value corresponding to the term “f(i)” should be understood as a value that changes with the value of i, and not as a fixed value. For example, in different practical scenarios, “f(1)” and “f(2)”, “f(1)” may be equal to “f(2)” or may not be equal to “f(2)”, and unless otherwise specified, there is no necessary size relationship between “f(1)” and “f(2)”.

[0026] It should be understood that in this application specification and appended claims, if numbers or symbols in the form of superscript are used, and the context or other corresponding locations provide a specific interpretation of them, they should be understood according to their corresponding explanatory description, and cannot be directly and simply understood as concepts such as "exponent" in mathematics or "atomic number" in chemistry. Similarly, if numbers or symbols in the form of subscript are used, they should be understood in the same way, without further explanation.

[0027] It should be understood that in the description of this application and the appended claims, if terms such as "A=(...)" are used, unless otherwise specifically interpreted, they should be understood as "A includes...", and not as "A is composed of...". Furthermore, unless otherwise specifically interpreted, the parentheses "(" and ")" are only used in conjunction with "=" to indicate what items or data A includes, and do not refer to any specific data structure, nor do they limit the type of its elements, whether the number of elements is fixed, whether the elements are ordered, whether the elements are repeatable, what query method is required to query its elements, or what access order is required to access its elements.

[0028] It should be understood that in the description of this application and the appended claims, if common processing functions such as "max(...)", "min(...)", and "avg(...)" are used, the context or other corresponding locations should provide a specific interpretation of these terms. If no specific interpretation exists, those skilled in the art should use relevant technical terms from computer science and technology for connection. For example, "max(...)" refers to a function for determining the maximum value, "min(...)" refers to a function for determining the minimum value, and "avg(...)" refers to a function for determining the average value.

[0029] Embodiments of this application provide a hot upgrade method for congestion control, such as... Figure 1 As shown, the method includes the following steps: S1. Obtain the hot patch file corresponding to the congestion control algorithm, and load the hot patch file into the preset storage area of ​​memory through the network card basic firmware.

[0030] Specifically, the network card's basic firmware is a piece of low-level software code that is embedded in the non-volatile memory inside the network card chip.

[0031] Specifically, the hot patch file is in binary format.

[0032] Specifically, the method runs in a bare metal environment; in this environment, the hot patch file is executed by direct loading without complex dynamic linking or symbol resolution; wherein, the hot patch file is configured to have a fixed execution address, or adopts a position-independent executable file (DYN / PIC) format to support address relocation, which is suitable for resource-constrained lightweight systems.

[0033] Specifically, step S1 also includes the following sub-steps S11-S13: S11. Obtain the hot patch file from the host machine through internal commands, and transfer the hot patch file to the network card basic firmware.

[0034] S12. The network card basic firmware writes the hot patch file into the Flash storage area for storage.

[0035] Specifically, the Flash storage area is a pre-defined non-volatile storage area within the flash memory.

[0036] S13. After the hot patch file is written, read the hot patch file from the Flash storage area and load it into the preset storage area of ​​memory.

[0037] Specifically, the preset storage area includes a fixed loading sub-area and a backup running sub-area; the fixed loading sub-area and the backup running sub-area are two fixed and non-overlapping storage areas predetermined in memory.

[0038] Specifically, in step S13, the newly read hot patch file is loaded into the fixed loading sub-area; wherein, if the fixed loading sub-area already contains a previous version of the hot patch file, after the newly read hot patch file is loaded, a version archiving and update operation is performed: the previous version of the hot patch file is copied as a historical patch file to the backup sub-area to overwrite the original historical patch file in the backup sub-area; at the same time, the newly read hot patch file is used to overwrite the previous version of the hot patch file in the fixed loading sub-area.

[0039] Specifically, after copying the previous version's hot patch file as a historical patch file to the backup sub-area, a patch function table corresponding to the historical patch file is generated, and this patch function table is used as a historical function table to overwrite the original historical function table in the backup running sub-area.

[0040] Through the above steps, a dual-zone archiving mechanism of Flash persistent storage and memory is introduced, realizing full lifecycle management of hot patches. On the one hand, Flash storage ensures the persistence and consistency of patches after device power failure or restart, avoiding system startup anomalies caused by patch loss. On the other hand, by dividing memory into a fixed loading sub-region and a backup running sub-region, and automatically archiving the previous version of the patch and generating the corresponding historical function table during the update process, not only is the fragmentation risk caused by dynamic memory allocation eliminated, but the system can also achieve zero-latency rollback based on the historical function table when facing anomalies in the new version of the patch, significantly improving the robustness and operational security of the network card's basic firmware.

[0041] S2. After the hot patch file is loaded, the target network congestion event is determined based on the hot patch file, and a patch function table is generated; the target network congestion event is the network congestion event corresponding to the new version of the congestion control function included in the hot patch file; the patch function table includes pointers to the new version of the congestion control function.

[0042] Specifically, after generating a new patch function table, the original patch function table is overwritten using the new patch function table.

[0043] Specifically, the new congestion control function is a function stored in the hot patch file that replaces the old congestion control function.

[0044] Specifically, the value of the pointer to the new congestion control function is the memory address of the new congestion control function in the fixed-load sub-region, which is obtained by adding the base address of the fixed-load sub-region to the offset address of the new congestion control function in the hot patch file.

[0045] Specifically, in step S2, after the hot patch file is loaded, the preset initialization function in the hot patch file is called to generate a patch function table; wherein, the initialization function is used to calculate the memory address of the new congestion control function in the fixed loading sub-region based on the fixed base address pre-compiled in the hot patch file and the offset address of the new congestion control function in the hot patch file, and then generate the patch function table; the fixed base address is the base address of the fixed loading sub-region.

[0046] Through the above steps, an address relocation mechanism of "static base address + relative offset" is adopted. The memory address of the new congestion control function is directly calculated using simple addition operations, which significantly reduces CPU overhead and loading latency. At the same time, the static memory planning strategy based on fixed loading sub-regions not only effectively avoids memory fragmentation and address uncertainty caused by dynamic memory allocation, but also ensures that all new congestion control function entries are ready and data consistent at the moment of pointer switching by pre-calculating and generating a complete patch function table. This ensures the long-term stability of the network card's basic firmware while achieving an efficient and low-latency hot upgrade initialization process.

[0047] S3. Modify the value of the global function table pointer in the network card basic firmware to the memory address of the patch function table; the initial value of the global function table pointer is the memory address of the initial function table; the initial function table includes pointers to the old congestion control functions.

[0048] Specifically, the global function table pointer is stored in a special register, such as the x18 register.

[0049] Specifically, the memory address of the patch function table is the base address of the patch function table.

[0050] Specifically, the memory address of the initial function table is the base address of the initial function table.

[0051] Specifically, the patch function table, the initial function table, and the historical function table are all stored in a separate fixed storage area in memory; this separate fixed storage area is physically isolated from the storage area of ​​the network card's basic firmware and the preset storage area, but can be accessed by the storage area of ​​the network card's basic firmware and the preset storage area.

[0052] Specifically, the old congestion control function is a function preset in the network card's basic firmware for handling network congestion events.

[0053] Specifically, the pointer to the old congestion control function is set to the memory address of the old congestion control function.

[0054] Specifically, the initial function table also includes pointers to basic firmware functions.

[0055] Specifically, the value of the pointer to the underlying firmware function is the memory address of the underlying firmware function.

[0056] Specifically, the basic firmware functions are the preset, securely verified low-level general service functions in the network card's basic firmware. These securely verified low-level general service functions do not involve high-risk operations such as resetting the underlying hardware state or directly tampering with registers. For example, functions used to perform device initialization operations or functions used to output system debugging logs. By restricting patches to only calling these securely verified low-level general service functions, high-risk risks such as hardware crashes, link interruptions, or device damage due to patch logic errors are avoided, thus improving the security of hot upgrades.

[0057] Specifically, the index position of the pointer to the new congestion control function in the patch function table must be strictly consistent with the index position of the pointer to the old congestion control function corresponding to the new congestion control function in the initial function table.

[0058] Specifically, the index position is the number used to record the storage location, such as 0, 1, 2, 3, which will not be elaborated here.

[0059] Furthermore, for the index positions in the initial function table of pointers to basic firmware functions and pointer positions in the initial function table of pointers to old congestion control functions that do not have corresponding new congestion control functions, placeholders are set at the corresponding index positions in the patch function table, for example, null pointers (NULL). By setting placeholders, the indexes of the patch function table and the initial function table are kept aligned, so that the patch function table can be accessed with a fixed offset.

[0060] Specifically, the index position of the pointers to basic firmware functions in the initial function table is consistent with the order in which the basic firmware functions are arranged in the network card's basic firmware; the index position of the pointers to legacy congestion control functions in the initial function table is consistent with the order in which the legacy congestion control functions are arranged in the network card's basic firmware.

[0061] By following the steps above, the patch function table is kept strictly aligned with the initial function table, and placeholders are used to fill in the positions of functions that have not been updated. This allows the network card's basic firmware to directly obtain the pointer to be accessed by simply using the global function table pointer and the fixed index offset when making calls. There is no need to traverse, search, or judge, which is simple and fast and meets the extreme low latency requirements of RDMA scenarios.

[0062] S4. When the target network congestion event occurs, the network card basic firmware calls the new version of the congestion control function related to the target network congestion event through the pointer in the global function table and the pointer in the patch function table.

[0063] In one specific embodiment, no processing is performed when network congestion events other than the target network congestion event occur.

[0064] Specifically, in step S4, the network card basic firmware locates the patch function table by dereferencing the global function table pointer; determines the storage location of the pointer to the new version of the congestion control function related to the target network congestion event in the patch function table based on the index position of the pointer to the new version of the congestion control function related to the target network congestion event; and reads the value of the pointer to the new version of the congestion control function related to the target network congestion event to complete the call. Specifically, among all the new congestion control functions included in the hot patch file, several new congestion control functions are configured to: when a basic firmware function needs to be called, look up and call the basic firmware function through the initial function table.

[0065] Specifically, the new congestion control function, configured to "find and call the basic firmware function through the initial function table when it is needed," internally holds an interface pointer to the initialization function table. During operation, the new congestion control function locates the initialization function table by dereferencing the interface pointer, determines the storage location of the pointer to the basic firmware function to be called in the initialization function table based on the index position of the pointer, and reads the value of the pointer to the basic firmware function to be called to complete the call.

[0066] Through the above steps, the network card's basic firmware utilizes a global function table pointer in conjunction with a fixed index to achieve direct calculation and location of memory addresses, meeting the extremely low latency requirements of RDMA scenarios. Furthermore, the new congestion control function internally statically binds an interface pointer to the initial function table. When a basic firmware function that cannot be hot-upgraded needs to be called, it directly backtracks to the initial function table for the call, achieving the reuse of the initial function table. Therefore, hot patch files do not need to repeatedly package basic firmware functions, greatly compressing the patch size, reducing transmission and storage costs, while ensuring that the stability of basic function calls is not affected by patch updates.

[0067] Specifically, after step S3, the following steps are also included: If an operational anomaly is detected, the value of the global function table pointer is rolled back and modified to the memory address of the historical function table corresponding to the historical patch file stored in the backup running sub-region, and the target network congestion event is re-determined based on the historical patch file.

[0068] Through the above steps, when a runtime anomaly is detected, it indicates that there is a compatibility or logical error in the currently loaded patch function table; therefore, the rollback mechanism is automatically triggered to switch the execution environment back to the previous version of the hot patch, thereby quickly restoring the stable running state before the update.

[0069] Specifically, after the patch function table is generated, the network interface card (NIC) stops responding to new connection requests. After confirming that the currently processed request has been completed, a data snapshot of the runtime state of the old congestion control algorithm is generated, and deinitialization processing is performed on the old congestion control algorithm. Based on the data snapshot of the runtime state of the old congestion control algorithm, data recovery and initialization processing are performed on the new congestion control algorithm. After data recovery is completed, the value of the global function table pointer in the NIC's basic firmware is modified to the memory address of the patch function table. After the value of the global function table pointer is modified, the NIC is instructed to respond to new connection requests again. The old congestion control algorithm can be understood as the congestion control algorithm used before the hot patch file was obtained. The new congestion control algorithm can be understood as the congestion control algorithm included in the hot patch file. The algorithm upgrade was completed while ensuring no data loss and no connection interruption, achieving zero-downtime maintenance. Furthermore, using snapshot technology, the runtime state data of the old congestion control algorithm was completely migrated to the new congestion control algorithm, enabling the new congestion control algorithm to seamlessly inherit the current network state and avoiding network oscillations or sudden drops in throughput caused by algorithm reset.

[0070] Specifically, hot patch files are compiled using a compiler and preset compilation rules. The preset compilation rules are configured such that when a new congestion control function needs to call a basic firmware function, the final function address is resolved based on the pointer to the initial function table and the index position of the basic firmware function to be called. During the compilation phase, the call to the external basic firmware function is transformed into a memory addressing instruction based on the interface pointer and a fixed index, thus achieving zero-overhead deterministic function calls.

[0071] Optionally, the compiler is a PCC compiler.

[0072] This application provides a hot-upgrade method for congestion control, comprising: obtaining a hot patch file corresponding to a congestion control algorithm and loading the hot patch file into a preset storage area in memory through the network interface card (NIC) basic firmware; after the hot patch file is loaded, determining the target network congestion event based on the hot patch file and generating a patch function table; wherein the patch function table includes pointers to the new version of the congestion control function; modifying the value of the global function table pointer in the NIC basic firmware to the memory address of the patch function table; wherein the initial value of the global function table pointer is the memory address of the initial function table; the initial function table includes pointers to the old version of the congestion control function; when the target network congestion event occurs, the NIC basic firmware uses the global function table pointer and The pointers in the patch function table call the new version of the congestion control function related to the target network congestion event. By introducing a global function table pointer, the discrete function update method is transformed into a table-level atomic switching method. Since modifying the value of the global function table pointer only requires a single atomic assignment operation, the non-atomic risk in the update process is fundamentally eliminated. This ensures that all subsequent requests can consistently access the new version of the congestion control function, avoiding logical conflicts and system crashes caused by mixing the old and new versions of the congestion control function. Furthermore, there is no need to lock and pause all calls to the congestion control function during the update, avoiding additional synchronization overhead. This ensures the system's responsiveness and effective throughput during hot upgrades, significantly improving the efficiency of hot upgrades.

[0073] In this application embodiment, a non-transitory computer-readable storage medium is also provided. This non-transitory computer-readable storage medium can be disposed in an electronic device to store at least one instruction or at least one program related to implementing the method provided in any embodiment of this application. The at least one instruction or the at least one program is loaded and executed by a processor to implement the method provided in any embodiment of this application, and can achieve the same technical effect. To avoid repetition, further details are omitted here.

[0074] Examples of non-transitory computer-readable storage media include: computer read-only memory (ROM), random access memory (RAM), erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), flash memory, magnetic disk, optical disk, portable computer disk, hard disk and / or solid-state drive, etc.

[0075] In this application embodiment, an electronic device is also provided, the electronic device including a processor and the non-transitory computer-readable storage medium. The processor loads and executes at least one instruction or at least one program stored in the non-transitory computer-readable storage medium related to implementing the method provided in any embodiment of this application, so as to implement the method provided in the embodiment of this application.

[0076] For example, the electronic device may be a mobile electronic device or a non-mobile electronic device that also includes other functions such as a personal digital assistant and / or music player. Further, the mobile electronic device may be any one of a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA); the non-mobile electronic device includes any one of a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine. No specific limitations are made in the embodiments of this application.

[0077] For example, the processor can be a processor in any electronic device.

[0078] Exemplary embodiments of this application also provide a feasible structure for an electronic device. For example, the electronic device may include a processor, an external memory interface, internal memory, a universal serial bus (USB) interface (hereinafter referred to as a USB interface), a charging management module, a power management module, a battery, a first antenna, a second antenna, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, a sensor module, buttons, a motor, an indicator, a camera, a display screen, and a subscriber identification module (SIM) card interface (hereinafter referred to as a SIM card interface), etc. The sensor module may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and / or bone conduction sensors, etc.

[0079] It should be understood that the exemplary structures of the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than the structure described herein, or combine some components, or split some components, or have different component arrangements. The components may be implemented in hardware, software, or a combination of software and hardware.

[0080] For example, the processor may include one or more processing units, wherein the processing units include: an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.

[0081] For example, the processor may further include a memory for storing instructions and data. In some embodiments of this application, the memory in the processor is a cache memory. The memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instructions or data again, it can directly retrieve them from the memory.

[0082] For example, the processor may also include one or more interfaces. These interfaces include: an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a USB interface, etc.

[0083] The integrated circuit interface is a bidirectional synchronous serial bus, which includes a serial data line (SDA) and a serial clock line (SCL).

[0084] Integrated circuits with built-in audio interfaces can be used for audio communication. In some embodiments of this application, the processor may include multiple sets of integrated circuit-based audio interfaces. The processor can couple with an audio module through the integrated circuit-based audio interface to achieve communication between the processor and the audio module.

[0085] The pulse code modulation interface can also be used for audio communication, specifically for sampling, quantizing, and encoding analog signals. In some embodiments of this application, the audio module and the wireless communication module can be coupled through the pulse code modulation interface.

[0086] A Universal Asynchronous Receiver / Transmitter (UART) is a universal serial data bus interface used for asynchronous communication. This bus can be a bidirectional communication bus interface. It converts the data to be transmitted between serial and parallel communication. In some embodiments of this application, the processor and the wireless communication module can be connected via the UART.

[0087] Mobile industry processor interfaces can be used to connect processors to peripheral devices such as displays and cameras.

[0088] General purpose input / output interfaces can be configured via software.

[0089] Furthermore, the general-purpose input / output interface can be configured as a control signal or a data signal. In some embodiments of this application, the general-purpose input / output interface can be used to connect the processor to a camera, display screen, wireless communication module, audio module, sensor module, etc.

[0090] A USB interface is an interface that conforms to the USB standard specification, specifically including Mini USB, Micro USB, and USB Type-C interfaces. USB interfaces can be used to connect chargers to charge electronic devices, and also for transferring data between electronic devices and peripheral devices.

[0091] It should be understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a limitation on the structure of the electronic device. In other embodiments of this application, the electronic device may also employ different interface connection methods or a combination of multiple interface connection methods as described in the embodiments.

[0092] The charging management module receives charging input from a charger, which can be either a wireless or wired charger. In some wired charging embodiments, the charging management module receives charging input from the wired charger via a USB interface. In some wireless charging embodiments, the charging management module receives wireless charging input via the wireless charging coil of the electronic device. While charging the battery, the charging management module can also supply power to various parts of the electronic device via the power management module.

[0093] The power management module is used to connect the battery, the charging management module, and the processor.

[0094] Wireless communication functionality in electronic devices can be achieved through a first antenna, a second antenna, a mobile communication module, a wireless communication module, a modem processor, and a baseband processor.

[0095] Mobile communication modules can enable wireless communication solutions, including 2G / 3G / 4G / 5G, for use in electronic devices.

[0096] A modem processor may include a modulator and a demodulator. The modulator modulates a low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to a baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to an application processor. The application processor outputs sound signals through audio devices (not limited to speakers, receivers, etc.) or displays images or videos on a display screen. In some embodiments of this application, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor and housed within the same device as the mobile communication module or other functional modules.

[0097] Wireless communication modules can enable solutions for wireless communication applications in electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0098] In some embodiments of this application, the first antenna of the electronic device is coupled to the mobile communication module, and the second antenna is coupled to the wireless communication module, enabling the electronic device to communicate with networks and other devices via wireless communication technology.

[0099] Electronic devices utilize GPUs, displays, and application processors to achieve their display functions. A GPU is a microprocessor for image processing, connecting the display and the application processor. GPUs perform mathematical and geometric calculations and are used for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.

[0100] The display screen is used to display images, videos, etc. The display screen includes a display panel. The display panel can be a liquid crystal display (LCD), or a display panel made of materials selected from organic light-emitting diodes (OLEDs), active-matrix organic light-emitting diodes (AMOLEDs), flexible light-emitting diodes (FLEDs), minimized, microLEDs, micro-OLEDs, or quantum dot light-emitting diodes (QLEDs). In some embodiments of this application, the electronic device may include one or more display screens. In some embodiments of this application, the display screen may also integrate touch functionality and may also be referred to as a touch screen.

[0101] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.

[0102] External storage interfaces can be used to connect external memory cards, such as Micro SD cards, to expand the storage capacity of electronic devices.

[0103] Internal memory can be used to store executable program code for a computer, which includes instructions. The processor executes the instructions stored in internal memory to perform various functional applications and data processing of electronic devices.

[0104] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors. Examples include music playback and recording.

[0105] The audio module converts digital audio information into analog audio signals for output, and also converts analog audio input into digital audio signals. The speaker, also called a "horn," converts audio electrical signals into sound signals. The receiver, also called a "handset," converts audio electrical signals into sound signals. The microphone, also called a "microphone" or "voice transducer," converts sound signals into electrical signals. The headphone jack is used to connect wired headphones.

[0106] Pressure sensors are used to sense pressure signals and convert them into electrical signals. In some embodiments of this application, the pressure sensor can be located on the display screen. A gyroscope sensor can be used to determine the motion posture of the electronic device. A barometric pressure sensor is used to measure air pressure. In some embodiments of this application, the electronic device calculates altitude using the air pressure value measured by the barometric pressure sensor, assisting in positioning and navigation. An accelerometer can detect the magnitude of acceleration of the electronic device in various directions (generally three axes). A distance sensor is used to measure distance. A fingerprint sensor is used to collect fingerprints. A touch sensor, also known as a "touch panel," can be located on the display screen, forming a touchscreen, also known as a "touch screen." A bone conduction sensor can acquire vibration signals. In some embodiments of this application, a bone conduction sensor can acquire vibration signals from vibrating bone fragments in the human vocal cords. A bone conduction sensor can also contact the human pulse to receive blood pressure signals.

[0107] The buttons include a power button and volume buttons. A motor can generate vibration alerts. Indicators can be indicator lights, used to show charging status, battery level changes, messages, missed calls, notifications, etc. A SIM card slot is used to connect a SIM card.

[0108] Embodiments of this application also provide a computer program product including program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described in this specification according to various exemplary embodiments of this application.

[0109] This application also provides a chip, which includes a processor and a communication interface. The communication interface is used to receive signals and transmit the signals to the processor. The processor processes the signals so that the methods described in the various exemplary embodiments of this application are executed.

[0110] While specific embodiments of this application have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this application. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this application. The scope of this application is defined by the appended claims.

Claims

1. A thermal upgrade method for congestion control, characterized in that, The method includes the following steps: S1. Obtain the hot patch file corresponding to the congestion control algorithm, and load the hot patch file into the preset storage area of ​​memory through the network card basic firmware; S2. After the hot patch file is loaded, the target network congestion event is determined based on the hot patch file, and a patch function table is generated; the target network congestion event is the network congestion event corresponding to the new version of the congestion control function included in the hot patch file; the patch function table includes pointers to the new version of the congestion control function; S3. Modify the value of the global function table pointer in the network card basic firmware to the memory address of the patch function table; the initial value of the global function table pointer is the memory address of the initial function table; the initial function table includes pointers to the old congestion control functions; S4. When the target network congestion event occurs, the network card basic firmware calls the new version of the congestion control function related to the target network congestion event through the pointer in the global function table and the pointer in the patch function table.

2. The thermal upgrade method for congestion control according to claim 1, characterized in that, The initial function table also includes pointers to basic firmware functions.

3. The thermal upgrade method for congestion control according to claim 2, characterized in that, Among all the new congestion control functions included in the hot patch file, several new congestion control functions are configured to: when a basic firmware function needs to be called, look up and call the basic firmware function through the initial function table.

4. The hot upgrade method for congestion control according to claim 1, characterized in that, Step S1 includes the following sub-steps: S11. Obtain the hot patch file from the host machine through internal commands, and transfer the hot patch file to the network card basic firmware; S12. The network card basic firmware writes the hot patch file into the Flash storage area for storage. S13. After the hot patch file is written, read the hot patch file from the Flash storage area and load it into the preset storage area of ​​memory.

5. The hot upgrade method for congestion control according to claim 1, characterized in that, The new congestion control function is a function stored in the hot patch file that replaces the old congestion control function.

6. The hot upgrade method for congestion control according to claim 1, characterized in that, The old congestion control function is a function preset in the network card's basic firmware for handling network congestion events.

7. The hot upgrade method for congestion control according to claim 2, characterized in that, The basic firmware functions are preset in the network card's basic firmware and are used to provide underlying general services.

8. The hot upgrade method for congestion control according to claim 1, characterized in that, The hot patch file is in binary format.

9. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the hot-upgrade method for congestion control as described in any one of claims 1-8.

10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.