DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [Bug 276] rte_rand() bit 31 and 63 are always zero
@ 2019-05-06 13:00 bugzilla
  2019-05-06 13:00 ` bugzilla
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2019-05-06 13:00 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=276

            Bug ID: 276
           Summary: rte_rand() bit 31 and 63 are always zero
           Product: DPDK
           Version: 19.05
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: mattias.ronnblom@ericsson.com
  Target Milestone: ---

rte_rand() is specified as returning a 64-bit pseudo-random number, but only
returns 62 bit worth of randomness.

The implementation uses two lrand48() calls, which each returns a 31-bit random
number. This results in bit 31 and 63 always being zero.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-dev] [Bug 276] rte_rand() bit 31 and 63 are always zero
  2019-05-06 13:00 [dpdk-dev] [Bug 276] rte_rand() bit 31 and 63 are always zero bugzilla
@ 2019-05-06 13:00 ` bugzilla
  0 siblings, 0 replies; 2+ messages in thread
From: bugzilla @ 2019-05-06 13:00 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=276

            Bug ID: 276
           Summary: rte_rand() bit 31 and 63 are always zero
           Product: DPDK
           Version: 19.05
          Hardware: All
                OS: All
            Status: CONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: mattias.ronnblom@ericsson.com
  Target Milestone: ---

rte_rand() is specified as returning a 64-bit pseudo-random number, but only
returns 62 bit worth of randomness.

The implementation uses two lrand48() calls, which each returns a 31-bit random
number. This results in bit 31 and 63 always being zero.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-06 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-06 13:00 [dpdk-dev] [Bug 276] rte_rand() bit 31 and 63 are always zero bugzilla
2019-05-06 13:00 ` bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).