X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_distributor%2Frte_distributor.c;h=07e385a25953bcc7ed132d852232f4ea133c8cc3;hb=d992fa555d23bb77079acd184ab60011277324d0;hp=fb4e9d93f95e1547c7740a80bbf13f1e3c6c3564;hpb=91d6b8235e726a40b87e9268b9686231eb1f7741;p=dpdk.git diff --git a/lib/librte_distributor/rte_distributor.c b/lib/librte_distributor/rte_distributor.c index fb4e9d93f9..07e385a259 100644 --- a/lib/librte_distributor/rte_distributor.c +++ b/lib/librte_distributor/rte_distributor.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "rte_distributor.h" #include "rte_distributor_single.h" @@ -702,6 +703,8 @@ rte_distributor_clear_returns(struct rte_distributor *d) /* Sync with worker. Release retptrs. */ __atomic_store_n(&(d->bufs[wkr].retptr64[0]), 0, __ATOMIC_RELEASE); + + d->returns.start = d->returns.count = 0; } /* creates a distributor instance */ @@ -760,7 +763,8 @@ rte_distributor_create(const char *name, d->dist_match_fn = RTE_DIST_MATCH_SCALAR; #if defined(RTE_ARCH_X86) - d->dist_match_fn = RTE_DIST_MATCH_VECTOR; + if (rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) + d->dist_match_fn = RTE_DIST_MATCH_VECTOR; #endif /*