On 09/04/2024 20:12, Juraj Linkeš wrote:
@@ -104,16 +108,15 @@ def pmd_scatter(self, mbsize: int) -> None:
"""
testpmd = self.sut_node.create_interactive_shell(
TestPmdShell,
- app_parameters=StrParams(
- "--mbcache=200 "
- f"--mbuf-size={mbsize} "
- "--max-pkt-len=9000 "
- "--port-topology=paired "
- "--tx-offloads=0x00008000"
+ app_parameters=TestPmdParameters(
+ forward_mode=TestPmdForwardingModes.mac,
+ mbcache=200,
+ mbuf_size=[mbsize],
+ max_pkt_len=9000,
+ tx_offloads=0x00008000,
),
privileged=True,
)
- testpmd.set_forward_mode(TestPmdForwardingModes.mac)
Jeremy, does this change the test? Instead of configuring the fw mode
after starting testpmd, we're starting testpmd with fw mode
configured.
I am not Jeremy (please Jeremy still reply), but we discussed this on
Slack. Reading through the testpmd source code, setting arguments like
forward-mode in the command line, is the exact equivalent of calling
`set forward mode` right after start-up. So it is equivalent in theory.
If not, we should remove the testpmd.set_forward_mode method, as it's
not used anymore.
Could there be test cases that change the forward mode multiple times in
the same shell, though? As this could still be needed to cover this.