Methods, apparatus, devices, and readable storage media for updating configuration files

By comparing the differences between the current and pending DPU configuration files, and processing each configuration entry, hot upgrades of the DPU configuration files are achieved. This solves the problem of service interruption during configuration file updates, improves user experience, and saves hardware costs.

CN117014309BActive Publication Date: 2026-11-17SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310740305.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-20
Publication Date
2026-11-17
Estimated Expiration
2043-06-20

AI Technical Summary

Technical Problem

In existing technologies, updating the DPU's message parsing configuration file requires disabling the message forwarding function, which interrupts business processes, affects user experience, and increases hardware costs due to the dual configuration file approach.

Method used

By comparing the differences between the current configuration file and the configuration file to be updated, the update type of each configuration entry is determined and processed one by one, thus achieving hot upgrades without disabling the DPU message forwarding function.

Benefits of technology

By keeping the DPU's business processes uninterrupted when the configuration file is updated, the user experience is improved while saving hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117014309B_ABST
    Figure CN117014309B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, device, and readable storage medium for updating a configuration file. The method includes: obtaining a first configuration file and a second configuration file for message parsing by a data processor; the first configuration file being the current configuration file of the data processor, and the second configuration file being the configuration file to be updated by the data processor; both the first and second configuration files containing multiple configuration entries, each configuration entry representing a jump relationship between parsing nodes of a multi-layer protocol for a message; comparing each configuration entry in the first and second configuration files to determine the update type of each configuration entry; and processing each configuration entry in the first configuration file item by item according to the update type of each configuration entry to update the first configuration file to the second configuration file. This method can avoid interruption of the data processor's business processes when updating the configuration file for message parsing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processor technology, and in particular to a method, apparatus, device, and readable storage medium for updating a configuration file. Background Technology

[0002] A Data Processing Unit (DPU) is a dedicated processor built around data. Packet forwarding via a DPU typically involves processes such as packet parsing and table lookup. The DPU's packet parsing configuration file is usually stored in hardware circuitry and updated by a configuration controller on the server that connects to the DPU when necessary.

[0003] In related technologies, updating the DPU's packet parsing configuration file generally employs a cold upgrade method. During a cold upgrade, the DPU's packet forwarding function is first disabled, and then the old configuration file in the DPU is completely deleted. Subsequently, the new configuration file is written to the DPU device line by line, and then the DPU's packet forwarding function is re-enabled.

[0004] However, upgrading the DPU's packet parsing configuration using a cold upgrade method will disable the DPU's packet forwarding function when the configuration file is updated, thereby interrupting the DPU's business processes. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, device, and readable storage medium for updating configuration files that can avoid interrupting the business processes of the DPU, in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a method for updating a configuration file. The method includes:

[0007] Obtain a first configuration file and a second configuration file for message parsing by the data processor. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated by the data processor. The first configuration file and the second configuration file contain multiple configuration entries, each of which is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message.

[0008] Compare each configuration entry in the first configuration file and the second configuration file to determine the entry update type for each configuration entry;

[0009] Based on the update type of each configuration entry, each configuration entry is processed item by item in the configuration space of the data processor to update the first configuration file to the second configuration file.

[0010] In one embodiment, the configuration entry includes an extraction sub-entry and a jumper entry. The extraction sub-entry is used to extract information about the next-layer protocol from the message, and the jumper entry is used to determine the parsing node of the next-layer protocol based on the information about the next-layer protocol and the current state of the message.

[0011] The step of comparing each configuration entry in the first configuration file and the second configuration file to determine the entry update type for each configuration entry includes:

[0012] Compare each configuration entry in the first configuration file and the second configuration file to determine the target configuration entry that is the same in the first configuration file and the second configuration file;

[0013] Based on the target configuration entry and the configuration file to which each configuration entry belongs, determine the entry update type for each configuration entry;

[0014] Wherein, the extracted sub-entry of the target configuration table entry in the first configuration file is the same as the extracted sub-entry of the target configuration table entry in the second configuration file, and the jump rotor entry of the target configuration table entry in the first configuration file is the same as the jump rotor entry of the target configuration table entry in the second configuration file.

[0015] In one embodiment, comparing each configuration entry in the first configuration file and the second configuration file to determine the same target configuration entry in both the first configuration file and the second configuration file includes:

[0016] Compare each configuration table entry in the first configuration file and the second configuration file;

[0017] If the comparison information in the configuration entries of the first configuration file and the corresponding configuration entries in the second configuration file are the same, then the configuration entries in the first configuration file and the configuration entries in the second configuration file are determined to be the same target configuration entries.

