CN102006226B - Message cache management method and device as well as network equipment - Google Patents

Message cache management method and device as well as network equipment Download PDF

Info

Publication number
CN102006226B
CN102006226B CN2010105538826A CN201010553882A CN102006226B CN 102006226 B CN102006226 B CN 102006226B CN 2010105538826 A CN2010105538826 A CN 2010105538826A CN 201010553882 A CN201010553882 A CN 201010553882A CN 102006226 B CN102006226 B CN 102006226B
Authority
CN
China
Prior art keywords
interface
buffer
yarn drill
ply
ports
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
CN2010105538826A
Other languages
Chinese (zh)
Other versions
CN102006226A (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.)
Ruijie Networks Co Ltd
Original Assignee
Fujian Star Net Communication 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 Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN2010105538826A priority Critical patent/CN102006226B/en
Publication of CN102006226A publication Critical patent/CN102006226A/en
Application granted granted Critical
Publication of CN102006226B publication Critical patent/CN102006226B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a message cache management method and device as well as network equipment. The method comprises: acquiring the size of the message cache on each line card; acquiring the state information of each interface on a local line card; and allocating and managing the message cache on the local line card according to the size of the message cache on each line card and/or the state information of each interface on the local line card. In the technical scheme of the invention, the message cache on the local line card is allocated and managed on the basis of the size of the message cache on each line card and/or the state information of each interface on the local line card, thereby improving the reasonability and effectiveness of message cache management and improving the use ratio of message cache so as to reduce the probability of insufficient message cache of line cards.

Description

