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 CE96E455CA; Mon, 8 Jul 2024 21:30:38 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6BA66427B7; Mon, 8 Jul 2024 21:30:36 +0200 (CEST) Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by mails.dpdk.org (Postfix) with ESMTP id 30237427A4 for ; Mon, 8 Jul 2024 21:30:34 +0200 (CEST) Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-6b5e4466931so19259306d6.0 for ; Mon, 08 Jul 2024 12:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1720467033; x=1721071833; 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=XNstWBHSjmGiwGllSUBP3f+y7vSKgl+1DbqRB8STYxhxknlyPtXyV6ug02DxpMSylP 93krbFguMyoyZ16Hmw/Wm0CVbaAXfxtHEQq7FPiyeRQ0VsGeahsownyBo0uPXf3Oal9d XvwhT/JmeTO92YX8GpYQDuSJ2axrM8g3eynns= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720467033; x=1721071833; 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=TnP+tW/XV31N98Gyp/nWA2IDeBPhcM/Z9ztITBVnjR+K9r3fMjPOdOeISOmJLiYKgU 2I23i3AhElj1Ts8MkYRIlT9IG0AIhGd0MQlJMzwc0bE2ZHrsPMh/k8ek3AcRRPutJAHC 0emhpctL1o1x6yVrUTp1wZ10bS5TNPR34RssLsIlrGwG9x4XOQ8udNAPeE/Z66QxUsVN ik/sZQUQJPTr1ldTVeN3tQeUpNrrYJtYb67LNQqetwyjGi9b56M3vLPCZjoLUWYch64F Bu4AuDoBddCgB574y/lo5ttBgn0MfFeMvENCorT/RtrTdqct2BvlFA2oLmFx4D85NUhe hjnw== X-Gm-Message-State: AOJu0YxE96X7x1MRrB+9Oxv/lN1t5TA55HiqfFBst4cmrM1t8IqxtDOj vUv7rN48RqvR4Kz8+/dK8M1ZSEXXhrnbPVhdiTLmd3dfYa1SogNgyGVEci+ETw8= X-Google-Smtp-Source: AGHT+IHIyBB2Jm0cGFwGooafkcnHIZHMATSvLADMEVH3n5GkNLKVRTUg5e1oBgT9+e49Sq/DnYzoCQ== X-Received: by 2002:ad4:5fc9:0:b0:6b5:e006:11ae with SMTP id 6a1803df08f44-6b61bccb55dmr9861576d6.22.1720467033473; Mon, 08 Jul 2024 12:30:33 -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-6b61ba019edsm2178226d6.61.2024.07.08.12.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jul 2024 12:30:33 -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 v3 2/4] dts: add toggle option to send and capture Date: Mon, 8 Jul 2024 15:30:10 -0400 Message-ID: <20240708193012.5465-2-dmarx@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240708193012.5465-1-dmarx@iol.unh.edu> References: <20240708191938.32132-1-dmarx@iol.unh.edu> <20240708193012.5465-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