src/dpdk/lib/librte_acl/acl_run_avx512.c
static inline uint32_t
update_flow_mask(const struct acl_flow_avx512 *flow, uint32_t *fmsk,
	uint32_t *rmsk)
{
	uint32_t i, j, k, m, n;

	fmsk[0] ^= rmsk[0];
	m = rmsk[0];

	k = __builtin_popcount(m);
	n = flow->total_packets - flow->num_packets;

	if (n < k) {
		/* reduce mask */
		for (i = k - n; i != 0; i--) {
			j = sizeof(m) * CHAR_BIT - 1 - __builtin_clz(m);
			m ^= 1 << j;
		}
	} else
		n = k;

	rmsk[0] = m;
	fmsk[0] |= rmsk[0];

	return n;
}
/*
 * Update flow and result masks based on the number of unprocessed flows.
 */
Update flow and result masks based on the number of unprocessed flows.
Update flow and result masks based on the number of unprocessed flows .
static inline uint32_t
update_flow_mask(const struct acl_flow_avx512 *flow, uint32_t *fmsk,
	uint32_t *rmsk)
{
	uint32_t i, j, k, m, n;
	fmsk[0] ^= rmsk[0];
	m = rmsk[0];
	k = __builtin_popcount(m);
	n = flow->total_packets - flow->num_packets;
	if (n < k) {
		for (i = k - n; i != 0; i--) {
			j = sizeof(m) * CHAR_BIT - 1 - __builtin_clz(m);
			m ^= 1 << j;
		}
	} else
		n = k;
	rmsk[0] = m;
	fmsk[0] |= rmsk[0];
	return n;
}
static inline uint32_t update_flow_mask ( const struct acl_flow_avx512 * flow , uint32_t * fmsk , uint32_t * rmsk ) { uint32_t i , j , k , m , n ; fmsk [ 0 ] ^= rmsk [ 0 ] ; m = rmsk [ 0 ] ; k = __builtin_popcount ( m ) ; n = flow -> total_packets - flow -> num_packets ; if ( n < k ) { for ( i = k - n ; i != 0 ; i -- ) { j = sizeof ( m ) * CHAR_BIT - 1 - __builtin_clz ( m ) ; m ^= 1 << j ; } } else n = k ; rmsk [ 0 ] = m ; fmsk [ 0 ] |= rmsk [ 0 ] ; return n ; }
Update flow and result masks based on the number of unprocessed flows.
Update flow and result masks based on the number of unprocessed flows .
/* reduce mask */