doc: extend installation section for SNOW3G/KASUMI
[dpdk.git] / lib / librte_distributor / rte_distributor.c
index 4725904..20ba9ff 100644 (file)
@@ -41,7 +41,8 @@
 #include <rte_errno.h>
 #include <rte_string_fns.h>
 #include <rte_eal_memconfig.h>
-#include <rte_compat.h>
+#include <rte_pause.h>
+
 #include "rte_distributor_private.h"
 #include "rte_distributor.h"
 #include "rte_distributor_v20.h"
@@ -555,7 +556,7 @@ total_outstanding(const struct rte_distributor *d)
 int
 rte_distributor_flush_v1705(struct rte_distributor *d)
 {
-       const unsigned int flushed = total_outstanding(d);
+       unsigned int flushed;
        unsigned int wkr;
 
        if (d->alg_type == RTE_DIST_ALG_SINGLE) {
@@ -563,6 +564,8 @@ rte_distributor_flush_v1705(struct rte_distributor *d)
                return rte_distributor_flush_v20(d->d_v20);
        }
 
+       flushed = total_outstanding(d);
+
        while (total_outstanding(d) > 0)
                rte_distributor_process(d, NULL, 0);
 
@@ -590,6 +593,7 @@ rte_distributor_clear_returns_v1705(struct rte_distributor *d)
        if (d->alg_type == RTE_DIST_ALG_SINGLE) {
                /* Call the old API */
                rte_distributor_clear_returns_v20(d->d_v20);
+               return;
        }
 
        /* throw away returns, so workers can exit */
@@ -653,12 +657,10 @@ rte_distributor_create_v1705(const char *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
+       d->dist_match_fn = RTE_DIST_MATCH_VECTOR;
 #endif
-               d->dist_match_fn = RTE_DIST_MATCH_SCALAR;
 
        /*
         * Set up the backog tags so they're pointing at the second cache