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 A29DE455CA; Mon, 8 Jul 2024 21:09:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAAAC40ED3; Mon, 8 Jul 2024 21:09:24 +0200 (CEST) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) by mails.dpdk.org (Postfix) with ESMTP id B277840E44 for ; Mon, 8 Jul 2024 21:09:21 +0200 (CEST) Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3d92bbadfd6so1119378b6e.3 for ; Mon, 08 Jul 2024 12:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720465761; x=1721070561; 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=eRynFYSFTSNbtn+zpOFX2DiV8MRcaXGMUKw5q3SbtIu4pPBS9O/rI6JP/pY7QlVKro VAxg6LK/13Ii8NNd3qu4gm/QWiAAAD4mJiNuSyWx64w0rE1Inzaq8/qPN0Lwj94rtch1 L1IbO9vpELwwBWS5biVNhKtPKEP7T5+Aec0vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720465761; x=1721070561; 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=rj9UtgSv/6LIjU/L6LFXxkmbfk8ruVknh5At7VBjoNBAn9tDtLr3IROM0KXGkGvy1Z C7sN/mbyVfoFOlDD7YNzUUW9GsxpnDDidkJr0FTS0ztJEFzb+RANf4WSutjHE+I/upxb OKgQxDspDcJrjPnsiYiQpF/fyC/8lWLSMPWTSdae7a12AHa+fWSsydIX8Ku3IuSJhmQO PoBRvVw+1F6wtFsBSzKJOnVi2gKsVn6uiZEsJ+SA5QWqGG89FCkqCxd0VYA3nadOISrR LBQV1gua8i+IMWKymgXVKUNWIxwnOv9ByMejiOoEgeMkFOf5iaSLWL7ld2k9yT4P7KaU rK7g== X-Gm-Message-State: AOJu0YyFGngne1k/11rr99J8xmqVb2mYgiEhllzY64aMTOYFMMMNVCBo nspn/F/WgplCbgACa/vcTs1Ir1k9Wdug2iARPJWhfqIfpUjYQMoO8AbkvpOhkbEweJRJNALNHhf N X-Google-Smtp-Source: AGHT+IFnMkTmxjSKe9MDywGMMuRYJLlOmNXQy5Gx/L792i9G5pzUXx5LUt3vFQzKuG8jaC3UVLlBHA== X-Received: by 2002:a05:6808:14d2:b0:3d9:2d78:d4c4 with SMTP id 5614622812f47-3d93bee9d69mr400630b6e.6.1720465760934; Mon, 08 Jul 2024 12:09:20 -0700 (PDT) Received: from dean-laptop.iol.unh.edu ([2606:4100:3880:1271:f9bd:24da:464d:6294]) by smtp.gmail.com with ESMTPSA id af79cd13be357-79f18ff6762sm19655885a.10.2024.07.08.12.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jul 2024 12:09:20 -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: dts: add toggle option to send and capture Date: Mon, 8 Jul 2024 15:08:56 -0400 Message-ID: <20240708190858.26583-3-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240708190858.26583-1-dmarx@iol.unh.edu> References: <20240708190858.26583-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