CN102447604B - Routing table information storage means and routing device - Google Patents

Routing table information storage means and routing device Download PDF

Info

Publication number
CN102447604B
CN102447604B CN201010298072.0A CN201010298072A CN102447604B CN 102447604 B CN102447604 B CN 102447604B CN 201010298072 A CN201010298072 A CN 201010298072A CN 102447604 B CN102447604 B CN 102447604B
Authority
CN
China
Prior art keywords
block
logical block
service area
logical
routing table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010298072.0A
Other languages
Chinese (zh)
Other versions
CN102447604A (en
Inventor
叶学东
梁晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201010298072.0A priority Critical patent/CN102447604B/en
Publication of CN102447604A publication Critical patent/CN102447604A/en
Application granted granted Critical
Publication of CN102447604B publication Critical patent/CN102447604B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Technical problem to be solved by this invention is, under existing memory conditions, and the routing table information storage means of the storable route entry number of the router that is multiplied, and realize the routing device of the method.Internal memory is divided into service area, compression blocks memory block; Routing table information is divided into some logical blocks, each routing table node in record routing table, its address is corresponding logical address, and logical address comprises logical block ID and block bias internal address; Service area is divided into some work blocks; According to allocation strategy, partial logic block is kept in the work block of service area, and the mapping relations table of writing task block ID and logical block ID, another part logical block is compressed, forms compression blocks, be kept at compression blocks memory block; The logical block at the routing table node place of current accessed need be kept in work block.

Description

Routing table information storage means and routing device
Technical field
The present invention relates to memory technology.
Background technology
Storage for the routing table in embedded device router needs to take very large memory headroom.Such as: the validation test according to routers shows, OSPF (open type shortest path priority protocol) IPv4 pattern each route average consumes internal memory 1KB, OSPFIPv6 pattern each route average consumes internal memory 1.1KB, the IP kernel heart each route average consumes 300B, under 1M bar route scale, OSPF+IP core, only route stores just needs to consume 1.3-1.4GB internal memory.Such internal memory often easily becomes the bottleneck of router.;
If can under existing memory conditions, the storable route entry number of the router that is multiplied, then can promote the disposal ability to routing iinformation of router greatly.
Summary of the invention
Technical problem to be solved by this invention is, under existing memory conditions, and the routing table information storage means of the storable route entry number of the router that is multiplied, and realize the routing device of the method.
The present invention is provide a kind of routing table information storage means, comprise step for solving the problems of the technologies described above adopted technical scheme:
Internal memory is divided into service area, compression blocks memory block;
Routing table information is divided into some logical blocks, each routing table node (a corresponding route entry of routing table node) in record routing table, its address is corresponding logical address (comprising logical block ID and block bias internal address);
Service area is divided into some work blocks; According to allocation strategy, partial logic block is kept in the work block of service area, and the mapping relations table of writing task block ID and logical block ID, another part logical block is compressed, forms compression blocks, be kept at compression blocks memory block; The logical block at the routing table node place of current accessed need be kept in work block.
Can retain multiple routing tables in router, the routing iinformation comprised between these routing tables is similar, and information itself has very large redundancy.Such as same ospf route can in ospf LSD, ospf routing table, heavily distribute routing table, ip kernel route table, transmit and exist in some shadow table simultaneously.And in actual applications, routing table is mostly among one or several subnets, routing iinformation is also among limited several down hop and interface simultaneously, and routing iinformation is very regular.The present invention utilizes the characteristic that routing table information redundancy is very large, internal memory is divided into service area, compression blocks memory block; The current logical block needing access of a part is only deposited in service area; Compression blocks memory block is stored to after other logical block all compresses, dramatically saves on memory source, when storage has the routing table information of identical route entry number, the memory headroom shared by the inventive method is adopted to only have the part of existing route table information storage means to ten parts.
Further, conveniently map, routing table information is divided into the logical block of formed objects, service area is divided into the work block identical with described logical block size.Such work block is consistent with logical block size, makes in work block simpler to the addressing of routing table node.
Allocation strategy except should preserving the current logical block needing to use in service area, can be random to the preservation of other logical block in service area, but logical block in service area may be caused like this to switch continually, because, as there being vacant work block in service area, but the current routing table node place logical block of access that needs is not in service area, then needs to switch to vacant work block by after the routing table node place compression blocks decompress(ion) of current needs access, and upgrade mapping relations table; As in service area without vacant work block and current needs access routing table node place logical block not in service area, also need first to select a work block according to allocation strategy, compression blocks memory block is saved to by after the logical block compression in this work block, switch to this work block by after the routing table node place compression blocks decompress(ion) of current needs access again, revise mapping relations table simultaneously.Further, in order to the exchange of try one's best reduction work block and compression blocks, the access of work block is added up, and obtains the access situation of logical block corresponding to this service area according to statistics, and perform allocation strategy; Described allocation strategy is, preserves the use of current needs and record nearer logical block with use in service area.Or, in service area, preserve the current logical block needing to use and frequency of utilization is higher.Or, in service area, preserve the current logical block needing to use and use is recorded comparatively closely, frequency of utilization is higher.Choice for use frequency is lower and/or use record logical block far away to enter compression blocks memory block, the logical block at the routing table node place be therefore of little use due to motion frequency low, substantially be kept in compression blocks memory block, the logical block at the routing table node place that motion frequency is high is kept in service area, this guarantees and is switched by logical block in service area too continually the access efficiency of routing table node.
A kind of routing device realizing said method is provided, comprises internal memory and divide module, logical block division module, service area division module, memory allocation module;
Internal memory divides module and is used for, and internal memory is divided into service area, compression blocks memory block;
Logical block divides module and is used for, and routing table information is divided into some logical blocks, the logical block ID that in record routing table, each routing table node is corresponding and block bias internal address;
Service area divides module and is used for, and service area is divided into some work blocks;
Memory allocation module is used for, and according to allocation strategy, is kept at by partial logic block in the work block of service area, and the mapping relations table of writing task block ID and logical block ID, another part logical block is compressed, forms compression blocks, be kept at compression blocks memory block; The logical block at the routing table node place of current accessed need be kept in work block.
Further, logical block divide module also for, routing table information is divided into the logical block of formed objects; Service area divides module and is used for, and service area is divided into the work block identical with described logical block size.
Further, memory allocation module also for, the access of work block is added up, and obtains the access situation of logical block corresponding to this service area according to statistics; Described allocation strategy is, preserves the current logical block needing to use and record nearer logical block with use in service area; Or, preserve in service area current need to use logical block and the higher logical block of frequency of utilization; Or, preserve the current logical block needing to use in service area and record the logical block comparatively near, frequency of utilization is higher with use.
The invention has the beneficial effects as follows, when memory headroom is constant, drastically increase routing table memory space, solve the memory bottleneck problem that current huge routing table information is brought.
Accompanying drawing explanation
Fig. 1 is routing device schematic diagram.
Fig. 2 is service area memory allocation schematic diagram;
Fig. 3 is work block and logical block schematic diagram;
Fig. 4 is compression blocks memory allocation schematic diagram;
Fig. 5 is flow process when adding routing table node;
Flow process when Fig. 6 is access routing table node.
Embodiment
Routing device adopts logical space to distribute to the memory space of routing table information, and is kept in specific memory headroom after being compressed in units of block by logical space.As shown in Figure 1, routing device comprises internal memory division module, logical block divides module, service area divides module, memory allocation module.
Internal memory divides module and first in internal memory, marks two pieces of continuous print spaces respectively as service area and compression blocks memory block according to the plan of operation of reality, and the large I of service area and compression blocks memory block is according to configuration adjustment.As shown in Figure 2, service area divides module and memory space is divided into fixed-size work block in the memory pool of service area, and the block ID specifying each work block is the serial number increased progressively with block address, be namely respectively (service area initial address/block size) ..., ((service area end address/block size)-1); Logical block divides module and routing table information is divided into some logical blocks, and record the logical space (logical block ID and block bias internal address) that in routing table, each routing table node is corresponding, the interface distributing routing table logical space and discharge is provided.As shown in Figure 3, logical block size is consistent with service area block size.Logical block ID is (logical address initial address/block size) ... ((addressable maximum logical address/block size)-1).Memory allocation module by current do not have use logical block compress after, be kept at the form of compression blocks in the memory pool of compression blocks memory block.Size due to logical block is fixing, and the size of compression blocks changes with the change of the content in logical block, but the equal and opposite in direction of size after each compression blocks decompress(ion) and work block, in order to the management of the block after compressing, set up the memory pool of a compression blocks memory block, and realize special interface and distribute and releasing memory in this memory pool, the memory size that can distribute can be 16,32,64,128,256,512,1024,2048 etc.Elongated compression blocks stores as shown in Figure 4: the global variable using two, i.e. memory pool first address bFreeBuf and internal memory bucket bQhead [].The managerial structure of additional allocation structbType (the managerial structure body to the carrying out of allocation block manages) when distributing compression blocks internal memory; When compression blocks internal memory will be discharged, internal memory is not discharged in the memory pool of compression blocks memory block, but the structbType (bp namely in Fig. 4) distributed is mounted in chained list corresponding to bQhead [].Like this when to need the internal memory distributing this size (256 bytes as shown in Figure 4) next time, just directly can fetch use from this chained list.
To when distributing new routing table node content, if when having clearance spaces to distribute in the current block in service area, then according to the side-play amount of address in the logical block ID of this block and block, be routing table peer distribution space in the block.If there is no enough remaining spaces in the current block of service area, then first check whether service area has the block not having to use, if there is the block not having to use, then for this block distributes one not by the logical address space used, and in mapping relations table, add the mapping item of work block ID and logical block ID; During the block if there is no do not used, again for this block distributes one not by the logical address space that uses and according to the side-play amount of address in the logical block ID of this block and block add mapping item in mapping relations table after, routing table peer distribution space in the block after then needing to use exchange algorithm to swap out one piece.Idiographic flow as shown in Figure 5.
To routing table node visit: first take out logical block ID corresponding to work at present block and in a register, then use side-play amount directly to access when the logical block ID that need access as current is consistent with the logical block ID that register is preserved; If time inconsistent, then use the current logical block ID of access that needs to look into mapping relations table, if found in mapping relations table, then the current logical block ID of access that needs is saved in this register, and accesses in work block corresponding to this logical block ID; If do not found in mapping relations table, then change to service area after the compression blocks decompress(ion) needing the logical block ID that accessed by needs from compression blocks memory block corresponding, and in mapping relations table, add the mapping item of this logical block ID and work block ID.
Work block and the exchange process of compression blocks are specially: if when also having vacant work block in service area, and only the direct compression blocks changed to that will need unzips in service area; If when service area does not have a vacant work block, LRU (not using at most recently) scheduling algorithm can being used, swapping out not having logical block corresponding to used work block at most.For by the logical block swapped out, if the content in this logical block was not changed, then can directly this logical block being abandoned; If the content in this logical block was changed, then need by compression blocks memory block to should logical block ID compression blocks delete, simultaneously by service area logical block compression after be saved in compression blocks memory block.For changing to (logical block is to be saved to service area for changing to after the form decompress(ion) of compression blocks), need the mapping item adding its logical block ID and work block ID in mapping relations table; For swap out (logical block is saved to compression blocks memory block for swapping out after the compression of work block), then need the mapping item of logical block ID corresponding in mapping relations table and work block ID to delete.
In amendment logical block during content, directly in service area, this logical block being modified, also should be modified in compression blocks corresponding to compression blocks memory block when needing to swap out.If when there is the exchange of work block and compression blocks, need amendment mapping relations table.
If need the content of the monoblock of deleting in service area, then direct compression blocks corresponding for logical block in compression blocks memory block to be deleted, in mapping relations table, delete relevant list item simultaneously.

Claims (8)

1. routing table information storage means, is characterized in that, comprises step:
Internal memory is divided into service area, compression blocks memory block;
Routing table information is divided into the logical block of some formed objects, each routing table node in record routing table, its address is corresponding logical address, and described logical address comprises logical block ID and block bias internal address;
Service area is divided into the work block that some and described logical block size is identical; According to allocation strategy, partial logic block is kept in the work block of service area, and the mapping relations table of writing task block ID and logical block ID, another part logical block is compressed, forms compression blocks, be kept at compression blocks memory block; The logical block at the routing table node place of current accessed need be kept in work block.
2. routing table information storage means as claimed in claim 1, is characterized in that, also comprise: add up the access of work block, and obtain the access situation of logical block corresponding to this service area according to statistics;
Described allocation strategy is, preserves the current logical block needing to use and record nearer logical block with use in service area; Or, preserve in service area current need to use logical block and the higher logical block of frequency of utilization; Or, preserve the current logical block needing to use in service area and record the logical block comparatively near, frequency of utilization is higher with use.
3. routing table information storage means as claimed in claim 1, is characterized in that, increases, access or amendment routing table node carry out in service area;
When in service area without vacant work block time, need first to select a work block according to allocation strategy, and be saved to compression blocks memory block by after the logical block compression in this work block, make this work block vacant, carry out the increase of routing table node, access or retouching operation again in this vacant work block after, amendment mapping relations table.
4. routing table information storage means as claimed in claim 1, it is characterized in that, when deleting monoblock logical block, the compression blocks that this logical block in this compression blocks memory block of direct deletion is corresponding, when deleting the monoblock logical block in service area, also list item corresponding to this logical block need be deleted in mapping relations table.
5. routing device, is characterized in that, comprises internal memory and divides module, logical block division module, service area division module, memory allocation module;
Described internal memory divides module and is used for, and internal memory is divided into service area, compression blocks memory block;
Described logical block divides module and is used for, and routing table information is divided into the logical block of some formed objects, each routing table node in record routing table, and its address is corresponding logical address, and described logical address comprises logical block ID and block bias internal address;
Described service area divides module and is used for, and service area is divided into the work block that some and described logical block size is identical;
Described memory allocation module is used for, and according to allocation strategy, is kept at by partial logic block in the work block of service area, and the mapping relations table of writing task block ID and logical block ID, another part logical block is compressed, forms compression blocks, be kept at compression blocks memory block; The logical block at the routing table node place of current accessed need be kept in work block.
6. routing device as claimed in claim 5, is characterized in that, described memory allocation module also for, the access of work block is added up, and obtains the access situation of logical block corresponding to this service area according to statistics; Described allocation strategy is, preserves the current logical block needing to use and record nearer logical block with use in service area; Or, preserve in service area current need to use logical block and the higher logical block of frequency of utilization; Or, preserve the current logical block needing to use in service area and record the logical block comparatively near, frequency of utilization is higher with use.
7. routing device as claimed in claim 5, it is characterized in that, described memory allocation module also for, when carrying out increasing, access or revise routing table node in service area, as in service area without vacant work block, then need first to select a work block according to allocation strategy, and be saved to compression blocks memory block by after the logical block compression in this work block, make this work block vacant, after carry out the increase of routing table node, access or retouching operation in this vacant work block, amendment mapping relations table.
8. routing device as claimed in claim 5, it is characterized in that, described memory allocation module also for, when deleting monoblock logical block, the compression blocks that this logical block in this compression blocks memory block of direct deletion is corresponding, when deleting the monoblock logical block in service area, also list item corresponding to this logical block need be deleted in mapping relations table.
CN201010298072.0A 2010-09-30 2010-09-30 Routing table information storage means and routing device Active CN102447604B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010298072.0A CN102447604B (en) 2010-09-30 2010-09-30 Routing table information storage means and routing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010298072.0A CN102447604B (en) 2010-09-30 2010-09-30 Routing table information storage means and routing device

Publications (2)

Publication Number Publication Date
CN102447604A CN102447604A (en) 2012-05-09
CN102447604B true CN102447604B (en) 2016-01-27

Family

ID=46009711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010298072.0A Active CN102447604B (en) 2010-09-30 2010-09-30 Routing table information storage means and routing device

Country Status (1)

Country Link
CN (1) CN102447604B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248523B (en) * 2013-05-07 2014-04-16 中国人民解放军国防科学技术大学 Network route collocation method used for calculating array operating system on large scale
CN107122312B (en) * 2017-05-05 2019-12-17 苏州浪潮智能科技有限公司 solid-state disk address mapping method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5778411A (en) * 1995-05-16 1998-07-07 Symbios, Inc. Method for virtual to physical mapping in a mapped compressed virtual storage subsystem
CN1266513A (en) * 1997-06-13 2000-09-13 艾利森电话股份有限公司 Simulation of computer processor
CN1588907A (en) * 2004-07-02 2005-03-02 中国科学院计算技术研究所 Method for realizing longest prifix address route search using sectioned compressed list
CN1598811A (en) * 2003-09-19 2005-03-23 株式会社Ntt都科摩 Data compresser,data decompresser and data managing system
CN1630247A (en) * 2003-12-18 2005-06-22 华为技术有限公司 A method for maintaining routing table in storage capable of content-address mapping

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6956507B2 (en) * 2002-12-12 2005-10-18 International Business Machines Corporation Method and apparatus for morphing memory compressed machines
CN101315628B (en) * 2007-06-01 2011-01-05 华为技术有限公司 Internal memory database system and method and device for implementing internal memory data base
CN101552032B (en) * 2008-12-12 2012-01-18 深圳市晶凯电子技术有限公司 Method and device for constructing a high-speed solid state memory disc by using higher-capacity DRAM to join in flash memory medium management
CN101790085A (en) * 2010-03-26 2010-07-28 南京邮电大学 Implementation method of family video monitoring system based on DaVinci technology

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5778411A (en) * 1995-05-16 1998-07-07 Symbios, Inc. Method for virtual to physical mapping in a mapped compressed virtual storage subsystem
CN1266513A (en) * 1997-06-13 2000-09-13 艾利森电话股份有限公司 Simulation of computer processor
CN1598811A (en) * 2003-09-19 2005-03-23 株式会社Ntt都科摩 Data compresser,data decompresser and data managing system
CN1630247A (en) * 2003-12-18 2005-06-22 华为技术有限公司 A method for maintaining routing table in storage capable of content-address mapping
CN1588907A (en) * 2004-07-02 2005-03-02 中国科学院计算技术研究所 Method for realizing longest prifix address route search using sectioned compressed list

Also Published As

Publication number Publication date
CN102447604A (en) 2012-05-09

Similar Documents

Publication Publication Date Title
CN105205009B (en) A kind of address mapping method and device based on large capacity solid-state storage
TWI238935B (en) Reconfigurable cache controller for nonuniform memory access computer systems
CN107220187B (en) Cache management method and device and field programmable gate array
CN102436421B (en) Data cached method
CN105893269A (en) Memory management method used in Linux system
CN105242881A (en) Distributed storage system and data read-write method for same
CN104714903B (en) Storage system
CN101984417A (en) Memory management method and device
CN105938458B (en) The isomery mixing EMS memory management process of software definition
CN109542331A (en) Storage system and the control method for controlling nonvolatile memory
CN101620623A (en) Method and device for managing list item of content addressable memory CAM
CN106980541B (en) A kind of big page memory compression recovery system and method
CN103944993A (en) Million-level user simultaneous online mobile platform server architecture
US20240045869A1 (en) A method and device of data transmission
CN102291296A (en) Updating method and system of routing table
CN108121670A (en) A kind of mapping method for reducing solid state disk metadata backwash frequency
CN102447604B (en) Routing table information storage means and routing device
CN108845958A (en) A kind of mapping of interleaver and dynamic EMS memory management system and method
CN109918316A (en) A kind of method and its system reducing FTL address of cache space
CN111694765A (en) Mobile application feature-oriented multi-granularity space management method for nonvolatile memory file system
CN106254270A (en) A kind of queue management method and device
CN106294191B (en) The method for handling table, the method and apparatus for accessing table
CN113157606A (en) Buffer implementation method and device and data processing equipment
US9261946B2 (en) Energy optimized cache memory architecture exploiting spatial locality
CN103744626A (en) Data writing method based on memory replacement

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 Sichuan city of Chengdu province high tech Zone nine Hing Road No. 16 building, Maipu

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder
CP02 Change in the address of a patent holder

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Patentee after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Patentee before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder