CN104519516B - The method and device that memory is tested - Google Patents

The method and device that memory is tested Download PDF

Info

Publication number
CN104519516B
CN104519516B CN201310454507.XA CN201310454507A CN104519516B CN 104519516 B CN104519516 B CN 104519516B CN 201310454507 A CN201310454507 A CN 201310454507A CN 104519516 B CN104519516 B CN 104519516B
Authority
CN
China
Prior art keywords
forwarding table
memory space
memory
copied
processing unit
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
CN201310454507.XA
Other languages
Chinese (zh)
Other versions
CN104519516A (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.)
Changzhou Hengtang Technology Industry Co ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310454507.XA priority Critical patent/CN104519516B/en
Publication of CN104519516A publication Critical patent/CN104519516A/en
Application granted granted Critical
Publication of CN104519516B publication Critical patent/CN104519516B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • For Increasing The Reliability Of Semiconductor Memories (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present embodiments relate to a kind of method and devices tested memory.Including:The first forwarding table that first memory space of memory stores is copied into the second memory space of the memory to obtain the second forwarding table;Network processing unit tests first memory space;The forwarding table that second memory space stores is copied into first memory space to obtain third forwarding table;The network processing unit accesses the third forwarding table, to help effectively to find the failure in memory.

Description

The method and device that memory is tested
Technical field
The present invention relates to mobile communication field more particularly to a kind of method and devices tested memory.
Background technology
The Forwarding plane of data communications equipment can generally use network processing unit (network processor, NP).NP mono- As can configure the memory of large capacity to store list item, include the internal storage and chip external memory of NP.NP receives data After message, can according to type of message and it is relevant be configured to search corresponding list item, determined to data according to lookup result How message is handled.The reliability of memory influences whether the normal processing of data message, if the memory that NP is accessed returns List item it is incorrect, then lead to processing mistakes of the NP to data message, finally influence service application.Therefore promoted memory can Problem in the urgent need to address is had become by property.
In the prior art, after network processing unit receives message, the test to memory is realized by searching for forwarding table.On Failure in memory can not effectively be found by stating technical solution.
Invention content
An embodiment of the present invention provides a kind of method and device for testing memory, help effectively to find storage Failure in device.
In a first aspect, a kind of method tested memory is provided, the method includes:
The first forwarding table that first memory space of memory stores is copied to the second memory space of the memory To obtain the second forwarding table;
Network processing unit tests first memory space;
The forwarding table that second memory space stores is copied into first memory space to obtain third forwarding table;
The network processing unit accesses the third forwarding table.
In above-mentioned technical proposal, the network processing unit tests first memory space.Relative to existing skill In art, the test to first memory space is realized by searching for first forwarding table in first memory space, Technical solution provided in an embodiment of the present invention helps to find the failure of memory.
In the first possible realization method of first aspect, first memory space by memory store the One forwarding table copies to the second memory space of the memory to obtain after the second forwarding table and described by described second The forwarding table of memory space storage copies to first memory space so that before obtaining third forwarding table, the method is also wrapped It includes:
The network processing unit accesses second forwarding table.
According to the possible realization method of the first of first aspect or first aspect, second in first aspect may Realization method in, the network processing unit to first memory space carry out test includes:
Determine that the network processing unit receives the rate of message less than first threshold;
The network processing unit starts to test first memory space.
According to any possible realization side in the possible realization method of the above two of first aspect or first aspect Formula, in the third possible realization method of first aspect, first turn of the first memory space storage by memory Deliver the second memory space for copying to the memory includes to obtain the second forwarding table:
During first forwarding table is copied to second memory space, if first forwarding table is by more Newly, then updated first forwarding table is copied in second memory space;And/or
The forwarding table by second memory space storage copies to first memory space and is turned with obtaining third Deliver including:
It, will if the forwarding table is updated during the forwarding table is copied to first memory space Updated forwarding table copies in first memory space.
According to any possible realization side in above-mentioned three kinds of possible realization methods of first aspect or first aspect Formula, in the 4th kind of possible realization method of first aspect, the network processing unit surveys first memory space Examination includes:
Determine that the network processing unit receives the rate of message more than second threshold;
First memory space is tested in the network processing unit stopping.
Second aspect, provides a kind of device tested memory, and described device includes:First copied cells, Test cell, the second copied cells and the first access unit;
First copied cells, it is described for copying to the first forwarding table of the first memory space storage of memory Second memory space of memory is to obtain the second forwarding table;
The test cell, for testing first memory space;
Second copied cells, the forwarding table for storing second memory space copy to first storage Space is to obtain third forwarding table;
First access unit, for accessing the third forwarding table.
In the first possible realization method of second aspect, described device further includes:Second access unit is used for The first forwarding table that first memory space of memory stores is copied to the memory by first copied cells After second memory space is to obtain the second forwarding table, and in second copied cells second memory space is stored Forwarding table copy to first memory space with before obtaining third forwarding table, access second forwarding table.
According to the possible realization method of the first of second aspect or second aspect, second in second aspect may Realization method in, the test cell includes:
First determination unit, for determining that the network processing unit receives the rate of message less than first threshold;
First subelement tests first memory space for starting.
According to any possible realization side in the possible realization method of the above two of second aspect or second aspect Formula, in the third possible realization method of second aspect,
First copied cells are specifically used for:First forwarding table is copied to the process of second memory space In, if first forwarding table is updated, updated first forwarding table is copied in second memory space; And/or
Second copied cells are specifically used for:During the forwarding table is copied to first memory space, If the forwarding table is updated, updated forwarding table is copied in first memory space.
According to any possible realization side in above-mentioned three kinds of possible realization methods of second aspect or second aspect Formula, in the 4th kind of possible realization method of second aspect, the test cell includes:
Second determination unit, for determining that the network processing unit receives the rate of message more than second threshold;
Second subelement tests first memory space for stopping.
The method and device provided in an embodiment of the present invention that memory is tested, by the first memory space of memory First forwarding table of storage copies to the second memory space of the memory to obtain the second forwarding table;Network processing unit is to institute The first memory space is stated to be tested;By second memory space store forwarding table copy to first memory space with Obtain third forwarding table;The network processing unit accesses the third forwarding table, to help effectively to find in memory Failure.
Description of the drawings
Fig. 1 is a kind of schematic diagram by CPU on-line testing memories provided in an embodiment of the present invention;
Fig. 2 is the flow chart for the method tested memory that the embodiment of the present invention one provides;
Fig. 3 is one of the schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one provides;
Fig. 4 is the two of the schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one provides;
Fig. 5 is the three of the schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one provides;
Fig. 6 is the four of the schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one provides;
Fig. 7 is the schematic device provided by Embodiment 2 of the present invention tested memory.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is clearly retouched It states, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the present invention In embodiment, the every other implementation that those of ordinary skill in the art are obtained without creative efforts Example, shall fall within the protection scope of the present invention.
Fig. 1 is a kind of schematic diagram by CPU on-line testing memories provided in an embodiment of the present invention.In Fig. 1, CPU prisons The size that forwarding module in NP receives message rate is controlled, enables and closes the detection module inside NP, and execute forwarding table The replication actions of list item, record test result etc..Include forwarding module and detection module inside NP, forwarding module is responsible for datagram The forward process of text, forwarding module can be always enabled.That is, the forwarding module can be constantly in operation shape State.Detection module is then enabled and is closed under the control of cpu;NP further includes memory, which is divided into polylith storage Space is used for storing the list item of different forwarding tables, to cope with different business.The list item of each forwarding table is in addition to normally storing Further include a corresponding backup space, which is also to mark off to come from memory, wherein normally other than space Memory space be known as the first memory space, backup space is known as the second memory space.Under normal circumstances, the list item of forwarding table is It is stored in the first memory space, without being stored in the second memory space.
In Fig. 1, in normal forwarding, i.e., when not starting memory on-line testing function, the detection module inside NP It does not run, only forwarding module is run.CPU is to operate the first of forwarding table to deposit to issuing and refreshing for the list item of each forwarding table Space is stored up, rather than operates the second memory space of forwarding table;Simultaneously when forwarding module forwarding service message, and pass through access Forwarding table in first memory space carrys out the forwarding of finishing service message.
Fig. 2 is the flow chart for the method tested memory that the embodiment of the present invention one provides.The method is held Row main body can be NP.As shown in Fig. 2, the method specifically includes:
The first forwarding table that first memory space of memory stores is copied to the second storage of the memory by S201 Space is to obtain the second forwarding table.
For example, the memory can be double data speed synchronous dynamic RAM (double Data rate synchronous dynamic random access memory, DDR SDRAM).Second forwarding table Content it is identical as the content of the first forwarding table.
For example, the executive agent of S201 can be CPU.For example, the CPU can be read in first memory space The first forwarding table.Then, first forwarding table is write second memory space of the memory by the CPU.Institute Stating CPU can be by peripheral parts interconnected (peripheral component interconnect, PCI) bus and the NP Connection.The memory can be connect by Double Data Rate (double data rate, DDR) interface with the NP.
For example, the executive agent of S201 can be the memory.For example, the CPU can indicate the storage Device is in the mode of direct memory access (direct memory access, DMA) by described the of first memory space One forwarding table copies to second memory space.Specifically, the CPU can send to the memory and order.It is described The start address of the start address and second memory space of first memory space is carried in order.The memory is received To after the order, by direct memory access controller (direct memory access controller, DMAC) to The CPU sends the request of take over bus control right.After the memory obtains the bus control unit, described first is deposited The first forwarding table in storage space writes second memory space of the memory.
One of the schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one shown in Figure 3 provides, with online It tests for the first memory space of forwarding table A, the forwarding table A for being recorded in the first memory space is denoted as the first forwarding table.It lifts For example, which can be action schedule (action table).The action schedule can be linear list (linear table).The linear list can be port table (port table).Above-mentioned action schedule may include action, and the action can be with It is to forward, abandon, being sent to CPU, modifying to message or counted to message.Before starting detection module, CPU is the first memory space for operating forwarding table A to the action that the list item of forwarding table A executes, and cpu cycle property first monitors The size of the rate of the reception message of forwarding module in NP, when receiving the size of rate of message less than first threshold, wherein First threshold generally can be set as the 30% of interface physical bandwidth, and user is configured by corresponding order line on the router When the state of memory on-line testing function is enabled, CPU thinks that the preparation before test can be started;Then CPU starts Monitoring issued to forwarding table A in the first memory space, start to forwarding table A issue monitoring after, by the list item of forwarding table A The second memory space is copied to from the first memory space, is stored as the second forwarding table, wherein the content of the second forwarding table and first The content of forwarding table is identical.During above-mentioned duplication, if cpu monitor is updated to the first forwarding table, i.e., cpu monitor arrives When the list item of first forwarding table is updated accordingly, then stop above-mentioned reproduction process, it again will more after delay a period of time The first forwarding table after new copies in the second memory space.It is exemplified as, if the first forwarding table has 10 list items, first replicates 6 After a list item to the second memory space, cpu monitor has list item to be updated to the first forwarding table, then stops the process replicating, prolong It slow 10 seconds and then attempts 10 list items of updated first forwarding table all copying to the second memory space again In.
S202, network processing unit test first memory space.
For example, the executive agent of S202 can be the NP.
For example, the CPU can indicate that the NP tests first memory space.The network processes Device can be tested first memory space by testing results program.The test program can pass through microcode reality It is existing.For example, the NP may include multiple processors.At least one of the multiple processor processor can pass through operation Microcode tests first forwarding table in first memory space.For example, the test program can correspond to one Kind testing algorithm or a variety of testing algorithms.
In Fig. 3 provided in an embodiment of the present invention, NP can be realized by FPGA, can also be realized by ASIC.The NP and Memory can be located in the same chip, can also be located in two chips.If the NP and the memory point Wei Yu not be in two chips, the NP can be direct-connected with the memory.For example, the NP can by ddr interface with The memory is direct-connected.Specifically, CPU periodically monitors the size of the rate of the reception message of forwarding module in NP, works as determination When the rate of the reception message of forwarding module is less than first threshold in NP, the detection module in NP start to the first memory space into Row test.The two of the schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one shown in Figure 4 provides, are starting After detection module, detection module executes many algorithms and is tested comprehensively the first memory space of forwarding table A, is exemplified as, Detection module can execute March C, March LR, March SS, Prbs_DataAlign or Qiot scheduling algorithms to forwarding table A The first memory space tested comprehensively.Since detection module is the hardware module inside NP, performance is very high, so detection mould The readwrite bandwidth of block can reach the maximum value of band width in physical, when solving in the prior art with CPU on-line testing memories, by It is that internal storage access is initiated by software in CPU, to cause the bandwidth pressure that CPU accesses NP memories big, can not achieve effectively The problem of test.It should be noted that during above-mentioned test, the action that CPU executes the list item of forwarding table A is all behaviour Make the second forwarding table in the second memory space, while the forwarding module in NP is by accessing the list item in the second forwarding table, from And realize the forwarding of service message, specifically, at least one of multiple processors processor can be micro- by running in NP Code, to access the second forwarding table.
It should be noted that when startup the first memory space of detection module pair is tested, the processing energy of NP can be influenced Power illustrates that forwarding module receives the quantity of message so when forwarding module receives the rate of message more than second threshold in NP Increasing, in order to not influence the processing capacity of NP, is needing to stop detection module.Specifically, it is forwarded when cpu cycle property monitors in NP The size of the rate of the reception message of module, when determining that the rate of the reception message of forwarding module in NP is more than second threshold, The first memory space is tested in detection module stopping in NP, wherein second threshold generally can be set as interface physical The 50% of bandwidth;After stopping test process, the detection module in NP completes the test to the first memory space, and surveys Test result is in the case that failure is not present in the first memory space, and the detection module in the NP sends first message to CPU, should First message is used to indicate the first memory space and failure is not present;When test result be the first memory space there are failures the case where Under, the detection module in the NP sends second message to CPU, which is used to indicate the first memory space, and there are failures; When in the case that detection module in NP is without completing the test to the first memory space, detection module in the NP is to CPU Third message is sent, which is used to indicate the test that do not complete to first memory space.It is exemplified as, is stopping After test process, if not completing the test to the first memory space, i.e., only test is completed in the first memory space The test of the part list item of first forwarding table, then CPU record the first forwarding table in the first memory space and do not test the letter of completion Breath, does not record other any information, when restarting detection module the first memory space of test again, retests the first forwarding The list item of table.
The forwarding table that second memory space stores is copied to first memory space and is turned with obtaining third by S203 It delivers.
For example, the executive agent of S203 can be the CPU.For example, the CPU can read the second storage sky Between in the forwarding table.Then, the forwarding table is write first memory space of the memory by the CPU.Institute The content for stating forwarding table is identical as the content of third forwarding table.
For example, the executive agent of S203 can be the memory.For example, the CPU can indicate the storage The forwarding table of second memory space is copied to first memory space by device in a manner of DMA.Specifically, institute Order can be sent to the memory by stating CPU.The start address of second memory space and described is carried in the order The start address of first memory space.After the memory receives the order, take over bus is sent to the CPU by DMAC The request of control.After the memory obtains the bus control unit, by the forwarding table in second memory space Write first memory space of the memory.
Detection module in NP completes the test to the first memory space, and test result be the first memory space not It deposits in the case of a fault, the detection module in the NP sends first message to CPU, which is used to indicate the first storage Failure is not present in space.The schematic diagram for the CPU on-line testing memories that the embodiment of the present invention one shown in Figure 5 provides it Three, CPU startup issue monitoring to the second forwarding table in the second memory space, and the forwarding table that the second memory space stores is answered It makes to the first memory space to obtain third forwarding table.It should be noted that by the storage of the first memory space of memory After first forwarding table copies to the second memory space of memory to obtain the second forwarding table, and by the second memory space The forwarding table of storage copies to first memory space with before obtaining third forwarding table, if the second forwarding table is updated to 4th forwarding table, then above-mentioned forwarding table is the 4th forwarding table;If the second forwarding table is not updated, above-mentioned forwarding table is the Two forwarding tables.The content of the forwarding table is identical as the content of third forwarding table.During above-mentioned duplication, if cpu monitor It is updated to forwarding table, is i.e. when the list item that CPU monitors forwarding table is updated accordingly, then stops above-mentioned reproduction process, Delay again copies to updated forwarding table in the first memory space after a period of time.It is exemplified as, if forwarding table has 10 A list item, after first replicating 6 list items to the first memory space, cpu monitor has list item to issue to forwarding table, then stops duplication Process postpones 10 seconds and then attempts all to copy to 10 list items of updated forwarding table into the first storage sky again Between in.
S204, the network processing unit access the third forwarding table.
For example, the executive agent of S204 can be the network processing unit.For example, the network processing unit receives After message to be forwarded, the third forwarding table can be searched, to forward the message to be forwarded.Specifically, described Network processing unit can search the third forwarding table according to the incoming interface for receiving the message to be forwarded.The network Processor can also search the third forwarding table according to the heading of the message to be forwarded.
In Fig. 5 provided in an embodiment of the present invention, the first storage sky is copied in the forwarding table for storing the second memory space Between to obtain third forwarding table after, forwarding module in NP is by accessing the list item in third forwarding table, to realize business The forwarding of message can also be to realize the forwarding of service message by searching for third forwarding table.
It should be noted that completing the survey to the first memory space according to detection module of the method in S202 in NP Examination, and test result is that the first memory space is deposited in the case of a fault, and the detection module in the NP sends second to CPU and disappears Breath, which is used to indicate the first memory space, and there are failures.What the embodiment of the present invention one shown in Figure 6 provided The four of the schematic diagram of CPU on-line testing memories, the detection module in NP completes the test to the first memory space, and surveys Test result is that the first memory space is deposited in the case of a fault, and CPU does not copy back into the list item of forwarding table from the second memory space First memory space, because the first memory space of forwarding table A has existed mistake and cannot be used continuously, CPU is to forwarding table A's The action that list item executes all is the second forwarding table operated in the second memory space, while the forwarding module in NP passes through access the List item in two forwarding tables, to realize the forwarding of service message, specifically, at least one of multiple processors are handled in NP Device can be by running microcode, to access the second forwarding table.
Optionally, in method shown in Fig. 2,
The first forwarding table that first memory space by memory stores copies to the second storage of the memory Space is to obtain after the second forwarding table and the forwarding table for storing second memory space copies to described first With before obtaining third forwarding table, the method further includes memory space:
The network processing unit accesses second forwarding table.
For example, executive agent can be the network processing unit.For example, the network processing unit receive it is to be forwarded Message after, second forwarding table can be searched, to forward the message to be forwarded.Specifically, at the network Reason device can search second forwarding table according to the incoming interface for receiving the message to be forwarded.The network processing unit Second forwarding table can also be searched according to the heading of the message to be forwarded.
Optionally, in above-mentioned technical proposal, the network processing unit carries out test to first memory space and includes:
Determine that the network processing unit receives the rate of message less than first threshold;
The network processing unit starts to test first memory space.
Optionally, in above-mentioned technical proposal,
The first forwarding table that first memory space by memory stores copies to the second storage of the memory Space includes to obtain the second forwarding table:During first forwarding table is copied to second memory space, if First forwarding table is updated, then is copied to updated first forwarding table in second memory space;And/or
The forwarding table by second memory space storage copies to first memory space and is turned with obtaining third Deliver including:It, will if the forwarding table is updated during the forwarding table is copied to first memory space Updated forwarding table copies in first memory space.
Optionally, in above-mentioned technical proposal, the network processing unit carries out test to first memory space and includes:
Determine that the network processing unit receives the rate of message more than second threshold;
First memory space is tested in the network processing unit stopping.
For example, the second threshold is more than the first threshold.
To sum up, the method provided in an embodiment of the present invention tested memory helps effectively to find in memory Failure, and the detection module inside NP can test memory with the access pressure of big bandwidth, so as to improving business Reliability.
Fig. 7 is the schematic device provided by Embodiment 2 of the present invention tested memory.Described device can be used In execution method shown in Fig. 2.For example, described device can be NP.As shown in fig. 7, the test device packet of the present embodiment It includes:First copied cells 701, test cell 702, the second copied cells 703 and the first access unit 704.
First copied cells 701, it is described for copying to the first forwarding table of the first memory space storage of memory Second memory space of memory is to obtain the second forwarding table.
For example, the memory can be SDRAM.The content of second forwarding table and first forwarding table Content is identical.
For example, the first copied cells 701 can be CPU.For example, the CPU can read first memory space In the first forwarding table.Then, first forwarding table is write second memory space of the memory by the CPU. The CPU can be connect by pci bus with the NP.The memory can be connect by ddr interface with the NP.
For example, the first copied cells 701 can be the memory.For example, the CPU can indicate the storage First forwarding table of first memory space is copied to second memory space by device in a manner of DMA.It is specific next It says, the CPU can send to the memory and order.Carried in the order first memory space start address and The start address of second memory space.After the memory receives the order, taken over to CPU transmissions by DMAC The request of bus control right.After the memory obtains the bus control unit, by first turn in first memory space Deliver second memory space for writing the memory.
In normal forwarding, the state of memory on-line testing function is not start.Cpu cycle property monitors NP transfers The size for sending out the rate of the reception message of module, when user is surveyed online by corresponding order line configuration memory on the router When the state for trying function is enabled, CPU starts or stops detection module to memory according to the variation for the rate for receiving message Test.
Test cell 702, for testing first memory space.
For example, test cell 702 can be the NP.
For example, the CPU can indicate that the NP tests first memory space.The network processes Device can be tested first memory space by testing results program.The test program can pass through microcode reality It is existing.For example, the NP may include multiple processors.At least one of the multiple processor processor can pass through operation Microcode tests first forwarding table in first memory space.For example, the test program can correspond to one Kind testing algorithm or a variety of testing algorithms.
Second copied cells 703, the forwarding table for storing second memory space copy to first storage Space is to obtain third forwarding table.
For example, the second copied cells 703 can be the CPU.For example, the CPU can read second storage The forwarding table in space.Then, the forwarding table is write first memory space of the memory by the CPU. The content of the forwarding table is identical as the content of third forwarding table.
For example, the second copied cells 703 can be the memory.For example, the CPU can indicate the storage The forwarding table of second memory space is copied to first memory space by device in a manner of DMA.Specifically, institute Order can be sent to the memory by stating CPU.The start address of second memory space and described is carried in the order The start address of first memory space.After the memory receives the order, take over bus is sent to the CPU by DMAC The request of control.After the memory obtains the bus control unit, by the forwarding table in second memory space Write first memory space of the memory.
First access unit 704, for accessing the third forwarding table.
For example, the first access unit 704 can be the network processing unit.For example, the network processing unit receives To after message to be forwarded, the third forwarding table can be searched, to forward the message to be forwarded.Specifically, institute The third forwarding table can be searched according to the incoming interface for receiving the message to be forwarded by stating network processing unit.The net Network processor can also search the third forwarding table according to the heading of the message to be forwarded.
In an implementation mode, the first copied cells 701 are specifically used for:First forwarding table is copied to described During two memory spaces, if first forwarding table is updated, updated first forwarding table is copied to described In second memory space;And/or
Second copied cells 703 are specifically used for:During the forwarding table is copied to first memory space, such as Forwarding table described in fruit is updated, then is copied to updated forwarding table in first memory space.
Under another realization method, test cell 702 includes:First determination unit 705 and the first subelement 706.
First determination unit 705, for determining that the network processing unit receives the rate of message less than first threshold.
First subelement 706 tests first memory space for starting.
Under other realization methods, test cell 702 includes:Second determination unit 707 and the second subelement 708.
Second determination unit 707, for determining that the network processing unit receives the rate of message more than second threshold;
Second subelement 708 tests first memory space for stopping.
For example, the second threshold is more than the first threshold.
Optionally, which further includes the second access unit 709, in first copied cells by memory The first memory space storage the first forwarding table copy to the second memory space of the memory to obtain the second forwarding table Later, and in second copied cells forwarding table that second memory space stores is copied into the first storage sky Between with before obtaining third forwarding table, access second forwarding table.
The method that device provided in an embodiment of the present invention implants the offer of the embodiment of the present invention one, therefore, the present invention provide Device specific work process, do not repeat again herein.
In the embodiment of the present invention two, the first copied cells 701 forward first that the first memory space of memory stores Table copies to the second memory space of the memory to obtain the second forwarding table;Test cell 702 is empty to first storage Between tested;The forwarding table that second memory space stores is copied to the first storage sky by the second copied cells 703 Between to obtain third forwarding table;First access unit 704 accesses the third forwarding table.It thereby assists in and effectively finds memory In failure, and the detection module inside NP can test memory with the access pressure of big bandwidth, so as to improving industry The reliability of business.
As it can be seen that the method and device provided in an embodiment of the present invention tested memory, helps effectively to find to deposit Failure in reservoir, and the detection module inside NP can test memory with the access pressure of big bandwidth, so as to carrying The reliability of high business.
It should be noted that being illustrated for testing NP memories in the embodiment of the present invention, but it is not limited to NP, it is right In programmable FPGA or multi-core CPU, this programme equally may be used;It in addition, can also be for non-programmable ASIC The function of this programme description is solidificated in ASIC.
Professional should further appreciate that, described in conjunction with the examples disclosed in the embodiments of the present disclosure Unit and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, hard in order to clearly demonstrate The interchangeability of part and software generally describes each exemplary composition and step according to function in the above description. These functions are implemented in hardware or software actually, depend on the specific application and design constraint of technical solution. Professional technician can use different methods to achieve the described function each specific application, but this realization It should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can use hardware, processor to execute The combination of software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only storage Device (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology neck Any other form of non-volatile computer-readable medium (non-transitory computer well known in domain Readable medium) in.
Above-described specific implementation mode has carried out further the purpose of the present invention, technical solution and advantageous effect It is described in detail, it should be understood that the foregoing is merely the specific implementation mode of the present invention, is not intended to limit the present invention Protection domain, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include Within protection scope of the present invention.

Claims (8)

1. a kind of method tested memory, which is characterized in that the method includes:
The first forwarding table that first memory space of memory stores is copied into the second memory space of the memory to obtain To the second forwarding table;
Network processing unit accesses second forwarding table;
The network processing unit tests first memory space;
The forwarding table that second memory space stores is copied into first memory space to obtain third forwarding table;
The network processing unit accesses the third forwarding table.
2. according to the method described in claim 1, it is characterized in that, the network processing unit carries out first memory space Test includes:
Determine that the network processing unit receives the rate of message less than first threshold;
The network processing unit starts to test first memory space.
3. according to any method in claim 1 to 2, which is characterized in that
The first forwarding table that first memory space by memory stores copies to the second memory space of the memory Include to obtain the second forwarding table:During first forwarding table is copied to second memory space, if described First forwarding table is updated, then is copied to updated first forwarding table in second memory space;And/or
The forwarding table by second memory space storage copies to first memory space to obtain third forwarding table Including:It, will update if the forwarding table is updated during the forwarding table is copied to first memory space Forwarding table afterwards copies in first memory space.
4. according to the method described in claim 3, it is characterized in that, the network processing unit carries out first memory space Test includes:
Determine that the network processing unit receives the rate of message more than second threshold;
First memory space is tested in the network processing unit stopping.
5. a kind of device tested memory, which is characterized in that described device includes:First copied cells, test are single Member, the second copied cells and the first access unit;
First copied cells, for the first forwarding table of the first memory space storage of memory to be copied to the storage Second memory space of device is to obtain the second forwarding table;
Second access unit, for accessing second forwarding table;
The test cell, for testing first memory space;
Second copied cells, the forwarding table for storing second memory space copy to first memory space To obtain third forwarding table;
First access unit, for accessing the third forwarding table.
6. device according to claim 5, which is characterized in that the test cell includes:
First determination unit, for determining that network processing unit receives the rate of message less than first threshold;
First subelement tests first memory space for starting.
7. according to any device in claim 5 to 6, which is characterized in that
First copied cells are specifically used for:During first forwarding table is copied to second memory space, If first forwarding table is updated, updated first forwarding table is copied in second memory space;And/or
Second copied cells are specifically used for:During the forwarding table is copied to first memory space, if The forwarding table is updated, then is copied to updated forwarding table in first memory space.
8. device according to claim 7, which is characterized in that the test cell includes:
Second determination unit, for determining that network processing unit receives the rate of message more than second threshold;
Second subelement tests first memory space for stopping.
CN201310454507.XA 2013-09-29 2013-09-29 The method and device that memory is tested Active CN104519516B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310454507.XA CN104519516B (en) 2013-09-29 2013-09-29 The method and device that memory is tested

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310454507.XA CN104519516B (en) 2013-09-29 2013-09-29 The method and device that memory is tested

Publications (2)

Publication Number Publication Date
CN104519516A CN104519516A (en) 2015-04-15
CN104519516B true CN104519516B (en) 2018-11-09

Family

ID=52794112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310454507.XA Active CN104519516B (en) 2013-09-29 2013-09-29 The method and device that memory is tested

Country Status (1)

Country Link
CN (1) CN104519516B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106373616B (en) * 2015-07-23 2020-02-07 深圳市中兴微电子技术有限公司 Method and device for detecting faults of random access memory and network processor
CN109343986B (en) * 2018-08-17 2020-12-22 华为技术有限公司 Method and computer system for processing memory failure
CN109509355A (en) * 2019-01-07 2019-03-22 黄慧 Wisdom traffic information taken terminal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024502A (en) * 2010-12-09 2011-04-20 福建星网锐捷网络有限公司 Flash device testing method and device as well as board and network equipment
EP2627041A2 (en) * 2012-02-13 2013-08-14 Fluke Corporation Inc. Method and apparatus for testing and displaying test results

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060143334A1 (en) * 2004-12-29 2006-06-29 Naik Uday R Efficient buffer management

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024502A (en) * 2010-12-09 2011-04-20 福建星网锐捷网络有限公司 Flash device testing method and device as well as board and network equipment
EP2627041A2 (en) * 2012-02-13 2013-08-14 Fluke Corporation Inc. Method and apparatus for testing and displaying test results

Also Published As

Publication number Publication date
CN104519516A (en) 2015-04-15

Similar Documents

Publication Publication Date Title
US8862953B2 (en) Memory testing with selective use of an error correction code decoder
US20160036623A1 (en) Automatic cloud-based disaster recovery system
US10824362B2 (en) File migration to persistent memory
CN105260128B (en) A kind of method and storage device for writing data into storage device
CN105824846B (en) Data migration method and device
CN106777126B (en) Data online migration method supporting heterogeneous time sequence database
CN104519516B (en) The method and device that memory is tested
US8868793B2 (en) SAS expander system and method for dynamically allocating SAS addresses to SAS expander devices
CN109522154A (en) Data reconstruction method and relevant device and system
CN106373616B (en) Method and device for detecting faults of random access memory and network processor
CN109753378A (en) A kind of partition method of memory failure, device, system and readable storage medium storing program for executing
CN102968353A (en) Fail address processing method and fail address processing device
CN107590144A (en) A kind of file memory method and terminal
CN108833164B (en) Server control method, device, electronic equipment and storage medium
CN103092718A (en) Test data backup system and method
CN104866388B (en) Data processing method and device
WO2016173172A1 (en) Method and apparatus for detecting heap memory operation
US9489276B2 (en) Implementing enhanced wear leveling in 3D flash memories
CN110704236A (en) On-line checking method for chip flash data and computer storage medium
CN104407806B (en) The amending method and device of RAID group hard disc information
WO2020177381A1 (en) Method and device for server testing, computer equipment, and storage medium
CN105488047B (en) Metadata reading/writing method and device
CN106713041A (en) Session log transmitting method and device
CN105471930B (en) A kind of method, system and equipment reading distributed data
US9288161B2 (en) Verifying the functionality of an integrated circuit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201105

Address after: 625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District

Patentee after: SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201201

Address after: 213000 No. 11 Qingyang North Road, Tianning District, Changzhou, Jiangsu

Patentee after: Changzhou Hong quantity Electronic Technology Co.,Ltd.

Address before: 625, room 269, Connaught platinum Plaza, No. 518101, Qianjin Road, Xin'an street, Shenzhen, Guangdong, Baoan District

Patentee before: SHENZHEN SHANGGE INTELLECTUAL PROPERTY SERVICE Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220826

Address after: Tianning District Hehai road 213000 Jiangsu city of Changzhou province No. 9

Patentee after: Changzhou Tianning Communication Technology Industrial Park Co.,Ltd.

Address before: 213000 No. 11 Qingyang North Road, Tianning District, Changzhou City, Jiangsu Province

Patentee before: Changzhou Hong quantity Electronic Technology Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230105

Address after: Tianning District Hehai road 213000 Jiangsu city of Changzhou province No. 9

Patentee after: Changzhou Hengtang Technology Industry Co.,Ltd.

Address before: Tianning District Hehai road 213000 Jiangsu city of Changzhou province No. 9

Patentee before: Changzhou Tianning Communication Technology Industrial Park Co.,Ltd.