Packet buffer management method, device and the network equipment
Technical field
The present invention relates to data communication field, relate in particular to a kind of packet buffer management method, device and the network equipment.
Background technology
Fig. 1 is a kind of structural representation of switch in the prior art, and as shown in Figure 1, this switch mainly comprises power board, management board and a plurality of ply-yarn drill that is interconnected with one another.Management board mainly manages whole switch, for example variety of protocol is processed, and usually can be provided with two management boards on every switch, with as redundancy backup; Mainly be provided with switching matrix on the power board, be used to exchanges data that passage is provided; Ply-yarn drill is user's interface card, and being mainly used to provides various interface to the user, such as: 100M electricity mouth, gigabit light mouth, gigabit electricity mouth, 10,000,000,000 light mouths etc.Generally include power board interface (Fabric Access Processor on the ply-yarn drill; Referred to as: FAP) module, message are processed (Packet Processor; Referred to as: PP) module and interface module.Message processing module (MPM) can be central processing unit (Central Processing Unit; Referred to as: CPU) or network processing unit (Network Processor; Referred to as: NP) etc., mainly realize the various processing of message; The power board interface module mainly realize and switching matrix between interface.When high-speed interface sends message or an interface and sends message toward a plurality of interfaces toward low-speed interface, speed that message enters might appear greater than the speed of message repeating, and therefore need to there be buffer memory to store the message that has little time to transmit.
Usually submit the periphery of changing plate interface module or message processing module (MPM) at ply-yarn drill and all can be provided with packet buffer, be mainly used to the message that memory interface receives.Packet buffer manages by descriptor; Descriptor generally comprises four parts: next pointer (next) territory is used in reference to next descriptor; State (status) territory is used for the length of recorded message; Territory, address (address) is used in reference to the packet buffer in the packet buffer district; Length (length) territory is for the length of recorded message buffer memory.Usually next pointer field by last descriptor points to circulus of first descriptor formation, and an internal memory fragment in the packet buffer district that each descriptor points to is exactly packet buffer.
Packet buffer is actually the internal memory that is specifically designed to the buffer memory message, and it is subjected to (the Printed Circuit Board of printed circuit board on memory grain capacity and the ply-yarn drill; Referred to as: the PCB) restriction of the layout such as cabling, therefore, the quantity of packet buffer is limited.When interface receives message, will go to apply for a packet buffer, and message is copied in the packet buffer, and will the information relevant with link layer set and give network layer and process; Then, network layer, transport layer, application layer be according to the corresponding agreement of the information realization in the packet buffer, and forward the packet away, applies for that simultaneously packet buffer is released.But, when interface receives a message, if apply for that less than packet buffer this message will be dropped; And for some business that has higher quality of service to require, abandoning of message is unallowed.And along with the growth of demand, switch or the router of high density, high bandwidth are more and more universal, 48 mouthful of 10,000,000,000 interface of individual ply-yarn drill support occurs, the complete machine switching bandwidth has also reached 100G even tens T, under the applied environment of this high density, high bandwidth, the easier appearance of the situation of packet buffer deficiency.Therefore, need reasonably packet buffer to be managed, with the utilance of raising packet buffer, thereby reduce the probability that the packet buffer deficiency occurs.
The management method of at present common packet buffer is main following several: sharing mode, and total interface is shared available spatial cache, and the packet buffer utilance under this way to manage is higher, but can not guarantee fairness; Dividing mode with each interface that is allocated to of packet buffer static state, can realizes fairness like this, but can distribute more buffer memory for the business of high priority yet, but the utilance of packet buffer is not high under this mode; The partial sharing mode is the certain packet buffer of each interface static division, and remaining packet buffer is shared for total interface, in this manner, when network traffics are larger, can cause the packet buffer utilance to descend, and packet loss rises.
From the above: all there is defective in the whole bag of tricks that in the prior art packet buffer is managed, therefore, a kind of new packet buffer management method to be supplied is arranged with validity and the reasonability of further raising to the packet buffer management, finally reduce the probability that the packet buffer deficiency occurs by the utilance that improves packet buffer.
Summary of the invention
The invention provides a kind of packet buffer management method, device and the network equipment, in order to improve the utilance of packet buffer, reduce the probability that the packet buffer deficiency occurs.
The invention provides a kind of packet buffer management method, comprising:
Obtain the size of packet buffer on each ply-yarn drill, described each ply-yarn drill comprises local ply-yarn drill and other ply-yarn drills that are connected with local ply-yarn drill;
Obtain the state information of each interface on the local ply-yarn drill;
According to the state information of each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, packet buffer on the local ply-yarn drill is carried out allocation manager.
The invention provides a kind of packet buffer management devices, comprising:
The first acquisition module, for the size of obtaining packet buffer on each ply-yarn drill, described each ply-yarn drill comprises local ply-yarn drill and other ply-yarn drills that are connected with local ply-yarn drill;
The second acquisition module is for the state information of obtaining each interface on the local ply-yarn drill;
Allocation manager module is used for the state information according to each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, and packet buffer on the local ply-yarn drill is carried out allocation manager.
The invention provides a kind of network equipment, comprise arbitrary packet buffer management devices provided by the invention.
Packet buffer management method of the present invention, device and the network equipment, the state information of each interface on size by obtaining packet buffer on each ply-yarn drill and the local ply-yarn drill, according to the state information of each interface on the big or small and/or local ply-yarn drill of packet buffer on each ply-yarn drill, packet buffer on the local ply-yarn drill is carried out allocation manager.Wherein, the message that interface receives on the local ply-yarn drill need to be forwarded to other ply-yarn drills usually, be the purpose ply-yarn drill, and the size of packet buffer has determined that the purpose ply-yarn drill receives the ability of message on the purpose ply-yarn drill, the buffer memory ability of interface on the local ply-yarn drill of the reception message capacity of purpose ply-yarn drill; In addition, the state of interface self, affect the follow-up behaviour in service of packet buffer such as meetings such as the message rates that whether is in connection status, supports, therefore, technical solution of the present invention is carried out allocation manager in conjunction with the size of packet buffer on each ply-yarn drill and/or the state information of interface to packet buffer on the local ply-yarn drill, can improve reasonability and validity to the packet buffer management, can improve the utilance of packet buffer, and then reduce the probability that the not enough this situation of packet buffer appears in ply-yarn drill.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, the below will do one to the accompanying drawing of required use in embodiment or the description of the Prior Art and introduce simply, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is a kind of structural representation of switch in the prior art;
The flow chart of the packet buffer management method that Fig. 2 provides for the embodiment of the invention one;
The flow chart of the packet buffer management method that Fig. 3 provides for the embodiment of the invention two;
The flow chart of the packet buffer management method that Fig. 4 provides for the embodiment of the invention three;
The flow chart of the packet buffer management method that Fig. 5 provides for the embodiment of the invention four;
The flow chart of the packet buffer management method that Fig. 6 provides for the embodiment of the invention five;
The flow chart of the packet buffer management method that Fig. 7 provides for the embodiment of the invention six;
The structural representation of the packet buffer management devices that Fig. 8 provides for the embodiment of the invention seven;
The structural representation of the packet buffer management devices that Fig. 9 A provides for the embodiment of the invention eight;
The structural representation of the packet buffer management devices that Fig. 9 B provides for the embodiment of the invention nine;
The structural representation of the packet buffer management devices that Figure 10 provides for the embodiment of the invention ten;
The structural representation of the packet buffer management devices that Figure 11 provides for the embodiment of the invention 11;
The structural representation of the packet buffer management devices that Figure 12 provides for the embodiment of the invention 12;
The structural representation of the switch online card that Figure 13 provides for the embodiment of the invention 13.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
Embodiment one
The flow chart of the packet buffer management method that Fig. 2 provides for the embodiment of the invention one.The executive agent of present embodiment is the ply-yarn drill in the switching equipment, for example the ply-yarn drill in switch or the router.As shown in Figure 2, the method for present embodiment comprises:
Step 201, obtain the size of packet buffer on each ply-yarn drill;
As shown in Figure 1, on the ply-yarn drill of switch, usually can comprise FAP, PP and interface module, be provided with a plurality of interfaces on the interface module.And for message being carried out buffer memory, also being provided with memory headroom on the ply-yarn drill of switch, this memory headroom generally includes program running space and spatial cache.Code when its Program running space is mainly used in the storage program operation, data etc., the program running space is necessary, and generally can not be used to the message that interim cache interface receives; And spatial cache is mainly used in the message that receives is carried out interim buffer memory, therefore, does not comprise the program running space at " packet buffer " described in the technical solution of the present invention, mainly refers to spatial cache.
Wherein, take local ply-yarn drill as benchmark, then " each ply-yarn drill " in the present embodiment comprises local ply-yarn drill and other ply-yarn drills that are connected with local ply-yarn drill; " connection " described here is not limited to " directly linking to each other ", usually is connected by switching matrix between each ply-yarn drill, as shown in Figure 1.Based on shown in Figure 1, " each ply-yarn drill " of present embodiment refer to the 1st ply-yarn drill ..., the n ply-yarn drill.
Particularly, as shown in Figure 1, each ply-yarn drill is connected with switching matrix with management board respectively, therefore, local ply-yarn drill can carry out information interaction by FAP and via switching matrix and other ply-yarn drills by its PP, obtaining the size of packet buffer on other ply-yarn drills, and the size of packet buffer on the local ply-yarn drill is offered other ply-yarn drills.
Step 202, obtain the state information of each interface on the local ply-yarn drill;
Particularly, the PP on the local ply-yarn drill can the docking port module on each interface monitor, to obtain the state information of each interface.For example: can obtain the enabled state of interface, namely interface is in (enable) state that enables or disable state; Again for example: can obtain the connection status of interface, namely this interface is current is in connection (linkup) state or is in notconnect state; Again for example: can also obtain the message rate (being operating rate) that each interface is supported, for example for Ethernet interface, the operating rate of each interface can 10M, 100M, 1000M, Wan Zhao etc.
Step 203, according to the state information of each interface on the size of packet buffer on each ply-yarn drill and/or the local ply-yarn drill, packet buffer on the local ply-yarn drill is carried out allocation manager.
Wherein, need to forward via other ply-yarn drills when each interface receives message on the local ply-yarn drill, the ply-yarn drill that forwards the packet away is called the purpose ply-yarn drill of local ply-yarn drill the corresponding interface.When packet buffer was larger on the purpose ply-yarn drill, the ability that the illustration purpose ply-yarn drill receives message was stronger, and corresponding to the corresponding interface on the local ply-yarn drill, this interface just can be supported higher message transmitting spped rate, and then the quantity of the required spatial cache of this interface is just less; Otherwise the quantity of the spatial cache that this interface is required is more; This shows: the large young pathbreaker of packet buffer affects the distribution of packet buffer on the local ply-yarn drill on the purpose ply-yarn drill.
In addition, the size of interface required spatial cache under different conditions is different; For example: when interface was in notconnect state or disable state, interface can not receive message, did not therefore just need spatial cache yet; Again for example: when interface receives burst flow, can require more spatial cache, to avoid occuring the packet loss phenomenon; Hence one can see that: the state of interface also will affect the distribution of packet buffer on the local ply-yarn drill.
Based on above-mentioned, when the local ply-yarn drill in the present embodiment gets access to the state information of each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, can reasonably distribute packet buffer on the local ply-yarn drill and manage according to the combination of a kind of information or above-mentioned information wherein.
The packet buffer management method of present embodiment, the state information of each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill is obtained in employing, state information according to each interface on the big or small and/or local ply-yarn drill of packet buffer on each ply-yarn drill, packet buffer on the local ply-yarn drill is carried out the technical scheme of allocation manager, taken into full account other ply-yarn drills and/or Interface status to the impact of packet buffer behaviour in service; And prior art all is impacts that the static division packet buffer is not considered above-mentioned dynamic factor, therefore, compared with prior art, what present embodiment provided carries out the technical scheme of allocation manager to packet buffer, can improve reasonability and validity to the packet buffer management, improve the utilance of packet buffer, and then the not probability of foot phenomenon of packet buffer appears in reduction.
Embodiment two
The flow chart of the packet buffer management method that Fig. 3 provides for the embodiment of the invention two.Present embodiment realizes that based on embodiment one as shown in Figure 3, the method for present embodiment comprises:
Step 301, obtain the size of packet buffer on each ply-yarn drill;
Step 302, obtain the state information of each interface on the local ply-yarn drill;
Wherein, to the specific descriptions of step 301 and step 302 can referring among the embodiment one to the description of step 201 and step 202, repeat no more herein.
Step 303, according to the state information of each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, packet buffer on the local ply-yarn drill is divided into public spatial cache and buffer to ports space;
Wherein, public spatial cache is the common spatial cache of each interface on the local ply-yarn drill; And the buffer to ports space refers to be assigned to the spatial cache of each interface.Wherein, the state of the size of packet buffer and interface can affect distribution to public spatial cache and buffer to ports space on the purpose ply-yarn drill.For example: packet buffer is larger on the purpose ply-yarn drill, and during the interface quantity that is in connection status on the local ply-yarn drill less (for example be no more than interface sum half), the ability that this situation illustration purpose ply-yarn drill receives message is stronger, the a large amount of buffer memory message of the corresponding interface on the local ply-yarn drill, and because more than half interfaces still are in notconnect state, therefore, more packet buffer can be divided into public spatial cache, the buffer to ports space is lacked relatively; Can use public spatial cache as its packet buffer space when follow-up when having interface to become connection status by notconnect state, when perhaps on interface is arranged, burst flow being arranged, also can from public spatial cache, obtain required spatial cache.Again for example: packet buffer is less on the purpose ply-yarn drill, and during the interface quantity that is in connection status on the local ply-yarn drill a lot (for example considerably beyond interface sum half), in order to guarantee that the phenomenon of dropping packets does not appear in each interface, more packet buffer can be divided into the buffer to ports space, and reserve less public spatial cache.
Step 304, according to the state information of each interface on the size of packet buffer on each ply-yarn drill and/or the local ply-yarn drill, from the buffer to ports space, give each interface assignment buffer to ports.
After marking off the buffer to ports space, also need to give concrete each interface with the buffer to ports allocation of space, namely give each interface assignment for its oneself buffer to ports.Wherein, uniform distribution is the simplest a kind of method of salary distribution, but this mode often lacks fairness or can cause the utilance of packet buffer not high, therefore, divide the buffer to ports space based on the state information of each interface on the big or small and/or local ply-yarn drill of packet buffer on each ply-yarn drill that affects the packet buffer behaviour in service in the present embodiment, the reasonability that the port spatial cache is distributed can be improved, and the utilance in buffer to ports space can be improved.
Wherein, distribute the method for port spatial cache to be specially based on the size of each ply-yarn drill packet buffer: each interface carries out the distribution in buffer to ports space as benchmark according to the size of packet buffer on purpose ply-yarn drill corresponding to each interface on the local ply-yarn drill.For example: packet buffer is larger on purpose ply-yarn drill corresponding to certain interface, then can give the less buffer to ports space of this interface assignment as its buffer to ports; Again for example: when packet buffer is less on purpose ply-yarn drill corresponding to certain interface, can give the more buffer to ports space of this interface assignment as its buffer to ports.
Wherein, method based on the state assignment buffer to ports space of each interface on the local ply-yarn drill specifically comprises following several situation: when the state information of interface refers to the connection status of interface, specifically refer to the connection status according to each interface on the local ply-yarn drill, give each interface assignment buffer to ports.For example: can whether be in connection status by judging one by one each interface; Be to be in a certain size the buffer to ports space of interface assignment of connection status as its buffer to ports for judged result; Be that the interface that is in notconnect state does not distribute the buffer to ports space for judged result; Compared with prior art, this technical scheme is only given the interface assignment buffer to ports space that needs, the idle of buffer to ports space that can reduce because distributing to the interface that is in notconnect state makes other interfaces the phenomenon of buffer to ports insufficient space occur, improve the utilance in buffer to ports space, improved reasonability and validity that the port spatial cache is distributed.
When the state information of interface refers to message rate (being operating rate) that interface supports, specifically refer to according to message rate corresponding to each interface on the local ply-yarn drill, give each interface assignment buffer to ports.For example: for the lower interface of the message rate of supporting (for example 10M interface), can distribute more buffer to ports space as its buffer to ports; And for the higher interface of the message rate of supporting (for example 1000M interface), can distribute less buffer to ports space as its buffer to ports.Compared with prior art, this technical scheme combines the message rate that interface is supported, can more reasonably distribute the port spatial cache, has improved the utilance in buffer to ports space.
Wherein, the various methods that the port spatial cache is distributed that present embodiment provides can also mutually combine, and are not limited to only distribute based on a kind of influencing factor.For example: the size that can consider packet buffer on message rate that interface supports and the corresponding purpose ply-yarn drill of interface is carried out the distribution in buffer to ports space; Again for example: can consider the connection status of interface and message rate that interface is supported and carry out the distribution in buffer to ports space; Again for example: the size that can consider simultaneously packet buffer on the connection status of interface, message rate that interface is supported and the corresponding purpose ply-yarn drill of interface is carried out the distribution in buffer to ports space.More than the method for the port spatial cache being distributed by considering a plurality of influencing factors, can further improve reasonability and validity that the port spatial cache is distributed, further improve the utilance in buffer to ports space, further reduce the probability of the situation that the packet buffer deficiency occurs, make switch satisfy miscellaneous service to the demand of packet buffer.
Need explanation at this, present embodiment step 303 and step 304 can specifically be considered as a kind of execution mode of step 203 among the embodiment one, but are not limited to this, can also be distributed packet buffer by other modes; For example: can be only according to the state information of each interface or only carry out the division in public spatial cache and buffer to ports space according to the size of packet buffer on each ply-yarn drill, then in the distribution of carrying out the buffer to ports space; Again for example: also can not divide public spatial cache and buffer to ports space, and directly packet buffer is assigned to each interface.
In sum, the packet buffer management method of present embodiment, by the state information in conjunction with each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, packet buffer is divided into public spatial cache and buffer to ports space, public spatial cache can be used as reserve packet buffer guarantee each interface assignment in the situation of buffer to ports with dealing with various emergency case, guaranteed to a certain extent the reasonability to the packet buffer distribution; And further according to the state information of each interface on the big or small and/or local ply-yarn drill of packet buffer on each ply-yarn drill the port spatial cache is distributed, by the reasonability that guarantees the port spatial cache is distributed, reasonability and validity to the packet buffer distribution have been guaranteed, improve the utilance of packet buffer, reduced the probability of the situation that the packet buffer deficiency occurs.
Need explanation at this, the described technical scheme of above-described embodiment can be used for switch is carried out initialization, namely when the system initialization of switch, can carry out by such scheme the original allocation of packet buffer, based on this, the present invention also provides the technical scheme of in system's running the buffer to ports of distributing to each interface being adjusted, with the utilance of further raising packet buffer.Technical solution of the present invention mainly is in system's running, by monitoring the interface message of each interface on the local ply-yarn drill, then according to the interface message that monitors and the public spatial cache of reservation, adjusts the size of the buffer to ports of distributing to each interface.Wherein, " interface message " among the present invention program mainly comprise packet buffer on purpose ply-yarn drill corresponding to state information, the flow information on each interface and each interface of use state, each interface itself of the buffer to ports of each interface assignment behaviour in service (such as: the size in current available cache memory space in the packet buffer) etc., but be not limited to this.Following examples of the present invention will be done technical solution of the present invention for different " interface message " respectively and be described in further detail.
Embodiment three
The flow chart of the packet buffer management method that Fig. 4 provides for the embodiment of the invention three.Present embodiment can realize based on embodiment one or embodiment two, take based on embodiment two as example, as shown in Figure 4, the difference of the method for present embodiment and embodiment two is that step 304 also comprises afterwards:
The use state of the buffer to ports of each interface assignment on step 305a, the local ply-yarn drill of monitoring;
Wherein, to receive the speed of message not identical for each interface; Same interface is also different in the speed that difference receives message constantly, and the size in available cache memory space also can change constantly in the purpose ply-yarn drill packet buffer corresponding with each interface, and above-mentioned factor all can affect the use state of the buffer to ports of each interface assignment on the local ply-yarn drill.Wherein, the direct use state of monitoring port buffer memory also can obtain by the flow on the monitoring interface use state of buffer to ports indirectly.For example: the flow that may monitor on certain interface is larger, and the buffer to ports utilance that it distributes is higher; Again for example: the flow that may monitor on certain interface is less, and the buffer to ports utilance that it distributes is lower.
Step 305b, according to use state and the public spatial cache of the buffer to ports of each interface assignment on the local ply-yarn drill, adjust the size of the buffer to ports of distributing to each interface.
For example: when monitoring buffer to ports utilance that certain interface distributes when higher, can consider from public spatial cache namely to be increased to the buffer to ports of this interface assignment again for it distributes some packet buffers also as its buffer to ports; Again for example: when monitoring buffer to ports utilance that certain interface distributes when low, can consider to regain and distribute some buffer to ports spaces for it, namely be reduced to the buffer to ports of this interface assignment, and with the buffer to ports regained as public spatial cache, so that for there being the interface that needs that spatial cache is provided.
Wherein, present embodiment does not limit the frequency of use state of the buffer to ports of each interface assignment on the local ply-yarn drill of monitoring, can Real-Time Monitoring also can periodic monitor, specifically decide according to disposal ability and the business demand of switch.
The packet buffer management method of present embodiment, the use state of the buffer to ports by monitoring each interface assignment, and according to the use state of the buffer to ports of each interface that monitors the buffer to ports of each interface assignment is done dynamic adjustment, the utilance of packet buffer be can further improve, reasonability and validity that packet buffer is distributed guaranteed.
Embodiment four
The flow chart of the packet buffer management method that Fig. 5 provides for the embodiment of the invention four.Present embodiment can realize based on embodiment one or embodiment two, take based on embodiment two as example, as shown in Figure 5, the difference of the method for present embodiment and embodiment two is that step 304 also comprises afterwards:
The state information of each interface on step 306a, the local ply-yarn drill of monitoring;
In actual moving process, the state of each interface all can change in real time on the switch, especially connection status.For example: a certain moment one interface may be for connection status, and this interface may be for notconnect state constantly for next; Again for example: another interface of a certain moment may be for notconnect state, and constantly may be in connection status at next.
Step 306b, according to state information and the public spatial cache of each interface on the local ply-yarn drill, adjust the size of the buffer to ports of distributing to each interface.
Particularly, when on monitoring local ply-yarn drill, having the state information of interface to become connection status by notconnect state, become the interface assignment buffer to ports of connection status by notconnect state from public spatial cache, for state information, be about to part packet buffer in the public spatial cache as the buffer to ports of newly-increased interface for connection status; The whole bag of tricks that the port spatial cache is distributed that wherein provides the embodiment two for the process of this newly-increased interface assignment buffer to ports can adopt from public spatial cache is implemented, and does not repeat them here.
When on monitoring local ply-yarn drill, having the state information of interface to become notconnect state by connection status, be released to state information is become the interface assignment of notconnect state by connection status buffer to ports, i.e. withdrawal is the buffer to ports space of this interface assignment, to avoid the idle of buffer to ports space; Simultaneously with discharge (withdrawal) buffer to ports as public spatial cache, to there being the interface that needs that packet buffer is provided.
Wherein, present embodiment does not limit the frequency of state information of each interface on the local ply-yarn drill of monitoring yet, can Real-Time Monitoring also can periodic monitor, specifically decide according to disposal ability and the business demand of switch.
The packet buffer management method of present embodiment, by monitoring the state information of each interface, and according to the state information of each interface that monitors the buffer to ports of each interface assignment is done dynamic adjustment, both can avoid the idle of buffer to ports space, can avoid again newly-increased interface the phenomenon of buffer memory deficiency to occur because obtaining buffer to ports, further improve the utilance of packet buffer, guaranteed reasonability and validity that packet buffer is distributed.
Embodiment five
The flow chart of the packet buffer management method that Fig. 6 provides for the embodiment of the invention five.Present embodiment can realize based on embodiment one or embodiment two, take based on embodiment two as example, as shown in Figure 6, the difference of the method for present embodiment and embodiment two is that step 304 also comprises afterwards:
Step 307a, monitor the flow information on each interface on the local ply-yarn drill;
Wherein, the uninterrupted on the distinct interface is generally different, and the flow on the different constantly same interfaces also may be different; And in actual applications, the situation of abnormal flow may appear also on certain interface, for example: burst flow may occur.Therefore, the difference of uninterrupted can cause the utilance of buffer to ports different.
Step 307b, according to the flow information on each interface on the local ply-yarn drill and described public spatial cache, adjust the size of the buffer to ports distribute to each interface.
Wherein, in the present embodiment the flow of each interface is monitored the situation that mainly refers to occur abnormal flow.For example: when on monitoring local ply-yarn drill, occurring burst flow (mainly referring to greater than default normal discharge higher limit) on certain interface, record the abnormal flow situation of this interface identifier and appearance; Then continue monitoring, and when the flow information on this interface is repeatedly greater than default normal discharge higher limit on monitoring local ply-yarn drill, obtain the replenishing port buffer memory from public spatial cache, and the replenishing port buffer memory distributed to flow information repeatedly greater than the interface of default normal discharge higher limit, as its buffer to ports, namely increase the buffer to ports of this interface, to prevent the situation of packet buffer deficiency.Wherein can preset flow information on the interface greater than the number of times of default normal discharge higher limit, for example can be set as 3 times.When the flow information on the interface not yet reaches set point number (for example 3 times) greater than the number of times of presetting the normal discharge higher limit, this interface can come with the packet buffer in the public spatial cache caching of burst stream amount, also will give back public spatial cache after using, namely the packet buffer in the employed public spatial cache of interface can not be as for its oneself buffer to ports in this case.Wherein, can judge the trend that occurs burst flow on the interface by setting flow information greater than the number of times of default normal discharge higher limit, and only on interface flow information greater than the number of times of default normal discharge higher limit during greater than set point number at the buffer to ports that increases interface, can prevent from like this in the accidental situation that burst flow occurs, increasing the idle of packet buffer that the buffer to ports of interface causes.
Again for example: when on monitoring local ply-yarn drill, having flow on the interface less than default normal discharge lower limit, record the abnormal flow situation of this interface identifier and appearance; Then continue monitoring, and when the flow information on this interface is repeatedly less than default normal discharge lower limit on monitoring local ply-yarn drill, from repeatedly obtaining the remaining port buffer memory the buffer to ports less than the interface assignment of presetting the normal discharge lower limit for flow information, namely be reduced to the buffer to ports of this interface assignment, to avoid the idle of buffer to ports space, simultaneously with the remaining port buffer memory as public spatial cache, thinking has the interface that needs that packet buffer is provided.In like manner, also can preset in this case flow information less than the number of times of default normal discharge lower limit, with avoid because of once or accidental flow information cause the situation that the packet buffer deficiency occurs with regard to the buffer to ports that reduces interface when presetting the normal discharge lower limit.
Wherein, present embodiment does not limit the frequency of the flow information on each interface on the local ply-yarn drill of monitoring yet, can Real-Time Monitoring also can periodic monitor, specifically decide according to disposal ability and the business demand of switch.
The packet buffer management method of present embodiment, by monitoring the flow information on each interface, and according to the flow information on each interface that monitors the buffer to ports of each interface assignment is done dynamic adjustment, can avoid the idle of buffer to ports space, further improve the utilance of packet buffer, guaranteed reasonability and validity that packet buffer is distributed.
Embodiment six
The flow chart of the packet buffer management method that Fig. 7 provides for the embodiment of the invention six.Present embodiment can realize based on embodiment one or embodiment two, take based on embodiment two as example, as shown in Figure 7, the difference of the method for present embodiment and embodiment two is that step 304 also comprises afterwards:
Step 308a, obtain on each ply-yarn drill the size in current available cache memory space in the packet buffer;
In actual moving process, the use state of packet buffer is all changing in real time on each ply-yarn drill, the size in available cache memory space also is dynamic change in the packet buffer, and the size in available cache memory space can affect dynamic adjustment to the buffer to ports of each interface assignment on the local ply-yarn drill in this packet buffer.
Particularly, in conjunction with Fig. 1, local ply-yarn drill can carry out information interaction by FAP and via switching matrix and other ply-yarn drills by its PP, obtaining on other ply-yarn drills the size in current available cache memory space in the packet buffer, and the size in current available cache memory space in the packet buffer on the local ply-yarn drill is offered other ply-yarn drills.
Step 308b, according to the size in current available cache memory space in the packet buffer on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill, adjust the size of the buffer to ports of distributing to each interface.
Wherein, when current available cache memory space is more in the packet buffer on purpose ply-yarn drill corresponding to certain interface, then reduce the buffer to ports that this interface distributes, to avoid the idle of buffer to ports space; When current available cache memory space is less in the packet buffer on purpose ply-yarn drill corresponding to certain interface, can be the more spatial cache of this interface assignment from public spatial cache, namely increase the buffer to ports that it distributes, to avoid occurring the phenomenon of packet buffer deficiency.Further, in order to guarantee on the purpose ply-yarn drill in the packet buffer that the buffer to ports of docking port is adjusted in the big or small metastable situation in current available cache memory space, can repeatedly obtain the use state of packet buffer on the purpose ply-yarn drill, and determine whether that the buffer to ports that carries out docking port adjusts after according to the result who repeatedly obtains the stability of the use state of packet buffer on the purpose ply-yarn drill being analyzed.
Wherein, present embodiment does not limit yet and obtains on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill frequency of the size in current available cache memory space in the packet buffer, can Real-time Obtaining also can timing acquisition, specifically decide according to disposal ability and the business demand of switch.
The packet buffer management method of present embodiment, by obtaining on purpose ply-yarn drill corresponding to each interface the size in current available cache memory space in the packet buffer, and according to the size in current available cache memory space in the packet buffer on purpose ply-yarn drill corresponding to each accessed interface the buffer to ports of each interface assignment is done dynamic adjustment, can avoid the idle of buffer to ports space or the situation of packet buffer deficiency occur, further improve the utilance of packet buffer, guaranteed reasonability and validity that packet buffer is distributed.
Need explanation at this, the method of the buffer to ports of each interface of having distributed dynamically being adjusted according to different affecting factors that the embodiment of the invention three to embodiment six provides respectively, but be not limited to only adjust based on single influencing factor, can also consider a plurality of influencing factors.Influencing factor related in above-described embodiment can be carried out combination in any comes the buffer to ports of each interface of having distributed is dynamically adjusted, this technical scheme can further improve reasonability and the validity to the packet buffer management, improve the utilance of packet buffer, and then the not probability of foot phenomenon of packet buffer appears in reduction.
Embodiment seven
The structural representation of the packet buffer management devices that Fig. 8 provides for the embodiment of the invention seven.The packet buffer management devices of present embodiment can be each ply-yarn drill in the switching equipment, also can be independent of the ply-yarn drill setting but is connected with ply-yarn drill, is used for the packet buffer on the ply-yarn drill is managed.As shown in Figure 8, the packet buffer management devices of present embodiment comprises: the first acquisition module 81, the second acquisition module 82 and allocation manager module 83.
Wherein, the first acquisition module 81 is used for obtaining the size of packet buffer on each ply-yarn drill; The second acquisition module 82 is used for obtaining the state information of each interface on the local ply-yarn drill; Allocation manager module 83 is used for the state information according to each interface on the size of packet buffer on each ply-yarn drill and/or the local ply-yarn drill, and packet buffer on the local ply-yarn drill is carried out allocation manager.Wherein for ease of representing the annexation between each module, the interface module at each interface place shown in Fig. 8, this interface module is connected with the second acquisition module 82, and a purpose ply-yarn drill (in order to the representative as other ply-yarn drills) also is shown simultaneously, and this purpose ply-yarn drill is connected with the first acquisition module 81.
The packet buffer management devices of present embodiment, can be used for carrying out the flow process of the packet buffer management method that the embodiment of the invention provides, obtain respectively the state information of each interface on the size of packet buffer on other ply-yarn drills that affect the packet buffer behaviour in service and the local ply-yarn drill by the first acquisition module and the second acquisition module, based on the combination of above-mentioned a kind of information or above-mentioned information packet buffer is carried out allocation manager by allocation manager module.Compare with the static technical scheme for each interface division packet buffer of prior art, the packet buffer device of present embodiment can improve the reasonability that packet buffer is distributed, and then the utilance of raising packet buffer, finally can reduce the probability that the not enough situation of packet buffer appears in interface, make contribution for switching equipment satisfies the miscellaneous service demand.
Based on above-mentioned, present embodiment specifically provides a kind of execution mode of being in charge of administration module, and as shown in Figure 8, the allocation manager module 83 of present embodiment comprises: divide submodule 831 and distribution sub module 832.Wherein, division submodule 831 is used for the state information according to each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, and packet buffer on the local ply-yarn drill is divided into public spatial cache and buffer to ports space; The state information that distribution sub module 832 is used for according to each interface on message cache size on each ply-yarn drill and/or the local ply-yarn drill is given each interface assignment buffer to ports from the buffer to ports space.
Pass through technique scheme, allocation manager module 83 is divided into public spatial cache and buffer to ports space with packet buffer, wherein under satisfying for the prerequisite of each interface assignment buffer to ports, can provide packet buffer for emergency case by reserving public spatial cache, when burst flow occurring or the newly-increased interface that is in connection status is arranged etc.
Particularly, the distribution that distribution sub module 832 is carried out the buffer to ports space according to the size of packet buffer on each ply-yarn drill specifically refers to the size according to packet buffer on the purpose ply-yarn drill that each interface is corresponding on this ground wire, gives each interface assignment buffer to ports.
In addition, the distribution that distribution sub module 832 is carried out the buffer to ports space according to the state information of each interface on the local ply-yarn drill comprises following situation: when the state information of interface refers to the connection status of interface, distribution sub module 832 specifically can according to the connection status of each interface on the local ply-yarn drill, be given each interface assignment buffer to ports; Perhaps, when the state information of interface referred to the operating rate of interface, distribution sub module 832 specifically can according to message rate corresponding to each interface on the local ply-yarn drill, be given each interface assignment buffer to ports.
Further, when distribution sub module 832 according to local ply-yarn drill on the connection status of each interface when distributing the port spatial cache, distribution sub module 832 can be realized by judging unit and allocation units.Wherein, judging unit is used for judging whether each interface is in connection status on the local ply-yarn drill; Allocation units are when being used for judged result at judging unit and being interface and being in connection status, to being in the interface assignment buffer to ports of connection status; And be interface when being in notconnect state in the judged result of judging unit, the interface that is in notconnect state is not distributed buffer to ports.
Above the whole bag of tricks has all been considered to affect packet buffer and has been come the port spatial cache is distributed with the factor of state, can improve the reasonability that packet buffer is distributed, and improves the utilance of packet buffer.Wherein, the port spatial cache distributed be not limited to only based on a kind of influencing factor, factor in above-mentioned each method can be carried out combination in any and form new method, for example: distribution sub module 832 can consider operating rate and the connection status of each interface on the local ply-yarn drill and carry out the distribution in buffer to ports space.Wherein, the technical scheme that considers a plurality of influencing factors can further improve the reasonability that packet buffer is distributed, and improves the utilance of packet buffer.
Embodiment eight
The structural representation of the packet buffer management devices that Fig. 9 A provides for the embodiment of the invention eight.Present embodiment can realize that shown in Fig. 9 A, the packet buffer management devices of present embodiment also comprises based on embodiment seven: monitoring adjusting module 90.
Monitoring adjusting module 90 is used for monitoring the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and public spatial cache, adjusts the size of the buffer to ports of distributing to each interface.Wherein, interface message mainly comprise packet buffer on purpose ply-yarn drill corresponding to state information, the flow information on each interface and each interface of use state, each interface itself of the buffer to ports of each interface assignment behaviour in service (such as: the size in current available cache memory space in the packet buffer) etc., but be not limited to this.
The packet buffer management devices of present embodiment, can distribute to according to the adaptive adjustment of practical application the buffer to ports of each interface by the interface message of monitoring adjusting module monitoring interface, can guarantee that the packet buffer space is farthest utilized, improve the utilance of packet buffer.Following examples of the present invention will be respectively describe the structure of the packet buffer management devices under the distinct interface information.
Embodiment nine
The structural representation of the packet buffer management devices that Fig. 9 B provides for the embodiment of the invention nine.Present embodiment can realize that shown in Fig. 9 B, the monitoring adjusting module 90 in the packet buffer management devices of present embodiment comprises based on embodiment eight: the first monitoring submodule 91 and first is adjusted submodule 92.
Wherein, the first monitoring submodule 91 use states for the buffer to ports of monitoring each interface assignment on the local ply-yarn drill; First adjusts submodule 92, is used for use state and public spatial cache according to the buffer to ports of each interface assignment on the local ply-yarn drill, adjusts the size of the buffer to ports of distributing to each interface.
The packet buffer management devices of present embodiment can be used for carrying out the flow process of the packet buffer management method that the embodiment of the invention three provides, and its specific works principle please see the description of embodiment three for details.Packet buffer management devices by present embodiment, can do dynamic adjustment to the buffer to ports of each interface assignment according to the use state of the buffer to ports of each interface that monitors, the utilance of packet buffer be can further improve, reasonability and validity that packet buffer is distributed guaranteed.
Embodiment ten
The structural representation of the packet buffer management devices that Figure 10 provides for the embodiment of the invention ten.Present embodiment can realize that as shown in figure 10, the monitoring adjusting module 90 in the packet buffer management devices of present embodiment comprises based on embodiment eight: the second monitoring submodule 93 and second is adjusted submodule 94.
Wherein, the second monitoring submodule 93 is for the state information of monitoring each interface on the local ply-yarn drill;
Second adjusts submodule 94, is used for state information and public spatial cache according to each interface on the local ply-yarn drill, adjusts the size of the buffer to ports of distributing to each interface.
The packet buffer management devices of present embodiment can be used for carrying out the flow process of the packet buffer management method that the embodiment of the invention four provides, and its specific works principle please see the description of embodiment four for details.Packet buffer management devices by present embodiment, can do dynamic adjustment to the buffer to ports of each interface assignment according to the state information of each interface that monitors, the utilance of packet buffer be can further improve, reasonability and validity that packet buffer is distributed guaranteed.
Further, second of present embodiment the adjustment submodule 94 specifically comprises: the first state adjustment unit and the second state adjustment unit.Wherein, the first state adjustment unit is used for being become the interface assignment buffer to ports of connection status for from public spatial cache by notconnect state state information when the state information that monitors local ply-yarn drill and have interface becomes connection status by notconnect state; The second state adjustment unit, be used for when the state information that monitors local ply-yarn drill and have interface becomes notconnect state by connection status, be released to state information and become the buffer to ports of the interface assignment of notconnect state by connection status, and with the buffer to ports that discharges as public spatial cache.
Both can be the newly-increased interface assignment buffer to ports that is in connection status by said structure, avoid occurring the situation of packet buffer deficiency, can prevent again the idle of buffer to ports space, to there being the interface that needs that packet buffer is provided.
Embodiment 11
The structural representation of the packet buffer management devices that Figure 11 provides for the embodiment of the invention 11.Present embodiment can realize that as shown in figure 11, the monitoring adjusting module 90 in the packet buffer management devices of present embodiment comprises based on embodiment eight: the 3rd monitoring submodule 95 and the 3rd is adjusted submodule 96.
Wherein, the 3rd monitoring submodule 95 is used for monitoring the flow information on each interface on the local ply-yarn drill; The 3rd adjusts submodule 96, is used for according to the flow information on each interface on the local ply-yarn drill and public spatial cache, adjusts the size of the buffer to ports of distributing to each interface.
The packet buffer management devices of present embodiment can be used for carrying out the flow process of the packet buffer management method that the embodiment of the invention five provides, and its specific works principle please see the description of embodiment five for details.Packet buffer management devices by present embodiment, can do dynamic adjustment to the buffer to ports of each interface assignment according to the flow information on each interface that monitors, the utilance of packet buffer be can further improve, reasonability and validity that packet buffer is distributed guaranteed.
Further, the 3rd of present embodiment the adjustment submodule 96 specifically comprises: first flow adjustment unit and the second flow adjustment unit.Wherein, the first flow adjustment unit, be used for when monitoring flow information that local ply-yarn drill has an interface repeatedly greater than default normal discharge higher limit, obtain the replenishing port buffer memory from public spatial cache, and the replenishing port buffer memory is distributed to flow information repeatedly greater than the interface of presetting the normal discharge higher limit; The second flow adjustment unit, be used for when monitoring local ply-yarn drill and have flow information on the interface repeatedly less than default normal discharge lower limit, from for flow information repeatedly obtains the remaining port buffer memory the buffer to ports less than the interface assignment of default normal discharge lower limit, and with the remaining port buffer memory as public spatial cache.
By said structure the buffer to ports that has distributed is dynamically adjusted the situation that both can avoid occurring the packet buffer deficiency, can prevent again the idle of buffer to ports space, improved the utilance of packet buffer.
Embodiment 12
The structural representation of the packet buffer management devices that Figure 12 provides for the embodiment of the invention 12.Present embodiment can realize that as shown in figure 12, the monitoring adjusting module 90 in the packet buffer management devices of present embodiment comprises based on embodiment eight: obtain submodule 97 and the 4th and adjust submodule 98.
Wherein, obtain submodule 97, be used for obtaining the size in the current available cache memory of packet buffer space on each ply-yarn drill; The 4th adjusts submodule 98, is used for the size according to the current available cache memory of packet buffer space on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill, adjusts the size of the buffer to ports of distributing to each interface.
The packet buffer management devices of present embodiment can be used for carrying out the flow process of the packet buffer management method that the embodiment of the invention six provides, and its specific works principle please see the description of embodiment six for details.Packet buffer management devices by present embodiment, can do dynamic adjustment to the buffer to ports of each interface assignment according to the size in available cache memory space in the packet buffer on purpose ply-yarn drill corresponding to each interface, the utilance of packet buffer be can further improve, reasonability and validity that packet buffer is distributed guaranteed.
Needing explanation at this, only be not limited to when the buffer to ports that has distributed is adjusted according to a kind of influencing factor, can be the combination of various factors.For example can be simultaneously according to the state information of use state He each interface of the buffer to ports that has distributed on each interface, the structure of the monitoring adjusting module in the packet buffer management devices can be constituted by embodiment nine and embodiment ten at this moment, comprises simultaneously that namely the first monitoring submodule, first is adjusted submodule, the second monitoring submodule and second is adjusted submodule.Based on above-mentioned, those skilled in the art are easy to know by inference the structure of the packet buffer management devices under other assembled schemes.Assembled scheme can further improve validity and the reasonability that packet buffer is distributed and manages, and further improve the utilance of packet buffer.
In addition, above-mentioned each monitoring submodule and the functional similarity that obtains submodule, and each function of adjusting submodule is also close, therefore, monitoring adjusting module in the packet buffer device that the embodiment of the invention provides can also only comprise a monitoring submodule and an adjustment submodule, is used for realizing monitoring various influencing factors and according to various influencing factors the buffer to ports that has distributed being adjusted.
Below in conjunction with one of at present common switching equipment switch technical solution of the present invention is described in further details.
Embodiment 13
The structural representation of the switch online card that Figure 13 provides for the embodiment of the invention 13.As shown in figure 13, the ply-yarn drill of present embodiment comprises: the interface bus between interface module, message processing module (MPM), power board interface module, credit administration module, interface monitoring module, memory modules and each module.Wherein, memory modules is divided into program running space, public spatial cache and buffer to ports space.
Wherein, bus A is the interface bus between interface module and the message processing module (MPM), the message of coming in from interface mainly arrives message processing module (MPM) by this bus A, and then exchange to outlet by other modules, for Ethernet, bus A can be gigabit Media Independent Interface (Gigabit Media Independent Interface; Referred to as: GMII), serial gigabit Media Independent Interface (Serial Gigabit Media Independent Interface; Referred to as: SGMII) or ten thousand mbit ethernet Attachment Unit Interface (XAUI, " AUI " part wherein refers to Ethernet Attachment Unit Interface (Ethernet Attachment Unit Interface), " X " represents Roman number 10, and it means per second 10,000,000,000 (10Gbps)) etc.
Bus B is the interface bus between message processing module (MPM) and the power board interface module; Wherein, can there be bus to want B for the message processing module (MPM) of supporting the switching matrix interface bus.
Bus C is that ply-yarn drill is followed the interface bus between the switching matrix.
Bus D is the interface bus between interface monitoring module and the message processing module (MPM), be mainly used in the state information of passing interface between interface monitoring module and message processing module (MPM), this interface is actual physical interface not necessarily, also can be the interface interchange etc. between the software.
Bus E is the bus between credit administration module and the message processing module (MPM), is mainly used in the situation of synchronous credit.Wherein, in the present embodiment on each ply-yarn drill the size of packet buffer represent with the form of credit value.
Bus F is the interface bus between message processing module (MPM) and the memory modules, i.e. internal memory (Memory) interface.
Bus G is the interface bus between connecting interface monitoring module and the interface module, generally is the management bus of interface module, for example can be serial management interface (Serial Management Interface; Referred to as: SMI) or serial peripheral interface bus (Serial Peripheral Interface; Referred to as: SPI) etc.
The interface monitoring module is obtained the state of each interface on the ply-yarn drill by bus G, the state of interface mainly is whether whether interface enable (enable), interface for the speed that connects (Linkup), interfaces, for example for Ethernet interface, the speed of interfaces may be 10M, 100M, 1000M, Wan Zhao etc.
In reality was implemented, message processing module (MPM) can realize that with special NP or CPU the power board interface module can be used field programmable gate array (Field Programmable Gate Array; Referred to as: FPGA) realize the conversion of interface, the credit administration module can be with FPGA or is relied on software to realize fully; The interface monitoring module can be used CPLD (Complex Programmable Logic Device; Referred to as: CPLD) or the management interface that carries of NP, CPU realize.The specific works principle of ply-yarn drill is as follows:
When system initialization, message processing module (MPM) is divided into program running space and packet buffer with the memory headroom in the whole memory modules, and the size of packet buffer announced to other ply-yarn drills via switching matrix by bus B, bus C with the form of credit value, obtain simultaneously the credit value information of other ply-yarn drills; And obtain the state of each interface by bus D from the interface monitoring module, then according to the credit value information of obtaining, the state information of interface, be the corresponding buffer to ports of each interface assignment.For example: can not distribute buffer to ports for the interface that does not have Linkup, consider to distribute less buffer to ports for the lower interface of speed ratio, for the lower buffer to ports of the larger interface assignment of purpose ply-yarn drill credit value etc.In addition, when system initialization, also can consider first the initial port buffer memory to an acquiescence of each interface assignment.
In service in system, message processing module (MPM) can be monitored the applicable cases of current packet buffer, and updates to other ply-yarn drills in the system by bus B, bus C, obtains simultaneously the applicable cases of current packet buffer on other ply-yarn drills.Wherein, the time of renewal can consider that for example: for the large system of flow, the time of renewal can be soon, and for the little system of flow, the time of renewal can be slowly according to the changes in flow rate of system.Simultaneously, message processing module (MPM) judges whether that according to the applicable cases of current packet buffer needs adjust the size of the buffer to ports that each interface distributed, for example: for the larger interface of flow-rate ratio, can consider from public spatial cache to be that it increases buffer to ports.
In addition, in running, if the interface monitoring module monitors changes to the state of interface, can be synchronized to message processing module (MPM) by bus D.For the newly-increased interface that is in connection status, message processing module (MPM) during according to initialization similarly strategy be that it distributes corresponding buffer to ports from public spatial cache.
Moreover, in running, when message processing module (MPM) monitors burst flow, state and the corresponding interface message of burst flow can be announced to the interface monitoring module simultaneously, for the interface monitoring module flow information of each interface is added up.For the interface of frequent generation burst flow, message processing module (MPM) can be considered from public spatial cache for it increases new buffer to ports, to avoid occurring the situation of packet buffer deficiency.
If after the packet buffer in the public spatial cache distributes, also can not satisfy the demand of buffer memory message, at this moment can abandon according to priority the message of low priority.
Wherein, the ply-yarn drill of present embodiment can be used for be carried out the flow process of the packet buffer management method that the embodiment of the invention provides, and can be corresponding with the packet buffer device that the embodiment of the invention provides.By above-mentioned introduction to ply-yarn drill and its operation principle, those skilled in the art it will be appreciated that packet buffer management method that the embodiment of the invention provides or the embodiment of device.The ply-yarn drill that adopts technical solution of the present invention to realize can more reasonable and effective assignment message buffer memory, for the utilance of raising packet buffer has been made contribution.
Embodiment 14
The embodiment of the invention 14 provides a kind of network equipment, comprises the packet buffer processing unit that the above embodiment of the present invention provides.Wherein, the network equipment of present embodiment can be various switching equipment, such as switch or router etc.
Because the network equipment of present embodiment has the packet buffer processing unit that the embodiment of the invention provides, can be used for carrying out the flow process of the packet buffer processing method that the embodiment of the invention provides, therefore, it is the allocation manager packet buffer more reasonably, and packet buffer has higher utilance on it.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of program command, aforesaid program can be stored in the computer read/write memory medium, this program is carried out the step that comprises said method embodiment when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (19)

