[ovs-dev] [PATCH] netdev: Custom statistics.
Ben Pfaff
blp at ovn.org
Thu Nov 30 17:37:50 UTC 2017
On Thu, Nov 30, 2017 at 02:39:56PM +0000, Weglicki, MichalX wrote:
> > -----Original Message-----
> > From: Ben Pfaff [mailto:blp at ovn.org]
> > Sent: Wednesday, November 29, 2017 6:35 PM
> > To: Weglicki, MichalX <michalx.weglicki at intel.com>
> > Cc: dev at openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH] netdev: Custom statistics.
> >
> > On Tue, Nov 28, 2017 at 01:46:05PM +0000, Michal Weglicki wrote:
> > > - New get_custom_stats interface function is added to netdev. It
> > > allows particular netdev implementation to expose custom
> > > counters in dictionary format (counter name/counter value).
> > > - New statistics are retrieved using experimenter code and
> > > are printed as a result to ofctl dump-ports.
> > > - New counters are available for OpenFlow 1.4+.
> > > - New statistics are printed to output via ofctl only if those
> > > are present in reply message.
> > > - New statistics definition is added to include/openflow/intel-ext.h.
> > > - Custom statistics are implemented only for dpdk-physical
> > > port type.
> > > - DPDK-physical implementation uses xstats to collect statistics.
> > > Only dropped and error counters are exposed.
> > >
> > > Signed-off-by: Michal Weglicki <michalx.weglicki at intel.com>
> >
> > This is pretty cool. I like it.
> >
> > There is one new compiler warning:
> >
> > ../lib/string.c:49:1: error: no previous prototype for function 'string_ends_with' [-Werror,-Wmissing-prototypes]
> [MW] I was quite confused how this happened and now I see that string.h is on git ignore list. I was trying
> to find good spot for string helper function, and didn't find anything more suitable. If this is on ignore list
> on purpose could you point me to some kind of string helper file where I can include my function?
lib/util.h declares a few string functions, such as ovs_strlcpy(). You
could add this one there.
> > and new "sparse" warnings:
> >
> > ../lib/ofp-util.c:8100:40: warning: incorrect type in assignment (different base types)
> > ../lib/ofp-util.c:8100:40: expected restricted ovs_be16 [usertype] stats_array_size
> > ../lib/ofp-util.c:8100:40: got unsigned int const [unsigned] [usertype] size
> > ../lib/ofp-util.c:8288:28: warning: incorrect type in assignment (different base types)
> > ../lib/ofp-util.c:8288:28: expected unsigned int [unsigned] [usertype] size
> > ../lib/ofp-util.c:8288:28: got restricted ovs_be16 const [usertype] stats_array_size
> > ../lib/ofp-util.c:8297:34: warning: restricted ovs_be16 degrades to integer
> [MW] Sorry about that, will do.
Great, I'll look forward to v2.
More information about the dev
mailing list