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

Function rsn_size

dpdk/lib/ipsec/sa.c:97–106  ·  view source on GitHub ↗

* Based on number of buckets calculated required size for the * structure that holds replay window and sequence number (RSN) information. */

Source from the content-addressed store, hash-verified

95 * structure that holds replay window and sequence number (RSN) information.
96 */
97static size_t
98rsn_size(uint32_t nb_bucket)
99{
100 size_t sz;
101 struct replay_sqn *rsn;
102
103 sz = sizeof(*rsn) + nb_bucket * sizeof(rsn->window[0]);
104 sz = RTE_ALIGN_CEIL(sz, RTE_CACHE_LINE_SIZE);
105 return sz;
106}
107
108/*
109 * for given size, calculate required number of buckets.

Callers 2

ipsec_sa_sizeFunction · 0.85
fill_sa_replayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected