On Tue, Mar 26, 2024 at 8:04 PM Luca Vizzarro <luca.vizza...@arm.com> wrote: > > Update the buffer scatter test suite to use TestPmdParameters > instead of the StrParams implementation. > > Signed-off-by: Luca Vizzarro <luca.vizza...@arm.com> > Reviewed-by: Jack Bond-Preston <jack.bond-pres...@arm.com> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com> > --- > dts/tests/TestSuite_pmd_buffer_scatter.py | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/dts/tests/TestSuite_pmd_buffer_scatter.py > b/dts/tests/TestSuite_pmd_buffer_scatter.py > index 4cdbdc4272..c6d313fc64 100644 > --- a/dts/tests/TestSuite_pmd_buffer_scatter.py > +++ b/dts/tests/TestSuite_pmd_buffer_scatter.py > @@ -23,7 +23,11 @@ > from scapy.utils import hexstr # type: ignore[import] > > from framework.params import StrParams > -from framework.remote_session.testpmd_shell import TestPmdForwardingModes, > TestPmdShell > +from framework.remote_session.testpmd_shell import ( > + TestPmdForwardingModes, > + TestPmdShell, > + TestPmdParameters, > +) > from framework.test_suite import TestSuite > > > @@ -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. If not, we should remove the testpmd.set_forward_mode method, as it's not used anymore. > testpmd.start() > > for offset in [-1, 0, 1, 4, 5]: > -- > 2.34.1 >