Pardon me, I should have said it's "definitely" not sniffer related - of course the issue is trying to set a port setting in testpmd for a port that doesn't exist. So again let's decorate this testcase with 2 link OR rewrite it so that when topology has 1 link, the tx port setting is set on port 0, not port 1.
On Tue, Mar 10, 2026 at 11:06 AM Patrick Robb <[email protected]> wrote: > > One more issue (that is probably not sniffer related) is that when > changing to 1 link, vlan_header_insertion testcase has an ERROR result > with: "Testpmd failed to set vlan insertion tag 51 on port 1." This > makes sense because usage of port 1 is hardcoded into the testcast - > we need to decorate this wil requires 2 links. > > @func_test > def vlan_header_insertion(self) -> None: > """Ensure that VLAN packet is received with the correct > inserted VLAN tag. > > Steps: > * Start testpmd. > * Set forwarding mode to MAC. > * Disable promiscuous mode. > * Enable Tx VLAN and set the VLAN tag. > * Send and capture VLAN packets. > > Verify: > * VLAN packets are received with the correct inserted VLAN tag. > """ > with TestPmd() as testpmd: > testpmd.set_forward_mode(SimpleForwardingModes.mac) > testpmd.set_promisc(port=0, enable=False) > testpmd.stop_all_ports() > testpmd.tx_vlan_set(port=1, enable=True, vlan=51) > testpmd.start_all_ports() > testpmd.start() > self._send_packet_and_verify_insertion(expected_id=51) > > On Tue, Mar 10, 2026 at 10:53 AM Patrick Robb <[email protected]> wrote: > > > > The implementation of the patch looks good to me, but I think the > > testsuites being reduced from 2 links to 1 link might be an incorrect > > set. > > > > For instance, I just did a testrun on cx7 comparing for-main to > > for-main + this series. > > > > This series introduces failures for: > > port control: start_ports testcase > > vlan: vlan_no_receipt testcase > > vlan: vlan_receipt_stripping testcase > > > > In terms of why these fails are happening... in principle the > > functions flexed by these testcases should be fine to test with 1 > > link. My guess is we are uncovering an issue with the scapy sniffer > > when running a 1 link test. The port_control testcase fails because it > > expects 100 packets and sniffs 200. Perhaps this is because it is > > sniffing both tx and rx packets on the TG port 0. We have code to > > prevent this from the most recent implementation of the sniffer class > > but maybe it has a gap.

