The content of the invention
The present invention provides a kind of clock frequency method of adjustment and device, reducing because the network equipment is in negative frequency deviation
Caused packet loss phenomenon.
The first aspect of the present invention provides a kind of clock frequency method of adjustment, it is characterised in that including:
The clock frequency of the network equipment is monitored, the processor of the network equipment includes M universal input and exports GPIO, uses
It is adjusted in the clock frequency to the network equipment, wherein M is the integer more than or equal to 1;
If the clock frequency of the network equipment is in negative frequency deviation, controls the M GPIO to change the network and set
The input voltage of standby voltage controlled oscillator, to adjust the clock frequency of the network equipment.
With reference in a first aspect, in the first possible implementation of first aspect, the M is the integer more than or equal to 2;
Correspondingly, the input voltage for the voltage controlled oscillator that the control M GPIO changes the network equipment includes:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of the port, and is less than the second buffer threshold, control
The first GPIO in the M GPIO exports high level, and remaining GPIO is input state in the M GPIO, wherein, it is described
The partial pressure pin of voltage controlled oscillator is connected between the first divider resistance and the second divider resistance, and the first GPIO passes through adjustment
Resistance is in parallel with first divider resistance.
With reference to the possible implementation of the first of first aspect and first aspect, second in first aspect may be real
In existing mode, the clock frequency of the monitoring network equipment includes:
The caching of the port of the network equipment is detected in real time;
If message be present in the caching of the port, the instantaneous delivery bandwidth of the port is obtained;
If the instantaneous delivery bandwidth of the port exceedes default port bandwidth threshold value, the network equipment is judged
Clock frequency is in negative frequency deviation.
With reference to second of possible implementation of first aspect, in the third possible implementation of first aspect, obtain
The instantaneous delivery bandwidth of the port is taken, including:
Obtain reception packet counting value of the port when current period starts and the reception at the end of current period
Packet counting value;
According to the reception packet counting value when current period starts and the reception at the end of current period
Packet counting value, obtain the message amount that the port receives in current period, the report received in the current period
Literary quantity subtracts the reception when current period starts equal to described in the reception packet counting value at the end of current period
Packet counting value;
According to the message amount received in current period, the instantaneous delivery bandwidth of the port is obtained, it is described
The instantaneous delivery bandwidth of port is equal to the duration of the message amount received in current period divided by the current period
The value of gained.
With reference to second of possible implementation of first aspect, in the 4th kind of possible implementation of first aspect, go back
Including:
If message is not present in the caching of described port, judge whether the clock frequency of the network equipment does overdeviation
Adjustment;
If the clock frequency of the network equipment does overdeviation adjustment, the clock frequency of the network equipment is returned to
Normal frequency.
Second aspect of the present invention provides a kind of clock frequency adjusting apparatus, including:
Monitoring module, for monitoring the clock frequency of the network equipment, the processor of the network equipment is general defeated including M
Enter to export GPIO, for being adjusted the clock frequency of the network equipment, wherein M is the integer more than or equal to 1;
Adjusting module, if it is determined that the clock frequency for the network equipment is in negative frequency deviation, then control the M
GPIO changes the input voltage of the voltage controlled oscillator of the network equipment, to adjust the clock frequency of the network equipment.
With reference to second aspect, in the first possible implementation of second aspect, the M is the integer more than or equal to 2;
The adjusting module is specifically used for:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of the port, and is less than the second buffer threshold, control
The first GPIO in the M GPIO exports high level, and remaining GPIO is input state in the M GPIO, wherein, it is described
The partial pressure pin of voltage controlled oscillator is connected between the first divider resistance and the second divider resistance, and the first GPIO passes through adjustment
Resistance is in parallel with first divider resistance.
With reference to the possible implementation of the first of second aspect and second aspect, second in second aspect may be real
In existing mode, the monitoring module is specifically used for:
The caching of the port of the network equipment is detected in real time;
If message be present in the caching of the port, the instantaneous delivery bandwidth of the port is obtained;
If the instantaneous delivery bandwidth of the port exceedes default port bandwidth threshold value, the network equipment is judged
Clock frequency is in negative frequency deviation.
With reference to second of possible implementation of second aspect, in the third possible implementation of second aspect, institute
Monitoring module is stated to be specifically used for:
Obtain reception packet counting value of the port when current period starts and the reception at the end of current period
Packet counting value;
According to the reception packet counting value when current period starts and the reception at the end of current period
Packet counting value, obtain the message amount that the port receives in current period, the report received in the current period
Literary quantity subtracts the reception when current period starts equal to described in the reception packet counting value at the end of current period
Packet counting value;
According to the message amount received in current period, the instantaneous delivery bandwidth of the port is obtained, it is described
The instantaneous delivery bandwidth of port is equal to the duration of the message amount received in current period divided by the current period
The value of gained.
With reference to second of possible implementation of second aspect, in the 4th kind of possible implementation of second aspect, institute
Monitoring module is stated to be additionally operable to:
If message is not present in the caching of the port, judge whether the clock frequency of the network equipment does overdeviation tune
It is whole;
Correspondingly, if the clock frequency that the adjusting module is additionally operable to the network equipment does overdeviation adjustment, by institute
The clock frequency for stating the network equipment returns to normal frequency.
It is of the invention to be to judge the clock frequency of the network equipment by the flow bandwidth for the port for monitoring the network equipment
It is no negative frequency deviation to be present, when the clock frequency of the network equipment has negative frequency deviation, by changing the voltage-controlled of the network equipment
The input voltage of oscillator, it is achieved thereby that dynamic adjusts the clock frequency of the network equipment, reduce due in relatively negative frequency
The phenomenon of packet loss on the inclined network equipment.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Fig. 1 is clock frequency method of adjustment flow chart provided in an embodiment of the present invention, and the crystal oscillator suitable for the network equipment is
Voltage controlled oscillator, method comprise the following steps:
Step 101, the clock frequency of the network equipment is monitored.
Wherein, the processor of the network equipment includes M GPIO(General Purpose Input Output, it is general defeated
Enter output), for being adjusted to the clock frequency of the network equipment, wherein M is the integer more than or equal to 1.
Processor can be central processing unit(Central processing unit, abbreviation CPU).
Comparatively the so-called negative frequency deviation of the present embodiment is, for example, carry out two network equipments of message transmissions
Between clock frequency it is asynchronous when, the clock frequency that can have network equipment is more than the clock frequency of another network equipment
The situation of rate, now, the clock frequency of the less network equipment of clock frequency are in negative frequency deviation.
As shown in Fig. 2 the step 101 specifically may include steps of:
Step 201, the caching for detecting the port of the network equipment in real time whether there is message, if existing in the caching of port
Message, step 202 is performed, otherwise, perform step 205.
In the present embodiment, detected in real time by timer the quantity of message in the caching of the port of the network equipment come
Know and whether there is message in the caching of the port of the network equipment, when the quantity of message in the caching of the port of the network equipment is big
When 1, message in the caching of the port of the network equipment be present, then step 202 is performed, when the port of the network equipment
Caching in the quantity of message when being 0, message is not present in the caching of the port of the network equipment, then judges the network equipment
Whether clock frequency does overdeviation adjustment, and when the clock frequency of the network equipment does overdeviation adjustment, clock frequency is recovered
To normal frequency, when the clock frequency of the network equipment does not do overdeviation adjustment, clock frequency is not adjusted.
Step 202, the instantaneous delivery bandwidth of port is obtained.
In the present embodiment, detected after message being present in the caching of the port of the network equipment, obtained by step 201
The instantaneous delivery bandwidth of the port of the network equipment, calculated according to the message amount of the port of the network equipment
The instantaneous delivery bandwidth of the port of the network equipment.
The step 202 specifically comprises the following steps:
Obtain reception packet counting value of the port when current period starts and the reception report at the end of current period
Literary count value;
According to the reception packet counting value when current period starts and the reception packet counting at the end of current period
Value, the message amount that the port receives within the current cycle is obtained, the message amount received in current period, which is equal to, to be worked as
Reception packet counting value during preceding end cycle subtracts the reception packet counting value when current period starts;
According to the message amount received in current period, the instantaneous delivery bandwidth of port, the instantaneous stream of port are obtained
Amount bandwidth is equal to the value obtained by the duration of the message amount received in current period divided by current period.
In this example, it is assumed that reception packet counting value of the port of the network equipment before current period starts is
P1, the reception packet counting value at the end of current period is P2, report that the port of the network equipment receives in current period
Literary quantity is P, then P=P2-P1, i.e. the message amount that the port of the network equipment receives in current period is equal to the current week
Reception packet counting value at the end of phase subtract connect when the current period starts receive packet counting value.Assuming that between timer
Be T every the time, i.e. current period when a length of T when, a width of B of instantaneous delivery band of the port of the network equipment, therefore, B=
(P2-P1) T, i.e., the instantaneous delivery bandwidth of the port of the network equipment be equal in the current period message amount that receives divided by
Value obtained by the duration of current period, so can be to be calculated the instantaneous delivery band of the port of the network equipment by message amount
It is wide.
The technical scheme of the present embodiment, this is obtained by the message amount in the caching for the port for detecting the network equipment
The instantaneous delivery bandwidth of the port of the network equipment.
Step 203, judge whether the instantaneous delivery bandwidth exceedes default port bandwidth thresholding, if so, step 204 is performed,
Otherwise, step 205 is performed.
Generally, the thresholding of the default port bandwidth can be set by User Defined.In the present embodiment, by step
The instantaneous delivery bandwidth B of the port of the network equipment is obtained in rapid 202, by the instantaneous delivery of the port of the network equipment
The thresholding of bandwidth B and default port bandwidth is compared, and judges whether the instantaneous delivery bandwidth of the port exceedes default port band
Wide thresholding, if exceeding, step 204 is performed, if being no more than, perform step 205.
Step 204, determine that the clock frequency of the network equipment is in negative frequency deviation.
Step 205, determine that the clock frequency of the network equipment is not at negative frequency deviation.
In the present embodiment, if judging that the instantaneous delivery bandwidth of the port of the network equipment exceedes in advance by step 203
If port bandwidth thresholding, it is determined that the clock frequency of the network equipment is in negative frequency deviation, if judging the network by step 203
The instantaneous delivery bandwidth of the port of equipment is not above default port bandwidth thresholding, it is determined that the clock frequency of the network equipment is not
In negative frequency deviation.
Step 102, if the clock frequency of the network equipment is in negative frequency deviation, M GPIO of control changes the network and set
The input voltage of standby voltage controlled oscillator, to adjust the clock frequency of the network equipment.
In the present embodiment, the crystal oscillator of the network equipment is voltage controlled oscillator, and the output frequency of voltage controlled oscillator and input are electric
Certain relation between pressure be present, the output frequency of usual voltage controlled oscillator increases with the increase of input voltage.Therefore, when by
When step 101 judges that the clock frequency of the network equipment is in negative frequency deviation, by the voltage controlled oscillator for changing the network equipment
Input voltage, can reach adjust the network equipment clock frequency purpose.
The technical scheme of the present embodiment, the clock frequency of the network equipment can be monitored by timer whether in negative frequency
Partially, the network equipment is adjusted by the input voltage for the voltage controlled oscillator for changing the network equipment when in negative frequency deviation when
Clock frequency, reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
Still optionally further, M is the integer more than or equal to 2;Correspondingly, described M GPIO of control changes the network equipment
The input voltage of voltage controlled oscillator includes:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of port, and is less than the second buffer threshold, control M
The first GPIO in GPIO exports high level, and remaining GPIO is input state in M GPIO, wherein, point of voltage controlled oscillator
Pressure pipe pin is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance and the first divider resistance
It is in parallel.
In the embodiment of the present invention, the processor of the network equipment can include M GPIO(General Purpose Input
Output, universal input output), for carrying out multistage adjustment to the clock frequency of the network equipment, wherein M is more than or equal to 1
Integer.
As M=1, that is, represent that processor has a GPIO, such as the first GPIO.Now, if the port of the network equipment is delayed
Stored messages quantity is more than the first buffer threshold, and when being less than the second buffer threshold, it is high that the first GPIO can be arranged to output
Level, if the caching message amount of the port of the network equipment is less than the first buffer threshold, the first GPIO is arranged to input
State.
Fig. 3 A are the structural representation of partial network devices provided in an embodiment of the present invention, with the processor of the network equipment
Exemplified by two GPIO.As shown in Figure 3A, two GPIO of processor are respectively GPIO1 and GPIO2, and VDD is VCO
The power pin of device(English:pin), GND is ground pin;Output is clock frequency output pin, exports clock signal
(CLOCK);VCON is that voltage controls pin, and supply voltage VCC is connected to by the first divider resistance R, passes through the second partial pressure electricity
Hinder R ' ground connection, the first divider resistance R and the second divider resistance R ' series connection.With R=R '=4.7 ohm in the present embodiment(Ω), R1=R2=
Illustrated exemplified by 10 Ω.Certain R and R ' resistance can not also wait, R1And R2Resistance can not also wait, specifically can basis
It is actually needed and is set, is not limited in the present embodiment.
For example, when initial time, GPIO1 and GPIO2 are input state, i.e. GPIO1 and GPIO2 are high resistant shape
During state, R1And R2Do not work, represent not change the input electricity of the voltage controlled oscillator of the network equipment by GPIO1 and GPIO2
Pressure, namely the clock frequency of the network equipment is not adjusted.Now voltage controls the pin VCON voltage to beIt is false
If the output frequency of voltage controlled oscillator is 25MHz+/- 100PPM, wherein, 25MHz is the frequency of desired output, and +/- 100PPM is
The error range of output frequency.
If the clock frequency for next monitoring the network equipment is in negative frequency deviation, GPIO1 or GPIO2 outputs are controlled
High level, such as GPIO1 output high level, GPIO2 is still input state.Assuming that GPIO1 output voltage is VG, it is assumed that then
Voltage control pin VCON voltage riseThat is voltage controls the pin VCON voltage to beDue to pressure
The input voltage of controlled oscillator is bigger, and output frequency is bigger, therefore the output frequency of voltage controlled oscillator is with increased voltageIncrease, it is assumed that increase 25PPM, the output frequency of the voltage controlled oscillator after so adjusting are(25MHz+25PPM)+/-
100PPM。
If the clock frequency for next monitoring the network equipment is still within negative frequency deviation, GPIO1 and GPIO2 is controlled
When all exporting high level, then voltage control pin VCON voltage raises againForCorrespondingly, it is voltage-controlled
The output frequency of oscillator is further added by 25PPM, and now, the output frequency of voltage controlled oscillator is(25MHz+50PPM)+/-
100PPM。
On the basis of above-described embodiment, when the clock frequency of the network equipment is in negative frequency deviation, by controlling the net
The GPIO of the processor of network equipment output level, change the input voltage of the voltage controlled oscillator of the network equipment, multistage adjustment
The clock frequency of the network equipment.Specific steps include:Obtain the message amount in the caching of the port of the network equipment;If end
Message amount is more than the first buffer threshold in the caching of mouth, and is less than the second buffer threshold, controls the first GPIO in M GPIO
High level is exported, remaining GPIO is input state in M GPIO, wherein, the partial pressure pin of voltage controlled oscillator is connected to first
Between divider resistance and the second divider resistance, the first GPIO is in parallel with the first divider resistance by adjusting resistance.In the present embodiment,
It is poor that the clock frequency difference of the network equipment after multistage adjustment can meet predeterminated frequency, such as disclosure satisfy that 802.3 agreements will
Ask, clock frequency difference is within +/- 50PPM.The clock frequency difference refers to the network equipment of multistage adjustment and an other network
The difference of clock frequency between equipment.
Next, illustrate technical solution of the present invention with reference to Fig. 3 A by specific.It is provided in an embodiment of the present invention referring to Fig. 3 B
Clock frequency method of adjustment flow chart, method include:
Step 301, the message amount in the caching of the port of the network equipment is identified.
The step is to identify the message amount that clock frequency is in the caching of the port of the network equipment of negative frequency deviation, message
Quantum hypothesis is p.
Step 302, identify whether the quantity of message in the caching of the port of the network equipment is more than the first buffer threshold.
Buffer threshold is set, in the present embodiment by taking two-level cache thresholding as an example, it is assumed that the first buffer threshold is p1, second
Buffer threshold is p2, wherein, p1<p2.Identification clock frequency is in the number of message in the caching of the port of the network equipment of negative frequency deviation
Whether amount p is more than the first buffer threshold p1, when more than the first buffer threshold p1When, step 304 is performed, when no more than the first caching
Thresholding p1When, perform step 303.
Step 303, GPIO is arranged to input state entirely;
It is pointed out that if GPIO is all set to input state in advance, then now step 303 is holding
The all input states of GPIO.
When the quantity p of message in the caching of the port of the network equipment is not more than the first buffer threshold p1When, show the network
The clock frequency of equipment is within a preset range, it is not necessary to enters line frequency adjustment, then connection voltage-controlled oscillator voltage is controlled pin
VCON GPIO is all input state.
Step 304, identify whether message amount is more than the second buffer threshold in the caching of the port of the network equipment;
P when the caching message amount p of the port of the network equipment is more than the first buffer threshold is identified in step 3021,
The step identifies whether the caching message amount p of the port of the network equipment is more than the second buffer threshold p again2, work as p>p2When, hold
Row step 306, as p≤p2When, perform step 305.
Step 305,1 GPIO is arranged to export high level, remaining GPIO is arranged to input state;
When identifying p1<p≤p2, make and 1 GPIO in the GPIO that are connected of the voltage of voltage controlled oscillator control pin VCON
High level is exported, remaining GPIO is input state.For example, in Fig. 3 A, GPIO1 is arranged to export high level, then GPIO2 is kept
Input state.
Step 306,2 GPIO are arranged to export high level.
It will be understood by those skilled in the art that can according to actual use situation setting buffer threshold series and with pressure
The GPIO of the voltage control pin parallel connection of controlled oscillator number, the present invention will not be repeated here.
The technical scheme of the present embodiment, pass through by least one GPIO and voltage controlled oscillator voltage control pin VCON
On the basis of the hardware connection of resistor coupled in parallel, by setting the buffer threshold of message amount, identify the network equipment port it is slow
The rank that the quantity of middle message is reached is deposited, makes in the GPIO connected to the voltage of voltage controlled oscillator control pin VCON corresponding
Several GPIO output high level, remaining is input state, has reached the effect of multistage dynamic adjustment network equipment clock frequency, has entered
One step can reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
Fig. 4 is the structural representation of clock frequency adjusting apparatus provided in an embodiment of the present invention.As shown in figure 4, the dress
Put including monitoring module 41 and adjusting module 42.
Wherein, monitoring module 41 is used for the clock frequency for monitoring the network equipment, and the processor of the network equipment includes M and led to
With input and output GPIO, for being adjusted to the clock frequency of the network equipment, wherein M is the integer more than or equal to 1;Adjust mould
If the clock frequency that block 42 is used for the network equipment is in negative frequency deviation, M GPIO is controlled, changes the voltage-controlled of the network equipment
The input voltage of oscillator, to adjust the clock frequency of the network equipment.
Specifically, monitoring module 41 can trigger adjustment when the clock frequency for monitoring the network equipment is in negative frequency deviation
Module 42, or frequency deviation monitoring module 41 send monitored results to adjusting module 42, so that adjusting module 42 is according to monitoring
When as a result identifying that the clock frequency of the network equipment is in negative frequency deviation, change the input electricity of the voltage controlled oscillator of the network equipment
Pressure, adjust the clock frequency of the network equipment.
Alternatively, M is the integer more than or equal to 2, and adjusting module 42 is specifically used for:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of port, and is less than the second buffer threshold, control M
The first GPIO in GPIO exports high level, and remaining GPIO is input state in M GPIO, wherein, point of voltage controlled oscillator
Pressure pipe pin is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance and the first divider resistance
It is in parallel.
Specifically, monitoring module 41 is used for:
The caching of the port of the detection network equipment in real time;
If message in the caching of port be present, the instantaneous delivery bandwidth of port is obtained;
If the instantaneous delivery bandwidth of port exceedes default port bandwidth threshold value, the clock frequency of the network equipment is judged
In negative frequency deviation.
More specifically, monitoring module 41 is used for:
Obtain reception packet counting value of the port when current period starts and the reception message at the end of current period
Count value;
According to the reception packet counting value when current period starts and the reception packet counting at the end of current period
Value, obtains the message amount that port receives in current period, and the message amount received in current period is equal to current
Reception packet counting value during end cycle subtracts the reception packet counting value when current period starts;
According to the message amount received in current period, the instantaneous delivery bandwidth of port, the instantaneous stream of port are obtained
Amount bandwidth is equal to the value obtained by the duration of the message amount received in current period divided by current period.
Wherein, monitoring module 41 is additionally operable to:
If message is not present in the caching of port, judge whether the clock frequency of the network equipment does overdeviation adjustment;
Correspondingly, if the clock frequency that adjusting module is additionally operable to the network equipment does overdeviation adjustment, by the network equipment
Clock frequency returns to normal frequency;If the clock frequency for keeping equipment does not do overdeviation adjustment, clock frequency is not adjusted
Rate.
The technical scheme of the present embodiment, by whether there is message in the caching for the port for detecting the network equipment, when depositing
In message, the instantaneous delivery bandwidth of the port of the network equipment is obtained, and preset according to whether the instantaneous delivery bandwidth exceedes
Port bandwidth thresholding judges whether the clock frequency of the network equipment is in negative frequency deviation, so as to knowing that the network equipment whether may be used
There can be the phenomenon of packet loss.
The technical scheme of the present embodiment, whether the clock frequency of the network equipment is monitored in negative frequency by monitoring module 41
Partially, then the input voltage that module 42 changes the voltage controlled oscillator of the network equipment in negative frequency deviation is adjusted, adjusts the network
The clock frequency of equipment, reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
On the basis of above-described embodiment, alternatively, the adjusting module 42 is by controlling the CPU of network equipment GPIO
Output level, change the input voltage of the voltage controlled oscillator of the network equipment, multistage adjusts the clock frequency of the network equipment.
Present invention also offers a kind of network equipment, as shown in figure 5, including:At least one processor 601, and storage
Device 602, in addition to voltage controlled oscillator 603;Memory 602, for depositing program.Specifically, program can include program code,
Program code includes computer-managed instruction.The processor 601 can pass through bus or other modes with the memory 602
Connect, in Fig. 5 exemplified by being connected by bus.Connected mode between processor 601 and voltage controlled oscillator 603 can specifically join
Fig. 3 A are examined, there can also be other connected modes certainly, not limited in the present embodiment.
Processor 601 performs the program stored in memory 602, realizes clock frequency adjustment provided in an embodiment of the present invention
Method, including:
Monitor the clock frequency of the network equipment, the processor of the network equipment includes M universal input output GPIO, for pair
The clock frequency of the network equipment is adjusted, and wherein M is the integer more than or equal to 1;
If the clock frequency of the network equipment is in negative frequency deviation, M GPIO is controlled, changes the VCO of the network equipment
The input voltage of device 603, to adjust the clock frequency of the network equipment.
Alternatively, M is the integer more than or equal to 2, then M GPIO of the control, changes the voltage controlled oscillator of the network equipment
603 input voltage includes:
Obtain the message amount in the caching of the port of the network equipment;
If message amount is more than the first buffer threshold in the caching of port, and is less than the second buffer threshold, control M
The first GPIO in GPIO exports high level, and remaining GPIO is input state in M GPIO, wherein, point of voltage controlled oscillator
Pressure pipe pin is connected between the first divider resistance and the second divider resistance, and the first GPIO is by adjusting resistance and the first divider resistance
It is in parallel.
Alternatively, the clock frequency of the monitoring network equipment, including:
The caching of the port of the detection network equipment in real time;
If message in the caching of the port of the network equipment be present, the instantaneous delivery bandwidth of port is obtained;
If the instantaneous delivery bandwidth of port exceedes default port bandwidth threshold value, the clock frequency of the network equipment is judged
In negative frequency deviation.
Alternatively, the instantaneous delivery bandwidth for obtaining the port, including:
Obtain reception packet counting value of the port when current period starts and the reception message at the end of current period
Count value;
According to the reception packet counting value when current period starts and the reception packet counting at the end of current period
Value, obtains the message amount that port receives in current period, and the message amount received in current period is equal to current
Reception packet counting value during end cycle subtracts the reception packet counting value when current period starts;
According to the message amount received in current period, the instantaneous delivery bandwidth of port, the instantaneous stream of port are obtained
Amount bandwidth is equal to the value obtained by the duration of the message amount received in current period divided by current period.
Alternatively, the clock frequency method of adjustment also includes:
If message is not present in the caching of port, judge whether the clock frequency of the network equipment does overdeviation adjustment;
If the clock frequency of the network equipment does overdeviation adjustment, the clock frequency of the network equipment is returned into normal frequency
Rate.
In the present embodiment, network equipment structure related to the present invention is only described, the network equipment can also include
Other devices, this present invention is not limited.
Whether the network equipment of the embodiment of the present invention, the clock frequency by monitoring the network equipment are in negative frequency deviation, then
The input voltage of the voltage controlled oscillator of the network equipment of negative frequency deviation is in by change, adjusts the clock frequency of the network equipment,
Reduce the phenomenon of packet loss on the network equipment in relative negative frequency deviation.
It should be noted that:For foregoing each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the present invention is not limited by described sequence of movement because
According to the present invention, some steps can use other orders or carry out simultaneously.Secondly, those skilled in the art should also know
Know, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention
It is necessary.
One of ordinary skill in the art will appreciate that:Realizing all or part of step of above method embodiment can pass through
Programmed instruction related hardware is completed, and foregoing program can be stored in a computer read/write memory medium, the program
Upon execution, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used
To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic;
And these modifications or replacement, the essence of appropriate technical solution is departed from various embodiments of the present invention technical scheme and scope.