Storage method, device, equipment, medium and product

By implementing an intelligent ACL sharing management algorithm in the TCAM and cascade RAM space and dynamically managing TCAM resources, the problem of low ACL table storage efficiency is solved, efficient storage is achieved under limited resources, and the security and stability of automotive network communications are ensured.

CN120653189AActive Publication Date: 2025-09-16SANECHIPS TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510359552.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-09-16
Estimated Expiration
2045-03-25

AI Technical Summary

Technical Problem

In the existing technology, the storage efficiency of access control list (ACL) entries in automotive network communications is low, which makes it difficult to meet the growing data traffic demand. Especially when TCAM resources are limited, traditional storage methods cannot reasonably allocate resources, resulting in insufficient capacity.

Method used

By implementing an intelligent ACL sharing management algorithm in the TCAM and cascade RAM space, TCAM resources are dynamically applied for, released, and fragmented, allowing multiple entries to share storage space and optimize TCAM resource sharing.

Benefits of technology

Without increasing storage space, the storage efficiency of ACL is improved, the utilization of storage space is increased, and the security and stability of vehicle network communications are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653189A_ABST
    Figure CN120653189A_ABST
Patent Text Reader

Abstract

The invention discloses a storage method and device, equipment, a medium and a product, and belongs to the technical field of network communication. The storage method comprises the following steps: acquiring information of a storage space and information of an access control list; selecting or determining a target access control list sharing algorithm model according to the information of the storage space and the information of the access control list; and performing table item management on the access control list in the storage space based on the target access control list sharing algorithm model, and adaptively selecting the target access control list sharing algorithm model according to the information of the storage space and the information of the access control list. Table item management is carried out on the access control list in the storage space through the target access control list sharing algorithm model, the storage efficiency of the access control list can be improved under the condition that the storage space is not increased, and the utilization rate of the storage space is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a storage method, device, equipment, medium and product. Background Art

[0002] With the continuous advancement of automotive technology and the rapid development of intelligent connected vehicles, automotive network communication systems are becoming increasingly complex. Access Control Lists (ACLs) play a crucial role in automotive network communications as a key tool for network security management. ACL entries define which systems or devices have access to services on the network, thereby ensuring the security and reliability of in-vehicle communications. However, with the increasing number of sensors, controllers, and actuators in vehicles, as well as the growing number of in-vehicle applications and services, the data traffic in automotive network communications is also growing. This growth in data traffic places higher demands on the capacity of ACL entries.

[0003] In existing technology, ACL tables are primarily stored in Ternary Content Addressable Memory (TCAM). Traditionally, this method divides the TCAM into blocks of varying sizes. Each block is assigned to an ACL entry, and the service key (KEY) is used to initiate parallel searches for multiple blocks of an ACL entry. However, this storage method is inefficient and hinders full utilization of storage space.

[0004] Therefore, it is necessary to propose a solution for improving the storage efficiency of ACL in a limited storage space to improve the utilization of the storage space. Summary of the Invention

[0005] The main purpose of this application is to provide a storage method, apparatus, device, medium and product, aiming to propose a solution for improving the storage efficiency of ACL in a limited storage space, thereby improving the utilization of storage space.

[0006] To achieve the above objectives, an embodiment of the present application provides a storage method, the method comprising:

[0007] Obtain storage space information and access control list information;

[0008] Selecting a target access control list sharing algorithm model according to the information of the storage space and the information of the access control list;

[0009] The access control list is managed in the storage space based on the target access control list sharing algorithm model.

[0010] An embodiment of the present application further provides a storage device, the device comprising:

[0011] An acquisition module is used to obtain storage space information and access control list information;

[0012] A selection module, configured to select or determine a target access control list sharing algorithm model based on the information of the storage space and the information of the access control list;

[0013] A management module is configured to manage entries of the access control list in the storage space based on the target access control list sharing algorithm model.

[0014] An embodiment of the present application further provides a network device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the storage method described above.

[0015] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the storage method described above are implemented.

[0016] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the storage method described above are implemented.

[0017] An embodiment of the present application discloses a storage method, which includes: obtaining storage space information and access control list information; selecting or determining a target access control list sharing algorithm model based on the storage space information and the access control list information; and performing table entry management on the access control list in the storage space based on the target access control list sharing algorithm model. The target access control list sharing algorithm model can be adaptively selected based on the storage space information and the access control list information. By performing table entry management on the access control list in the storage space using the target access control list sharing algorithm model, the storage efficiency of the access control list can be improved without increasing the storage space, thereby improving the utilization of the storage space. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a schematic diagram of an exemplary process of the storage method in an embodiment of the present application;

