CN108347494A - MAC address aging processing method, network processor chip and communication equipment - Google Patents
MAC address aging processing method, network processor chip and communication equipment Download PDFInfo
- Publication number
- CN108347494A CN108347494A CN201710060551.0A CN201710060551A CN108347494A CN 108347494 A CN108347494 A CN 108347494A CN 201710060551 A CN201710060551 A CN 201710060551A CN 108347494 A CN108347494 A CN 108347494A
- Authority
- CN
- China
- Prior art keywords
- mac address
- aging
- processing
- mac
- memory
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/618—Details of network addresses
- H04L2101/622—Layer-2 addresses, e.g. medium access control [MAC] addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
An embodiment of the present invention provides a kind of MAC address aging processing method, network processor chip and communication equipments;When reaching digestion period, the aging for generating triggering MAC address aging process triggers message;Message initiated at least one MAC address aging process is triggered according to the aging, and the processing MAC Address to be aging for meeting aging condition is filtered out in the currently stored MAC Address of storage region to be preset from network Processor memory, and the processing MAC Address to be aging is issued into processor, so that the processor deletes the MAC Address of processing to be aging, the MAC Address item number of a MAC address aging process alignment processing is more than or equal to 2;By the MAC Address item number that MAC ager process alignment processings are arranged, it is convenient, flexible, it solves and needs to send a large amount of Initial messages in existing MAC address aging processing procedure and lead to network processing unit MAC address aging inefficiency, the problem of influencing its performance, ensure that normal processing of the network processing unit to other business.
Description
Technical field
The present invention relates to network communication technology field more particularly to a kind of MAC (Media Access Control, media
Access control) address aging processing method, network processor chip and communication equipment.
Background technology
Network processing unit has the function of learning MAC Address automatically, when carrying out data forwarding and receiving, by the data
MAC Address is stored, to facilitate network processing unit to reuse these MAC Address.But these are stored in network
In all MAC Address in processor memory, generally not all MAC Address are all frequently using, it is understood that there may be part
The not used situation of MAC Address long-time, for this Section MAC address, it will the serious memory headroom for occupying network processing unit,
And the business processing efficiency of network processing unit is influenced, therefore, it is necessary to these are met with the MAC Address of corresponding aging condition to carry out always
Change delete processing, to control occupancy of the unnecessary MAC Address to memory, is also beneficial to store net in limited memory headroom
The new MAC Address that network processor learns.
Existing MAC address aging processing is typically to be at the beginning of being sent to network processing unit by digestion period by generator package
Beginningization message, network processing unit is updated to MAC Address according to the Initial message or aging, but due to network processing unit
An Initial message being sent to according to generator package every time can only one MAC Address of alignment processing, therefore it is old at one
Change in order to which all MAC Address for completing to store in network processing unit are updated or aging in the period, and in network processing unit
The MAC Address item number that may store is usually larger, generally 1M (1024*1024), so generator package needs to send largely
Initial message, network processing unit are also required to receive and handle the Initial message of these substantial amounts, to singly
Update aging to all MAC Address is completed, seriously affects the performance of network processing unit, therefore ageing efficiency is lowly and very
It is inconvenient.
Invention content
MAC address aging processing method, network processor chip and communication equipment provided in an embodiment of the present invention, it is main to solve
Certainly the technical issues of is that existing MAC address aging processing method treatment effeciency is low, influences the performance of network processing unit.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of MAC address aging processing method, including:
When reaching digestion period, generates the aging for triggering MAC address aging process and trigger message;
Message initiated at least one MAC address aging process is triggered with default from network processing unit memory according to the aging
The processing MAC Address to be aging for meeting aging condition is filtered out in the currently stored MAC Address of storage region, and is waited for described always
Change processing MAC Address and issue processor, so that the processor deletes the MAC Address of processing to be aging, a MAC Address is old
The MAC Address item number of change process alignment processing is more than or equal to 2.
The embodiment of the present invention also provides a kind of network processor chip, including:
Aging monitoring modular, for when reaching digestion period, generation to be touched for triggering the aging of MAC address aging process
Message is sent out, and aging triggering message is sent to burin-in process module;
Burin-in process module, for triggering message initiated at least one MAC address aging process from interior according to the aging
It deposits and filters out the processing MAC Address to be aging for meeting aging condition in the currently stored MAC Address of default storage region, and by institute
It states processing MAC Address to be aging and issues processor, so that the processor deletes the MAC Address of processing to be aging, a MAC
The MAC Address item number of address aging process alignment processing is more than or equal to 2.
The embodiment of the present invention also provides a kind of communication equipment, including network processor chip recited above.
The embodiment of the present invention also provides a kind of computer storage media, and computer is stored in the computer storage media
Executable instruction, the computer executable instructions are used to execute MAC address aging processing method any one of above-mentioned.
The beneficial effects of the invention are as follows:
MAC address aging processing method, network processor chip and the communication equipment provided according to embodiments of the present invention,
When digestion period reaches, the aging for generating triggering MAC address aging process triggers message;It is triggered according to the aging message initiated
At least one MAC address aging process is screened with being preset in the currently stored MAC Address of storage region from network Processor memory
Go out to meet the processing MAC Address to be aging of aging condition, and the processing MAC Address to be aging is issued into processor, for institute
It states processor to delete the MAC Address of processing to be aging, the MAC Address item number of a MAC address aging process alignment processing is big
In equal to 2;It is convenient, flexible by the way that the MAC Address item number of MAC ager process alignment processings is arranged, solve existing MAC Address
Needing during burin-in process to send a large amount of Initial messages leads to network processing unit MAC address aging inefficiency, influences it
The problem of performance, ensure that normal processing of the network processing unit to other business.
Description of the drawings
Fig. 1 is the MAC address aging process flow schematic diagram of the embodiment of the present invention one;
Fig. 2 is the flow diagram that the network processing unit of the embodiment of the present invention one handles MAC address aging;
Fig. 3 is the communication apparatus construction schematic diagram of the embodiment of the present invention two;
Fig. 4 is the aging monitor structural schematic diagram of the embodiment of the present invention two;
Fig. 5 is the structural schematic diagram of the communication equipment of the embodiment of the present invention two.
Specific implementation mode
The embodiment of the present invention is described in further detail below by specific implementation mode combination attached drawing.
Embodiment one:
Lead to network processes to solve to need in existing MAC address aging processing procedure to send a large amount of Initial messages
Device MAC address aging inefficiency, the problem of influencing its performance, the embodiment of the present invention provide a kind of MAC address aging processing side
Method, refers to Fig. 1, and the MAC address aging processing method includes:
S11:When reaching digestion period, generates the aging for triggering MAC address aging process and trigger message.
Digestion period can be by including timer or register to carrying out timing monitoring digestion period, also may be used certainly
To use other devices or functional unit to realize the monitoring to digestion period.Preferably, timer can be used or posted
Storage to digestion period carry out timing monitoring, this mode is more reliable and more stable than software monitors mode, speed faster, Er Qiezi
Source occupies relatively low.When being monitored to digestion period, digestion period can be flexibly arranged, it is preferable that the aging
Period could be provided as 60-360 seconds, such as 60 seconds, 120 seconds, 180 seconds, 240 seconds, 300 seconds etc., and the mode of setting can pass through
The timing of timer is adjusted to being adjusted digestion period, not to be limited herein.When reaching digestion period, generates and touch
The aging for sending out MAC address aging process initiation triggers message.Specifically, aging triggering message can pass through generator package or control
Device processed generates.
S12:Message initiated at least one MAC address aging process is triggered with from network processing unit memory according to the aging
The processing MAC Address to be aging for meeting aging condition is filtered out in the currently stored MAC Address of default storage region, and will be described
Processing MAC Address to be aging issues processor, so that the processor deletes the MAC Address of processing to be aging, MAC
The MAC Address item number of location ager process alignment processing is more than or equal to 2.
Message initiated at least one MAC address aging process is triggered according to the aging to be carried out to corresponding MAC Address
Burin-in process.It can be a trigger packet that aging, which triggers message, can also be multiple trigger packets, and a trigger packet triggering starts one
A MAC address aging process, and the MAC Address item number of each MAC address aging process alignment processing is at least 2.And each MAC
The MAC Address item number of address aging process alignment processing may be the same or different, specifically, can be according to actual conditions
Flexibly setting.It should be understood that within a burin-in process period, message initiated MAC address aging is triggered according to aging
Process should be completed to preset the currently stored all MAC Address progress respective handling of storage region to the memory jointly.
For a better understanding of the present invention, message initiated at least one MAC address aging is triggered below for according to aging
The process of process carries out specific example explanation.
Example one:
Only include a trigger packet in the aging triggering message, it is old that a MAC Address can be started according to the trigger packet
Change process.In order to complete to carry out respective handling, therefore this MAC Address to all MAC Address in network processing unit memory
The maximum MAC that the MAC Address item number of ager process alignment processing may store for the default storage region of network processing unit memory
Location number, for example, 1M (1024*1024).At this point it is possible to be configured to the MAC address aging process, its processing is set
MAC Address item number is 1M, and then the MAC address aging process carries out the corresponding MAC Address in network processing unit memory corresponding
Processing.It is of course also possible to according to MAC Address actual number currently stored in its network processing unit memory, the MAC is arranged
The MAC Address item number stored in the MAC Address item number of address aging process alignment processing, such as its current memory of network processing unit
Be 10000, then the MAC Address item number that the MAC address aging process alignment processing can directly be arranged accordingly is 10000, this
Sample MAC address aging process actually also completes the process handled all MAC Address, and the MAC empty to remaining
Address list item can not scan (assuming that the maximum MAC landlords item number that network processing unit memory may store is more than 10000), carry
The high treatment effeciency of the MAC ager process, but according to the MAC Address item number of actual storage in network processing unit memory, to match
The MAC Address item number for setting MAC address aging process alignment processing needs to occupy the certain process resource of network processing unit, specifically
Situation can be selected flexibly.
Example two:
Include at least two trigger packets in the aging triggering message of the generation, a trigger packet triggering starts a MAC
Address aging process that is to say that being often directed to a trigger packet starts a MAC address aging process.Each MAC address aging into
The MAC Address item number of journey alignment processing is the maximum MAC address number that network processing unit memory presets that storage region may store
Divided by the trigger packet number of the generation, to guarantee to complete to carry out phase to all MAC Address in network processing unit memory
It should handle.For example, it is 100k, trigger packet that network processing unit memory, which presets the maximum MAC address number that storage region may store,
Number is 100, namely the MAC address aging process number started is 100, then each MAC address aging process corresponds to
The MAC Address item number of processing is 100k/100=1k, that is, the MAC Address item number of each MAC Address alignment processing is 1k items.
It should be understood that when the memory presets the maximum MAC address number that storage region may store divided by the trigger packet
When number, if there is aliquant situation, add 1, such as 100/3=33.3 ≈ after obtained numerical value can be removed to fractional part
34, remove fractional part 0.3, integer part 33 plus 1 are obtained 34, that is to say that each MAC address aging process is to be treated
MAC Address item number is 34.Certainly it is actually the MAC Address of first and the processing of second MAC address aging process here
Item number is 34, and the MAC Address item number of third MAC address aging process processing is 32, because actually only having here
100 (34+34+32) a MAC Address.
It should be understood that MAC address aging process can be pre-configured with, and it is stored in corresponding position, for example can be
In network processing unit.Such as, it is first determined the maximum MAC address number that network processing unit memory may store, for example be 1M
(1024*1024);Then the case where being directed in aging triggering message only including a trigger packet, is pre-configured with corresponding
MAC address aging process, the MAC Address item number that the MAC address aging process alignment processing is arranged are 1M;Similarly, corresponding aging
The MAC Address item number that corresponding MAC address aging process alignment processing is arranged in triggering message comprising 2 trigger packets is 1M/2=
524288 ... correspondingly, is triggered to aging old comprising the corresponding MAC Address of a trigger packet settings of N (1≤N≤0.5M) in message
The MAC Address item number of change process alignment processing is 1M/N ... last, and correspondingly, it includes 524288 to be triggered in message to aging
The MAC Address item number that corresponding MAC address aging process alignment processing is arranged in trigger packet is 1M/524288=2.Here it should protect
The MAC Address item number for demonstrate,proving each MAC address aging process alignment processing is more than or equal to 2.Just reduce the MAC that triggering starts in this way
Address aging process, so as to reduce resource occupation.The trigger packet number for including in message is triggered according to the aging, directly
The corresponding preconfigured MAC address aging process of triggering, to carry out respective handling to corresponding MAC Address.It avoids the need for
The process of provisional configuration MAC Address process is conducive to improve its treatment effeciency.It is equally applicable for above-mentioned example one.
Example three:
Above-mentioned example one and example are second is that trigger the trigger packet number for including in message according to aging, to start phase therewith
With the MAC address aging process of number, it that is to say that being often directed to a trigger packet starts a MAC address aging process, to complete
The processing of corresponding number MAC Address, the trigger packet is used only for triggering and starts MAC address aging process, in the trigger packet
Content without any relationship, such as the trigger packet can be empty packet, and can also be other can complete MAC address aging process and touch
The triggering message of hair.Therefore dissection process is not needed to this trigger packet, it is not necessary to be concerned about the content information entrained by it, directly may be used
It is corresponding to reduce to start the MAC address aging process of corresponding number according to the trigger packet number received
Processing load, avoids handling other business to network processing unit and impacts.
In this example three, when reaching digestion period, generates the triggering of the aging for triggering MAC address aging process and disappear
Breath, the aging triggering message includes at least one trigger packet, and is needed comprising MAC address aging process in the trigger packet
The MAC Address item number K of burin-in process;The triggering of each trigger packet starts a MAC address aging process, and the MAC Address is arranged
It is K that ager process, which needs the MAC Address item number of burin-in process, with from the currently stored MAC of the default storage region of the memory
K MAC Address is selected to carry out the processing MAC Address to be aging screening for meeting aging condition in location.It should be understood that being arranged
When MAC address aging process needs the MAC Address item number of burin-in process, can extract in trigger packet comprising MAC address aging into
Journey needs the MAC Address item number K of burin-in process, needs the MAC Address item number K of burin-in process to be set according to what is extracted
It sets.The MAC Address item number that MAC address aging process needs burin-in process can certainly be obtained by other means, to
The MAC Address item number that the MAC address aging process needs burin-in process is set.Trigger packet in example one and example two with originally show
Trigger packet in example three can be identified with fast and easy by carrying different identification informations, judge whether to be parsed
Extract the content in the trigger packet.When carrying out parsing extraction trigger packet for judgement, such as the institute in this example three
Trigger packet is stated, parsing extraction is just carried out, and according to the MAC Address item number K of extraction, the MAC address aging being currently up is arranged
The MAC Address item number of its alignment processing of process is K, is selected with being preset in the currently stored MAC Address of storage region from the memory
It selects K MAC Address and carries out the processing MAC Address to be aging screening for meeting aging condition.
For example, the maximum MAC address number that network processing unit memory may store is 1000, aging triggering message includes
3 trigger packets, and it is respectively 500 to need the MAC Address item number of burin-in process comprising MAC address aging process in each trigger packet
Item, 300,200;Extract the MAC Address item number K for including in the trigger packet at this time, here by these three trigger packets into
After row extraction, the MAC Address item number for including in corresponding trigger packet can be obtained, that is to say that can to obtain three MAC Address old
The MAC Address item number K of change process alignment processing is respectively 500,300,200.It should be understood that being wrapped in extracting the trigger packet
Before the MAC Address item number contained, it can carry out judging whether to need to extract by the identification information that the triggering carries.It is carrying
After obtaining MAC Address item number K, start a MAC address aging process, and the MAC address aging process is set and is needed always
The MAC Address item number for changing processing is K, that is to say need to start three MAC address aging processes here, and needs to be respectively set each
A MAC address aging process needs to handle the MAC Address item number 500,300,200 of burin-in process, so that these three MAC Address are old
Change process from selecting 500,300,200 MAC Address to carry out respectively in the currently stored MAC Address of the memory predeterminable area
Reason, filters out the processing MAC Address to be aging for meeting aging condition.
Each MAC address aging process can be serial, can also be parallel, can also be that a part is serial one
Part parallel.For example, when above three MAC address aging process is that serial mode starts execution, first MAC address aging
It is 500 that process, which needs the MAC Address item number of burin-in process, then presets the currently stored MAC Address of storage region from the memory
Middle selection 500, for example can be preceding 500 MAC Address stored successively in the MAC Address, it that is to say that sequence is 1-500
This 500 MAC Address;Second MAC address aging process can be then this 300 MAC of 501-800 with selecting sequence
Location;Third MAC address aging process can then select last sequence for this 200 MAC Address of 801-1000 at
Reason.In order to facilitate understanding, following table is referred to:
Table 1
When above three MAC address aging process is that parallel starting executes, i.e., these three MAC address aging processes are same
Shi Qidong's, then the MAC Address serial number of each MAC address aging process selection processing can flexibly be set, but it should ensureing it
The MAC Address item number of processing.For example, it is desired to handle the MAC that the MAC address aging process selection that MAC Address item number is 500 is handled
Address serial number can be 1-500, can also be 301-800, can also be 601-1000;Similarly, for other two MAC Address
Ager process can also carry out corresponding flexibly setting.In order to make it easy to understand, referring to following table:
Table 2
In addition, the memory preset storage region may the MAC Address quantity of actual storage not reach the memory pre-
If the maximum MAC address number that storage region may store.Such as by taking table 2 as an example, the MAC Address item number that maximum may store is
1000, and the MAC Address item number of actual storage may be 500, MAC address aging process 1 can directly handle this 500 at this time
MAC Address, and MAC address aging process 2 and 3 its MAC Address item number to be treated despite the provision of, but due to not depositing at this time
In the MAC Address for needing its processing, therefore it is sky that can return to handling result to processor, that is to say that there is no processing to be aging
Then MAC Address terminates the process;It is of course also possible to handle this physical presence by MAC address aging process 2 and 3
500 MAC Address, it is sky that MAC address aging process 1 then returns to handling result to processor, specifically can be according to actual conditions
Flexibly setting.
It needs to carry out aging prison it should be noted that the memory in network processing unit is preset storage region and can be stored
The MAC Address of survey can also store all MAC Address.It needs to carry out the MAC Address of aging monitoring be network processing unit
The less MAC Address of number that is interim learning or learning, it may also be said to be the lower MAC Address of priority;It is corresponding
, it is understood that there may be the MAC Address often learnt, network processing unit need the MAC Address frequently communicated therewith, these
The priority of MAC Address is higher, it may not be necessary to carry out aging monitoring.It will need to carry out aging prison according to corresponding division rule
The MAC Address surveyed and need not carry out aging monitoring stores respectively, is conducive to the efficiency for improving MAC address aging processing.This reality
Apply the region that the memory in example presets the MAC Address storage for needing to carry out aging monitoring of storage region namely here.
In order to better understand the present invention, MAC address aging process in network processing unit is specifically described below, is asked
Referring to Fig. 2, including:
S21:The MAC Address of selection setting item number, filters out the processing to be aging for meeting aging condition from the memory
MAC Address.
MAC address aging process from network processing unit memory preset storage region in selection setting item number MAC Address into
Row meets the processing MAC Address to be aging screening of aging condition, specifically, the MAC Address that the selection goes out can be scanned,
Judge whether each MAC Address meets aging condition, determines processing MAC Address to be aging.It should be understood that the aging item
Part can be flexibly arranged according to practical application, such as the MAC Address not communicated for a long time with network processing unit.
S22:Processing MAC Address to be aging is added in the buffer area buffer of pre- first to file.
It, can be according to corresponding format by the processing MAC to be aging after filtering out corresponding processing MAC Address to be aging
Location is added in the buffer area buffer of pre- first to file.Corresponding format can be with only carrying the processing MAC to be aging
The index of location, processor can find the specifying information of the MAC Address according to the index;And/or the MAC of the processing to be aging
Location and in the relevant virtual LAN of the MAC Address to be aging address (VLAN) and the address Virtual Private Network (VPN) etc..But
It should be guaranteed that corresponding format can be identified by processor, that is to say and should in advance be arranged with processor, to ensure
It being capable of identifying processing.
The memory size of the buffer area buffer of pre- first to file can flexibly be set, for example, can be 256 bytes, can also
It is 1kB, 12kB etc..Buffer memories are bigger, and the mac address information to be aging that may store is also more, but is sent to processing
The bandwidth of required occupancy and resource are bigger when device.
S23:When buffer area buffer is filled with or is scanned, builds burin-in process request message and be sent to processing
Device.
When buffer area buffer is filled with or is scanned, structure includes place to be aging in the buffer area buffer
It manages the burin-in process request message of the identification information of MAC Address and is sent to processor, identification information can be the place to be aging
Manage the index and/or its specific mac address information of MAC Address, such as MAC Address and its relevant virtual LAN (VLAN)
Address and the address Virtual Private Network (VPN) etc..
One MAC address aging process, which corresponds to the processing MAC Address to be aging filtered out, can be stored in a buffer area
In buffer, but when the buffer area buffer has been filled with, it can apply applying for that a buffer area buffer is carried out again
Storage.It should be understood that the processing MAC Address to be aging that a MAC address aging process filters out can be stored separately on
In the buffer area buffer of one or more pre- first to file;Multiple MAC address aging processes can also share one or more
A buffer area buffer.Specifically can flexibly it be arranged according to actual conditions.
It, can be by MAC Address that network processing unit is stored with bitmap form table when being scanned screening to MAC Address
Show, reduce access times, improves treatment effeciency.Such as network processing unit memory presets the maximum MAC that storage region may store
Address number is 1M, if 1M too cost source is directly accessed, such as can be by the MAC Address entry with the bitmap table of 64 bytes
Show, the MAC Address entry of such 1M need to only access 1M/64=16k list item entry, for the processing to be aging filtered out
MAC Address can also be identified by corresponding identifier, such as identify the MAC Address with " bit 1 " as processing to be aging
MAC Address identifies the MAC Address not for processing MAC Address to be aging with " bit 0 ".To be conducive to improve scanning screening effect
Rate.
After scanning Screening Treatment, builds corresponding burin-in process request message and be sent to processor and handled.
It should be understood that the size of burin-in process request message, format and content etc. can neatly be configured adjustment, specifically may be used
With according to treatment effeciency, stability, flexibility, resource occupation etc., which consider, to be configured.For example, the burin-in process
The size of request message can be 256 byte of buffer area buffer units of minimum, can also be that network processing unit is supported most
Long frame length 12kB.It should be understood that message is longer, entrained by information it is generally also just more, correspondingly, required hair
The message number sent is also just relatively fewer, but since the message is longer, so its occupied bandwidth and resource when sending
With regard to more.
Screening is scanned to corresponding MAC Address to complete, and institute is sent to according to the MAC filtered out processing MAC Address to be aging
After stating processor, which then can directly terminate, and restart when next digestion period arrives.It avoids
The process avoids influencing processing of the network processing unit to other business to the resource occupation of network processing unit.
The processing MAC Address to be aging received is preset storage region from network processing unit memory and deleted by processor
It removes.The processing MAC Address to be aging that processor receives can be from according in the burin-in process device request message that receives into
Row parsing obtains, and is deleted the processing MAC Address to be aging in network processing unit by issuing corresponding deletion instruction,
It realizes and treats the purpose that burin-in process MAC Address carries out aging.
MAC address aging processing method provided in an embodiment of the present invention, when reaching digestion period, with generating triggering MAC
The aging of location ager process triggers message, according to the aging trigger message initiated at least one MAC address aging process with from
Network processing unit memory is preset in the currently stored MAC Address of storage region and filters out the processing to be aging for meeting aging condition
MAC Address, and the processing MAC Address to be aging is issued into processor, by the MAC of processing to be aging for the processor
Location is deleted, and the MAC Address item number of a MAC address aging process alignment processing is more than or equal to 2;MAC Address can flexibly be set
The MAC Address item number of ager process alignment processing can also carry out flexibly setting structure for burin-in process request message, side
Just flexibly, solve to need to send a large amount of Initial messages in existing MAC address aging processing procedure and lead to network processing unit
MAC address aging inefficiency, ensure that normal processing of the network processing unit to other business, have the problem of influencing its performance
Conducive to the application scenarios of extended MAC address aging processing.
Embodiment two:
The embodiment of the present invention provides a kind of network processor chip, for realizing the MAC described in the embodiment of the present invention one
Location ageing method, please refers to Fig. 3, and the network processor chip 3 includes:Aging monitoring modular 31 and burin-in process mould
Block 32;
Wherein, aging monitoring modular 31 is used for when reaching digestion period, is generated for triggering MAC address aging process
Aging triggers message, and aging triggering message is sent to burin-in process module 32.
Burin-in process module 32 is used to trigger message initiated at least one MAC address aging process according to aging pre- from memory
If filtering out the processing MAC Address to be aging for meeting aging condition in the currently stored MAC Address of storage region, and will be to be aging
Processing MAC Address issues processor, so that the processor deletes the MAC Address of processing to be aging, a MAC address aging
The MAC Address item number of process alignment processing is more than or equal to 2.
It may include a trigger packet that aging, which triggers in message, can also include at least two trigger packets, and the triggering
It can include the MAC Address item number K for needing MAC address aging process alignment processing in packet, can also be for triggering MAC Address
Other trigger packets of ager process, for example, empty packet.The MAC Address item number of each MAC address aging process alignment processing is at least
It is 2.
Specifically, when aging triggering message includes a trigger packet, aging trigger module 32 is used for according to the trigger packet
One MAC address aging process of startup, which is preset to filter out in the currently stored MAC Address of storage region from memory, meets aging item
The processing MAC Address to be aging of part, and processing MAC Address to be aging is issued into processor, the MAC address aging process corresponding position
The MAC Address item number of reason is the maximum MAC address number that network processing unit memory presets that storage region may store.
When aging triggering message includes at least two trigger packets, aging trigger module 32 is for often receiving a triggering
Start a MAC address aging process when packet, to be preset in the currently stored MAC Address of storage region from memory, filters out full
The processing MAC Address to be aging of sufficient aging condition, and the processing MAC Address to be aging is issued into processor, each MAC Address
The maximum MAC that the MAC Address item number of ager process alignment processing may store for the default storage region of network processing unit memory
The trigger packet number that location number divided by aging monitoring modular 31 are sent within digestion period to aging trigger module 32.
It includes at least one trigger packet that aging, which triggers message, and is needed comprising MAC address aging process in the trigger packet
The MAC Address item number K of burin-in process;Aging trigger module 32 is extracted and is wrapped in the trigger packet for often receiving a trigger packet
The MAC Address item number K contained, and start a MAC address aging process, which is set and needs burin-in process
MAC Address item number be K;K MAC Address is selected to filter out to be preset in the currently stored MAC Address of storage region from memory
Meet the processing MAC Address to be aging of aging condition, and the processing MAC Address to be aging filtered out is issued into processor.
Aging trigger module 32 is used to preset the MAC Address that storage region scans corresponding item number from the memory, filters out
Meet the processing MAC Address to be aging of aging condition and adds it in the buffer area of pre- first to file;And for caching
When area is filled with or scans completion, structure includes the burin-in process request of corresponding processing mac address information to be aging in buffer area
Message is simultaneously sent to processor.
In the present embodiment, aging monitoring modular 31 may include timer or register, please refer to Fig. 4, timer 311
Or register 312 may be incorporated in digestion period can also further reaching to carrying out timing monitoring digestion period
When, notice aging monitoring modular 31.In the present embodiment, the network processor chip 3 can be set in network processing unit, be used
In carrying out aging monitoring processing to the MAC Address in network processing unit, the network processing unit includes but not limited to exchange
Machine.
The present embodiment also provides a kind of communication equipment, please refer to Fig. 5, and the communication equipment includes the net in the present embodiment
Network processor chips 3 can be used to implement the MAC address aging processing method in embodiment one, the communication equipment packet
It includes but is not limited to interchanger.
Network processor chip 3 provided in an embodiment of the present invention and the communication equipment for including the network processor chip 3, can
For realizing that the MAC address aging processing method described in the above embodiment of the present invention one, the network processor chip 3 include
Ageing management module 31, burin-in process module 32;Wherein 3 module of aging monitor is used for when reaching digestion period, is generated and is used
Message is triggered in the aging of triggering MAC address aging process, and aging triggering message is sent to burin-in process module 32;
Burin-in process module 32 is used to trigger message initiated at least one MAC address aging process according to aging presets memory block from memory
Filter out the processing MAC Address to be aging for meeting aging condition in the currently stored MAC Address in domain, and by processing MAC to be aging
Processor 33 is issued in address, so that the processor deletes the MAC Address of processing to be aging, a MAC address aging process
The MAC Address item number of alignment processing is more than or equal to 2;It solves and needs to send largely in existing MAC address aging processing procedure
Initial message leads to network processing unit MAC address aging inefficiency, the problem of influencing its performance, ensure that network processing unit
Normal processing to other business.
Obviously, those skilled in the art should be understood that each module of the embodiments of the present invention or each step can be used
General computing device realizes that they can be concentrated on a single computing device, or be distributed in multiple computing device institutes
On the network of composition, optionally, they can be realized with the program code that computing device can perform, it is thus possible to by them
It is stored in computer storage media (ROM/RAM, magnetic disc, CD) and is performed by computing device, and in some cases, it can
With the steps shown or described are performed in an order that is different from the one herein, or they are fabricated to each integrated circuit dies
Block, or by them multiple modules or step be fabricated to single integrated circuit module and realize.So the present invention does not limit
It is combined in any specific hardware and software.
It cannot recognize being further described made by the embodiment of the present invention the above content is specific embodiment is combined
The specific implementation of the fixed present invention is confined to these explanations.For those of ordinary skill in the art to which the present invention belongs,
Without departing from the inventive concept of the premise, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to the present invention
Protection domain.
Claims (10)
1. a kind of MAC address aging processing method, which is characterized in that including:
When reaching digestion period, generates the aging for triggering MAC address aging process and trigger message;
Message initiated at least one MAC address aging process is triggered according to the aging currently to deposit to preset storage region from memory
Filter out the processing MAC Address to be aging for meeting aging condition in the MAC Address of storage, and by the processing MAC Address to be aging
Processor is issued so that the processor is deleted, the MAC Address item number of a MAC address aging process alignment processing is more than or equal to
2。
2. MAC address aging processing method as described in claim 1, which is characterized in that the aging triggering message includes one
A trigger packet;
Message initiated at least one MAC address aging process, which is triggered, according to the aging meets waiting for always for aging condition to filter out
Changing processing MAC Address includes:
According to the trigger packet start a MAC address aging process with from memory with presetting the currently stored MAC of storage region
The processing MAC Address to be aging for meeting aging condition is filtered out in location, and the processing MAC Address to be aging is issued into processing
Device, the MAC Address item number of the MAC address aging process alignment processing presets storage region for network processing unit memory to be deposited
The maximum MAC address number of storage;
Or,
The aging triggering message includes at least two trigger packets;
Message initiated at least one MAC address aging process, which is triggered, according to the aging meets waiting for always for aging condition to filter out
Changing processing MAC Address includes:
Start a MAC address aging process according to each trigger packet to preset the currently stored MAC of storage region from memory
The processing MAC Address to be aging for meeting aging condition is filtered out in address, and the processing MAC Address to be aging is issued into processing
Device, the MAC Address item number of each MAC address aging process alignment processing presets storage region for network processing unit memory to be deposited
The maximum MAC address number of storage divided by the trigger packet number.
3. MAC address aging processing method as described in claim 1, which is characterized in that the aging triggering message includes extremely
Lack a trigger packet, needs the MAC Address item number K of burin-in process in the trigger packet comprising MAC address aging process;
Message initiated at least one MAC address aging process, which is triggered, according to the aging meets waiting for always for aging condition to filter out
Changing processing MAC Address includes:
The triggering of each trigger packet starts a MAC address aging process, and the MAC address aging process is arranged and needs burin-in process
MAC Address item number be K, with from the memory preset in the currently stored MAC Address of storage region K MAC Address of selection into
Row meets the processing MAC Address to be aging screening of aging condition.
4. MAC address aging processing method as described in any one of claims 1-3, which is characterized in that by the place to be aging
Reason MAC Address issues processor and includes:
From the memory preset storage region scan the MAC Address of corresponding item number with filter out meet aging condition it is to be aging from
MAC Address is managed, and the identification information of the processing MAC Address to be aging filtered out is added in the buffer area of pre- first to file;
When the buffer area is filled with or MAC Address is scanned, structure is comprising processing MAC to be aging in the buffer area
The burin-in process request message of the identification information of location is simultaneously sent to processor.
5. MAC address aging processing method as claimed in claim 4, which is characterized in that the identification information includes:MAC
Location index, MAC Address and at least one of the associated virtual local area network address of MAC Address and virtual private network address.
6. a kind of network processor chip, which is characterized in that including:
Aging monitoring modular disappears for when reaching digestion period, generating the aging for triggering MAC address aging process and triggering
Breath;
Burin-in process module, it is pre- from memory for triggering message initiated at least one MAC address aging process according to the aging
If filtering out the processing MAC Address to be aging for meeting aging condition in the currently stored MAC Address of storage region, and waited for described
Burin-in process MAC Address issues processor so that the processor is deleted, the MAC of a MAC address aging process alignment processing
Address article number is more than or equal to 2.
7. network processor chip as claimed in claim 6, which is characterized in that the aging triggering message includes a triggering
Packet;
The burin-in process module is used to start a MAC address aging process according to the trigger packet presets memory block from memory
Filter out the processing MAC Address to be aging for meeting aging condition in the currently stored MAC Address in domain, and by the processing to be aging
MAC Address issues processor, and the MAC Address item number of the MAC address aging process alignment processing is the default storage of the memory
The maximum MAC address number that region may store;
Or,
The aging triggering message includes at least two trigger packets;
It is default from memory to start a MAC address aging process when burin-in process module is for often receiving a trigger packet
The processing MAC Address to be aging for meeting aging condition is filtered out in the currently stored MAC Address of storage region, and is waited for described always
Change processing MAC Address and issue processor, the MAC Address item number of each MAC address aging process alignment processing is that the memory is pre-
If maximum MAC address number divided by ageing module that storage region may store are sent within digestion period to burin-in process module
Trigger packet number.
8. network processor chip as claimed in claim 6, which is characterized in that the aging triggering message includes at least one
Trigger packet needs the MAC Address item number K of burin-in process in the trigger packet comprising MAC address aging process;
The burin-in process module is for after often receiving a trigger packet, starting a MAC address aging process, setting
It is K that the MAC address aging process, which needs the MAC Address item number of burin-in process,;It is currently deposited with presetting storage region from the memory
K MAC Address is selected to filter out the processing MAC Address to be aging for meeting aging condition in the MAC Address of storage.
9. such as claim 6-8 any one of them network processor chips, which is characterized in that the burin-in process module is used for
The MAC Address that storage region scans corresponding item number is preset from the memory, filters out the processing MAC to be aging for meeting aging condition
Address simultaneously adds it in the buffer area of pre- first to file;
And for when the buffer area is filled with or scans completion, structure to include corresponding processing to be aging in the buffer area
The burin-in process request message of mac address information is simultaneously sent to processor.
10. a kind of communication equipment, which is characterized in that including such as claim 6-9 any one of them network processor chip.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710060551.0A CN108347494B (en) | 2017-01-25 | 2017-01-25 | MAC address aging processing method, network processor chip and communication equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710060551.0A CN108347494B (en) | 2017-01-25 | 2017-01-25 | MAC address aging processing method, network processor chip and communication equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108347494A true CN108347494A (en) | 2018-07-31 |
CN108347494B CN108347494B (en) | 2022-03-11 |
Family
ID=62962958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710060551.0A Active CN108347494B (en) | 2017-01-25 | 2017-01-25 | MAC address aging processing method, network processor chip and communication equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108347494B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109451087A (en) * | 2018-10-26 | 2019-03-08 | 新华三技术有限公司 | MAC address entries ageing method and device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1581100A (en) * | 2003-07-31 | 2005-02-16 | 华为技术有限公司 | Data aging method for network processor |
CN101047670A (en) * | 2006-04-14 | 2007-10-03 | 华为技术有限公司 | MAC address table ageing, operation method and process system thereof |
CN101170551A (en) * | 2007-11-30 | 2008-04-30 | 中兴通讯股份有限公司 | A data aging processing method |
CN104579718A (en) * | 2013-10-10 | 2015-04-29 | 杭州迪普科技有限公司 | Device and method for optimizing ARP aging mechanism |
CN105959430A (en) * | 2016-05-31 | 2016-09-21 | 深圳市风云实业有限公司 | Switcher MAC address aging method |
US20160294695A1 (en) * | 2015-04-06 | 2016-10-06 | Fujitsu Limited | Packet transmission apparatus |
CN106330712A (en) * | 2015-06-18 | 2017-01-11 | 中兴通讯股份有限公司 | MAC address learning control method and device |
-
2017
- 2017-01-25 CN CN201710060551.0A patent/CN108347494B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1581100A (en) * | 2003-07-31 | 2005-02-16 | 华为技术有限公司 | Data aging method for network processor |
CN101047670A (en) * | 2006-04-14 | 2007-10-03 | 华为技术有限公司 | MAC address table ageing, operation method and process system thereof |
CN101170551A (en) * | 2007-11-30 | 2008-04-30 | 中兴通讯股份有限公司 | A data aging processing method |
CN104579718A (en) * | 2013-10-10 | 2015-04-29 | 杭州迪普科技有限公司 | Device and method for optimizing ARP aging mechanism |
US20160294695A1 (en) * | 2015-04-06 | 2016-10-06 | Fujitsu Limited | Packet transmission apparatus |
CN106330712A (en) * | 2015-06-18 | 2017-01-11 | 中兴通讯股份有限公司 | MAC address learning control method and device |
CN105959430A (en) * | 2016-05-31 | 2016-09-21 | 深圳市风云实业有限公司 | Switcher MAC address aging method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109451087A (en) * | 2018-10-26 | 2019-03-08 | 新华三技术有限公司 | MAC address entries ageing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108347494B (en) | 2022-03-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2608874C2 (en) | Method and device for modifying and forwarding messages in data network | |
EP3073676A1 (en) | Method, apparatus and system for controlling auto-provisioning of network device | |
US20150098475A1 (en) | Host table management in software defined network (sdn) switch clusters having layer-3 distributed router functionality | |
CN104040977A (en) | Message caching method and device | |
CN103117947A (en) | Load sharing method and device | |
CN107360096A (en) | A kind of retransmission method and system of VXLAN messages | |
CN104092612A (en) | Method and device for updating matching order of fast forwarding table | |
CN109240796A (en) | Virtual machine information acquisition methods and device | |
US20220124185A1 (en) | Terabit-scale network packet processing via flow-level parallelization | |
CN109347745A (en) | A kind of flow table matching process and device based on OpenFlow interchanger | |
CN110474845A (en) | Flow entry eliminates method and relevant apparatus | |
CN104883302A (en) | Method, device and system for forwarding data packet | |
JP2022523195A (en) | Memory management method and equipment | |
CN108347494A (en) | MAC address aging processing method, network processor chip and communication equipment | |
CN102843287B (en) | Computer and identifier management method | |
US8995269B2 (en) | Computer readable storage medium storing congestion control program, information processing apparatus, and congestion control method | |
CN109800074A (en) | Task data concurrently executes method, apparatus and electronic equipment | |
CN103986660B (en) | The device of loading micro code and the method for loading micro code | |
CN112804276B (en) | Virtual broadband remote access server, control method thereof and communication system | |
CN110519147A (en) | Data frame transmission method, device, equipment and computer readable storage medium | |
US11431795B2 (en) | Method, apparatus and storage medium for resource configuration | |
CN108551439B (en) | Method and device for improving policy template application | |
CN106059956A (en) | Time queue processing method and device for session of network equipment | |
WO2017193814A1 (en) | Service chain generation method and system | |
CN108632070B (en) | Configuration method of virtual network equipment and server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |