[ovs-dev] [PATCH v3] dpif-netdev: Sync PMD ALB state with user commands.

Ilya Maximets i.maximets at ovn.org
Wed Nov 17 21:35:09 UTC 2021


On 11/2/21 19:10, Kevin Traynor wrote:
> Previously, when a user enabled PMD auto load balancer with
> pmd-auto-lb="true", some conditions such as number of PMDs/RxQs
> that were required for a rebalance to take place were checked.
> 
> If the configuration meant that a rebalance would not take place
> then PMD ALB was logged as 'disabled' and not run.
> 
> Later, if the PMD/RxQ configuration changed whereby a rebalance
> could be effective, PMD ALB was logged as 'enabled' and would run at
> the appropriate time.
> 
> This worked ok from a functional view but it is unintuitive for the
> user reading the logs.
> 
> e.g. with one PMD (PMD ALB would not be effective)
> 
> User enables ALB, but logs say it is disabled because it won't run.
> $ ovs-vsctl set open_vSwitch . other_config:pmd-auto-lb="true"
> |dpif_netdev|INFO|PMD auto load balance is disabled
> 
> No dry run takes place.
> 
> Add more PMDs (PMD ALB may be effective).
> $ ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=50
> |dpif_netdev|INFO|PMD auto load balance is enabled ...
> 
> Dry run takes place.
> |dpif_netdev|DBG|PMD auto load balance performing dry run.
> 
> A better approach is to simply reflect back the user enable/disable
> state in the logs and deal with whether the rebalance will be effective
> when needed. That is the approach taken in this patch.
> 
> To cut down on unneccessary work, some basic checks are also made before
> starting a PMD ALB dry run and debug logs can indicate this to the user.
> 
> e.g. with one PMD (PMD ALB would not be effective)
> 
> User enables ALB, and logs confirm the user has enabled it.
> $ ovs-vsctl set open_vSwitch . other_config:pmd-auto-lb="true"
> |dpif_netdev|INFO|PMD auto load balance is enabled...
> 
> No dry run takes place.
> |dpif_netdev|DBG|PMD auto load balance nothing to do, not enough non-isolated PMDs or RxQs.
> 
> Add more PMDs (PMD ALB may be effective).
> $ ovs-vsctl set Open_vSwitch . other_config:pmd-cpu-mask=50
> 
> Dry run takes place.
> |dpif_netdev|DBG|PMD auto load balance performing dry run.
> 
> Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
> Acked-by: Sunil Pai G <sunil.pai.g at intel.com>
> Reviewed-by: David Marchand <david.marchand at redhat.com>
> Acked-by: Gaetan Rivet <grive at u256.net>

Applied.  Thanks!

Best regards, Ilya Maximets.


More information about the dev mailing list