DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dean Marx <dmarx@iol.unh.edu>
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 <dmarx@iol.unh.edu>
Subject: [PATCH v2 2/4] dts: add toggle option to send and capture
Date: Mon,  8 Jul 2024 15:19:36 -0400	[thread overview]
Message-ID: <20240708191938.32132-3-dmarx@iol.unh.edu> (raw)
In-Reply-To: <20240708191938.32132-1-dmarx@iol.unh.edu>

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 <dmarx@iol.unh.edu>
---
 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


  parent reply	other threads:[~2024-07-08 19:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 19:19 [PATCH v2 0/4] dts: initial dynamic config suite Dean Marx
2024-07-08 19:19 ` [PATCH v2 1/4] dts: add multicast set function to shell Dean Marx
2024-07-10 16:44   ` Jeremy Spewock
2024-07-08 19:19 ` Dean Marx [this message]
2024-07-08 19:19 ` [PATCH v2 3/4] dts: dynamic config conf schema Dean Marx
2024-07-08 19:19 ` [PATCH v2 4/4] dts: dynamic config test suite Dean Marx
2024-07-08 19:30 ` [PATCH v3 1/4] dts: add multicast set function to shell Dean Marx
2024-07-08 19:30   ` [PATCH v3 2/4] dts: add toggle option to send and capture Dean Marx
2024-07-10 16:13     ` Jeremy Spewock
2024-07-08 19:30   ` [PATCH v3 3/4] dts: dynamic config conf schema Dean Marx
2024-07-10 16:45     ` Jeremy Spewock
2024-07-08 19:30   ` [PATCH v3 4/4] dts: dynamic config test suite Dean Marx
2024-07-10 16:45     ` Jeremy Spewock
2024-07-15 16:00 ` [PATCH v4 1/3] dts: add multicast set function to shell Dean Marx
2024-07-15 16:00   ` [PATCH v4 2/3] dts: dynamic config conf schema Dean Marx
2024-07-15 20:22     ` Jeremy Spewock
2024-07-15 16:00   ` [PATCH v4 3/3] dts: dynamic config test suite Dean Marx
2024-07-15 20:22     ` Jeremy Spewock
2024-07-15 20:22   ` [PATCH v4 1/3] dts: add multicast set function to shell Jeremy Spewock
2024-07-24 19:21 ` [PATCH v5 0/3] dts: refactored dynamic config test suite Dean Marx
2024-07-24 19:21   ` [PATCH v5 1/3] dts: add multicast set function to shell Dean Marx
2024-08-07 15:50     ` Luca Vizzarro
2024-07-24 19:21   ` [PATCH v5 2/3] dts: dynamic config conf schema Dean Marx
2024-07-26 19:35     ` Jeremy Spewock
2024-08-07 15:56     ` Luca Vizzarro
2024-07-24 19:21   ` [PATCH v5 3/3] dts: dynamic config test suite Dean Marx
2024-07-26 19:35     ` Jeremy Spewock
2024-08-07 19:18   ` [PATCH v6 0/2] dts: refactored " Dean Marx
2024-08-07 19:18     ` [PATCH v6 1/2] dts: add multicast set function to shell Dean Marx
2024-08-07 19:18     ` [PATCH v6 2/2] dts: dynamic config test suite Dean Marx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240708191938.32132-3-dmarx@iol.unh.edu \
    --to=dmarx@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jspewock@iol.unh.edu \
    --cc=juraj.linkes@pantheon.tech \
    --cc=luca.vizzarro@arm.com \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=yoan.picchi@foss.arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).