Compute how many packets can be sent before overflow occurs */
| 703 | |
| 704 | /* Compute how many packets can be sent before overflow occurs */ |
| 705 | static inline uint16_t |
| 706 | esn_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 |
no outgoing calls
no test coverage detected