[0018] The comparison information includes extraction parameters from the sub-entry, protocol number from the jump rotor entry, protocol corresponding to the current state of the message in the jump rotor entry, and protocol corresponding to the next state of the message in the jump rotor entry.

[0019] In one embodiment, the table entry update type includes reusable table entries, table entries to be deleted, and newly added table entries;

[0020] The step of determining the update type of each configuration entry based on the target configuration entry and the configuration file to which each configuration entry belongs includes:

[0021] If the configuration entry to be processed is the target configuration entry, then the configuration entry to be processed is determined to be the reuse class entry, and the configuration entry to be processed is any one of the configuration entries in the first configuration file and the second configuration file;

[0022] If the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the first configuration file, then the configuration entry to be processed is determined to be the class entry to be deleted.

[0023] If the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the second configuration file, then the configuration entry to be processed is determined to be the newly added class entry.

[0024] In one embodiment, the step of processing each configuration entry item by item in the configuration space of the data processor according to the entry update type of each configuration entry includes:

[0025] If the configuration entry to be processed is a newly added class entry, then the status number of the protocol of the reused class entry in the first configuration file is used to replace the status number of the corresponding protocol in the configuration entry to be processed.

[0026] In the configuration space of the data processor, the configuration table entry to be processed after the status number of the replacement protocol is added to the first configuration file.

[0027] In one embodiment, the step of processing each configuration entry item by item in the configuration space of the data processor according to the entry update type of each configuration entry includes:

[0028] If the configuration entry to be processed is the entry to be deleted, then the configuration entry to be processed in the first configuration file is deleted in the configuration space of the data processor.

[0029] In one embodiment, the step of processing each configuration entry item by item in the configuration space of the data processor according to the entry update type of each configuration entry includes:

[0030] If the configuration entry to be processed is a reused entry, then the configuration entry to be processed in the first configuration file remains unchanged in the configuration space of the data processor.

[0031] Secondly, this application also provides a configuration file updating device. The device includes:

[0032] The acquisition module is used to acquire a first configuration file and a second configuration file for the data processor to parse the message. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated of the data processor. The first configuration file and the second configuration file contain multiple configuration entries, and each configuration entry is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message.

[0033] The comparison module is used to compare each configuration entry in the first configuration file and the second configuration file to determine the entry update type of each configuration entry.

[0034] The processing module is configured to process each configuration entry in the configuration space of the data processor according to the entry update type of each configuration entry, so as to update the first configuration file to the second configuration file.

[0035] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the aforementioned method for updating the configuration file.

[0036] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the above-described method for updating the configuration file.

[0037] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the above-described method for updating the configuration file.

[0038] The aforementioned method, apparatus, device, and readable storage medium for updating the configuration file first obtains a first configuration file and a second configuration file for message parsing by the data processor. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated. Both configuration files contain multiple configuration entries, each representing a jump relationship between parsing nodes of a multi-layer protocol for a message. Then, each configuration entry in the first and second configuration files is compared to determine the update type of each configuration entry. Finally, based on the update type of each configuration entry, each configuration entry in the first configuration file is processed item by item to update the first configuration file to the second configuration file. Because the update type of each configuration entry is determined by comparing the differences between the current first configuration file and the second configuration file to be updated, and the configuration entries are updated item by item based on the update type, the message forwarding function of the DPU does not need to be shut down during configuration file updates, thus maintaining the DPU's business processes. Attached Figure Description

[0039] Figure 1 This is a schematic diagram of a message parsing jump diagram in related technologies;

[0040] Figure 2 This is a flowchart illustrating a message parsing pipeline in a related technology.

[0041] Figure 3 An application environment diagram for a configuration file update method provided in this application embodiment;

[0042] Figure 4 A flowchart illustrating a method for updating a configuration file provided in an embodiment of this application;

[0043] Figure 5 A flowchart illustrating another method for updating a configuration file provided in an embodiment of this application;

[0044] Figure 6 A flowchart illustrating another method for updating a configuration file provided in an embodiment of this application;

[0045] Figure 7 A structural block diagram of a configuration file updating device provided in an embodiment of this application;

[0046] Figure 8 This is an internal structural diagram of a computer device provided in an embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0048] The following section will first explain the message parsing process of the DPU in the relevant technology.

[0049] A Data Processing Unit (DPU) is a dedicated processor built around data. Packet forwarding via a DPU typically involves processes such as packet parsing and table lookup. The DPU's packet parsing configuration file is generally embedded in hardware circuitry and is updated by a configuration controller on the server that connects to the DPU when necessary. In related technologies, each configuration table entry in the DPU's packet parsing configuration file can include sub-table entries and skip-table entries. These sub-table entries and skip-table entries enable a programmable packet parsing pipeline for the DPU.

[0050] Figure 1 This is a schematic diagram of a message parsing jump diagram in related technologies.

[0051] like Figure 1 As shown, Figure 1 In this system, each parsing node represents a protocol and corresponds to the current state of a message. Simultaneously, a message with the same current state may have several subsequent states; correspondingly, one parsing node is followed by several subsequent parsing nodes. By using the extraction sub-table entries and jump sub-table entries in the configuration file, the correct parsing node can be selected from the connected subsequent parsing nodes for hopping. For example... Figure 1 As shown, the aforementioned parsing nodes may include Ethernet protocol parsing nodes, Virtual LAN protocol parsing nodes, Internet Control Message Protocol parsing nodes, Transmission Control Protocol parsing nodes, etc.

[0052] The aforementioned message parsing pipeline is as follows: Figure 2 As shown, it may include S101-S108:

[0053] S101. After inputting a message into the DPU, perform initialization.

[0054] The initialization mentioned above may include setting the current state machine of the message to the initial state, setting the protocol number of the next layer to an empty protocol, setting the extraction offset to 0, setting the message metadata to empty, setting the current extraction sub-table entry to the first entry in the extraction sub-table entry, and setting the current jump rotor table entry to the first entry in the jump rotor table entry, etc.

[0055] S102. Based on the extraction parameters in the current extraction sub-entry, extract data at the current extraction offset to determine the information of the next layer protocol of the message.

[0056] S103. Write the information of the next layer protocol of the extracted message into the message metadata.

[0057] S104. Update the extraction offset based on the current extraction offset and the protocol header length of the next layer of the message.

[0058] In some embodiments, the current extraction offset can be added to the protocol header length of the next layer of the message to update the extraction offset.

[0059] S105. Determine whether there exists a jumper table entry that matches the information of the next layer protocol of the message and the current state of the message.

[0060] If yes, then execute S106; otherwise, execute S108.

[0061] S106. Determine if the number of jumps is less than the maximum number.

[0062] If yes, then execute S107; otherwise, execute S108.

[0063] S107. Based on the next state of the message corresponding to the jump sub-table entry, jump to the next parsing node and update the extraction sub-table entry corresponding to the next state of the message to the current extraction sub-table entry.

[0064] S102 is executed after S107.

[0065] S108. Confirm that message parsing is complete and exit the message parsing pipeline.

[0066] It should be noted that the above message parsing pipeline provides the DPU with programmable message parsing capabilities, namely, an editable configuration file consisting of extracted sub-entries and jumper entries.

[0067] However, in related technologies, updating the DPU's packet parsing configuration file generally employs a cold upgrade method. During a cold upgrade, the DPU's packet forwarding function is first disabled, and then the old configuration file in the DPU is completely deleted. Subsequently, the new configuration file is written to the DPU device line by line, and then the DPU's packet forwarding function is re-enabled.

[0068] However, upgrading the DPU's packet parsing configuration using a cold upgrade method will disable the DPU's packet forwarding function when the configuration file is updated, thereby interrupting the DPU's business process and affecting the user experience.

[0069] Furthermore, related technologies can also use a dual-configuration-file approach to update the configuration. Specifically, two configuration spaces, A and B, of the same size can be set up, each containing one configuration file. The configuration file in one space is used for normal operation, while the configuration file in the other space is used for updating the configuration file.

[0070] For example, when the DPU is running normally, the configuration file in configuration space A can be used, while the configuration file in configuration space B is temporarily inactive. When an update is needed, the configuration file to be updated can be downloaded to configuration space B. Then, a configuration switch is performed, changing from using the configuration file in configuration space A to using the configuration file in configuration space B. Finally, the configuration file in configuration space B is activated, thus completing the update. During the next update, the configuration file to be updated is downloaded to configuration file A, and the above process is repeated.

[0071] However, using a dual-configuration-file approach for configuration updates requires twice the configuration space, increasing hardware costs.

[0072] To address the aforementioned technical problems, embodiments of this application provide a method, apparatus, device, and readable storage medium for updating configuration files. By comparing the differences between the current first configuration file and the second configuration file to be updated, the update type of each configuration entry is determined. Then, the configuration entries are updated item by item based on the update type. This allows the DPU's message forwarding function to be maintained during configuration file updates without disabling it, thus improving the user experience. Furthermore, only one configuration file's configuration space is required, saving hardware costs.

[0073] The following describes the application environment of the configuration file update method involved in this application.

[0074] The configuration file update method provided in this application embodiment can be applied to, for example, Figure 3 In the application environment shown, server 201 communicates with DPU 202 via a network. A configuration controller is deployed on server 201. DPU 202 stores the current first configuration file. When server 201 receives a configuration update request, it can store the second configuration file to be updated in its storage device. Next, server 201 can connect to DPU 202 to obtain the first configuration file. Then, server 201 can compare each configuration entry in the first and second configuration files to determine the update type for each entry. Finally, server 202 processes each configuration entry in the first configuration file of DPU 202 according to its update type to update the first configuration file to the second configuration file.

[0075] Server 201 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0076] It is understood that the above-mentioned configuration file update method can be implemented by the configuration file update device provided in the embodiments of this disclosure. The configuration file update device can be part or all of a device, such as the above-mentioned server or the configuration controller deployed on the server.

[0077] In one embodiment, such as Figure 4 As shown, a method for updating a configuration file is provided, which is applied to... Figure 3 The configuration controller of the server in the example is used, including S301-S303:

[0078] S301, Obtain the first and second configuration files for message parsing by the data processor.

[0079] In this application, when it is necessary to parse the configuration file for message parsing in the DPU, a first configuration file and a second configuration file can be obtained. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file of the data processor to be updated.

[0080] It should be understood that both the first and second configuration files mentioned above contain multiple configuration entries, each of which represents a jump relationship between the parsing nodes of the multi-layer protocol of a message. For example, as shown... Figure 1 As shown, when the DPU parses a message, because the message contains multiple layers of protocols, the parsing process also involves multiple parsing nodes. Each configuration entry in both the first and second configuration files can correspond to one parsing node.

[0081] It should be noted that the embodiments of this application do not limit the information contained in the above configuration entries. In some embodiments, the configuration entries may include extraction sub-entries and jumper entries. Extraction sub-entries are used to extract information of the next layer protocol from the message, and jumper entries are used to determine the parsing node of the next layer protocol based on the information of the next layer protocol and the current state of the message.

[0082] For example, the extraction sub-entry may include extraction parameters used to locate information about the next-layer protocol in the message. For example, the jump sub-entry includes a protocol number, the current state of the message, and the next state of the message. The protocol number is the protocol number of the next-layer protocol, and both the current state and the next state of the message can be the jump state of the message.

[0083] It should be understood that the embodiments of this application do not limit how the first configuration file and the second configuration file are obtained. In some embodiments, the first configuration file may be stored in the configuration space of the DPU. When it is necessary to update the configuration file of the DPU, the configuration controller may connect to the DPU and read the first configuration file from the configuration space of the DPU.

[0084] In some embodiments, the server deploying the configuration controller can receive a configuration update request, which includes a second configuration file and a configuration update time. The server can then store the second configuration file in a storage device. When the configuration update time arrives, the configuration controller can retrieve the second configuration file from the storage device. In other embodiments, upon receiving a configuration update request, the server deploying the configuration controller can immediately retrieve the second configuration file from the request and immediately update the configuration of the DPU.

[0085] S302. Compare each configuration entry in the first configuration file and the second configuration file to determine the entry update type for each configuration entry.

[0086] In this step, after the configuration controller obtains the first configuration file and the second configuration file, it can compare each configuration entry in the first configuration file and the second configuration file to determine the entry update type of each configuration entry.

[0087] It should be understood that the above comparison of each configuration entry in the first configuration file and the second configuration file can be used to identify the same target configuration entry in the first configuration file and the second configuration file.

[0088] In some embodiments, the configuration controller may compare each configuration entry in a first configuration file and a second configuration file to determine the same target configuration entry in both the first and second configuration files. Subsequently, the configuration controller determines the entry update type for each configuration entry based on the target configuration entry and the configuration file to which each configuration entry belongs.

[0089] Among them, the extracted sub-table entries of the target configuration table entry in the first configuration file are the same as the extracted sub-table entries of the target configuration table entry in the second configuration file, and the jump rotor table entries of the target configuration table entry in the first configuration file are the same as the jump rotor table entries of the target configuration table entry in the second configuration file.

[0090] In some embodiments, the target configuration entry can be determined by preset comparison information in the configuration entry. If the comparison information in the corresponding configuration entry of the first configuration file and the second configuration file is the same, then the configuration entry of the first configuration file and the configuration entry of the second configuration file are determined to be the same target configuration entry.

[0091] The comparison information includes the extraction parameters in the extracted sub-entry, the protocol number in the jump rotor entry, the protocol corresponding to the current state of the message in the jump rotor entry, and the protocol corresponding to the next state of the message in the jump rotor entry.

[0092] It should be noted that the comparison information above does not include the status number corresponding to the current state and the status number corresponding to the next state. Therefore, even if the status numbers corresponding to the current state and / or the status numbers corresponding to the next state are different in two configuration entries, if the comparison information above is exactly the same, it can be determined that the two configuration entries are the same, that is, the two configuration entries are the target configuration entries.

[0093] It should be understood that the embodiments of this application do not limit the update type of configuration entries, and can be divided according to the update method of configuration entries. In some embodiments, the update type of entries includes reused entries, deleted entries, and newly added entries.

[0094] Among them, the above-mentioned reused table entries can be table entries that continue to be used in the first configuration file, the above-mentioned deleted table entries can be table entries that need to be deleted in the first configuration file, and the above-mentioned newly added table entries can be table entries newly added in the first configuration file.

[0095] In some embodiments, if the configuration entry to be processed is a target configuration entry, then the configuration entry to be processed is determined to be a reused entry. That is, entries identical in the first configuration file and the second configuration file can be directly reused. In some embodiments, if the configuration entry to be processed is not a target configuration entry and the configuration entry to be processed belongs to the first configuration file, then the configuration entry to be processed is determined to be a deletion entry. That is, entries that exist only in the first configuration file but not in the second configuration file can be deleted. If the configuration entry to be processed is not a target configuration entry and the configuration entry to be processed belongs to the second configuration file, then the configuration entry to be processed is determined to be a new entry. That is, entries that exist only in the second configuration file but not in the first configuration file can be added to the first configuration file.

[0096] The configuration entry to be processed is any one of the configuration entries in the first configuration file and the second configuration file.

[0097] S303. Based on the update type of each configuration entry, process each configuration entry in the configuration space of the data processor to update the first configuration file to the second configuration file.

[0098] In this step, once the configuration controller determines the update type of each configuration entry, it can process each configuration entry in the configuration space of the data processor according to the update type of each configuration entry to update the first configuration file to the second configuration file.

[0099] It should be understood that, regarding how each configuration entry is processed item by item in the configuration space of the data processor, in some embodiments, the configuration controller may first process the configuration entries existing in the first configuration file, and then process the configuration entries existing in the second configuration file but not in the first configuration file. In other embodiments, the configuration controller may process each configuration entry sequentially according to the entry update type. For example, it may process the deletion-type entries first, then the addition-type entries, and finally the reuse-type entries.

[0100] It should be understood that the update methods for configuration entries of different update types differ when updating configuration files. In some embodiments, if the configuration entry to be processed is a reused entry, the configuration entry to be processed in the first configuration file remains unchanged in the configuration space of the data processor. For example, if configuration entry A exists in both the first and second configuration files, the status number corresponding to the current state and the status number corresponding to the next state of the jumper entry in configuration entry A can be the same or different. When updating configuration processing entry A, configuration entry A can remain unchanged in the first configuration file within the DPU.

[0101] In some embodiments, if the configuration entry to be processed is a deletion entry, then the configuration entry to be processed in the first configuration file is deleted from the configuration space of the data processor. For example, if configuration entry B exists only in the first configuration file and not in the second configuration file, when updating the configuration processing of configuration entry B, the configuration controller can directly delete configuration entry B in the first configuration file in the DPU.

[0102] In some embodiments, if the configuration entry to be processed is a newly added class entry, the status number of the protocol in the configuration entry to be processed is replaced with the status number of the protocol of the reused class entry in the first configuration file. In the configuration space of the data processor, the configuration entry to be processed with the replaced protocol status number is added to the first configuration file.

[0103] It should be understood that since the status numbers used for the same protocol in the first and second configuration files may be different, for newly added class entries, the status numbers in the first configuration file need to be used to preserve compatibility.

[0104] For example, the status field in the reuse class entry can be retrieved to determine the status number of the protocol in the reuse class entry. Then, it is determined whether the retrieved protocol status number has appeared in the reuse class entry before. If the retrieved protocol status number has not appeared before, the status number of the protocol in the configuration entry to be processed is replaced with the status number of the protocol in the reuse class entry. If the retrieved protocol status number has appeared before, no status number replacement is necessary.

[0105] In other embodiments, when processing newly added class entries, the number of newly added class entries can be counted, and it can be determined whether the remaining number of entries that the configuration space in the DPU can accommodate is greater than the number of newly added class entries. If so, the processing of newly added class entries continues. If not, the configuration file update is exited.

[0106] It should be understood that the embodiments of this application do not limit how new class entries are added to the first configuration file. In some embodiments, the configuration controller can append new class entries to the configuration space of the DPU.

[0107] In this application, the above-mentioned configuration file update method updates the configuration file one configuration entry at a time, thus requiring only one configuration space for in-situ hot upgrades, without needing double the configuration space, thereby saving configuration space and hardware costs.

[0108] The configuration file update method provided in this application first obtains a first configuration file and a second configuration file for packet parsing by the data processor. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated. Both the first and second configuration files contain multiple configuration entries, each representing a jump relationship between parsing nodes of a multi-layer protocol for a packet. Then, each configuration entry in the first and second configuration files is compared to determine the update type of each configuration entry. Finally, based on the update type of each configuration entry, each configuration entry in the first configuration file is processed item by item to update the first configuration file to the second configuration file. Because the update type of each configuration entry is determined by comparing the differences between the current first configuration file and the second configuration file to be updated, and the configuration entries are updated item by item based on the update type, the packet forwarding function of the DPU does not need to be shut down during configuration file updates, thus maintaining the DPU's business process and improving the user experience.

[0109] The following explains how to compare the first and second configuration files. Figure 5 This is a flowchart illustrating another method for updating a configuration file provided in an embodiment of this application. Figure 5 As shown, the update methods for this configuration file include S401-S404:

[0110] S401, Obtain the first and second configuration files for message parsing by the data processor.

[0111] The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file of the data processor to be updated. The first and second configuration files contain multiple configuration entries, each of which is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message.

[0112] S402. If the comparison information in the configuration entries of the first configuration file and the corresponding configuration entries in the second configuration file are the same, then the configuration entries of the first configuration file and the configuration entries of the second configuration file are determined to be the same target configuration entries.

[0113] The comparison information includes extraction parameters from the sub-entry, protocol number from the jump rotor entry, protocol corresponding to the current state of the message in the jump rotor entry, and protocol corresponding to the next state of the message in the jump rotor entry.

[0114] S403. Determine the update type of each configuration entry based on the target configuration entry and the configuration file to which each configuration entry belongs.

[0115] In some embodiments, if the configuration entry to be processed is a target configuration entry, then the configuration entry to be processed is determined to be a reuse class entry, and the configuration entry to be processed is any one of the configuration entries in the first configuration file and the second configuration file.

[0116] In some embodiments, if the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the first configuration file, then the configuration entry to be processed is determined to be a class entry to be deleted.

[0117] In some embodiments, if the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the second configuration file, then the configuration entry to be processed is determined to be a newly added class entry.

[0118] S404. Based on the update type of each configuration entry, process each configuration entry in the configuration space of the data processor to update the first configuration file to the second configuration file.

[0119] The following explains how to process each configuration entry in the first configuration file. Figure 6 This is a flowchart illustrating another method for updating a configuration file provided in an embodiment of this application. Figure 6 As shown, the update methods for this configuration file include S501-S509:

[0120] S501, Obtain the first and second configuration files for message parsing by the data processor.

[0121] The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file of the data processor to be updated. The first and second configuration files contain multiple configuration entries, each of which is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message.

[0122] S502. If the comparison information in the configuration entries of the first configuration file and the corresponding configuration entries in the second configuration file are the same, then the configuration entries of the first configuration file and the configuration entries of the second configuration file are determined to be the same target configuration entries.

[0123] The comparison information includes extraction parameters from the sub-entry, protocol number from the jump rotor entry, protocol corresponding to the current state of the message in the jump rotor entry, and protocol corresponding to the next state of the message in the jump rotor entry.

[0124] S503. Determine the update type of each configuration entry based on the target configuration entry and the configuration file to which each configuration entry belongs.

[0125] S504. Determine whether the configuration table item to be processed is a newly added class item.

[0126] If yes, then execute S505; otherwise, execute S507.

[0127] S505. Replace the status number of the corresponding protocol in the configuration entry to be processed with the status number of the protocol in the reuse class table entry in the first configuration file.

[0128] S506. In the configuration space of the data processor, add the configuration table entry to be processed after the status number of the replacement protocol to the first configuration file.

[0129] S507. Determine whether the configuration entry to be processed is a deletion entry.

[0130] If yes, then execute S508; otherwise, execute S509.

[0131] S508. In the configuration space of the data processor, delete the configuration entries to be processed in the first configuration file.

[0132] S509. In the configuration space of the data processor, keep the configuration entries to be processed in the first configuration file unchanged.

[0133] The configuration file update method provided in this application first obtains a first configuration file and a second configuration file for packet parsing by the data processor. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated. Both the first and second configuration files contain multiple configuration entries, each representing a jump relationship between parsing nodes of a multi-layer protocol for a packet. Then, each configuration entry in the first and second configuration files is compared to determine the update type of each configuration entry. Finally, based on the update type of each configuration entry, each configuration entry in the first configuration file is processed item by item to update the first configuration file to the second configuration file. Because the update type of each configuration entry is determined by comparing the differences between the current first configuration file and the second configuration file to be updated, and the configuration entries are updated item by item based on the update type, the packet forwarding function of the DPU does not need to be shut down during configuration file updates, thus maintaining the DPU's business process and improving the user experience.

[0134] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0135] Based on the same inventive concept, this application also provides a configuration file updating apparatus for implementing the configuration file updating method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations of one or more configuration file updating apparatus embodiments provided below can be found in the limitations of the configuration file updating method described above, and will not be repeated here.

[0136] In one embodiment, such as Figure 7 As shown, a configuration file updating device 600 is provided, including: an acquisition module 601, a comparison module 602, and a processing module 603, wherein:

[0137] The acquisition module 601 is used to acquire the first configuration file and the second configuration file for the data processor to parse the message. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated of the data processor. The first configuration file and the second configuration file contain multiple configuration entries, and each configuration entry is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message.

[0138] The comparison module 602 is used to compare each configuration entry in the first configuration file and the second configuration file to determine the entry update type of each configuration entry.

[0139] The processing module 603 is used to process each configuration entry in the configuration space of the data processor according to the entry update type of each configuration entry, so as to update the first configuration file to the second configuration file.

[0140] In one embodiment, the configuration entry includes an extraction sub-entry and a jumper entry. The extraction sub-entry is used to extract information about the next-layer protocol from the message, and the jumper entry is used to determine the parsing node of the next-layer protocol based on the information about the next-layer protocol and the current state of the message.

[0141] The comparison module 602 is specifically used to compare each configuration entry in the first configuration file and the second configuration file, determine the target configuration entry that is the same in the first configuration file and the second configuration file, and determine the entry update type of each configuration entry based on the target configuration entry and the configuration file to which each configuration entry belongs.

[0142] Wherein, the extracted sub-entry of the target configuration table entry in the first configuration file is the same as the extracted sub-entry of the target configuration table entry in the second configuration file, and the jump rotor entry of the target configuration table entry in the first configuration file is the same as the jump rotor entry of the target configuration table entry in the second configuration file.

[0143] In one embodiment, the comparison module 602 is specifically used to compare each configuration entry in the first configuration file and the second configuration file; if the comparison information in the corresponding configuration entries in the first configuration file and the second configuration file is the same, then the configuration entries in the first configuration file and the configuration entries in the second configuration file are determined to be the same target configuration entries.

[0144] The comparison information includes the extraction parameters in the extracted sub-entry, the protocol number in the jump rotor entry, the protocol corresponding to the current state of the message in the jump rotor entry, and the protocol corresponding to the next state of the message in the jump rotor entry.

[0145] In one embodiment, the table entry update type includes reused table entries, deleted table entries, and newly added table entries.

[0146] The comparison module 602 is specifically used to determine the configuration entry to be processed as a reused class entry if the configuration entry to be processed is the target configuration entry, and the configuration entry to be processed is either the first configuration file or the second configuration file; if the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the first configuration file, then the configuration entry to be processed is a class entry to be deleted; if the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the second configuration file, then the configuration entry to be processed is a class entry to be added.

[0147] In one embodiment, the processing module 603 is specifically configured to, if the configuration entry to be processed is a newly added class entry, replace the status number of the corresponding protocol in the configuration entry to be processed with the status number of the protocol of the reused class entry in the first configuration file; and add the configuration entry to be processed after replacing the status number of the protocol in the configuration space of the data processor to the first configuration file.

[0148] In one embodiment, the processing module 603 is specifically used to delete the configuration entry to be processed in the first configuration file in the configuration space of the data processor if the configuration entry to be processed is a class entry to be deleted.

[0149] In one embodiment, the processing module 603 is specifically configured to keep the configuration entry to be processed in the first configuration file unchanged in the configuration space of the data processor if the configuration entry to be processed is a reusable entry.

[0150] Each module in the aforementioned configuration file update device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0151] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a method for updating a configuration file.

[0152] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0153] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method for updating the configuration file.

[0154] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method for updating the configuration file.

[0155] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method for updating the configuration file.

[0156] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0157] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0158] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for updating a configuration file, characterized in that, The method includes: Obtain a first configuration file and a second configuration file for message parsing by the data processor. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated by the data processor. The first configuration file and the second configuration file contain multiple configuration entries, each of which is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message. Compare each configuration entry in the first configuration file and the second configuration file to determine the target configuration entry that is the same in the first configuration file and the second configuration file; If the configuration entry to be processed is the target configuration entry, then the configuration entry to be processed is determined to be a reuse class entry, and the configuration entry to be processed is any one of the configuration entries in the first configuration file and the second configuration file; If the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the first configuration file, then the configuration entry to be processed is determined to be a class entry to be deleted. If the configuration entry to be processed is not the target configuration entry and the configuration entry to be processed belongs to the second configuration file, then the configuration entry to be processed is determined to be a new class entry; If the configuration entry to be processed is a newly added class entry, then the status number of the protocol in the configuration entry to be processed is replaced with the status number of the protocol in the reused class entry in the first configuration file. In the configuration space of the data processor, the configuration table entry to be processed after the status number of the replacement protocol is added to the first configuration file.

2. The method according to claim 1, characterized in that, The configuration entry includes an extraction sub-entry and a jumper entry. The extraction sub-entry is used to extract information about the next-layer protocol from the message. The jumper entry is used to determine the parsing node of the next-layer protocol based on the information about the next-layer protocol and the current state of the message. The extraction sub-entry of the target configuration entry in the first configuration file is the same as the extraction sub-entry of the target configuration entry in the second configuration file. The jumper entry of the target configuration entry in the first configuration file is the same as the jumper entry of the target configuration entry in the second configuration file.

3. The method according to claim 2, characterized in that, The step of comparing each configuration entry in the first configuration file and the second configuration file to determine the same target configuration entry in both the first configuration file and the second configuration file includes: Compare each configuration table entry in the first configuration file and the second configuration file; If the comparison information in the configuration entries of the first configuration file and the corresponding configuration entries in the second configuration file are the same, then the configuration entries in the first configuration file and the configuration entries in the second configuration file are determined to be the same target configuration entries. The comparison information includes extraction parameters from the sub-entry, protocol number from the jump rotor entry, protocol corresponding to the current state of the message in the jump rotor entry, and protocol corresponding to the next state of the message in the jump rotor entry.

4. The method according to claim 1, characterized in that, The step of processing each configuration entry item by item in the configuration space of the data processor according to the entry update type of each configuration entry includes: If the configuration entry to be processed is the entry to be deleted, then the configuration entry to be processed in the first configuration file is deleted in the configuration space of the data processor.

5. The method according to claim 1, characterized in that, The step of processing each configuration entry item by item in the configuration space of the data processor according to the entry update type of each configuration entry includes: If the configuration entry to be processed is a reused entry, then the configuration entry to be processed in the first configuration file remains unchanged in the configuration space of the data processor.

6. A configuration file updating device, characterized in that, The device includes: The acquisition module is used to acquire a first configuration file and a second configuration file for the data processor to parse the message. The first configuration file is the current configuration file of the data processor, and the second configuration file is the configuration file to be updated of the data processor. The first configuration file and the second configuration file contain multiple configuration entries, and each configuration entry is used to represent a jump relationship between the parsing nodes of the multi-layer protocol of the message. The comparison module compares each configuration entry in the first configuration file and the second configuration file to identify the same target configuration entry in both configuration files. If the configuration entry to be processed is a target configuration entry, it is determined to be a reused configuration entry, and the configuration entry to be processed can be any configuration entry in the first or second configuration file. If the configuration entry to be processed is not a target configuration entry but belongs to the first configuration file, it is determined to be a deletion configuration entry. If the configuration entry to be processed is not a target configuration entry but belongs to the second configuration file, it is determined to be a new configuration entry. The processing module, when a new class entry is to be processed, uses the status number of the protocol of the reused class entry in the first configuration file to replace the status number of the corresponding protocol in the configuration entry to be processed; in the configuration space of the data processor, the configuration entry to be processed after replacing the status number of the protocol is added to the first configuration file.

7. The apparatus according to claim 6, characterized in that, The configuration entry includes an extraction sub-entry and a jumper entry. The extraction sub-entry is used to extract information about the next-layer protocol from the message. The jumper entry is used to determine the parsing node of the next-layer protocol based on the information about the next-layer protocol and the current state of the message. The extraction sub-entry of the target configuration entry in the first configuration file is the same as the extraction sub-entry of the target configuration entry in the second configuration file. The jumper entry of the target configuration entry in the first configuration file is the same as the jumper entry of the target configuration entry in the second configuration file.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Configuration file modification method and apparatus, computer device, and storage medium

    CN109358869A

  • Management system for DPU networking

    CN115225484A