aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/libraries/python/Constants.py3
-rw-r--r--resources/libraries/python/autogen/Regenerator.py10
-rw-r--r--resources/libraries/robot/shared/interfaces.robot20
3 files changed, 30 insertions, 3 deletions
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index 1049e47f40..1a4b10d441 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -250,6 +250,9 @@ class Constants:
# Default path to VPP API Stats socket.
SOCKSTAT_PATH = u"/run/vpp/stats.sock"
+ # This MTU value is used to force VPP to fragment 1518B packet into two.
+ MTU_FOR_FRAGMENTATION = 1043
+
# Number of trials to execute in MRR test.
PERF_TRIAL_MULTIPLICITY = get_int_from_env(u"PERF_TRIAL_MULTIPLICITY", 10)
diff --git a/resources/libraries/python/autogen/Regenerator.py b/resources/libraries/python/autogen/Regenerator.py
index 4474996ef1..47e5b9fe86 100644
--- a/resources/libraries/python/autogen/Regenerator.py
+++ b/resources/libraries/python/autogen/Regenerator.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2022 Cisco and/or its affiliates.
+# Copyright (c) 2023 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -190,8 +190,12 @@ def add_default_testcases(testcase, iface, suite_id, file_out, tc_kwargs_list):
# Soak test take too long, do not risk other than tc01.
if kwargs[u"phy_cores"] != 1:
emit = False
- if kwargs[u"frame_size"] not in MIN_FRAME_SIZE_VALUES:
- emit = False
+ if u"reassembly" in suite_id:
+ if kwargs[u"frame_size"] != 1518:
+ emit = False
+ else:
+ if kwargs[u"frame_size"] not in MIN_FRAME_SIZE_VALUES:
+ emit = False
kwargs = filter_and_edit_kwargs_for_astf(suite_id, kwargs)
if emit and kwargs is not None:
file_out.write(testcase.generate(**kwargs))
diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot
index a905373401..4f15d5c9be 100644
--- a/resources/libraries/robot/shared/interfaces.robot
+++ b/resources/libraries/robot/shared/interfaces.robot
@@ -853,3 +853,23 @@
| |
| | ${vhost_dump}= | Vhost User Dump | ${dut}
| | Return From Keyword | ${vhost_dump}
+
+| Lower DUT1-DUT2 MTU For Fragmentation
+| | [Documentation] | Set lower MTU on both ends of DUT1-DUT2 link.
+| |
+| | ... | This should force VPP to fragment (and reassembly) packets.
+| | ... | Should be called after Initialize Layer Interface.
+| | ... | Suite variables such as \${dut2_if1} should be defined by then.
+| |
+| | ... | As VPP (at least dpdk plugin) require interface to be down
+| | ... | before MTU can be changed, interfaces are temporarily downed.
+| |
+| | # TODO: ip_reassembly_set to increase max_reassembly_length so jumbo passes.
+| | Set Interface State | ${nodes['DUT1']} | ${dut1_if2} | down
+| | Set Interface State | ${nodes['DUT2']} | ${dut2_if1} | down
+| | VPP Set Interface MTU
+| | ... | ${nodes['DUT1']} | ${dut1_if2} | ${MTU_FOR_FRAGMENTATION}
+| | VPP Set Interface MTU
+| | ... | ${nodes['DUT2']} | ${dut2_if1} | ${MTU_FOR_FRAGMENTATION}
+| | Set Interface State | ${nodes['DUT1']} | ${dut1_if2} | up
+| | Set Interface State | ${nodes['DUT2']} | ${dut2_if1} | up