2002-05-29 14:17:33+0530, venugopalv <[EMAIL PROTECTED]> -> > > > hi, > > I was going through the netfilter code and i have a doubt regarding its > limit match implementation. Can anybody let me know the reason behind the > macro values for CREDITS_PER_JIFFY and HZ used in the calculation of > credits/credit_cap, cost. > > Also, I have gone through Rusty Russel's guide on "Packet Filtering HOW TO" > and found that the the results mentioned there for limit match can be > achieved without using user2credits() also, i.e. by using raw avg, burst > values specified by the user. Can anybody tell me why the current > implementation calculates cost, credit_cap etc (especially the use of > function - user2credits()). > > TIA >
Its needed since each machine type has different number of jiffies per second (HZ). And CREDITS_PER_JIFFY is needed to transform up the figures because we would have a divison always resulting in 1 otherwise (sort of fixpoint-solution). -- /Joakim Axelsson A.K.A Gozem@EFnet & OPN