1. a packet buffer management method is characterized in that, comprising:
Obtain the size of packet buffer on each ply-yarn drill, described each ply-yarn drill comprises local ply-yarn drill and other ply-yarn drills that are connected with local ply-yarn drill;
Obtain the state information of each interface on the local ply-yarn drill;
According to the state information of each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, packet buffer on the local ply-yarn drill is carried out allocation manager; Described according to packet buffer on each ply-yarn drill size and local ply-yarn drill on the state information of each interface, packet buffer on the local ply-yarn drill is carried out allocation manager to be comprised: the state information according to each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill is divided into public spatial cache and buffer to ports space with packet buffer on the local ply-yarn drill; According to the state information of each interface on the big or small and/or local ply-yarn drill of packet buffer on each ply-yarn drill, from described buffer to ports space, give each interface assignment buffer to ports;
Monitor the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and described public spatial cache, adjust the size of the buffer to ports of distributing to each interface.
2. packet buffer management method according to claim 1 is characterized in that, according to the state information of each interface on the big or small and/or local ply-yarn drill of packet buffer on each ply-yarn drill, comprises for from described buffer to ports space each interface assignment buffer to ports:
According to the connection status of each interface on the local ply-yarn drill, give each interface assignment buffer to ports; And/or
According to message rate corresponding to each interface on the local ply-yarn drill, give each interface assignment buffer to ports; And/or
According to the size of packet buffer on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill, give each interface assignment buffer to ports.
3. packet buffer management method according to claim 2 is characterized in that, according to the connection status of each interface on the local ply-yarn drill, is specially for each interface assignment buffer to ports:
Judge whether each interface is in connection status on the local ply-yarn drill;
When judged result is that interface is when being in connection status, to being in the interface assignment buffer to ports of connection status;
When judged result is interface when being in notconnect state, the interface that is in notconnect state is not distributed buffer to ports.
4. packet buffer management method according to claim 1 is characterized in that, monitors the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and described public spatial cache, the size of adjusting the buffer to ports of distributing to each interface comprises:
Monitor the use state of the buffer to ports of each interface assignment on the local ply-yarn drill;
According to use state and the described public spatial cache of the buffer to ports of each interface assignment on the local ply-yarn drill, adjust the size of the buffer to ports of distributing to each interface.
5. packet buffer management method according to claim 4 is characterized in that, monitors the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and described public spatial cache, the size of adjusting the buffer to ports of distributing to each interface comprises:
Monitor the state information of each interface on the local ply-yarn drill;
According to state information and the described public spatial cache of each interface on the local ply-yarn drill, adjust the size of the buffer to ports of distributing to each interface.
6. packet buffer management method according to claim 5 is characterized in that:
When on monitoring local ply-yarn drill, having the state information of interface to become connection status by notconnect state, become the interface assignment buffer to ports of connection status for from described public spatial cache by notconnect state state information;
When on monitoring local ply-yarn drill, having the state information of interface to become notconnect state by connection status, be released to state information and become the buffer to ports of the interface assignment of notconnect state by connection status, and with the buffer to ports that discharges as described public spatial cache.
7. packet buffer management method according to claim 1 is characterized in that, monitors the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and described public spatial cache, the size of adjusting the buffer to ports of distributing to each interface comprises:
Monitor the flow information on each interface on the local ply-yarn drill;
According to the flow information on each interface on the local ply-yarn drill and described public spatial cache, adjust the size of the buffer to ports of distributing to each interface.
8. packet buffer management method according to claim 7 is characterized in that:
When on monitoring local ply-yarn drill, having flow information on the interface repeatedly greater than default normal discharge higher limit, obtain the replenishing port buffer memory from described public spatial cache, and described replenishing port buffer memory is distributed to flow information repeatedly greater than the interface of presetting the normal discharge higher limit;
When on monitoring local ply-yarn drill, having flow information on the interface repeatedly less than default normal discharge lower limit, from for flow information repeatedly obtains the remaining port buffer memory the buffer to ports less than the interface assignment of default normal discharge lower limit, and with described remaining port buffer memory as described public spatial cache.
9. packet buffer management method according to claim 1 is characterized in that, monitors the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and described public spatial cache, the size of adjusting the buffer to ports of distributing to each interface comprises:
Obtain on each ply-yarn drill the size in current available cache memory space in the packet buffer;
According to the size in current available cache memory space in the packet buffer on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill, adjust the size of the buffer to ports of distributing to each interface.
10. a packet buffer management devices is characterized in that, comprising:
The first acquisition module, for the size of obtaining packet buffer on each ply-yarn drill, described each ply-yarn drill comprises local ply-yarn drill and other ply-yarn drills that are connected with local ply-yarn drill;
The second acquisition module is for the state information of obtaining each interface on the local ply-yarn drill;
Allocation manager module is used for the state information according to each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, and packet buffer on the local ply-yarn drill is carried out allocation manager;
Described allocation manager module comprises: divide submodule, be used for the state information according to each interface on the size of packet buffer on each ply-yarn drill and the local ply-yarn drill, packet buffer on the local ply-yarn drill is divided into public spatial cache and buffer to ports space; Distribution sub module is used for the state information according to each interface on message cache size on each ply-yarn drill and/or the local ply-yarn drill, gives each interface assignment buffer to ports from described buffer to ports space;
The monitoring adjusting module is used for monitoring the interface message of each interface on the local ply-yarn drill, and according to the interface message that monitors and described public spatial cache, adjusts the size of the buffer to ports of distributing to each interface.
11. packet buffer management devices according to claim 10 is characterized in that, described distribution sub module specifically is used for the connection status according to each interface on the local ply-yarn drill, gives each interface assignment buffer to ports; And/or, concrete being used for according to message rate corresponding to each interface on the local ply-yarn drill, give each interface assignment buffer to ports; And/or the concrete size that is used for according to packet buffer on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill is given each interface assignment buffer to ports.
12. packet buffer management devices according to claim 11 is characterized in that, described distribution sub module comprises:
Judging unit is used for judging whether each interface is in connection status on the local ply-yarn drill;
Allocation units are when being used for judged result at described judging unit and being interface and being in connection status, to being in the interface assignment buffer to ports of connection status; When perhaps being used for judged result at described judging unit and being interface and being in notconnect state, the interface that is in notconnect state is not distributed buffer to ports.
13. packet buffer management devices according to claim 10 is characterized in that, described monitoring adjusting module comprises:
The first monitoring submodule is for the use state of the buffer to ports of monitoring each interface assignment on the local ply-yarn drill;
First adjusts submodule, is used for use state and described public spatial cache according to the buffer to ports of each interface assignment on the local ply-yarn drill, adjusts the size of the buffer to ports of distributing to each interface.
14. packet buffer management devices according to claim 13 is characterized in that, described monitoring adjusting module comprises:
The second monitoring submodule is for the state information of monitoring each interface on the local ply-yarn drill;
Second adjusts submodule, is used for state information and described public spatial cache according to each interface on the local ply-yarn drill, adjusts the size of the buffer to ports of distributing to each interface.
15. packet buffer management devices according to claim 14 is characterized in that, described second adjusts submodule comprises:
The first state adjustment unit is used for being become the interface assignment buffer to ports of connection status for from described public spatial cache by notconnect state state information when the state information that monitors local ply-yarn drill and have interface becomes connection status by notconnect state;
The second state adjustment unit, be used for when the state information that monitors local ply-yarn drill and have interface becomes notconnect state by connection status, be released to state information and become the buffer to ports of the interface assignment of notconnect state by connection status, and with the buffer to ports that discharges as described public spatial cache.
16. packet buffer management devices according to claim 10 is characterized in that, described monitoring adjusting module comprises:
The 3rd monitoring submodule is used for monitoring the flow information on each interface on the local ply-yarn drill;
The 3rd adjusts submodule, is used for according to the flow information on each interface on the local ply-yarn drill and described public spatial cache, adjusts the size of the buffer to ports of distributing to each interface.
17. packet buffer management devices according to claim 16 is characterized in that, the described the 3rd adjusts submodule comprises:
The first flow adjustment unit, be used for when monitoring flow information that local ply-yarn drill has an interface repeatedly greater than default normal discharge higher limit, obtain the replenishing port buffer memory from described public spatial cache, and described replenishing port buffer memory is distributed to flow information repeatedly greater than the interface of presetting the normal discharge higher limit;
The second flow adjustment unit, be used for when monitoring local ply-yarn drill and have flow information on the interface repeatedly less than default normal discharge lower limit, from for flow information repeatedly obtains the remaining port buffer memory the buffer to ports less than the interface assignment of default normal discharge lower limit, and with described remaining port buffer memory as described public spatial cache.
18. packet buffer management devices according to claim 10 is characterized in that, described monitoring adjusting module comprises:
Obtain submodule, be used for obtaining the size in the current available cache memory of packet buffer space on each ply-yarn drill;
The 4th adjusts submodule, is used for the size according to the current available cache memory of packet buffer space on the purpose ply-yarn drill that each interface is corresponding on the local ply-yarn drill, adjusts the size of the buffer to ports of distributing to each interface.
19. network equipment that comprises each described packet buffer management devices of claim 10-18.
CN2010105538826A 2010-11-19 2010-11-19 Message cache management method and device as well as network equipment Active CN102006226B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105538826A CN102006226B (en) 2010-11-19 2010-11-19 Message cache management method and device as well as network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105538826A CN102006226B (en) 2010-11-19 2010-11-19 Message cache management method and device as well as network equipment

