From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A987645920; Fri, 6 Sep 2024 19:37:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F07042FD9; Fri, 6 Sep 2024 19:37:42 +0200 (CEST) Received: from mail-pl1-f228.google.com (mail-pl1-f228.google.com [209.85.214.228]) by mails.dpdk.org (Postfix) with ESMTP id 8EDB642FD1 for ; Fri, 6 Sep 2024 19:37:41 +0200 (CEST) Received: by mail-pl1-f228.google.com with SMTP id d9443c01a7336-2068acc8b98so21686515ad.3 for ; Fri, 06 Sep 2024 10:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1725644260; x=1726249060; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sU2t3JJqc53mLZ1dPqVxaDxukj9ROPqr89ssCppK60s=; b=Nr+HHNmASAVH7z9xaQCg4Vf9RkzZenUxcpQkzc8fCTb04T5p0eKfBgaYtsXfA7pPoG MiJNtrO8WHjIu+cK6x2wiORplQT+0GtqUnBxLtl2j3a4VGfVsapJcy6eOYjiu8Ep7GKM M7s9gxxlUX11LebE7Sft0yB9hqCp2TUBJuCOA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725644260; x=1726249060; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sU2t3JJqc53mLZ1dPqVxaDxukj9ROPqr89ssCppK60s=; b=o28yQU2pP+fzE30Vw80+cGFGXfKQL9GGK0CP7sNX1SQSXluISuZMVM7LieyRuf74oi axivMUkjdVcp8dZY7Gx05tv/yS6I2TsSwlky6+qExPY9ZepJy0O77T3cjmQ5IwxNZdLX lcqlhMMZ6kfHdcWOOOL4N1yjR+QCFRKVFE6CnDqDzaL+pPtwxUZCSWC6hANqrzd+f3iZ phDALZXRsmTk/mZ37iOJQ9JfJIw5xDtGSeSlIeQ04S0u1JkyjA7iaxlC4HSPCCb/Ev6x 227DQ+aqCNAd40jYTyaL/BCTUc3Sql0GlasHhU9DP+ZkZED0p2bFMr9cw1fPhC8LBuP0 R5qQ== X-Gm-Message-State: AOJu0YzIe/qenmnWck8RdIf+F9fCwEYr2t5bNrlGsZ0RZB0a/vErE4yg LIIW4wKBELlZtzFizy8uxR2hTYzkua+m+5uGypqC3SlwJcO6CLJ5cBtg69Io2E7DVwvLHxzN+u2 70M2jsi1FSlvQiIGCOvYVX8lUgon6uEuM X-Google-Smtp-Source: AGHT+IFLiiHMS89uMMUl76QeSFyccNMpz7b+YDnxLQQTNLBrjJRzAN9jiL2mLSGfVbLfTuLTQo+K29crKluS X-Received: by 2002:a17:902:f54e:b0:206:c776:4f01 with SMTP id d9443c01a7336-206c776537emr73176785ad.42.1725644260596; Fri, 06 Sep 2024 10:37:40 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id d9443c01a7336-206ae8d1247sm2997425ad.50.2024.09.06.10.37.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Sep 2024 10:37:40 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Received: from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::1083]) by postal.iol.unh.edu (Postfix) with ESMTP id 119816050A73; Fri, 6 Sep 2024 13:37:39 -0400 (EDT) From: jspewock@iol.unh.edu To: npratte@iol.unh.edu, thomas@monjalon.net, alex.chapman@arm.com, probb@iol.unh.edu, wathsala.vithanage@arm.com, Luca.Vizzarro@arm.com, Honnappa.Nagarahalli@arm.com, yoan.picchi@foss.arm.com, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v1 2/3] dts: parameterize ports used in pf_smoke suite Date: Fri, 6 Sep 2024 13:37:08 -0400 Message-ID: <20240906173709.17487-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240906173709.17487-1-jspewock@iol.unh.edu> References: <20240906173709.17487-1-jspewock@iol.unh.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Jeremy Spewock Currently the pf_smoke testing suite only uses the default ports for sending and receiving packets. When looking at that suite in isolation, this is fine since its primary goal is to test the physical functions in the test run (which the defaults should represent). However, since this suite represents the same coverage that should be tested on VFs, it makes sense to parameterize the ports that are in use in the suite so that the same test cases can be used for testing VFs. Signed-off-by: Jeremy Spewock --- dts/tests/TestSuite_pf_smoke_tests.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/dts/tests/TestSuite_pf_smoke_tests.py b/dts/tests/TestSuite_pf_smoke_tests.py index 287132e9dd..984a193e8b 100644 --- a/dts/tests/TestSuite_pf_smoke_tests.py +++ b/dts/tests/TestSuite_pf_smoke_tests.py @@ -18,6 +18,7 @@ from framework.params.testpmd import SimpleForwardingModes from framework.remote_session.testpmd_shell import TestPmdShell from framework.test_suite import TestSuite +from framework.testbed_model.port import Port class TestPfSmokeTests(TestSuite): @@ -35,6 +36,8 @@ class TestPfSmokeTests(TestSuite): is_blocking: ClassVar[bool] = True jumbo_frame_len: ClassVar[int] = 9000 num_queues: int = 4 + sut_egress_port: Port | None = None + sut_ingress_port: Port | None = None def set_up_suite(self) -> None: """Increase the MTU of the traffic generator to support jumboframes.""" @@ -48,12 +51,17 @@ def test_jumbo_frame_support(self) -> None: max_pkt_len=self.jumbo_frame_len, mbuf_size=[self.jumbo_frame_len + 128], forward_mode=SimpleForwardingModes.mac, + ports=[self.sut_egress_port, self.sut_ingress_port] + if self.sut_egress_port is not None and self.sut_ingress_port is not None + else None, ) as testpmd: testpmd.start() # Take 26 bytes off the MTU size to account for Ethernet headers payload_len = self.jumbo_frame_len - 26 packet = Ether() / Raw("X" * payload_len) - recv = self.send_packet_and_capture(packet) + recv = self.send_packet_and_capture( + packet, sut_ingress=self.sut_ingress_port, sut_egress=self.sut_egress_port + ) self.verify( any(hasattr(p, "load") and "X" * 20 in str(p.load) for p in recv), f"Jumboframe was not received even when MTU was set to {self.jumbo_frame_len}.", @@ -73,6 +81,9 @@ def test_rss_functionality(self) -> None: forward_mode=SimpleForwardingModes.rxonly, rx_queues=self.num_queues, tx_queues=self.num_queues, + ports=[self.sut_egress_port, self.sut_ingress_port] + if self.sut_egress_port is not None and self.sut_ingress_port is not None + else None, ) as testpmd: testpmd.set_verbose(1) src_max = "00:00:00:00:00:01" @@ -80,7 +91,7 @@ def test_rss_functionality(self) -> None: Ether(src=src_max) / IP(dst=f"192.168.0.{i+1}") for i in range(self.num_queues * 4) ] testpmd.start() - self.send_packets(send_pkts) + self.send_packets(send_pkts, sut_ingress=self.sut_ingress_port) verbose_stats = TestPmdShell.extract_verbose_output(testpmd.stop()) # Filter down the packets to only the ones with the correct source MAC verbose_stats = list(filter(lambda x: x.src_mac == src_max, verbose_stats)) @@ -105,7 +116,12 @@ def test_rss_functionality(self) -> None: def test_runtime_modify_num_queues(self) -> None: """Ensure that the number of queues on a port can be changed at runtime.""" with TestPmdShell( - self.sut_node, rx_queues=self.num_queues, tx_queues=self.num_queues + self.sut_node, + rx_queues=self.num_queues, + tx_queues=self.num_queues, + ports=[self.sut_egress_port, self.sut_ingress_port] + if self.sut_egress_port is not None and self.sut_ingress_port is not None + else None, ) as testpmd: try: testpmd.set_num_queues_all(2, True, verify=True) -- 2.46.0