On Wed, Apr 21, 2010 at 8:35 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote: > > All existing users I know of process packets in order, so there's > no need to worry about duplicate IDs. > > Does it really matter in your case? I mean, how long do you intend > to keep packets in userspace? Even with 10 Mpps (which you're *very* > unlikely to reach with userspace queueing) it still won't wrap > around for ~430s. Although it may not happen, we'd better deal with it. I have found a way to speed up duplicate IDs lookup. Since the IDs in a bucket are in order, we can first check if the new ID is in the range of first_ID and last_ID, and in most cases, we don't need to travel the whole bucket. > > Alternatively we could round the hash size to the next power of > two to avoid this. > It is a better idea. Thanks. -- Regards, Changli Gao(xiaosuo@xxxxxxxxx) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html