src/dpdk/lib/librte_distributor/rte_distributor.c
void
find_match_scalar(struct rte_distributor *d,
			uint16_t *data_ptr,
			uint16_t *output_ptr)
{
	struct rte_distributor_backlog *bl;
	uint16_t i, j, w;

	/*
	 * Function overview:
	 * 1. Loop through all worker ID's
	 * 2. Compare the current inflights to the incoming tags
	 * 3. Compare the current backlog to the incoming tags
	 * 4. Add any matches to the output
	 */

	for (j = 0 ; j < RTE_DIST_BURST_SIZE; j++)
		output_ptr[j] = 0;

	for (i = 0; i < d->num_workers; i++) {
		bl = &d->backlog[i];

		for (j = 0; j < RTE_DIST_BURST_SIZE ; j++)
			for (w = 0; w < RTE_DIST_BURST_SIZE; w++)
				if (d->in_flight_tags[i][w] == data_ptr[j]) {
					output_ptr[j] = i+1;
					break;
				}
		for (j = 0; j < RTE_DIST_BURST_SIZE; j++)
			for (w = 0; w < RTE_DIST_BURST_SIZE; w++)
				if (bl->tags[w] == data_ptr[j]) {
					output_ptr[j] = i+1;
					break;
				}
	}

	/*
	 * At this stage, the output contains 8 16-bit values, with
	 * each non-zero value containing the worker ID on which the
	 * corresponding flow is pinned to.
	 */
}
/*
 * Match then flow_ids (tags) of the incoming packets to the flow_ids
 * of the inflight packets (both inflight on the workers and in each worker
 * backlog). This will then allow us to pin those packets to the relevant
 * workers to give us our atomic flow pinning.
 */
Match then flow_ids (tags) of the incoming packets to the flow_ids
of the inflight packets (both inflight on the workers and in each worker
backlog). This will then allow us to pin those packets to the relevant
workers to give us our atomic flow pinning.
Match then flow_ids ( tags ) of the incoming packets to the flow_ids of the inflight packets ( both inflight on the workers and in each worker backlog ) . This will then allow us to pin those packets to the relevant workers to give us our atomic flow pinning .
void
find_match_scalar(struct rte_distributor *d,
			uint16_t *data_ptr,
			uint16_t *output_ptr)
{
	struct rte_distributor_backlog *bl;
	uint16_t i, j, w;
	for (j = 0 ; j < RTE_DIST_BURST_SIZE; j++)
		output_ptr[j] = 0;
	for (i = 0; i < d->num_workers; i++) {
		bl = &d->backlog[i];
		for (j = 0; j < RTE_DIST_BURST_SIZE ; j++)
			for (w = 0; w < RTE_DIST_BURST_SIZE; w++)
				if (d->in_flight_tags[i][w] == data_ptr[j]) {
					output_ptr[j] = i+1;
					break;
				}
		for (j = 0; j < RTE_DIST_BURST_SIZE; j++)
			for (w = 0; w < RTE_DIST_BURST_SIZE; w++)
				if (bl->tags[w] == data_ptr[j]) {
					output_ptr[j] = i+1;
					break;
				}
	}
}
void find_match_scalar ( struct rte_distributor * d , uint16_t * data_ptr , uint16_t * output_ptr ) { struct rte_distributor_backlog * bl ; uint16_t i , j , w ; for ( j = 0 ; j < RTE_DIST_BURST_SIZE ; j ++ ) output_ptr [ j ] = 0 ; for ( i = 0 ; i < d -> num_workers ; i ++ ) { bl = & d -> backlog [ i ] ; for ( j = 0 ; j < RTE_DIST_BURST_SIZE ; j ++ ) for ( w = 0 ; w < RTE_DIST_BURST_SIZE ; w ++ ) if ( d -> in_flight_tags [ i ] [ w ] == data_ptr [ j ] ) { output_ptr [ j ] = i + 1 ; break ; } for ( j = 0 ; j < RTE_DIST_BURST_SIZE ; j ++ ) for ( w = 0 ; w < RTE_DIST_BURST_SIZE ; w ++ ) if ( bl -> tags [ w ] == data_ptr [ j ] ) { output_ptr [ j ] = i + 1 ; break ; } } }
Match then flow_ids (tags) of the incoming packets to the flow_ids
 of the inflight packets (both inflight on the workers and in each worker
 backlog).
Match then flow_ids ( tags ) of the incoming packets to the flow_ids of the inflight packets ( both inflight on the workers and in each worker backlog ) .
/*
	 * Function overview:
	 * 1. Loop through all worker ID's
	 * 2. Compare the current inflights to the incoming tags
	 * 3. Compare the current backlog to the incoming tags
	 * 4. Add any matches to the output
	 */ /*
	 * At this stage, the output contains 8 16-bit values, with
	 * each non-zero value containing the worker ID on which the
	 * corresponding flow is pinned to.
	 */