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

Function get_rev_bit_lfsr

dpdk/lib/hash/rte_thash.c:142–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142static inline uint32_t
143get_rev_bit_lfsr(struct thash_lfsr *lfsr)
144{
145 uint32_t bit, ret;
146
147 bit = rte_popcount32(lfsr->rev_state & lfsr->rev_poly) & 0x1;
148 ret = lfsr->rev_state & (1 << (lfsr->deg - 1));
149 lfsr->rev_state = ((lfsr->rev_state << 1) | bit) &
150 ((1 << lfsr->deg) - 1);
151
152 lfsr->bits_cnt++;
153 return ret;
154}
155
156static inline uint32_t
157thash_get_rand_poly(uint32_t poly_degree)

Callers 2

alloc_lfsrFunction · 0.85
generate_subkeyFunction · 0.85

Calls 1

rte_popcount32Function · 0.85

Tested by

no test coverage detected