2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-04 00:05:15 +00:00

dpif-netdev: Add configure to enable autovalidator at build time.

This commit adds a new command to allow the user to enable
autovalidatior by default at build time thus allowing for
runnig unit test by default.

 $ ./configure --enable-mfex-default-autovalidator

Signed-off-by: Kumar Amber <kumar.amber@intel.com>
Co-authored-by: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
This commit is contained in:
Kumar Amber
2021-07-15 21:36:11 +05:30
committed by Ian Stokes
parent 5c5c98cec2
commit 5324b54e60
5 changed files with 28 additions and 0 deletions

View File

@@ -307,3 +307,8 @@ implementations provide the same results.
To set the Miniflow autovalidator, use this command :: To set the Miniflow autovalidator, use this command ::
$ ovs-appctl dpif-netdev/miniflow-parser-set autovalidator $ 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

2
NEWS
View File

@@ -41,6 +41,8 @@ Post-v2.15.0
* Add study function to miniflow function table which studies packet * Add study function to miniflow function table which studies packet
and automatically chooses the best miniflow implementation for that and automatically chooses the best miniflow implementation for that
traffic. traffic.
* Add build time configure command to enable auto-validatior as default
miniflow implementation at build time.
- ovs-ctl: - ovs-ctl:
* New option '--no-record-hostname' to disable hostname configuration * New option '--no-record-hostname' to disable hostname configuration
in ovsdb on startup. in ovsdb on startup.

View File

@@ -14,6 +14,22 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # 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 Set OVS DPCLS Autovalidator as default subtable search at compile time?
dnl This enables automatically running all unit tests with all DPCLS dnl This enables automatically running all unit tests with all DPCLS
dnl implementations. dnl implementations.

View File

@@ -186,6 +186,7 @@ OVS_ENABLE_SPARSE
OVS_CTAGS_IDENTIFIERS OVS_CTAGS_IDENTIFIERS
OVS_CHECK_DPCLS_AUTOVALIDATOR OVS_CHECK_DPCLS_AUTOVALIDATOR
OVS_CHECK_DPIF_AVX512_DEFAULT OVS_CHECK_DPIF_AVX512_DEFAULT
OVS_CHECK_MFEX_AUTOVALIDATOR
OVS_CHECK_BINUTILS_AVX512 OVS_CHECK_BINUTILS_AVX512
AC_ARG_VAR(KARCH, [Kernel Architecture String]) AC_ARG_VAR(KARCH, [Kernel Architecture String])

View File

@@ -60,7 +60,11 @@ void
dpif_miniflow_extract_init(void) dpif_miniflow_extract_init(void)
{ {
atomic_uintptr_t *mfex_func = (void *)&default_mfex_func; atomic_uintptr_t *mfex_func = (void *)&default_mfex_func;
#ifdef MFEX_AUTOVALIDATOR_DEFAULT
int mfex_idx = MFEX_IMPL_AUTOVALIDATOR;
#else
int mfex_idx = MFEX_IMPL_SCALAR; int mfex_idx = MFEX_IMPL_SCALAR;
#endif
/* Call probe on each impl, and cache the result. */ /* Call probe on each impl, and cache the result. */
for (int i = 0; i < MFEX_IMPL_MAX; i++) { for (int i = 0; i < MFEX_IMPL_MAX; i++) {