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

Function replay_num_bucket

dpdk/lib/ipsec/sa.c:111–121  ·  view source on GitHub ↗

* for given size, calculate required number of buckets. */

Source from the content-addressed store, hash-verified

109 * for given size, calculate required number of buckets.
110 */
111static uint32_t
112replay_num_bucket(uint32_t wsz)
113{
114 uint32_t nb;
115
116 nb = rte_align32pow2(RTE_ALIGN_MUL_CEIL(wsz, WINDOW_BUCKET_SIZE) /
117 WINDOW_BUCKET_SIZE);
118 nb = RTE_MAX(nb, (uint32_t)WINDOW_BUCKET_MIN);
119
120 return nb;
121}
122
123static int32_t
124ipsec_sa_size(uint64_t type, uint32_t *wnd_sz, uint32_t *nb_bucket)

Callers 1

ipsec_sa_sizeFunction · 0.85

Calls 1

rte_align32pow2Function · 0.50

Tested by

no test coverage detected