[ovs-dev] [PATCH v1 1/4] dpif-netdev: Fix the pmd_perf_stats

Lance Yang Lance.Yang at arm.com
Wed Nov 20 08:13:20 UTC 2019


When compiling Open vSwitch for aarch64, the compiler will warn about
an uninitailized variable in lib/dpif-netdev-perf.c. It is necessary to
initialize it to avoid build failure.

Reviewed-by: Yanqin Wei <Yanqin.Wei at arm.com>
Signed-off-by: Lance Yang <Lance.Yang at arm.com>
---
 lib/dpif-netdev-perf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/dpif-netdev-perf.c b/lib/dpif-netdev-perf.c
index baf90b0..f85bb0c 100644
--- a/lib/dpif-netdev-perf.c
+++ b/lib/dpif-netdev-perf.c
@@ -63,6 +63,7 @@ pmd_perf_estimate_tsc_frequency(void)
     struct pmd_perf_stats s;
     uint64_t start, stop;
 
+    memset(&s, 0, sizeof(s));
     /* DPDK is not available or returned unreliable value.
      * Trying to estimate. */
     affinity = ovs_numa_thread_getaffinity_dump();
-- 
2.7.4



More information about the dev mailing list