MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bnxt_prandom_bytes

Function bnxt_prandom_bytes

dpdk/drivers/net/bnxt/bnxt_vnic.c:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 */
36
37void bnxt_prandom_bytes(void *dest_ptr, size_t len)
38{
39 char *dest = (char *)dest_ptr;
40 uint64_t rb;
41
42 while (len) {
43 rb = rte_rand();
44 if (len >= 8) {
45 memcpy(dest, &rb, 8);
46 len -= 8;
47 dest += 8;
48 } else {
49 memcpy(dest, &rb, len);
50 dest += len;
51 len = 0;
52 }
53 }
54}
55
56static void bnxt_init_vnics(struct bnxt *bp)
57{

Callers 3

bnxt_vnic_rss_createFunction · 0.85

Calls 2

rte_randFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected