src/dpdk/lib/librte_ipsec/esp_inb.c
static inline uint16_t
esp_inb_pkt_process(struct rte_ipsec_sa *sa, struct rte_mbuf *mb[],
	uint16_t num, uint8_t sqh_len, esp_inb_process_t process)
{
	uint32_t k, n;
	uint32_t sqn[num];
	uint32_t dr[num];

	/* process packets, extract seq numbers */
	k = process(sa, mb, sqn, dr, num, sqh_len);

	/* handle unprocessed mbufs */
	if (k != num && k != 0)
		move_bad_mbufs(mb, dr, num, num - k);

	/* update SQN and replay window */
	n = esp_inb_rsn_update(sa, sqn, dr, k);

	/* handle mbufs with wrong SQN */
	if (n != k && n != 0)
		move_bad_mbufs(mb, dr, k, k - n);

	if (n != num)
		rte_errno = EBADMSG;

	return n;
}
/*
 * process group of ESP inbound packets.
 */
process group of ESP inbound packets.
process group of ESP inbound packets .
static inline uint16_t
esp_inb_pkt_process(struct rte_ipsec_sa *sa, struct rte_mbuf *mb[],
	uint16_t num, uint8_t sqh_len, esp_inb_process_t process)
{
	uint32_t k, n;
	uint32_t sqn[num];
	uint32_t dr[num];
	k = process(sa, mb, sqn, dr, num, sqh_len);
	if (k != num && k != 0)
		move_bad_mbufs(mb, dr, num, num - k);
	n = esp_inb_rsn_update(sa, sqn, dr, k);
	if (n != k && n != 0)
		move_bad_mbufs(mb, dr, k, k - n);
	if (n != num)
		rte_errno = EBADMSG;
	return n;
}
static inline uint16_t esp_inb_pkt_process ( struct rte_ipsec_sa * sa , struct rte_mbuf * mb [ ] , uint16_t num , uint8_t sqh_len , esp_inb_process_t process ) { uint32_t k , n ; uint32_t sqn [ num ] ; uint32_t dr [ num ] ; k = process ( sa , mb , sqn , dr , num , sqh_len ) ; if ( k != num && k != 0 ) move_bad_mbufs ( mb , dr , num , num - k ) ; n = esp_inb_rsn_update ( sa , sqn , dr , k ) ; if ( n != k && n != 0 ) move_bad_mbufs ( mb , dr , k , k - n ) ; if ( n != num ) rte_errno = EBADMSG ; return n ; }
process group of ESP inbound packets.
process group of ESP inbound packets .
/* process packets, extract seq numbers */ /* handle unprocessed mbufs */ /* update SQN and replay window */ /* handle mbufs with wrong SQN */