[0019] Figure 2 Schematic diagram of the access control list sharing algorithm management system in an embodiment of the present application;

[0020] Figure 3A schematic diagram of the access control list structure in an embodiment of the present application;

[0021] Figure 4 Schematic diagram of the storage structure of a ternary content addressable memory in an embodiment of the present application;

[0022] Figure 5 This is a schematic diagram of model selection in the embodiment of the present application;

[0023] Figure 6 Schematic diagram of storage of different entry bit widths in TCAM according to an embodiment of the present application;

[0024] Figure 7 Schematic diagram of the corresponding structure of the base address and index in the embodiment of the present application;

[0025] Figure 8 This is a schematic diagram of the simultaneous hit selection mode in the embodiment of the present application;

[0026] Figure 9 A schematic diagram of the process of adding table entries in the embodiment of the present application;

[0027] Figure 10 Schematic diagram of the table entry deletion process in an embodiment of the present application;

[0028] Figure 11 A schematic diagram of a process for applying for a ternary content addressable memory block in an embodiment of the present application;

[0029] Figure 12 This is a schematic diagram of the fragmentation sorting process in an embodiment of the present application;

[0030] Figure 13 is another exemplary flow chart of the storage method in an embodiment of the present application;

[0031] Figure 14 This is a schematic diagram of a first effect of moving data entries in an embodiment of the present application;

[0032] Figure 15 This is a schematic diagram of a second effect of moving data entries in an embodiment of the present application;

[0033] Figure 16 This is a schematic diagram of a third effect of moving data entries in an embodiment of the present application;

[0034] Figure 17 This is a schematic diagram of a fourth effect of moving data entries in an embodiment of the present application;

[0035] Figure 18 A schematic diagram of the storage device structure provided in an embodiment of the present application.

[0036] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0037] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0038] Technical terms involved in the embodiments of this application:

[0039] ACL: Access Control List, access control list;

[0040] TCAM: Ternary Content Addressab le Memory;

[0041] RAM: Random Access Memory, random access memory;

[0042] Bit: bit;

[0043] Key_mode: table entry storage bit width / key value;

[0044] Block: Block.

[0045] With the continuous advancement of automotive technology and the rapid development of intelligent connected vehicles, automotive network communication systems are becoming increasingly complex. Access control lists (ACLs) play a crucial role in automotive network communications as a key tool for network security management. ACL entries define which systems or devices have access to services on the network, thereby ensuring the security and reliability of in-vehicle communications. However, with the increasing number of sensors, controllers, and actuators in vehicles, as well as the growing number of in-vehicle applications and services, data traffic in automotive network communications is also growing. This growth in data traffic places higher demands on the capacity of ACL entries. ACLs are primarily stored in ternary content-addressable memory (TCAM). TCAM features parallel search and low latency, but its disadvantages are high cost, high power consumption, and limited capacity.

[0046] The traditional method for storing ACL entries divides the TCAM into blocks of varying sizes. Each block is allocated to an ACL entry, and the service key initiates parallel lookups across multiple blocks for a single ACL entry. This storage method is inefficient, especially in large networks with a large number of ACL entries. Traditional storage methods struggle to meet capacity requirements. Therefore, increasing ACL capacity within limited TCAM resources has become a pressing issue in automotive communications technology.

[0047] Currently, in order to improve the capacity of ACLs, in addition to the direct method of increasing TCAM resource space, the industry has also explored a variety of optimization solutions, including: (1) One block lock can store two ACL table entries, and two ACL tables are written in different address directions to achieve resource sharing of one block lock; (2) Two block locks store one type of ACL table entry respectively, and the two ACL tables are written in different address directions. By adjusting the size of the block lock, resource sharing of the block lock is achieved. However, these two solutions are not feasible for scenarios where more than three ACL service table entries share resources; (3) By loading the same ACL rules in multiple ACLs as ACL shared segments separately, the purpose of saving memory space is achieved. However, the number of ACL shared segments found in solution (3) is limited, which has strong limitations.

[0048] Taking a TCAM with 16 blocks, each with 1k*640 bits of space, as an example, in actual applications, different services have varying ACL entry bit width requirements. For example, service 1 requires 160 bits of bit width, with a maximum resource requirement of 12k*640 bits; service 2 increases to 320 bits, also requiring a maximum resource requirement of 12k*640 bits; and service 3 increases to 640 bits, with a maximum resource requirement remaining at 12k*640 bits. However, when ACL entries for these three services coexist in the network, the total maximum resource requirements exceed the existing 16k*640 bits. Traditional storage methods, allocating 12k*640 bits of resources to each service, clearly cannot meet the coexisting needs of all three services, resulting in insufficient resource allocation. Therefore, developing an efficient ACL entry storage sharing solution is crucial to ensure that ACL table resources are appropriately allocated in various service scenarios, thereby maintaining secure and stable automotive network communications.

[0049] This embodiment of the application proposes a solution for limited TCAM and cascade RAM space. Based on existing TCAM storage rules, this solution provides users with an efficient shared ACL entry storage management method through an intelligent ACL sharing management algorithm. Multiple entries share a single space, and TCAM resource sharing is achieved through dynamic TCAM block allocation, release, and fragmentation processes.

[0050] Reference Figure 1 , Figure 1 The following is an exemplary flow chart of a storage method in an embodiment of the present application, wherein the storage method includes:

[0051] Step S10: Obtaining storage space information and access control list information;

[0052] Exemplarily, the information of the storage space includes at least one of a resource size of a ternary content addressable memory block, a resource address management method of the ternary content addressable memory block, and a cascade resource size.

[0053] Exemplarily, the information of the access control list includes the key value bit width of each entry and / or the size of the shared resource that can be applied for by each entry.

[0054] Reference Figure 2 , Figure 2 Schematic diagram of the access control list sharing algorithm management system in the embodiment of the present application, such as Figure 2 As shown, the access control list sharing algorithm management system in the embodiment of the present application includes at least one entry information processing unit, a sharing algorithm processing unit and a storage unit. The storage unit includes at least one TCAM interface and a cascade RAM interface.

[0055] Reference Figure 3 , Figure 3 This is a schematic diagram of the access control list structure in the embodiment of the present application, such as Figure 3 As shown in Figure 1, the ACL table consists of two parts: ACL rules and results. ACL rules are stored in TCAM, and results are stored in cascade RAM. The key first searches the ACL rules stored in TCAM. When an ACL rule in the TCAM matches, the entry's location is used as a handle. The handle is then used as an index to search the cascade RAM again to obtain the result.

[0056] Reference Figure 4 , Figure 4 Schematic diagram of the storage structure of the ternary content addressable memory in the embodiment of the present application, as shown in FIG. Figure 4 As shown, in the embodiment of the present application, a TCAM composed of 16 blocks is used as an example for explanation. Each block includes 8 TCAM units, and each TCAM unit is 1k (1024) * 80 bits.

[0057] Step S20: selecting a target access control list sharing algorithm model according to the information of the storage space and the information of the access control list;

[0058] For example, the aforementioned Figure 2The table entry information processing unit in the system can select an appropriate target access control list sharing algorithm model (i.e., ACL sharing algorithm model) to manage the ACL table according to the user's TCAM b lock resource size, TCAM b lock resource address management method, cascade resource size, key value bit width of each table entry, and the size of shared resources that can be applied for each table entry.

[0059] Exemplarily, the target access control list sharing algorithm model includes at least one of a first access control list sharing algorithm model, a second access control list sharing algorithm model, a third access control list sharing algorithm model, and a fourth access control list sharing algorithm model.

[0060] Exemplarily, the step of selecting a target access control list sharing algorithm model according to the information of the storage space and the information of the access control list includes:

[0061] Identify whether the information of the storage space and the information of the access control list meet the first condition and the second condition;

[0062] When the information of the storage space and the information of the access control list meet the first condition and the second condition, selecting the first access control list sharing algorithm model;

[0063] When the information of the storage space and the information of the access control list do not satisfy the first condition but satisfy the second condition, selecting the second access control list sharing algorithm model;

[0064] When the information of the storage space and the information of the access control list meet the first condition but do not meet the second condition, selecting the third access control list sharing algorithm model;

[0065] When the information of the storage space and the information of the access control list do not satisfy the first condition and the second condition, the fourth access control list sharing algorithm model is selected.

[0066] Exemplarily, the TCAM block resource address management method includes a configuration range of a base address of a TCAM block and / or a mode of simultaneous hit calculation processing of multiple blocks.

[0067] Exemplarily, the step of identifying whether the information of the storage space and the information of the access control list meet the first condition and the second condition includes:

[0068] Identifying whether the cascade resource size meets the resource requirement and whether the configuration range of the base address meets the range requirement based on the key value bit width of each table entry, the size of the shared resource that can be applied for by each table entry, and the resource size of the ternary content addressable memory block;

[0069] When the size of the cascaded resource meets the resource requirement and the configuration range of the base address meets the range requirement, determining that the information of the storage space and the information of the access control list meet the first condition;

