> -----Original Message----- > From: Stokes, Ian [mailto:ian.sto...@intel.com] > Sent: Tuesday, 27 March, 2018 16:21 > To: Ilya Maximets <i.maxim...@samsung.com>; Jan Scheurich > <jan.scheur...@ericsson.com>; d...@openvswitch.org > Cc: ktray...@redhat.com; O Mahony, Billy <billy.o.mah...@intel.com> > Subject: RE: [PATCH v10 2/3] dpif-netdev: Detailed performance stats for PMDs > > > Comments inline. > > > > Best regards, Ilya Maximets. > > > > On 18.03.2018 20:55, Jan Scheurich wrote: > > > This patch instruments the dpif-netdev datapath to record detailed > > > statistics of what is happening in every iteration of a PMD thread. > > > > > > The collection of detailed statistics can be controlled by a new > > > Open_vSwitch configuration parameter "other_config:pmd-perf-metrics". > > > By default it is disabled. The run-time overhead, when enabled, is > > > in the order of 1%. > > > > > [snip] > > > > + } > > > + if (tx_packets > 0) { > > > + ds_put_format(str, > > > + " Tx packets: %12"PRIu64" (%.0f Kpps)\n" > > > + " Tx batches: %12"PRIu64" (%.2f pkts/batch)" > > > + "\n", > > > + tx_packets, (tx_packets / duration) / 1000, > > > + tx_batches, 1.0 * tx_packets / tx_batches); > > > + } else { > > > + ds_put_format(str, > > > + " Tx packets: %12"PRIu64"\n" > > > + "\n", > > > + 0ULL); > > > > I have a few interesting warnings on 64bit ARMv8. > > > > Clang: > > > > lib/dpif-netdev-perf.c:216:17: error: format specifies type 'unsigned > > long' but the argument has type 'unsigned long long' [-Werror,-Wformat] > > 0ULL); > > ^~~~ > > lib/dpif-netdev-perf.c:229:17: error: format specifies type 'unsigned > > long' but the argument has type 'unsigned long long' [-Werror,-Wformat] > > 0ULL); > > ^~~~ > > > > GCC: > > > > lib/dpif-netdev-perf.c: In function ‘pmd_perf_format_overall_stats’: > > lib/dpif-netdev-perf.c:215:17: error: format ‘%lu’ expects argument of > > type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ > > [-Werror=format=] > > " Rx packets: %12"PRIu64"\n", > > ^ > > lib/dpif-netdev-perf.c:227:17: error: format ‘%lu’ expects argument of > > type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ > > [-Werror=format=] > > " Tx packets: %12"PRIu64"\n" > > ^ > > > > Both are coming from the fact that PRIu64 expands to '%lu'. > > Why we need this printing at all? Can we just print 0 in a string? > > Otherwise, the only way to fix these warnings is to cast 0 directly to > > uint64_t. > > I see the same in Travis. > > In the v9 of the series the format used was 0UL. This allowed compilation in > Travis except for when compiling OVS with the 32 bit flag. > From the logs the introduction of 0ULL seems to avoid the issue for 32 bit > compilation but introduces the problem for 64 bit > compilation. > > I don’t see a way around it either without casting. > > Ian
I'll work around this by printing "0" as a string :-) _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev