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 191A945A3C; Thu, 26 Sep 2024 22:40:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73B56402E6; Thu, 26 Sep 2024 22:39:53 +0200 (CEST) Received: from mail-yw1-f225.google.com (mail-yw1-f225.google.com [209.85.128.225]) by mails.dpdk.org (Postfix) with ESMTP id EF4784027D for ; Thu, 26 Sep 2024 22:39:50 +0200 (CEST) Received: by mail-yw1-f225.google.com with SMTP id 00721157ae682-6d6891012d5so14098257b3.2 for ; Thu, 26 Sep 2024 13:39:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1727383190; x=1727987990; 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=Xi3m5WSlQa//I5pXhV9HE1jjguogKGExKER2FZWFUs9DeHCFAfZKrxlmJ31htNBLel jqEEktVf3/+QqD3gKs4UJle8fhr6ywiuBRc0RPkm7jNR5swznVFR2TYzPVPqa4rMSuV7 jnddvD+cGAPzaBM/AXRTeDawWvSUm+Z+njLOw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727383190; x=1727987990; 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=ApAXvLJH4bxDznkSSqNS4v5aIGgm1Zq3fpF5XcK14IBdZyKQlwyXhSdJf8uXXFbNx1 /GxyElT20ae2/TmieBVREDnrbVHW5nqdZTdANmCFy2JDu8CENXJPOzNN5czo3Fwn/THK 5EHYqNCAa+5OunUcuDwJxI2rGkRinV73xy6QLokUVnJ87NGGoD4nbrNlxkDTPnOo0Z2e oRyriBlliN2zwFbnklVBHbSdLMQndNBnYqzHMjlQWemCwsYibDqOEUmSZIbJq2KthrTY Ll5ruzaHI8dC5hdSrA4SB0CMOYeVMCAuJWq+w9UlKa5RfeEwQORiByOoaQ4obrKiv/fc 7YEg== X-Gm-Message-State: AOJu0Ywj91Nhtw32NP4U4htqsdEREtewO7rCFLTzAW7zzWOuT40ytAjv 6i8N+5EmXdX20nrcEz/EC9zjtfPOARyhvo3Nk5VlJL2zRg9nMWqcDhRl/0c2zI51kfXSkQkjRiz zhJMGy72aaGw57Qa27lnUjN2uBeb6mked X-Google-Smtp-Source: AGHT+IFXzGZUZ4+yrxi6sqXTnVvLwRRiS92Bex+OvlTSgyV4JXHaa6LgEkzPAgSTevDyamL9IEESgNPNGNsX X-Received: by 2002:a05:690c:12:b0:6d3:f283:8550 with SMTP id 00721157ae682-6e247600468mr7706777b3.28.1727383190235; Thu, 26 Sep 2024 13:39:50 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id 00721157ae682-6e245500649sm194757b3.32.2024.09.26.13.39.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Sep 2024 13:39:50 -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 9787C605C352; Thu, 26 Sep 2024 16:39:48 -0400 (EDT) From: jspewock@iol.unh.edu To: npratte@iol.unh.edu, paul.szczepanek@arm.com, wathsala.vithanage@arm.com, thomas@monjalon.net, probb@iol.unh.edu, Luca.Vizzarro@arm.com, yoan.picchi@foss.arm.com, alex.chapman@arm.com, Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v2 2/3] dts: parameterize ports used in pf_smoke suite Date: Thu, 26 Sep 2024 16:39:27 -0400 Message-ID: <20240926203928.19881-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926203928.19881-1-jspewock@iol.unh.edu> References: <20240906173709.17487-1-jspewock@iol.unh.edu> <20240926203928.19881-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