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 F1391455CA; Mon, 8 Jul 2024 21:20:10 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FFBB427B2; Mon, 8 Jul 2024 21:20:04 +0200 (CEST) Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by mails.dpdk.org (Postfix) with ESMTP id 34F58427A8 for ; Mon, 8 Jul 2024 21:20:01 +0200 (CEST) Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6ad86f3cc34so20684336d6.1 for ; Mon, 08 Jul 2024 12:20:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720466400; x=1721071200; 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=R6yZNZCI86sgnELA0h1NsY77BnYoDKBFGNKRRw5Odr8=; b=CDLX6HWk+xd31i0sr9akAU4t3hp6aDeAVWUAh7blTEa9Y5oEfrv3KlW47inXRIS+jY TUVZsTZlHOw6hY3Fhrti4kK5S3XOWA51NsVIteOLlnJzlc1rrMxisrGQfgpUBeayhl08 XxWrRplGq9X2fDQpSbnZ2BRwcpelGJNtZ1U7s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720466400; x=1721071200; 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=R6yZNZCI86sgnELA0h1NsY77BnYoDKBFGNKRRw5Odr8=; b=AjLgN1tn2yFnHyVrBMEx8mSJH/dYdFtVmih9MTWhjbWxLV2Fvx5nL/8BewYw2lfdd1 5u+WdkLBU+mmniUvGmraR4m2xhKTwIHEqYDDFtMqJ5UF6L/OXiyO4LH2E7oQBYDrEQsf /+miayXmefPFOqq9tvgdcDvGzfQYKT+n1xSQIDHM/cuxhdyACE7KF0CmlSo/ekNbjNpJ l1732H9HaKOmxESX3U356T/OENYwiJde7IPhJ4VchMu7Pgyai+dMCrBQU7FIcGjidcsn kz5tE/0OWWQmCgjk9tWFXVFAn/cAVYof4aO4xQ4mB42I4UweXYRN4WdAmtmp1NdPFYnw q8BQ== X-Gm-Message-State: AOJu0YwRvANXJNknf1gxrrNno4jP/PYxZL089JJVe68wDC6EVwfWbV2D 2AMqcvy7dhAycI4tCPVHi8PYqMrHioT9PeKh0UUU9TmfiICMP6RTh6sdoFA15+A= X-Google-Smtp-Source: AGHT+IFJ4haeaZebZHprVYMufNBLesFMHljAjmDZsMNIzz1j44ufta107S+oyTiubTIombXw8T6XQw== X-Received: by 2002:ad4:5c68:0:b0:6b5:e5bc:3d39 with SMTP id 6a1803df08f44-6b61bca3823mr8250536d6.19.1720466400447; Mon, 08 Jul 2024 12:20:00 -0700 (PDT) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b61b9d5f89sm2128796d6.34.2024.07.08.12.19.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jul 2024 12:20:00 -0700 (PDT) From: Dean Marx To: Honnappa.Nagarahalli@arm.com, juraj.linkes@pantheon.tech, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, jspewock@iol.unh.edu, bruce.richardson@intel.com, luca.vizzarro@arm.com Cc: dev@dpdk.org, Dean Marx Subject: [PATCH v2 2/4] dts: add toggle option to send and capture Date: Mon, 8 Jul 2024 15:19:36 -0400 Message-ID: <20240708191938.32132-3-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240708191938.32132-1-dmarx@iol.unh.edu> References: <20240708191938.32132-1-dmarx@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 add option to skip _adjust_addresses method in send_packet_and_capture when test cases involve sending packets with a preset MAC address. Signed-off-by: Dean Marx --- dts/framework/test_suite.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py index 694b2eba65..551a587525 100644 --- a/dts/framework/test_suite.py +++ b/dts/framework/test_suite.py @@ -185,6 +185,7 @@ def send_packet_and_capture( packet: Packet, filter_config: PacketFilteringConfig = PacketFilteringConfig(), duration: float = 1, + adjust_addresses: bool = True, ) -> list[Packet]: """Send and receive `packet` using the associated TG. @@ -195,11 +196,15 @@ def send_packet_and_capture( packet: The packet to send. filter_config: The filter to use when capturing packets. duration: Capture traffic for this amount of time after sending `packet`. + adjust_addresses: If :data:'True', adjust addresses of the egressing packet with + a default addressing scheme. If :data:'False', do not adjust the addresses of + egressing packet. Returns: A list of received packets. """ - packet = self._adjust_addresses(packet) + if adjust_addresses: + packet = self._adjust_addresses(packet) return self.tg_node.send_packet_and_capture( packet, self._tg_port_egress, -- 2.44.0