These modules only needed for FTP/TFTP conntrack tests.  These tests
should be calling CHECK_CONNTRACK_ALG() and so the module loading
should happen in there.

Loading and, more importantly, unloading of these two modules are very
time consuming operations.  On my test VM each takes about 3 seconds
to unload, significantly increasing the test suite run time.

This change reduces the total time required for 'make check-kernel'
on my test VM from 60 to 48 minutes.  And seem to provide a similar
speed up for our tests in GitHub Actions as well.

Same change was merged into OVS recently.

OVN doesn't have any tests that require ALG support today, but it's
better to keep the macros updated.  Also to stay in sync with the
corresponding OVS macros.  Alternative would be to remove the
CHECK_CONNTRACK_ALG() macro entirely.

Signed-off-by: Ilya Maximets <[email protected]>
---
 tests/system-kmod-macros.at | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
index e63e81015..81f074cf4 100644
--- a/tests/system-kmod-macros.at
+++ b/tests/system-kmod-macros.at
@@ -64,8 +64,7 @@ m4_define([CONFIGURE_VETH_OFFLOADS],
 # kernel conntrack tables when the test is finished.
 #
 m4_define([CHECK_CONNTRACK],
-     m4_foreach([mod], [[nf_conntrack_ipv4], [nf_conntrack_ipv6], [nf_nat_ftp],
-                        [nf_nat_tftp]],
+     m4_foreach([mod], [[nf_conntrack_ipv4], [nf_conntrack_ipv6]],
                 [modprobe mod && on_exit 'modprobe -r mod' || echo "Module mod 
not loaded."
                 ])
      sysctl -w net.netfilter.nf_conntrack_helper=0
@@ -75,9 +74,13 @@ m4_define([CHECK_CONNTRACK],
 # CHECK_CONNTRACK_ALG()
 #
 # Perform requirements checks for running conntrack ALG tests. The kernel
-# supports ALG, so no check is needed.
+# supports ALG, so no check is needed.  But we need to load the modules.
 #
-m4_define([CHECK_CONNTRACK_ALG])
+m4_define([CHECK_CONNTRACK_ALG],
+     m4_foreach([mod], [[nf_nat_ftp], [nf_nat_tftp]],
+                [modprobe mod && on_exit 'modprobe -r mod' || echo "Module mod 
not loaded."
+                ])
+)
 
 # CHECK_CONNTRACK_LOCAL_STACK()
 #
-- 
2.54.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to