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>]
schedMandatory. Select round robin (
rr) or transmit hash (hash).nb_ringMandatory. Number of rings to be referenced by
qmaps.nb_qmapOptional. 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_MAPPINGparameter.
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:2The core polling queue 0 polls ring 1, the core polling queue 1 polls ring 3.
auto:rr/nb_ring:1/nb_qmap:2The core polling queue 0 polls ring 1, the core polling queue 1 polls ring 1.
auto:rr/nb_ring:3/nb_qmap:1The core polling queue 0 polls rings 1, 3, and 5.
auto:rr/nb_ring:4/nb_qmap:2The core polling queue 0 polls rings 1, 3 and the core polling queue 1 polls rings 5, and 7.
Examples for txqmap in auto mode¶
auto:rr/nb_ring:2/nb_qmap:2The core transmitting on queue 0 transmits on ring 0, and the core transmitting on queue 1 transmits on ring 2.
auto:rr/nb_ring:1/nb_qmap:2The core transmitting on queue 0 transmits on ring 0, and the core transmitting on queue 1 transmits on ring 0.
auto:rr/nb_ring:3/nb_qmap:1The core transmitting on queue 0 transmits on rings 0, 2, or 4, in round-robin mode.
auto:hash/nb_ring:3/nb_qmap:1The core transmitting on queue 0 transmits on ring 0, 2, or 4, depending on the packet flow.
auto:hash/nb_ring:3/nb_qmap:2When
hashis used, each queue references all virtual rings.auto:rr/nb_ring:3/nb_qmap:2If
nb_ringandnb_qmapare 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.
auto:rr/nb_ring:2/nb_qmap:3In this case as well, use the manual mode to avoid a non uniform mapping.