From: Dean Marx <dmarx@iol.unh.edu>
To: Patrick Robb <probb@iol.unh.edu>
Cc: luca.vizzarro@arm.com, yoan.picchi@foss.arm.com,
Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com,
dev@dpdk.org
Subject: Re: [PATCH v3 2/2] dts: add QinQ test suite
Date: Thu, 13 Nov 2025 13:59:04 -0500 [thread overview]
Message-ID: <CABD7UXNWR-WY+Oe_JFSCXWfB-vGxQy1=68nDRxH4_x-hHQD0Ng@mail.gmail.com> (raw)
In-Reply-To: <CAJvnSUDywCd9cdjWtpGjpkdB0Mk-dYs+bmra_CKKNhkD6Q44Mg@mail.gmail.com>
On Fri, Nov 7, 2025 at 3:15 PM Patrick Robb <probb@iol.unh.edu> wrote:
<snip>
>
> The testcase does look good except that form what I'm seeing, vlan_filter is not supported for 88a8 + 8100 packets (it won't read the 88a8 tag). I sent Bruce and Morten an email about it. But, I think the most reasonable thing is to remove this testcase for the 25.11 release since the expected behavior is either not well defined, or vlan_filter is not supposed to be able to read 88a8 tags.
Agreed, I'll remove this in the new version
<snip>
>> +
>> + verify(packet is not None, "Packet was dropped when it should have been received.")
>> +
>> + if packet is not None:
>> + verify(bool(packet.haslayer(Dot1AD)), "QinQ layer not found in packet")
>
>
> I guess you can also verify that packet haslayer(Dot1Q)
Great point, I hadn't realized the final if statement could be
silently failing if the Dot1Q layer doesn't exist. I'll update this
<snip>
>> + received_packets1 = send_packet_and_capture(test_packets[0])
>> + packet1 = self._get_relevant_packet(received_packets1)
>> + received_packets2 = send_packet_and_capture(test_packets[1])
>> + packet2 = self._get_relevant_packet(received_packets2)
>> + received_packets3 = send_packet_and_capture(test_packets[2])
>> + packet3 = self._get_relevant_packet(received_packets3)
>> + received_packets4 = send_packet_and_capture(test_packets[3])
>> + packet4 = self._get_relevant_packet(received_packets4)
>
>
> rename to make them more descriptive? I.e. vlan_packet, 2_vlan_packet, qinq_packet, qinq_vlan_packet? Or similar.
Got it
>
>>
>> +
>> + testpmd.stop()
>> +
>> + tests = [
>> + ("Single 8100 tag", self._strip_verify(packet1, False, "Single 8100 tag")),
>> + (
>> + "Double 8100 tag",
>> + self._strip_verify(packet2, True, "Double 8100 tag"),
>> + ),
>> + ("Single 88a8 tag", self._strip_verify(packet3, False, "Single 88a8 tag")),
>> + (
>> + "QinQ (88a8 and 8100 tags)",
>> + self._strip_verify(packet4, False, "QinQ (88a8 and 8100 tags)"),
>> + ),
>> + ]
>
>
> this is good for testing behavior when we have both vlan_strip and qinq_strip enabled. What about when we have only vlan_strip enabled or only qinq_strip enabled? I.e. when we have only vlan_strip enabled, and we send an 88a8 only packet, nothing should get stripped at all. It probably makes sense to have different testcases for vlan strip, qinq_strip, and vlan_strip + qinq_strip.
My logic here was that vlan strip only is being tested in the vlan
suite already, even if it isn't with this set of QinQ style packets. I
think it would make more sense to add those extra cases in the vlan
suite in the future anyways, rather than in the QinQ suite.
I didn't test only qinq strip either because Stephen Hemminger
mentioned it was undefined in this email thread (second message):
https://mail.google.com/mail/u/0/#search/label%3Adev+qinq/FMfcgzQbgJNPMqLMRLkTsrxMrfRjJLzq
>
>>
>> +
>> + failed = [ctx for ctx, result in tests if not result]
>> +
>> + verify(
>> + not failed,
>> + f"The following packets were not stripped correctly: {', '.join(failed)}",
>> + )
>> --
>> 2.51.0
>>
>
> Reviewed-by: Patrick Robb <probb@iol.unh.edu>
next prev parent reply other threads:[~2025-11-13 18:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 18:41 [RFC PATCH 0/2] add qinq " Dean Marx
2025-06-05 18:41 ` [RFC PATCH 1/2] dts: add qinq strip and VLAN extend to testpmd shell Dean Marx
2025-07-17 20:57 ` [PATCH v1 " Dean Marx
2025-07-17 20:57 ` [PATCH v1 2/2] dts: add qinq test suite Dean Marx
2025-07-30 13:19 ` Luca Vizzarro
2025-07-30 11:33 ` [PATCH v1 1/2] dts: add qinq strip and VLAN extend to testpmd shell Luca Vizzarro
2025-10-17 20:31 ` [PATCH v2 1/2] dts: add QinQ " Dean Marx
2025-10-17 20:31 ` [PATCH v2 2/2] dts: add QinQ test suite Dean Marx
2025-10-24 18:16 ` [PATCH v3 1/2] dts: add QinQ strip and VLAN extend to testpmd shell Dean Marx
2025-10-24 18:16 ` [PATCH v3 2/2] dts: add QinQ test suite Dean Marx
2025-11-07 20:14 ` Patrick Robb
2025-11-13 18:59 ` Dean Marx [this message]
2025-11-13 19:03 ` [PATCH v4 1/2] dts: add QinQ strip and VLAN extend to testpmd shell Dean Marx
2025-11-13 19:03 ` [PATCH v4 2/2] dts: add QinQ test suite Dean Marx
2025-06-05 18:41 ` [RFC PATCH 2/2] dts: add qinq " 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='CABD7UXNWR-WY+Oe_JFSCXWfB-vGxQy1=68nDRxH4_x-hHQD0Ng@mail.gmail.com' \
--to=dmarx@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--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).