Publications (2)

Publication Number Publication Date
CN102006226A CN102006226A (en) 2011-04-06
CN102006226B true CN102006226B (en) 2013-01-02

Family

ID=43813312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105538826A Active CN102006226B (en) 2010-11-19 2010-11-19 Message cache management method and device as well as network equipment

Country Status (1)

Country Link
CN (1) CN102006226B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263698B (en) * 2011-08-11 2014-01-22 福建星网锐捷网络有限公司 Method for establishing virtual channel, method of data transmission and line card
CN102546386A (en) * 2011-10-21 2012-07-04 北京安天电子设备有限公司 Method and device for self-adaptation multi-network-card packet capturing
CN102571324A (en) * 2011-12-31 2012-07-11 深圳市永达电子股份有限公司 Method for building dynamic nonstandard character library, built character library, and system applying method and character library above
WO2014166092A1 (en) * 2013-04-11 2014-10-16 华为技术有限公司 Resource allocation method, switch, and controller
CN103595724A (en) * 2013-11-19 2014-02-19 曙光信息产业(北京)有限公司 Message buffering method and device
CN104038435A (en) * 2014-06-04 2014-09-10 上海斐讯数据通信技术有限公司 Cache management method for switch
CN104158680B (en) * 2014-06-18 2018-03-06 大唐移动通信设备有限公司 Alert buffer area processing method and equipment
WO2016008145A1 (en) * 2014-07-18 2016-01-21 华为技术有限公司 Routing node, optical switching network and optical signal transmission method
CN104394100B (en) * 2014-11-07 2017-12-08 深圳市国微电子有限公司 Credit assignment method and interchanger
CN106302232A (en) * 2015-05-25 2017-01-04 深圳市中兴微电子技术有限公司 A kind of buffer memory management method and local device
CN107689923B (en) * 2016-08-04 2021-02-12 华为技术有限公司 Message processing method and router
CN106454937B (en) * 2016-09-29 2020-02-18 东南大学 Distribution control method for mobile terminal cache space
CN107835135B (en) * 2017-10-23 2020-08-21 深圳市楠菲微电子有限公司 Shared buffer access control method and device
CN108023777B (en) * 2017-12-12 2021-05-18 锐捷网络股份有限公司 Port interconnection adaptation method, board card and system
CN110557432B (en) * 2019-07-26 2022-04-26 苏州浪潮智能科技有限公司 Cache pool balance optimization method, system, terminal and storage medium
CN113542152A (en) * 2020-04-17 2021-10-22 华为技术有限公司 Method for processing message in network equipment and related equipment
CN114598669B (en) * 2022-03-07 2024-03-19 潍柴动力股份有限公司 Message storage method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304383A (en) * 2008-07-07 2008-11-12 杭州华三通信技术有限公司 Method for switching message of switching network, switching system, routing line card and Ether line card
CN101547150A (en) * 2009-04-30 2009-09-30 中兴通讯股份有限公司 Method and device for scheduling data communication input port
CN101873269A (en) * 2010-06-24 2010-10-27 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567855B (en) * 2009-06-11 2011-12-21 杭州华三通信技术有限公司 Distributed packet switching system and distributed packet switching method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101304383A (en) * 2008-07-07 2008-11-12 杭州华三通信技术有限公司 Method for switching message of switching network, switching system, routing line card and Ether line card
CN101547150A (en) * 2009-04-30 2009-09-30 中兴通讯股份有限公司 Method and device for scheduling data communication input port
CN101873269A (en) * 2010-06-24 2010-10-27 杭州华三通信技术有限公司 Data retransmission device and method for distributing buffer to ports

Also Published As

Publication number Publication date
CN102006226A (en) 2011-04-06

Similar Documents

Publication Publication Date Title
CN102006226B (en) Message cache management method and device as well as network equipment
EP1958375B1 (en) Dynamic power allocation in system for providing power over communication link
DE60316458T2 (en) INTEGRATED CIRCUIT AND METHOD FOR CREATING TRANSACTIONS
US20070121499A1 (en) Method of and system for physically distributed, logically shared, and data slice-synchronized shared memory switching
US7085875B1 (en) Modular switch with dynamic bus
CN110515724B (en) Resource allocation method, device, monitor and machine-readable storage medium
CN100355239C (en) Management information interactive system and special interface card and master control card in network equipment
CN103609077B (en) Method, apparatus and system for data transmission, and physical adapter
CN104202264A (en) Carrying resource allocation method for clouded data center network, device and system
JPWO2004051955A1 (en) Communication apparatus, control method, and program
US20220086539A1 (en) Virtual optical network-oriented spectrum resource trading method and system
CN101478527A (en) Bandwidth allocation method and routing equipment
CN101179351B (en) Dynamic allocation method for space/time division cross time slot resource of synchronous digital hierarchy equipment
CN108199976A (en) Switching equipment, exchange system and the data transmission method for uplink of RapidIO networks
CN110166857A (en) A kind of implementation method of fibre channel media dynamic configuration
CN108768898A (en) A kind of method and its device of network-on-chip transmitting message
CN110045922A (en) The network equipment and operating method
CN108804535A (en) Software definition storage with network hierarchy(SDS)System
CN101247663B (en) Considerable routing system and its forwarding table generation method
CN112737867A (en) Cluster RIO network management method
CN101420307B (en) Method and system for expanding micro telecommunication computer construction
CN103827836B (en) A method and apparatus for storing data
CN115459968B (en) Isolation method for high-performance computer system and high-performance computer system
CN102541506B (en) First-in-first-out (FIFO) data register, chip and equipment
CN104579872A (en) Large-scale access converged network system oriented to integration of three networks

Legal Events

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

Address after: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor

Patentee after: RUIJIE NETWORKS Co.,Ltd.

Address before: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor

Patentee before: Beijing Star-Net Ruijie Networks Co.,Ltd.