[0070] If the size of the cascaded resource does not meet the resource requirement or the configuration range of the base address does not meet the range requirement, determining that the information of the storage space and the information of the access control list do not meet the first condition;

[0071] When the mode of simultaneous hit calculation processing of the multiple blocks is the first mode, determining that the information of the storage space and the information of the access control list meet the second condition;

[0072] When the mode of the simultaneous hit calculation processing of the multiple blocks is the second mode, it is determined that the information of the storage space and the information of the access control list do not meet the second condition.

[0073] Reference Figure 5 , Figure 5 This is a schematic diagram of the model selection in the embodiment of the present application, such as Figure 5 As shown, four models are selected based on the following two conditions: the first condition: whether the cascade RAM resources are sufficient or the base_addr range is sufficient; the second condition: whether the handle selection mode when multiple block locks are hit simultaneously is the first mode. If the first condition is not met, the block lock base addresses need to be adjusted to ensure the order of base addresses is 640-bit block locks, 320-bit block locks, and 160-bit block locks. If the second condition is not met, the order of block_ids within the table needs to be guaranteed from smallest to largest. Based on the first and second conditions, at least one of the first, second, third, and fourth access control list sharing algorithm models is selected for resource application.

[0074] Exemplarily, the first mode includes: when different ternary content addressable memory blocks hit the access control list rules at the same time, selecting the ternary content addressable memory block with a smaller base address, and using the result corresponding to the index calculated using the base address of the selected ternary content addressable memory block as the hit result.

[0075] Exemplarily, the second mode includes: when different ternary content addressable memory blocks hit the access control list rules at the same time, selecting the ternary content addressable memory block with a smaller serial number, and using the result corresponding to the index calculated using the base address of the selected ternary content addressable memory block as the hit result.

[0076] Reference Figure 6 , Figure 6 Schematic diagram of the storage method of different table entry bit widths in TCAM in the embodiment of the present application, such as Figure 6 As shown, for 80-bit, 160-bit, 320-bit, and 640-bit bit widths (key_mode), each row of TCAM0 through TCAM7 is 80 bits, for a total of 640 bits. This 640-bit row can store eight 80-bit ACL rules, four 160-bit ACL rules, two 320-bit ACL rules, or one 640-bit ACL rule. For example, when multiple entries in the same block can simultaneously hit, such as ACL rule 1 and ACL rule 1022, the entry with the smaller position (handle = 1) is selected.

[0077] Reference Figure 7 , Figure 7 This is a schematic diagram of the corresponding structure of the base address and index in the embodiment of the present application, such as Figure 7 As shown, the embodiment of the present application provides two corresponding modes of ACL table item tcam block base address (base_addr) and handle index. The first mode is that each table is allocated a cascade RAM, so the tcam_handle calculated by the base address (base_addr) of each table starts from 0; the second mode is that all tables share a cascade RAM, and the tcam_handle calculated by base_addr cannot overwrite each other. The advantage of the first mode is that the base_addr configuration range is small, and the disadvantage is that multiple cascade RAMs are required; the advantage of the second mode is that only one cascade RAM is required for the cascade RAM, and the disadvantage is that the base_addr range is larger. In addition, the calculation formula of base_addr and the starting tcam_handle inside the block includes: tcam_handle = base_addr*1024*640 / key_mode, where tcam_handle is the index of the cascade RAM, base_addr is the base address, and key_mode is the key value.

[0078] Reference Figure 8 , Figure 8 Schematic diagram of simultaneous hit selection mode in the embodiment of the present application, such as Figure 8As shown, the present embodiment mainly includes two modes for selecting handles when multiple TCAM block locks are hit simultaneously. The first mode compares the handle sizes calculated based on the base_addr and selects the smaller handle as the hit result. The second mode compares the handle sizes based on the block_id and calculates the handle based on the base_addr with the smaller block_id as the hit result.

[0079] Step S30: managing entries of the access control list in the storage space based on the target access control list sharing algorithm model.

[0080] For example, the aforementioned Figure 2 The shared algorithm processing unit in the ACL can apply for, release, defragment, move entries, adjust addresses, and move entries in the cascade RAM according to the selected ACL shared algorithm model when adding or deleting ACL entries.

[0081] Illustratively, the access control list includes access control list entries to be added and / or access control list entries to be deleted.

[0082] Exemplarily, the step of managing entries of the access control list in the storage space based on the target access control list sharing algorithm model includes:

[0083] In a case where the allocated resource storage corresponding to the access control list entry to be added is full, applying for, releasing, and / or defragmenting a ternary content-addressable memory block on the storage space based on the target access control list sharing algorithm model to obtain a target ternary content-addressable memory block, and storing the access control list entry to be added in the target ternary content-addressable memory block; and / or

[0084] Based on the target access control list sharing algorithm model, the index corresponding to the access control list entry to be deleted is released in the storage space, and the access control list rule and cascade resource corresponding to the access control list entry to be deleted are deleted.

[0085] Exemplarily, based on the target access control list sharing algorithm model, the steps of applying for, releasing, and / or defragmenting the storage space to obtain a target ternary content addressable memory block include:

[0086] Applying for a ternary content addressable memory block based on the target access control list sharing algorithm model, and allocating a base address for the applied ternary content addressable memory block to obtain the target ternary content addressable memory block;

[0087] If the TCAM block application fails, performing fragmentation on the access control list of the applied TCAM block, and / or releasing the applied TCAM block, returning to the step of applying for the TCAM block based on the target access control list sharing algorithm model and subsequent steps until the target TCAM block is obtained;

[0088] In the case that the application for the TCAM block is successful, an index is allocated to the applied TCAM block and an access control list rule and cascade resources are configured to obtain the target TCAM block.

[0089] Reference Figure 9 , Figure 9 A flowchart of adding a table entry in the embodiment of the present application is shown in FIG. Figure 9 As shown in the figure, the process of adding an ACL entry includes: first, judging whether a block lock is needed based on whether the storage of the resource allocated to the table entry is full, and if so, applying for a block lock from the resource pool and allocating a base_addr. If the application fails, the fragmentation of other table entries is triggered to release the block lock, and the block lock is applied again. After the software allocates the tcam_handle, the hardware ACL rules and cascade RAM are finally configured.

[0090] Reference Figure 10 , Figure 10 Schematic diagram of the table entry deletion process in the embodiment of the present application, such as Figure 10 As shown in FIG, the process of deleting an ACL entry includes: releasing the tcam_handle allocated by the software, and then directly deleting the corresponding data from the TCAM and cascade RAM.

[0091] Reference Figure 11 , Figure 11 This is a flow chart of the application process of the ternary content addressable memory block in the embodiment of the present application, as shown in FIG. Figure 11 As shown, from left to right are the processes of applying for a ternary content-addressable memory block using the first access control list sharing algorithm model, the second access control list sharing algorithm model, the third access control list sharing algorithm model and the fourth access control list sharing algorithm model.

[0092] Exemplarily, the step of applying for a ternary content-addressable memory block based on the first access control list sharing algorithm model includes: applying for unused block numbers from a resource pool of the ternary content-addressable memory in a first order.

[0093] Exemplarily, the steps of applying for a ternary content-addressable memory block based on a second access control list sharing algorithm model and allocating a base address for the applied ternary content-addressable memory block include: applying for an unused block number from a resource pool of the ternary content-addressable memory in a first order, calculating the base address of the block number, and moving the cascade table according to the base address of the block number.

[0094] Exemplarily, the steps of applying for a ternary content-addressable memory block based on a third access control list sharing algorithm model and allocating a base address for the applied ternary content-addressable memory block include: applying for unused block numbers from a resource pool of the ternary content-addressable memory in a second order, adjusting the block order according to the block numbers, calculating the base addresses of the block numbers after the order is adjusted, and moving the ternary content-addressable storage table according to the base addresses of the block numbers after the order is adjusted.

[0095] Exemplarily, the steps of applying for a ternary content-addressable memory block based on the fourth access control list sharing algorithm model and allocating a base address for the applied ternary content-addressable memory block include: applying for unused block numbers from a resource pool of the ternary content-addressable memory in a second order, adjusting the block order according to the block numbers, calculating the base addresses of the block numbers after the order is adjusted, and moving the cascade table and the ternary content-addressable storage table according to the base addresses of the block numbers after the order is adjusted.

[0096] Exemplarily, the first sequence includes: from the first block sequence number (0) of the ternary content addressable memory block to the last block sequence number (n) of the ternary content addressable memory block.

[0097] Exemplarily, the second order includes: from the applied maximum block number (last_block_id) to the last block number of the ternary content addressable memory block, and from the first block number (0) of the ternary content addressable memory block to the applied maximum block number (last_block_id).

[0098] Reference Figure 12 , Figure 12 This is a schematic diagram of the fragmentation sorting process in the embodiment of the present application, such as Figure 12 As shown, the steps of performing defragmentation on the access control list of the applied ternary content addressable memory block include:

[0099] Checking the access control lists (ACLs) of the applied ternary content addressable memory blocks one by one to determine whether there is an ACL that can release the block;

[0100] If there is an access control list capable of releasing the block, move the ternary content addressable memory entry (tcam entry) and the cascade resource (as_data) corresponding to the access control list capable of releasing the block one by one to release the ternary content addressable memory block;

[0101] identifying whether a target access control list sharing algorithm model adopted by the released ternary content addressable memory block in the application phase is the first access control list sharing algorithm model or the third access control list sharing algorithm model;

[0102] In a case where the target access control list sharing algorithm model adopted by the released ternary content addressable memory block during the application phase is the first access control list sharing algorithm model or the third access control list sharing algorithm model, the cascade table is moved according to the released ternary content addressable memory block, including adjusting the handle and moving as_data one by one at the granularity of block lock, and then configuring the base address base_addr of the block lock.

[0103] For example, the ACL entries may be stored according to the result calculated by the ACL sharing algorithm.

[0104] This embodiment adopts the above-mentioned scheme, specifically by obtaining storage space information and access control list information; selecting or determining a target access control list sharing algorithm model according to the storage space information and the access control list information; performing table entry management of the access control list in the storage space based on the target access control list sharing algorithm model, and adaptively selecting a target access control list sharing algorithm model according to the storage space information and the access control list information. By performing table entry management of the access control list in the storage space through the target access control list sharing algorithm model, the storage efficiency of the access control list can be improved without increasing the storage space, thereby improving the utilization rate of the storage space.

[0105] Reference Figure 13 , Figure 13 FIG. 5 is another exemplary flow chart of a storage method in an embodiment of the present application, wherein the method includes:

[0106] Step 1: Obtain hardware TCAM storage space, which includes 16 blocks, each with a storage size of 1024 x 640 bits.

[0107] Step 2: Obtain the address management mode for the hardware TCAM resources. The base address range is 0 to 63. If multiple blocks are hit simultaneously, select mode 2 (calculate the handle based on the base_addr of the block with the smallest block_id and output it as the hit result).

[0108] Step 3: Get the space for the cascade RAM resource. The cascade RAM only has one copy of data, which is 128k capacity RAM.

[0109] Step 4: Get the bit width (key_mode) of all tab le entries and the shared resource threshold (share_block_num). Tab le0 has a bit width of 160 bits, share_b lock_num = 16; tab le1 has a bit width of 320 bits, share_b lock_num = 16; tab le2 has a bit width of 640 bits, share_b lock_num = 16;

[0110] Step 5: Get the corresponding ACL sharing algorithm model. According to steps 2-3, Figure 5 The first and second conditions are not met, therefore, the resource model applied for from the shared pool selects the fourth access control list sharing algorithm model;

[0111] Step 6: Obtain sample operation procedures for adding and deleting various table entries. Procedure: ① Tab le0 first adds an 8k 640-bit entry, ② Tab le2 adds a 16k 160-bit entry, ③ Tab le1 adds an 8k 320-bit entry, ④ Tab le2 deletes high-priority 8k 160-bit entries (entries in b lock 8 and b lock 9), ⑤ Tab le1 adds a 4k 320-bit entry.

[0112] Step 7: Store based on the fourth access control list sharing algorithm model. Figure 14 - Figure 17 , Figure 14 - Figure 17 The following are the first, second, third, and fourth effect diagrams of data entry migration in the embodiment of the present application. In process ①, all block locks are not used, so block locks are allocated directly from block lock0 and base_addr is calculated. In process ②, since the table width of table le2 is 160 bits, table le0 (640 bits) is directly inserted and base_addr is calculated. The effect after insertion is as follows: Figure 14 As shown in Figure 3, in process ③, since the bit width of tab le1 is 320 bits and the base address needs to be sufficient (the order of base addresses is block lock for 640 bits, block for 320 bits, and block lock for 160 bits), the base address of block lock for tab le2 needs to be adjusted before inserting block lock for tab le1. The effect after insertion is as shown in Figure 3. Figure 15 As shown. Process ④ deletes the entry of tab le2 and executes Figure 10 In process ⑤, since all block locks are used up, it is necessary to go through the fragmentation process. It is found that tab le2 can release 2 block locks, and tab le2 meets the requirements. Figure 5 The fourth access control list in the shared algorithm model needs to be moved, so the cascade table needs to be moved. The effect after the move is as follows Figure 16 As shown. Then apply for b lock. Since tab le2 uses the fourth access control list sharing algorithm model, it is necessary to move the cascade RAM corresponding to tab le2 first, and then move the tcam table. The final insertion effect is as follows Figure 17 shown.

[0113] This embodiment uses the above solution to select an appropriate ACL sharing algorithm model based on the user's TCAM block resource size, TCAM block resource address management method, cascade resource size, key value width per table entry, and the available shared resource size per table entry. When adding or deleting ACL entries, the selected ACL sharing algorithm is used to apply for, release, defragment, move entries, adjust addresses, and move entries in the cascade RAM, thereby implementing ACL table management and TCAM resource sharing.

[0114] In addition, the present invention also provides a storage device, referring to Figure 18 , Figure 18 A schematic diagram of the storage device structure provided in an embodiment of the present application, wherein the device includes:

[0115] An acquisition module 10 is used to acquire storage space information and access control list information;

[0116] A selection module 20, configured to select or determine a target access control list sharing algorithm model based on the information of the storage space and the information of the access control list;

[0117] The management module 30 is configured to manage entries of the access control list in the storage space based on the target access control list sharing algorithm model.

[0118] An embodiment of the present application further provides a network device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the storage method described above.

[0119] An embodiment of the present application further provides a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the storage method described above are implemented.

[0120] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps of the storage method described above are implemented.

[0121] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or computing device, etc.) to execute the methods described in each embodiment of the present application.

[0123] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A storage method, characterized in that: include: Obtain storage space information and access control list information; Selecting a target access control list sharing algorithm model according to the information of the storage space and the information of the access control list; The access control list is managed in the storage space based on the target access control list sharing algorithm model.

2. The storage method according to claim 1, wherein: The target access control list sharing algorithm model includes at least one of a first access control list sharing algorithm model, a second access control list sharing algorithm model, a third access control list sharing algorithm model, and a fourth access control list sharing algorithm model. The step of selecting the target access control list sharing algorithm model according to the information of the storage space and the information of the access control list includes: Identify whether the information of the storage space and the information of the access control list meet the first condition and the second condition; When the information of the storage space and the information of the access control list meet the first condition and the second condition, selecting the first access control list sharing algorithm model; When the information of the storage space and the information of the access control list do not satisfy the first condition but satisfy the second condition, selecting the second access control list sharing algorithm model; When the information of the storage space and the information of the access control list meet the first condition but do not meet the second condition, selecting the third access control list sharing algorithm model; When the information of the storage space and the information of the access control list do not satisfy the first condition and the second condition, the fourth access control list sharing algorithm model is selected.

3. The storage method according to claim 2, wherein: The information of the storage space includes the resource size of the ternary content addressable memory block, the resource address management method of the ternary content addressable memory block, and at least one of the cascade resource size, and the information of the access control list includes the key value bit width of each table entry and / or the shared resource size that can be applied for by each table entry.

4. The storage method according to claim 3, wherein: The ternary content addressable memory block resource address management method includes a configuration range of a base address of a ternary content addressable memory block and / or a mode of simultaneous hit calculation processing of multiple blocks, and the step of identifying whether the information of the storage space and the information of the access control list meet the first condition and the second condition includes: Identifying whether the cascade resource size meets the resource requirement and whether the configuration range of the base address meets the range requirement based on the key value bit width of each table entry, the size of the shared resource that can be applied for by each table entry, and the resource size of the ternary content addressable memory block; When the size of the cascaded resource meets the resource requirement and the configuration range of the base address meets the range requirement, determining that the information of the storage space and the information of the access control list meet the first condition; If the size of the cascaded resource does not meet the resource requirement or the configuration range of the base address does not meet the range requirement, determining that the information of the storage space and the information of the access control list do not meet the first condition; When the mode of simultaneous hit calculation processing of the multiple blocks is the first mode, determining that the information of the storage space and the information of the access control list meet the second condition; When the mode of the simultaneous hit calculation processing of the multiple blocks is the second mode, it is determined that the information of the storage space and the information of the access control list do not meet the second condition.

5. The storage method according to claim 4, wherein: The first mode includes: when different ternary content addressable memory blocks hit the access control list rule at the same time, selecting the ternary content addressable memory block with the smaller base address, and using the result corresponding to the index calculated using the base address of the selected ternary content addressable memory block as the hit result; and / or, The second mode includes: when different ternary content addressable memory blocks hit the access control list rules at the same time, selecting the ternary content addressable memory block with a smaller serial number, and using the result corresponding to the index calculated using the base address of the selected ternary content addressable memory block as the hit result.

6. The storage method according to claim 2, wherein: The access control list includes access control list entries to be added and / or access control list entries to be deleted, and the step of managing entries of the access control list in the storage space based on the target access control list sharing algorithm model includes: In a case where the allocated resource storage corresponding to the access control list entry to be added is full, applying for, releasing, and / or defragmenting a ternary content-addressable memory block on the storage space based on the target access control list sharing algorithm model to obtain a target ternary content-addressable memory block, and storing the access control list entry to be added in the target ternary content-addressable memory block; and / or Based on the target access control list sharing algorithm model, the index corresponding to the access control list entry to be deleted is released in the storage space, and the access control list rule and cascade resource corresponding to the access control list entry to be deleted are deleted.

7. The storage method according to claim 6, wherein: The step of applying for, releasing, and / or defragmenting ternary content addressable memory blocks on the storage space based on the target access control list sharing algorithm model to obtain target ternary content addressable memory blocks includes: Applying for a ternary content addressable memory block based on the target access control list sharing algorithm model, and allocating a base address for the applied ternary content addressable memory block to obtain the target ternary content addressable memory block; If the TCAM block application fails, performing fragmentation on the access control list of the applied TCAM block, and / or releasing the applied TCAM block, returning to the step of applying for the TCAM block based on the target access control list sharing algorithm model and subsequent steps until the target TCAM block is obtained; In the case that the application for the TCAM block is successful, an index is allocated to the applied TCAM block and an access control list rule and cascade resources are configured to obtain the target TCAM block.

8. The storage method according to claim 7, wherein: The method further comprises at least one of the following: The step of applying for a ternary content addressable memory block based on the first access control list sharing algorithm model includes: applying for unused block numbers from a resource pool of the ternary content addressable memory in a first order; The steps of applying for a ternary content-addressable memory block based on the second access control list sharing algorithm model and allocating a base address for the applied ternary content-addressable memory block include: applying for unused block numbers from a resource pool of the ternary content-addressable memory in a first order, calculating base addresses of the block numbers, and moving a cascade table according to the base addresses of the block numbers; The steps of applying for a ternary content-addressable memory block based on the third access control list sharing algorithm model and allocating a base address for the applied ternary content-addressable memory block include: applying for unused block numbers from a resource pool of the ternary content-addressable memory in a second order, adjusting the block order according to the block numbers, calculating the base addresses of the block numbers after the order is adjusted, and moving the ternary content-addressable memory table according to the base addresses of the block numbers after the order is adjusted; The steps of applying for a ternary content-addressable memory block based on the fourth access control list sharing algorithm model and allocating a base address for the applied ternary content-addressable memory block include: applying for unused block numbers from a resource pool of the ternary content-addressable memory in a second order, adjusting the block order according to the block numbers, calculating the base addresses of the block numbers after the order is adjusted, and moving the cascade table and the ternary content-addressable storage table according to the base addresses of the block numbers after the order is adjusted.

9. The storage method according to claim 8, wherein: The first sequence includes: from the first block sequence number of the ternary content addressable memory block to the last block sequence number of the ternary content addressable memory block; and / or, The second sequence includes: from the applied maximum block number to the last block number of the ternary content addressable memory block, and from the first block number of the ternary content addressable memory block to the applied maximum block number.

10. The storage method according to claim 7, wherein: The step of performing fragmentation on the access control list of the applied ternary content addressable memory block includes: Checking the access control lists of the applied ternary content addressable memory blocks one by one to determine whether there is an access control list that can release the block; In the case that an access control list capable of releasing the block exists, moving the ternary content addressable memory entries and cascade resources corresponding to the access control list capable of releasing the block one by one to release the ternary content addressable memory block; identifying whether a target access control list sharing algorithm model adopted by the released ternary content addressable memory block in the application phase is the first access control list sharing algorithm model or the third access control list sharing algorithm model; When the target access control list sharing algorithm model adopted by the released ternary content addressable memory block in the application stage is the first access control list sharing algorithm model or the third access control list sharing algorithm model, the cascade table is moved according to the released ternary content addressable memory block.

11. A storage device, characterized in that: The device comprises: An acquisition module is used to obtain storage space information and access control list information; A selection module, configured to select or determine a target access control list sharing algorithm model based on the information of the storage space and the information of the access control list; A management module is configured to manage entries of the access control list in the storage space based on the target access control list sharing algorithm model.

12. A network device, characterized in that: The network device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the storage method according to any one of claims 1 to 10.

13. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the storage method according to any one of claims 1 to 10 are implemented.

14. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the storage method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Item management method and apparatus

    CN104935517A

  • Routing table item storage method and device and routing table item search method and device

    CN113992579A

  • Method and device for adjusting storage block of access control list

    CN118523941A

  • Method and device for managing table space of ternary content addressable memory

    WO2016090848A1