| Thread Links | Date Links | ||||
|---|---|---|---|---|---|
| Thread Prev | Thread Next | Thread Index | Date Prev | Date Next | Date Index | 
| 
 Hi,all: 
On page 173 the age update function. 
At each ageinterval time, use the mac data path function to get addrate to 
calculate the lpaddrate. 
But DON'T clear the addrate to zero for the next ageinterval to statistics 
addrate. So on the mac  
datapath the counter maybe overflow. How to do it? 
More  
addRate = (addRate * (AGECOEF - 1)) / AGECOEF; 
if do this calculate, can need use this age addrate update the mac datapath counter? Maybe I don't understand the 
addRate,addRateCongested,fwRate,fwRateCongested,nrXmitRate. 
I think there is five conter reside in the mac Datapath. Maybe they are 
16bits or 32bits. If the mac  
send bytes to the link it updates this counters.  
So if the FU read these counters, does need the mac datapath to clearout 
the counter? 
void agingIntervalUpdate () 
{ lpAddRate = ((LPCOEF-1) * lpAddRate + addRate) / LPOEF; lpAddRateCongested = ((LPCOEF-1) * lpAddRateCongested + addRateCongested) / LPOEF; lpFwRate = ((LPCOEF-1) * lpFwRate + fwRate) / LPOEF; lpFwRateCongested = ((LPCOEF-1) * lpFwRateCongested + fwRateCongested) / LPOEF; lpNrXmitRate ((LPCOEF-1) * lpNrXmitRate + nrXmitRate) / LPOEF; normLpFwRateCongested = lpFwRateCongested / NORMCOEF; addRate = (addRate * (AGECOEF - 1)) / AGECOEF; addRateCongested = (addRateCongested * (AGECOEF - 1)) / AGECOEF; fwRate = (fwRate * (AGECOEF - 1)) / AGECOEF; fwRateCongested = (fwRateCongested * (AGECOEF - 1)) / AGECOEF; nrXmitRate = (nrXmitRate * (AGECOEF - 1)) / AGECOEF; } Best Regards Jiangzhou 
  |