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

Function esp_inb_rsn_update

dpdk/lib/ipsec/esp_inb.c:694–717  ·  view source on GitHub ↗

* for group of ESP inbound packets perform SQN check and update. */

Source from the content-addressed store, hash-verified

692 * for group of ESP inbound packets perform SQN check and update.
693 */
694static inline uint16_t
695esp_inb_rsn_update(struct rte_ipsec_sa *sa, const uint32_t sqn[],
696 uint32_t dr[], uint16_t num)
697{
698 uint32_t i, k;
699 struct replay_sqn *rsn;
700
701 /* replay not enabled */
702 if (sa->replay.win_sz == 0)
703 return num;
704
705 rsn = rsn_update_start(sa);
706
707 k = 0;
708 for (i = 0; i != num; i++) {
709 if (esn_inb_update_sqn(rsn, sa, rte_be_to_cpu_32(sqn[i])) == 0)
710 k++;
711 else
712 dr[i - k] = i;
713 }
714
715 rsn_update_finish(sa, rsn);
716 return k;
717}
718
719/*
720 * process group of ESP inbound packets.

Callers 1

esp_inb_pkt_processFunction · 0.85

Calls 3

rsn_update_startFunction · 0.85
esn_inb_update_sqnFunction · 0.85
rsn_update_finishFunction · 0.85

Tested by

no test coverage detected