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 5861F45A2C; Wed, 25 Sep 2024 20:36:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2872540270; Wed, 25 Sep 2024 20:36:33 +0200 (CEST) Received: from mail-il1-f231.google.com (mail-il1-f231.google.com [209.85.166.231]) by mails.dpdk.org (Postfix) with ESMTP id 5F01C4025D for ; Wed, 25 Sep 2024 20:36:32 +0200 (CEST) Received: by mail-il1-f231.google.com with SMTP id e9e14a558f8ab-3a2761f1227so679845ab.0 for ; Wed, 25 Sep 2024 11:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1727289391; x=1727894191; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IlXJujXx4hLnYuR/G3wovnr114T734jNe7SjGqM+Mms=; b=c5lFTQFTZsOHf0zAT/WMmIftaaYSjRwA/nyo/o2o8LRTIDnpVOXrP2fUuIO3O1S/T5 5uGxYLKhGexWOdgko+EpVG5TZQnBA8Kh1h0ZReZGFG3dPG41NYi4NIiVsiNvSqCSi1T8 ZE+BwceScuuV7eROuB4IIjWNYBd8ovoQEBVdU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727289391; x=1727894191; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IlXJujXx4hLnYuR/G3wovnr114T734jNe7SjGqM+Mms=; b=Gi1JE25ZSXIs4Y3GYPyujSR+on0N3pjmcUwgSP2YJY1tPnON7cMWOerv69oIvOu3aj 3+XIDhgZuHzMtQX9nAUSkko+Gufk2sVVyanYm+Q+XvEmxeJOFQFkDRLy2wEOQS7p7k1X HDX8dP5uTxTHl+slZtqLsgfhbF1ifGuyINx264uaX/BnIHouI5Mq4jhTPt5Gsbimu9jG biJIcz/EJaVHZ9M+p5QwH9mavsdLd6VgCE2I9YD+nqg043sLmUL60su0SsOevd2K/WKU 6CpdG35wHePlRG2IXFpZJZSiQfQb79+MVFq6dYjIKNEBZheRVRbPgrOoNEopmDEzsb8a D8Og== X-Gm-Message-State: AOJu0YyFN2fiGWUSC1Muv/h569+qthjUJdGOals09DY7EeDmBxI/Ixs4 CYMXIaJAN1aNNGGiVzl4UvcIpC46kY3LOujVdNGWipPHAnnLDOJA2LyJ4Q0566QknnrojBjnpiE DdiS6iLOFxKaq6JUclwjIFXg29oEB3QRif95AF7SvzUfvtTw2 X-Google-Smtp-Source: AGHT+IESEn+4X88WEvECZ6OcOEncYGRbILw3eiZq5FVZ2T5LpK8FHh9NnIBDk0RskseQWXxPQOP4bkZsuxHL X-Received: by 2002:a92:cd8f:0:b0:39f:797a:65f8 with SMTP id e9e14a558f8ab-3a26d7a2defmr44417185ab.19.1727289391569; Wed, 25 Sep 2024 11:36:31 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id e9e14a558f8ab-3a1a66efbd6sm1512945ab.29.2024.09.25.11.36.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2024 11:36:31 -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 5A13C605C351; Wed, 25 Sep 2024 14:36:30 -0400 (EDT) From: jspewock@iol.unh.edu To: probb@iol.unh.edu, juraj.linkes@pantheon.tech, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, thomas@monjalon.net, wathsala.vithanage@arm.com, Honnappa.Nagarahalli@arm.com, alex.chapman@arm.com, Luca.Vizzarro@arm.com, npratte@iol.unh.edu Cc: dev@dpdk.org, Jeremy Spewock Subject: [PATCH v1] dts: add send_packets to test_suite Date: Wed, 25 Sep 2024 14:36:25 -0400 Message-ID: <20240925183625.15930-1-jspewock@iol.unh.edu> X-Mailer: git-send-email 2.46.0 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 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. Depends-on: patch-144440 ("dts: rework packet addressing") Signed-off-by: Jeremy Spewock --- 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 69388ff5ab..8945663bae 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