src/dpdk/lib/librte_ipsec/esp_inb.c
static inline uint16_t
esp_inb_rsn_update(struct rte_ipsec_sa *sa, const uint32_t sqn[],
	uint32_t dr[], uint16_t num)
{
	uint32_t i, k;
	struct replay_sqn *rsn;

	/* replay not enabled */
	if (sa->replay.win_sz == 0)
		return num;

	rsn = rsn_update_start(sa);

	k = 0;
	for (i = 0; i != num; i++) {
		if (esn_inb_update_sqn(rsn, sa, rte_be_to_cpu_32(sqn[i])) == 0)
			k++;
		else
			dr[i - k] = i;
	}

	rsn_update_finish(sa, rsn);
	return k;
}
/*
 * for group of ESP inbound packets perform SQN check and update.
 */
for group of ESP inbound packets perform SQN check and update.
for group of ESP inbound packets perform SQN check and update .
static inline uint16_t
esp_inb_rsn_update(struct rte_ipsec_sa *sa, const uint32_t sqn[],
	uint32_t dr[], uint16_t num)
{
	uint32_t i, k;
	struct replay_sqn *rsn;
	if (sa->replay.win_sz == 0)
		return num;
	rsn = rsn_update_start(sa);
	k = 0;
	for (i = 0; i != num; i++) {
		if (esn_inb_update_sqn(rsn, sa, rte_be_to_cpu_32(sqn[i])) == 0)
			k++;
		else
			dr[i - k] = i;
	}
	rsn_update_finish(sa, rsn);
	return k;
}
static inline uint16_t esp_inb_rsn_update ( struct rte_ipsec_sa * sa , const uint32_t sqn [ ] , uint32_t dr [ ] , uint16_t num ) { uint32_t i , k ; struct replay_sqn * rsn ; if ( sa -> replay . win_sz == 0 ) return num ; rsn = rsn_update_start ( sa ) ; k = 0 ; for ( i = 0 ; i != num ; i ++ ) { if ( esn_inb_update_sqn ( rsn , sa , rte_be_to_cpu_32 ( sqn [ i ] ) ) == 0 ) k ++ ; else dr [ i - k ] = i ; } rsn_update_finish ( sa , rsn ) ; return k ; }
for group of ESP inbound packets perform SQN check and update.
for group of ESP inbound packets perform SQN check and update .
/* replay not enabled */