@@ -302,6 +302,11 @@ To set the Miniflow autovalidator, use this command ::
$ ovs-appctl dpif-netdev/miniflow-parser-set autovalidator
+A compile time option is available in order to test it with the OVS unit
+test suite. Use the following configure option ::
+
+ $ ./configure --enable-mfex-default-autovalidator
+
Running Fuzzy test with Autovalidator
+++++++++++++++++++++++++++++++++++++
@@ -22,6 +22,16 @@ Post-v2.15.0
* Optimize dp_netdev_output by enhancing compiler optimization potential.
* Optimize netdev sending by assuming the happy case, and using fallback
for if the netdev doesnt meet the required HWOL needs of a packet.
+ * Add command line option to switch between mfex function pointers.
+ * Add miniflow extract auto-validator function to compare different
+ miniflow extract implementations against default implementation.
+ * Add study function to miniflow function table which studies packet
+ and automatically chooses the best miniflow implementation for that
+ traffic.
+ * Add AVX512 based optimized miniflow extract function for traffic type
+ IP/UDP.
+ * Add build time configure command to enable auto-validatior as default
+ miniflow implementation at build time.
v2.15.0 - 15 Feb 2021
@@ -14,6 +14,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+dnl Set OVS MFEX Autovalidator as default miniflow extract at compile time?
+dnl This enables automatically running all unit tests with all MFEX
+dnl implementations.
+AC_DEFUN([OVS_CHECK_MFEX_AUTOVALIDATOR], [
+ AC_ARG_ENABLE([mfex-default-autovalidator],
+ [AC_HELP_STRING([--enable-mfex-default-autovalidator], [Enable MFEX autovalidator as default miniflow_extract implementation.])],
+ [autovalidator=yes],[autovalidator=no])
+ AC_MSG_CHECKING([whether MFEX Autovalidator is default implementation])
+ if test "$autovalidator" != yes; then
+ AC_MSG_RESULT([no])
+ else
+ OVS_CFLAGS="$OVS_CFLAGS -DMFEX_AUTOVALIDATOR_DEFAULT"
+ AC_MSG_RESULT([yes])
+ fi
+])
+
dnl Set OVS DPCLS Autovalidator as default subtable search at compile time?
dnl This enables automatically running all unit tests with all DPCLS
dnl implementations.
@@ -186,6 +186,7 @@ OVS_ENABLE_SPARSE
OVS_CTAGS_IDENTIFIERS
OVS_CHECK_DPCLS_AUTOVALIDATOR
OVS_CHECK_DPIF_AVX512_DEFAULT
+OVS_CHECK_MFEX_AUTOVALIDATOR
OVS_CHECK_BINUTILS_AVX512
AC_ARG_VAR(KARCH, [Kernel Architecture String])
@@ -173,3 +173,18 @@ dpif_miniflow_extract_autovalidator(struct dp_packet_batch *packets,
/* Always return full hitmask as scalar mfex will always work. */
return (1ULL << cnt) - 1;
}
+
+miniflow_extract_func
+dpif_miniflow_extract_get_default(void)
+{
+
+#ifdef MFEX_AUTOVALIDATOR_DEFAULT
+ ovs_assert(mfex_impls[0].extract_func ==
+ dpif_miniflow_extract_autovalidator);
+ VLOG_INFO("Default miniflow Extract implementation %s \n",
+ mfex_impls[0].name);
+ return mfex_impls[0].extract_func;
+#else
+ return NULL;
+#endif
+}
@@ -129,4 +129,9 @@ mfex_avx512_ipv4_udp(struct dp_packet_batch *packets,
uint32_t keys_size, odp_port_t in_port,
void *pmd_handle);
+/* Retrieve the default miniflow extract or auto-validator
+ * based upon build time configuration choosen by the user. */
+miniflow_extract_func
+dpif_miniflow_extract_get_default(void);
+
#endif /* DPIF_NETDEV_AVX512_EXTRACT */
@@ -6247,8 +6247,8 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread *pmd, struct dp_netdev *dp,
/* Initialize DPIF function pointer to the default configured version. */
pmd->netdev_input_func = dp_netdev_impl_get_default();
- /*Init default miniflow_extract function */
- pmd->miniflow_extract_opt = NULL;
+ /* Init default miniflow_extract function */
+ pmd->miniflow_extract_opt = dpif_miniflow_extract_get_default();
/* init the 'flow_cache' since there is no
* actual thread created for NON_PMD_CORE_ID. */