Setup Rx queue at run time

Setup Rx queue when device is started, perform the check using flow API

Make sure that it is possible to setup a Rx queue when the Ethernet device is started. Perform the check using flow API rules.

  1. Configure the Ethernet device

  2. Change destination MAC to NIC MAC if it is present in pattern

  3. Check for Rx queue runtime setup capability

  4. Setup isolation mode if requested by isolated

  5. Setup the queues that are not in rxq_runtime_setup_ids

  6. Start the device

  7. Stop and start the device again to make sure that the device can be stopped while some of its queues are not set up

  8. Make flow rule attributes with only one "ingress" attribute

  9. Make flow rule pattern by flow_rule_pattern

  10. Prepare template that matches the filter

  11. Prepare template that does not match the filter

  12. Repeat following steps for all rxq_runtime_setup_ids

  13. While 1 :

    • Check that all previously started queues are able to receive traffic

    • For each iteration (j = 0; j < nb_rxq_started; j++):

      • Validate and create the flow rule that redirects packets that match flow rule pattern to the target queue

      • Transmit one packet with prepared match template. Check that the packet was recieved on target queue

      • Transmit one packet with mismatching template. Check that the packet was recieved on default queue. In case of isolated flow - check that the packet appeared on neither target nor default queue

      • Destroy the flow rule

    • Setup a queue, add deferred start flag if requested by deferred_start

    • Restart the device to start all Rx queues that were setup previously except deferred start queues. Also make sure that the current state of the queues does not cause device start and stop failures

    • Start the queue if it is deferred (deferred_start)

Igor Romanov Igor.Romanov@oktetlabs.ru

Parameters:

isolated

Whether to enable flow isolated mode

deferred_start

Whether the queues that are set up at run time should be marked as deferred

flow_rule_pattern

Flow rule

nb_rxq

Rx queue count

rxq_runtime_setup_ids

Indices of queues that will be set up and started at run time