* for given size, calculate required number of buckets. */
| 109 | * for given size, calculate required number of buckets. |
| 110 | */ |
| 111 | static uint32_t |
| 112 | replay_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 | |
| 123 | static int32_t |
| 124 | ipsec_sa_size(uint64_t type, uint32_t *wnd_sz, uint32_t *nb_bucket) |
no test coverage detected