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

Function esn_outb_nb_valid_packets

dpdk/lib/ipsec/esp_outb.c:705–713  ·  view source on GitHub ↗

Compute how many packets can be sent before overflow occurs */

Source from the content-addressed store, hash-verified

703
704/* Compute how many packets can be sent before overflow occurs */
705static inline uint16_t
706esn_outb_nb_valid_packets(uint16_t num, uint32_t n_sqn, uint16_t nb_segs[])
707{
708 uint16_t i;
709 uint32_t seg_cnt = 0;
710 for (i = 0; i < num && seg_cnt < n_sqn; i++)
711 seg_cnt += nb_segs[i];
712 return i - 1;
713}
714
715/*
716 * process group of ESP outbound tunnel packets destined for

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected