DPDK patches and discussions
 help / color / mirror / Atom feed
From: jspewock@iol.unh.edu
To: npratte@iol.unh.edu, thomas@monjalon.net, alex.chapman@arm.com,
	probb@iol.unh.edu, wathsala.vithanage@arm.com,
	Luca.Vizzarro@arm.com, Honnappa.Nagarahalli@arm.com,
	yoan.picchi@foss.arm.com, paul.szczepanek@arm.com,
	juraj.linkes@pantheon.tech
Cc: dev@dpdk.org, Jeremy Spewock <jspewock@iol.unh.edu>
Subject: [PATCH v1 1/3] dts: allow specifying ingress port in send_packets
Date: Fri,  6 Sep 2024 13:37:07 -0400	[thread overview]
Message-ID: <20240906173709.17487-2-jspewock@iol.unh.edu> (raw)
In-Reply-To: <20240906173709.17487-1-jspewock@iol.unh.edu>

From: Jeremy Spewock <jspewock@iol.unh.edu>

In order to use VFs in the framework, methods for sending packets had to
be modified so that they support choosing which ports to use when
sending and receiving. This patch creates the same support for the
send_packets method so that it can be used with VFs.

Signed-off-by: Jeremy Spewock <jspewock@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 b17f0c04b2..6490500610 100644
--- a/dts/framework/test_suite.py
+++ b/dts/framework/test_suite.py
@@ -221,13 +221,18 @@ def send_packet_and_capture(
     def send_packets(
         self,
         packets: list[Packet],
+        sut_ingress: Port | None = None,
     ) -> None:
         """Send packets using the traffic generator and do not capture received traffic.
 
         Args:
             packets: Packets to send.
+            sut_ingress: Optional port to use as the SUT ingress port. Defaults to
+                `self._sut_port_ingress`.
         """
-        packets = self._adjust_addresses(packets)
+        if sut_ingress is None:
+            sut_ingress = self._sut_port_ingress
+        packets = self._adjust_addresses(packets, sut_ingress, self._sut_port_egress)
         self.tg_node.send_packets(packets, self._tg_port_egress)
 
     def get_expected_packet(
-- 
2.46.0


  reply	other threads:[~2024-09-06 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-06 17:37 [PATCH v1 0/3] dts: port vf_smoke to new DTS jspewock
2024-09-06 17:37 ` jspewock [this message]
2024-09-06 17:37 ` [PATCH v1 2/3] dts: parameterize ports used in pf_smoke suite jspewock
2024-09-06 17:37 ` [PATCH v1 3/3] dts: add vf_smoke tests suite jspewock

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=20240906173709.17487-2-jspewock@iol.unh.edu \
    --to=jspewock@iol.unh.edu \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Luca.Vizzarro@arm.com \
    --cc=alex.chapman@arm.com \
    --cc=dev@dpdk.org \
    --cc=juraj.linkes@pantheon.tech \
    --cc=npratte@iol.unh.edu \
    --cc=paul.szczepanek@arm.com \
    --cc=probb@iol.unh.edu \
    --cc=thomas@monjalon.net \
    --cc=wathsala.vithanage@arm.com \
    --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).