From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: jspewock@iol.unh.edu, wathsala.vithanage@arm.com,
alex.chapman@arm.com, Luca.Vizzarro@arm.com, probb@iol.unh.edu,
Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com,
npratte@iol.unh.edu, yoan.picchi@foss.arm.com,
thomas@monjalon.net
Cc: dev@dpdk.org
Subject: Re: [PATCH v3 1/1] dts: rework packet addressing
Date: Thu, 26 Sep 2024 14:30:59 +0200 [thread overview]
Message-ID: <51c16b44-ecd7-4a8f-85a4-296e8552eb07@pantheon.tech> (raw)
In-Reply-To: <20240925182141.15404-2-jspewock@iol.unh.edu>
> diff --git a/dts/framework/test_suite.py b/dts/framework/test_suite.py
> + def _adjust_addresses(self, packets: list[Packet], expected: bool = False) -> list[Packet]:
> + # The packet is routed from TG egress to TG ingress regardless of whether it is
> + # expected or not.
> + if ip_src_is_unset:
> + l3_to_use.src = self._tg_ip_address_egress.ip.exploded
> +
> + if ip_dst_is_unset:
> + l3_to_use.dst = self._tg_ip_address_ingress.ip.exploded
So this is where l3_to_use also appears. This could also be in the same
if branch, right? As you mentioned, ip_src_is_unset is only going to be
true in that branch.
Now that I look at it, we're mixing the update of l2 addresses (starting
with pkt_src_is_unset = "src" not in packet.fields) with l3 addresses
(starting with num_ip_layers right below that). We could first do l2
addresses, then l3 addresses. And I don't think we even need the
*_is_unset variables, they're only used once.
> + ret_packets.append(Ether(packet.build()))
>
> - return Ether(packet.build())
> + return ret_packets
>
> def verify(self, condition: bool, failure_description: str) -> None:
> """Verify `condition` and handle failures.
next prev parent reply other threads:[~2024-09-26 12:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-04 15:28 [PATCH v1 0/1] dts: adjust packet addressing and sending jspewock
2024-09-04 15:28 ` [PATCH v1 1/1] dts: add send_packets to test suites and rework packet addressing jspewock
2024-09-09 19:43 ` Dean Marx
2024-09-12 12:35 ` Patrick Robb
2024-09-20 18:08 ` [PATCH v2 0/1] dts: adjust packet addressing and sending jspewock
2024-09-20 18:08 ` [PATCH v2 1/1] dts: add send_packets to test suites and rework packet addressing jspewock
2024-09-24 14:30 ` Juraj Linkeš
2024-09-25 16:09 ` Jeremy Spewock
2024-09-26 7:52 ` Juraj Linkeš
2024-09-26 10:13 ` Juraj Linkeš
2024-09-25 18:21 ` [PATCH v3 0/1] dts: adjust " jspewock
2024-09-25 18:21 ` [PATCH v3 1/1] dts: rework " jspewock
2024-09-26 12:30 ` Juraj Linkeš [this message]
2024-09-26 17:02 ` Jeremy Spewock
2024-09-26 18:06 ` [PATCH v4 0/1] dts: adjust " jspewock
2024-09-26 18:06 ` [PATCH v4 1/1] dts: rework " jspewock
2024-09-26 18:18 ` [PATCH v5 0/2] dts: adjust packet addressing and add send_packets to test_suite jspewock
2024-09-26 18:18 ` [PATCH v5 1/2] dts: rework packet addressing jspewock
2024-09-27 9:46 ` Juraj Linkeš
2024-09-27 11:46 ` Luca Vizzarro
2024-09-26 18:18 ` [PATCH v5 2/2] dts: add send_packets to test_suite jspewock
2024-09-27 11:46 ` Luca Vizzarro
2024-09-30 13:40 ` [PATCH v5 0/2] dts: adjust packet addressing and " Juraj Linkeš
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=51c16b44-ecd7-4a8f-85a4-296e8552eb07@pantheon.tech \
--to=juraj.linkes@pantheon.tech \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=Luca.Vizzarro@arm.com \
--cc=alex.chapman@arm.com \
--cc=dev@dpdk.org \
--cc=jspewock@iol.unh.edu \
--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).