src/dpdk/lib/librte_acl/acl_run_neon.h
static inline int
search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
	      uint32_t *results, int total_packets, uint32_t categories)
{
	int n;
	struct acl_flow_data flows;
	uint64_t index_array[4];
	struct completion cmplt[4];
	struct parms parms[4];
	int32x4_t input;

	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
		     total_packets, categories, ctx->trans_table);

	for (n = 0; n < 4; n++) {
		cmplt[n].count = 0;
		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
	}

	/* Check for any matches. */
	acl_match_check_x4(0, ctx, parms, &flows, index_array);

	while (flows.started > 0) {
		/* Gather 4 bytes of input data for each stream. */
		input = vdupq_n_s32(GET_NEXT_4BYTES(parms, 0));
		input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input, 1);
		input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input, 2);
		input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input, 3);

		/* Process the 4 bytes of input on each stream. */
		input = transition4(input, flows.trans, index_array);
		input = transition4(input, flows.trans, index_array);
		input = transition4(input, flows.trans, index_array);
		input = transition4(input, flows.trans, index_array);

		/* Check for any matches. */
		acl_match_check_x4(0, ctx, parms, &flows, index_array);
	}

	return 0;
}
/*
 * Execute trie traversal with 4 traversals in parallel
 */
Execute trie traversal with 4 traversals in parallel
Execute trie traversal with 4 traversals in parallel
static inline int
search_neon_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
	      uint32_t *results, int total_packets, uint32_t categories)
{
	int n;
	struct acl_flow_data flows;
	uint64_t index_array[4];
	struct completion cmplt[4];
	struct parms parms[4];
	int32x4_t input;
	acl_set_flow(&flows, cmplt, RTE_DIM(cmplt), data, results,
		     total_packets, categories, ctx->trans_table);
	for (n = 0; n < 4; n++) {
		cmplt[n].count = 0;
		index_array[n] = acl_start_next_trie(&flows, parms, n, ctx);
	}
	acl_match_check_x4(0, ctx, parms, &flows, index_array);
	while (flows.started > 0) {
		input = vdupq_n_s32(GET_NEXT_4BYTES(parms, 0));
		input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 1), input, 1);
		input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 2), input, 2);
		input = vsetq_lane_s32(GET_NEXT_4BYTES(parms, 3), input, 3);
		input = transition4(input, flows.trans, index_array);
		input = transition4(input, flows.trans, index_array);
		input = transition4(input, flows.trans, index_array);
		input = transition4(input, flows.trans, index_array);
		acl_match_check_x4(0, ctx, parms, &flows, index_array);
	}
	return 0;
}
static inline int search_neon_4 ( const struct rte_acl_ctx * ctx , const uint8_t * * data , uint32_t * results , int total_packets , uint32_t categories ) { int n ; struct acl_flow_data flows ; uint64_t index_array [ 4 ] ; struct completion cmplt [ 4 ] ; struct parms parms [ 4 ] ; int32x4_t input ; acl_set_flow ( & flows , cmplt , RTE_DIM ( cmplt ) , data , results , total_packets , categories , ctx -> trans_table ) ; for ( n = 0 ; n < 4 ; n ++ ) { cmplt [ n ] . count = 0 ; index_array [ n ] = acl_start_next_trie ( & flows , parms , n , ctx ) ; } acl_match_check_x4 ( 0 , ctx , parms , & flows , index_array ) ; while ( flows . started > 0 ) { input = vdupq_n_s32 ( GET_NEXT_4BYTES ( parms , 0 ) ) ; input = vsetq_lane_s32 ( GET_NEXT_4BYTES ( parms , 1 ) , input , 1 ) ; input = vsetq_lane_s32 ( GET_NEXT_4BYTES ( parms , 2 ) , input , 2 ) ; input = vsetq_lane_s32 ( GET_NEXT_4BYTES ( parms , 3 ) , input , 3 ) ; input = transition4 ( input , flows . trans , index_array ) ; input = transition4 ( input , flows . trans , index_array ) ; input = transition4 ( input , flows . trans , index_array ) ; input = transition4 ( input , flows . trans , index_array ) ; acl_match_check_x4 ( 0 , ctx , parms , & flows , index_array ) ; } return 0 ; }
Execute trie traversal with 4 traversals in parallel
Execute trie traversal with 4 traversals in parallel
/* Check for any matches. */ /* Gather 4 bytes of input data for each stream. */ /* Process the 4 bytes of input on each stream. */ /* Check for any matches. */