for (; i < RTE_DIST_BURST_SIZE; i++)
flows[i] = 0;
- find_match_scalar(d, &flows[0], &matches[0]);
+ switch (d->dist_match_fn) {
+ case RTE_DIST_MATCH_VECTOR:
+ find_match_vec(d, &flows[0], &matches[0]);
+ break;
+ default:
+ find_match_scalar(d, &flows[0], &matches[0]);
+ }
/*
* Matches array now contain the intended worker ID (+1) of
snprintf(d->name, sizeof(d->name), "%s", name);
d->num_workers = num_workers;
d->alg_type = alg_type;
- d->dist_match_fn = RTE_DIST_MATCH_SCALAR;
+
+#if defined(RTE_ARCH_X86)
+ if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_SSE4_2))
+ d->dist_match_fn = RTE_DIST_MATCH_VECTOR;
+ else
+#endif
+ d->dist_match_fn = RTE_DIST_MATCH_SCALAR;
/*
* Set up the backog tags so they're pointing at the second cache