DPDK patches and discussions
 help / color / mirror / Atom feed
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 v2 2/2] dts: add virtio forwarding test suite
Date: Fri, 24 Oct 2025 14:38:09 -0400	[thread overview]
Message-ID: <CABD7UXM6_11st4Y16hRwgQQk6368V_f5EWT+kQVPHsHyqmrdSQ@mail.gmail.com> (raw)
In-Reply-To: <CAJvnSUC3gt3McAjK1UWpwtw2ay1YphYMbTZFysnoSEawcmafOg@mail.gmail.com>

>> +"""Virtio forwarding test suite.
>> +
>> +Verify vhost/virtio pvp and loopback topology functionalities.
>
>
> Loopback doesn't seem quite right. Maybe you can just say pvp and fully virtual?

Sure, I'll change that in the pvp_loop docstring as well

>
>>
>> +"""
>> +
>> +from scapy.layers.inet import IP
>> +from scapy.layers.l2 import Ether
>> +
>> +from api.capabilities import LinkTopology
>> +from api.testpmd import TestPmd
>> +from api.testpmd.config import SimpleForwardingModes
>> +from framework.parser import TextParser
>> +from framework.test_suite import TestSuite, func_test
>> +from framework.testbed_model.capability import requires
>> +from framework.testbed_model.linux_session import LinuxSession
>> +from framework.testbed_model.virtual_device import VirtualDevice
>> +
>> +
>> +@requires(topology_type=LinkTopology.TWO_LINKS)
>
>
> two links is true for the pvp test, but the other two dont require any links, right?

Yes good catch, I'll change that around

>
>>
>> +class TestVirtioFwd(TestSuite):
>> +    """Virtio forwarding test suite."""
>> +
>> +    class ForwardingParsers:
>> +        """Class for gathering Rx/Tx packets from testpmd stats."""
>> +
>> +        rx_packets = TextParser.find_int(r"RX-packets:\s*(\d+)")
>> +        tx_packets = TextParser.find_int(r"TX-packets:\s*(\d+)")
>> +
>> +    class vdevs:
>> +        """Class containing virtio-user and vhost-user virtual devices."""
>> +
>> +        virtio_user = VirtualDevice(
>> +            "net_virtio_user0,mac=00:01:02:03:04:05,path=/tmp/vhost-net,server=1"
>> +        )
>> +        vhost_user = VirtualDevice("eth_vhost0,iface=/tmp/vhost-net,client=1")
>
>
> +1 to Luca's comment about not needing these to be internal classes.

Heard

<snip>
>> +        with TestPmd(
>> +            prefix="virtio",
>> +            vdevs=[VirtualDevice("virtio_user0,path=/dev/vhost-net,queues=1,queue_size=1024")],
>> +        ) as virtio:
>> +            self.sut_node.main_session.send_command("ip link set dev tap0 up", privileged=True)
>> +            with TestPmd(
>> +                prefix="vhost", no_pci=True, vdevs=[VirtualDevice("net_af_packet0,iface=tap0")]
>> +            ) as vhost:
>> +                virtio.set_forward_mode(SimpleForwardingModes.mac)
>> +                vhost.set_forward_mode(SimpleForwardingModes.mac)
>> +                vhost.start()
>> +                virtio.start()
>> +
>> +                packet = Ether() / IP()
>> +                packets = [packet] * 100
>> +                captured_packets = self.send_packets_and_capture(packets)
>> +
>> +                self.verify(
>> +                    len(captured_packets) >= 100, "Sent packets not received on physical interface."
>> +                )
>
>
> Can you remind me what docs you were working from for setting up the pvp test? I'm guessing how you've done it is valid, but I originally thought we needed 2 tap interfaces and that vhost had to run in --no-pci, not virtio. Better safe than sorry. :)

https://doc.dpdk.org/guides/howto/virtio_user_as_exception_path.html

According to the doc you only need one tap interface. Also the current
implementation already has vhost using --no-pci, not virtio

>
>>
>> --
>> 2.51.0
>>
>
> Reviewed-by: Patrick Robb <probb@iol.unh.edu>

  reply	other threads:[~2025-10-24 18:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-16 20:04 [PATCH v1 1/2] dts: add start Tx first method to testpmd shell Dean Marx
2025-09-16 20:04 ` [PATCH v1 2/2] dts: add virtio forwarding test suite Dean Marx
2025-09-23 11:38   ` Luca Vizzarro
2025-10-03 18:14     ` Dean Marx
2025-10-09 13:04   ` Patrick Robb
2025-09-23 11:27 ` [PATCH v1 1/2] dts: add start Tx first method to testpmd shell Luca Vizzarro
2025-10-03 19:27 ` [PATCH v2 " Dean Marx
2025-10-03 19:27   ` [PATCH v2 2/2] dts: add virtio forwarding test suite Dean Marx
2025-10-21 15:13     ` Luca Vizzarro
2025-10-21 17:35       ` Dean Marx
2025-10-23 12:59     ` Patrick Robb
2025-10-24 18:38       ` Dean Marx [this message]
2025-10-24 17:46   ` [PATCH v3 1/3] dts: add start Tx first method to testpmd shell Dean Marx
2025-10-24 17:46     ` [PATCH v3 2/3] dts: add method for bringing link of interface up Dean Marx
2025-10-24 17:47     ` [PATCH v3 3/3] dts: add virtio forwarding test suite Dean Marx
2025-10-24 18:50     ` [PATCH v4 1/3] dts: add start Tx first method to testpmd shell Dean Marx
2025-10-24 18:50       ` [PATCH v4 2/3] dts: add method for bringing link of interface up Dean Marx
2025-10-24 18:50       ` [PATCH v4 3/3] dts: add virtio forwarding 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=CABD7UXM6_11st4Y16hRwgQQk6368V_f5EWT+kQVPHsHyqmrdSQ@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).