Static auto mode

In this mode, the numbers of rings and queues are specified and rings are automatically associated to queues. This configuration is static, meaning that the port has to be restarted to modify it.

The option syntax is as follows:

auto:<sched>/nb_ring:<nb_ring>[/nb_qmap:<nb_qmap>]
sched

Mandatory. Select round robin (rr) or transmit hash (hash).

nb_ring

Mandatory. Number of rings to be referenced by qmaps.

nb_qmap

Optional. Number of queues to be created by the Virtio Host PMD. If it is not specified, the number of queues will be set by the application at Virtio Host PMD initialization. For example, when using the fast path, one TX queue per core is created, and the number of RX queues created depends on the CORE_PORT_MAPPING parameter.

The auto mode ensures that all the rings specified by nb_rings (0, 2, 4, ..., 2*(nb_rings-1) for TX, and 1, 3, 5, ..., 2*(nb_rings-1)+1 for RX) will be polled or filled if all qmaps (queues) are used by the application.

In round-robin mode, if the number of rings is the same as the number of queues, a 1:1 association is applied. For other use cases, see the examples below.

To apply a non-uniform mapping, which can be useful in some specific situations, use the manual mode.

For rxqmap, the sched argument can only be rr (round-robin). For txqmap, the sched argument can be rr (round-robin) or hash. In the latter case, each qmap points to all virtual rings, and the virtual ring used to transmit packets depends on the flow hash of the packet.

Examples for rxqmap in auto mode

auto:rr/nb_ring:2/nb_qmap:2

The core polling queue 0 polls ring 1, the core polling queue 1 polls ring 3.

../../../../../_images/aafig-1a42b62d709aadc811b5ecb39957d97f47ce7fe3.svg
auto:rr/nb_ring:1/nb_qmap:2

The core polling queue 0 polls ring 1, the core polling queue 1 polls ring 1.

../../../../../_images/aafig-20c68f6eee717eae2b1d6b4e23406a8bfcc1ddf2.svg
auto:rr/nb_ring:3/nb_qmap:1

The core polling queue 0 polls rings 1, 3, and 5.

../../../../../_images/aafig-6413e4d0e71f7d5e2db10708ab38b42f6ca312f9.svg
auto:rr/nb_ring:4/nb_qmap:2

The core polling queue 0 polls rings 1, 3 and the core polling queue 1 polls rings 5, and 7.

../../../../../_images/aafig-7335812be1c24877b3ceb09ecdfd4a339a88a11e.svg

Examples for txqmap in auto mode

auto:rr/nb_ring:2/nb_qmap:2

The core transmitting on queue 0 transmits on ring 0, and the core transmitting on queue 1 transmits on ring 2.

../../../../../_images/aafig-ff71e5d643b0b9c08294d79c61fa5cd71efac0f3.svg
auto:rr/nb_ring:1/nb_qmap:2

The core transmitting on queue 0 transmits on ring 0, and the core transmitting on queue 1 transmits on ring 0.

../../../../../_images/aafig-dad20bfea68c239c1e5de5ed441726f25c35813c.svg
auto:rr/nb_ring:3/nb_qmap:1

The core transmitting on queue 0 transmits on rings 0, 2, or 4, in round-robin mode.

../../../../../_images/aafig-4474fdcbbdaf1b6444be8b4d93b2afca6da1cbed.svg
auto:hash/nb_ring:3/nb_qmap:1

The core transmitting on queue 0 transmits on ring 0, 2, or 4, depending on the packet flow.

../../../../../_images/aafig-410143bf3ba10680f6e373580975056ef0fa2ad7.svg
auto:hash/nb_ring:3/nb_qmap:2

When hash is used, each queue references all virtual rings.

../../../../../_images/aafig-37f5353e7560b95193db2d9e6315fb67dfa17c65.svg
auto:rr/nb_ring:3/nb_qmap:2

If nb_ring and nb_qmap are relatively prime, the mapping will not be uniform. In this case, the core transmitting on queue 0 transmits on rings 0 and 4, and the core transmitting on queue 1 transmits on ring 2.

In this case, to keep a better control, use the manual mode.

../../../../../_images/aafig-6f9a3cc4606e74b2538af283a7292c1d09501e13.svg
auto:rr/nb_ring:2/nb_qmap:3

In this case as well, use the manual mode to avoid a non uniform mapping.

../../../../../_images/aafig-90f2828bbf7664f1bfcdfc54c91a59d76924ded8.svg