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. Check that all previously started queues are able to receive traffic

    • 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

  14. Destroy the flow rule

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

  16. 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

  17. Start the queue if it is deferred (deferred_start)

Parameters:

isolated

Isolated mode toggle

flow_rule_pattern

Flow rule

nb_rxq

Rx queue count

rxq_runtime_setup_ids

Indices of queues that will be setup and started at run time

deferred_start

Should the queues that setup at run time be marked as deferred