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 99BBC45A3B; Thu, 26 Sep 2024 20:18:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9227C40DFD; Thu, 26 Sep 2024 20:18:38 +0200 (CEST) Received: from mail-ot1-f101.google.com (mail-ot1-f101.google.com [209.85.210.101]) by mails.dpdk.org (Postfix) with ESMTP id EDCE440672 for ; Thu, 26 Sep 2024 20:18:34 +0200 (CEST) Received: by mail-ot1-f101.google.com with SMTP id 46e09a7af769-710daaadd9bso729609a34.2 for ; Thu, 26 Sep 2024 11:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1727374714; x=1727979514; 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=VGI4I+5Rl6Xb1ZHf4zPy2sSZ90u6jSsCtyLRIaBkMLI=; b=YZBdw456MYkpE6QjZVOsT361wvqslHfClgg337bl5oIX+7/+5prDkBxdv3zSRpPFTm MhsK/tIS1upy179G7rt18XWG6KuYKFiubm1kAMVEqC5oP4ObJIdBbEjzzl+e+fWXbokH PX6MRWoZe5GD0lrI7wn5Bv6o7MOA/mbNhUIyw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727374714; x=1727979514; 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=VGI4I+5Rl6Xb1ZHf4zPy2sSZ90u6jSsCtyLRIaBkMLI=; b=i8FJXJigq+hwcX2ArVCubR0N3//lOIPMn0VUp/FQSwFJh0esa2NzC7wEDAQCZ8vbAh 3YHH0kNLG8gJu5RzFd6M9U4WFw+NEr7JcAbsvS0sB8T8mOE3i/jiTH/XI8VsXm6Jy/8+ DeNHPHc03hVqIGZGf22Is1Cvhhqjj2GeVRJSGCtedhSzQfYa5o2esFR/K2EfrAen+wQG rP1STGHMgShsjaYHQLyZz6g9OFvCcC5IR7i/vJeKuS+md/pypejy5aqI0oFTHs9UFfIe 3EMa1SPP6wSeo0I+2wxJSk2AoS4xiqOup3Lj/GFMfIa8/J61UH6ACgNjWeZ+722y6mI4 4eRA== X-Gm-Message-State: AOJu0YyT72YYX48aq8spbfKmK3SKlcdnal5pRyBcpBNQhauxTZz4X4QP 6efXOlsmNzsQeyzgJiwcINipsCfQJfiol2+rXSGpTAEjjGZZrjGYSJgdSx0PLLDx7+c33PBA+ZU kR6w5Ulp3roup1A+Su4aohxkBH7lcdXp3 X-Google-Smtp-Source: AGHT+IGX6+obb2cLnJdbQKk6tDahF8Rpo79nJ2SWRLcyRaGQQ8KO0cQ84fE0Zg3yl7P483hSF2fSEL9Xyhpv X-Received: by 2002:a05:6830:3592:b0:710:fae8:fcae with SMTP id 46e09a7af769-714fbe908cbmr460303a34.18.1727374714194; Thu, 26 Sep 2024 11:18:34 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id 46e09a7af769-714fb6663fdsm24051a34.5.2024.09.26.11.18.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Sep 2024 11:18:34 -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 16B986050A6B; Thu, 26 Sep 2024 14:18:32 -0400 (EDT) From: jspewock@iol.unh.edu To: alex.chapman@arm.com, wathsala.vithanage@arm.com, thomas@monjalon.net, probb@iol.unh.edu, juraj.linkes@pantheon.tech, Honnappa.Nagarahalli@arm.com, Luca.Vizzarro@arm.com, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v5 2/2] dts: add send_packets to test_suite Date: Thu, 26 Sep 2024 14:18:28 -0400 Message-ID: <20240926181828.15037-3-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240926181828.15037-1-jspewock@iol.unh.edu> References: <20240904152827.11914-1-jspewock@iol.unh.edu> <20240926181828.15037-1-jspewock@iol.unh.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 only methods provided in the test suite class for sending packets capture the resulting received traffic after sending. There is, in some cases, a need to send multiple packets at once while not really needing to capture any of said received traffic. It is favorable to avoid capturing received traffic when you don't need it since not all traffic generators will necessarily be capturing traffic generators. The method to fulfill this need exists in the traffic generator already, but this patch exposes the method to test suites. Signed-off-by: Jeremy Spewock Reviewed-by: Juraj Linkeš Reviewed-by: Patrick Robb --- dts/framework/test_suite.py | 12 ++++++++++++ dts/framework/testbed_model/tg_node.py | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py index b2d8de99e7..159071d0e2 100644 --- a/dts/framework/test_suite.py +++ b/dts/framework/test_suite.py @@ -234,6 +234,18 @@ def send_packets_and_capture( duration, ) + def send_packets( + self, + packets: list[Packet], + ) -> None: + """Send packets using the traffic generator and do not capture received traffic. + + Args: + packets: Packets to send. + """ + packets = self._adjust_addresses(packets) + self.tg_node.send_packets(packets, self._tg_port_egress) + def get_expected_packet(self, packet: Packet) -> Packet: """Inject the proper L2/L3 addresses into `packet`. diff --git a/dts/framework/testbed_model/tg_node.py b/dts/framework/testbed_model/tg_node.py index 19b5b6e74c..4179365abb 100644 --- a/dts/framework/testbed_model/tg_node.py +++ b/dts/framework/testbed_model/tg_node.py @@ -83,6 +83,15 @@ def send_packets_and_capture( duration, ) + def send_packets(self, packets: list[Packet], port: Port): + """Send packets without capturing resulting received packets. + + Args: + packets: Packets to send. + port: Port to send the packets on. + """ + self.traffic_generator.send_packets(packets, port) + def close(self) -> None: """Free all resources used by the node. -- 2.46.0