[ovs-dev] [PATCH v2 2/3] dpif-netdev-perf: Fix TSC frequency for non-DPDK case.
david.marchand at redhat.com
Mon Sep 2 13:09:29 UTC 2019
On Mon, Sep 2, 2019 at 1:27 PM Ilya Maximets <i.maximets at samsung.com> wrote:
> Unlike 'rte_get_tsc_cycles()' which doesn't need any specific
> initialization, 'rte_get_tsc_hz()' could be used only after successfull
> call to 'rte_eal_init()'. 'rte_eal_init()' estimates the TSC frequency
> for later use by 'rte_get_tsc_hz()'. Fairly said, we're not allowed
> to use 'rte_get_tsc_cycles()' before initializing DPDK too, but it
> works this way for now and provides correct results.
> This patch provides TSC frequency estimation code that will be used
> in two cases:
> * DPDK is not compiled in, i.e. DPDK_NETDEV not defined.
> * DPDK compiled in but not initialized,
> i.e. other_config:dpdk-init=false
> This change is mostly useful for AF_XDP netdev support, i.e. allows
> to use dpif-netdev/pmd-perf-show command and various PMD perf metrics.
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> Acked-by: William Tu <u9012063 at gmail.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
More information about the dev