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

Function fill_sa_replay

dpdk/lib/ipsec/sa.c:512–526  ·  view source on GitHub ↗

* helper function, init SA replay structure. */

Source from the content-addressed store, hash-verified

510 * helper function, init SA replay structure.
511 */
512static void
513fill_sa_replay(struct rte_ipsec_sa *sa, uint32_t wnd_sz, uint32_t nb_bucket,
514 uint64_t sqn)
515{
516 sa->replay.win_sz = wnd_sz;
517 sa->replay.nb_bucket = nb_bucket;
518 sa->replay.bucket_index_mask = nb_bucket - 1;
519 sa->sqn.inb.rsn[0] = (struct replay_sqn *)(sa + 1);
520 sa->sqn.inb.rsn[0]->sqn = sqn;
521 if ((sa->type & RTE_IPSEC_SATP_SQN_MASK) == RTE_IPSEC_SATP_SQN_ATOM) {
522 sa->sqn.inb.rsn[1] = (struct replay_sqn *)
523 ((uintptr_t)sa->sqn.inb.rsn[0] + rsn_size(nb_bucket));
524 sa->sqn.inb.rsn[1]->sqn = sqn;
525 }
526}
527
528int
529rte_ipsec_sa_size(const struct rte_ipsec_sa_prm *prm)

Callers 1

rte_ipsec_sa_initFunction · 0.85

Calls 1

rsn_sizeFunction · 0.85

Tested by

no test coverage detected