virtio_fwd Test Suite

Virtio forwarding test suite.

Verify vhost/virtio pvp and fully virtual functionalities.

class TestVirtioFwd

Bases: TestSuite

Virtio forwarding test suite.

virtio_server() None

Test virtio server packet transmission.

Steps:
  • Launch a testpmd session with a vhost-user virtual device (client side).

  • Launch a testpmd session with a virtio-user virtual device (server side).

  • Set the forwarding mode to mac in both sessions.

  • Start packet forwarding on vhost session.

  • Send a burst of packets from the virtio session.

  • Stop packet forwarding on vhost session and collect packet stats.

Verify:
  • Vhost session receives packets from virtio session.

virtio_server_reconnect() None

Test virtio server reconnection.

Steps:
  • Launch a testpmd session with a vhost-user virtual device (client side).

  • Launch a testpmd session with a virtio-user virtual device (server side).

  • Close the virtio session and relaunch it.

  • Start packet forwarding on vhost session.

  • Send a burst of packets from the virtio session.

  • Stop packet forwarding on vhost session and collect packet stats.

Verify:
  • Vhost session receives packets from relaunched virtio session.

pvp_loop() None

Test vhost/virtio physical-virtual-physical topology.

Steps:
  • Launch testpmd session with a physical NIC and virtio-user vdev

    connected to a vhost-net socket.

  • Configure the tap interface that is created with IP address and

    set link state to UP.

  • Launch second testpmd session with af_packet vdev connected to

    the tap interface.

  • Start packet forwarding on both testpmd sessions.

  • Send 100 packets to the physical interface from external tester.

Verify:
  • Vhost session receives/forwards 100+ packets.