Subject: Re: [RFC] enhanced version of net_random()

From: "David S. Miller" <[email-masked]>
Date: Fri, 20 Aug 2004 12:48:23 -0700

On Fri, 20 Aug 2004 15:22:09 -0400 (EDT)
"Richard B. Johnson" <[email-masked]> wrote:

> The attached code will certainly work on Intel machines. It is
> in the public domain, having been modified by myself to produce
> a very long sequence...

How long a period does it have?  The one we're adding to the
networking has one which is 2^88.

> I wouldn't suggest converting it to 'C' because the rotation
> takes many CPU instructions when one tries to do the test, shift,
> and OR in 'C',

You only need 2 'shifts' and an 'or' to do a rotate in C.
No tests are needed.