Read xstats in different device states

Examine xstats values in different device state

The test sets device to the given state and reads per-queue packets xstat. If the state is STARTED, the test starts receiving/sending traffic and examine how corresponding xstats change.

  1. Prepare IUT ethdev port iut_port in requested state

  2. Obtain number of all xstats and their names

  3. If ethdev_state == TEST_ETHDEV_STOPPED :

    • Check consistency of xstats number and names reporting in stopped state

  4. Looking for xstat ID

  5. Check initial value of xstat

  6. If ethdev_state == TEST_ETHDEV_STARTED || ethdev_state == TEST_ETHDEV_STOPPED :

    • Ensure that interface is UP on Tester side

    • If traffic_direction_rx :

      • See if sending packet burst changes the xstat

    • If not traffic_direction_rx :

      • See if receiving packet burst changes the xstat

  7. If ethdev_state == TEST_ETHDEV_STOPPED :

    • Check xstat value is not changed in stopped state

Ivan Ilchenko Ivan.Ilchenko@oktetlabs.ru

Parameters:

ethdev_state

The state of Ethernet device

  • Possible values: INITIALIZED, CONFIGURED, RX_SETUP_DONE, TX_SETUP_DONE, RXTX_SETUP_DONE, STARTED, STOPPED, CLOSED, DETACHED

template

Traffic template

traffic_direction_rx

Traffic direction: TRUE for Rx, FALSE for Tx

payload_len

Payload length