[ovs-dev] [PATCH] dpif-netdev: Fix non-atomic read of smc_enable_db.
Ferriter, Cian
cian.ferriter at intel.com
Tue Jul 27 14:16:15 UTC 2021
> Atomic variables must be read atomically. And since we already have
> 'smc_enable_db' in the PMD context, we need to use it from there to
> avoid reading atomically twice.
>
> Also, 'smc_enable_db' is a global configuration, there is no need
> to read it per-port or per-rxq.
>
> CC: Harry van Haaren <harry.van.haaren at intel.com>
> Fixes: 9ac84a1a3698 ("dpif-avx512: Add ISA implementation of dpif.")
> Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
> ---
This LGTM too.
Agreed that it doesn't need to be read per-port or per-RXQ.
Acked-by: Cian Ferriter <cian.ferriter at intel.com>
I also tested this by running a scenario with multiple PMD threads and toggling the SMC on and off with EMC off always:
$OVS_DIR/utilities/ovs-vsctl --no-wait set Open_vSwitch . other_config:smc-enable=true
$OVS_DIR/utilities/ovs-vsctl --no-wait set Open_vSwitch . other_config:smc-enable=false
I checked pmd-perf-show to see that SMC was being enabled and disabled correctly. It was.
watch -d -n 1 $OVS_DIR/utilities/ovs-appctl dpif-netdev/pmd-perf-show
More information about the dev
mailing list