[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB5PR05MB1895991888E270CE790F1C16AC9C0@DB5PR05MB1895.eurprd05.prod.outlook.com>
Date: Fri, 16 Dec 2016 12:11:24 +0000
From: Nogah Frankel <nogahf@...lanox.com>
To: Stephen Hemminger <stephen@...workplumber.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"roopa@...ulusnetworks.com" <roopa@...ulusnetworks.com>,
Jiri Pirko <jiri@...lanox.com>, Elad Raz <eladr@...lanox.com>,
Yotam Gigi <yotamg@...lanox.com>,
Ido Schimmel <idosch@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>
Subject: RE: [PATCH iproute2 v2 1/3] ifstat: Add extended statistics to ifstat
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@...workplumber.org]
> Sent: Thursday, December 15, 2016 7:33 PM
> To: Nogah Frankel <nogahf@...lanox.com>
> Cc: netdev@...r.kernel.org; roopa@...ulusnetworks.com; Jiri Pirko
> <jiri@...lanox.com>; Elad Raz <eladr@...lanox.com>; Yotam Gigi
> <yotamg@...lanox.com>; Ido Schimmel <idosch@...lanox.com>; Or Gerlitz
> <ogerlitz@...lanox.com>
> Subject: Re: [PATCH iproute2 v2 1/3] ifstat: Add extended statistics to ifstat
>
> On Thu, 15 Dec 2016 15:00:43 +0200
> Nogah Frankel <nogahf@...lanox.com> wrote:
>
> > Extended stats are part of the RTM_GETSTATS method. This patch adds them
> > to ifstat.
> > While extended stats can come in many forms, we support only the
> > rtnl_link_stats64 struct for them (which is the 64 bits version of struct
> > rtnl_link_stats).
> > We support stats in the main nesting level, or one lower.
> > The extension can be called by its name or any shorten of it. If there is
> > more than one matched, the first one will be picked.
> >
> > To get the extended stats the flag -x <stats type> is used.
> >
> > Signed-off-by: Nogah Frankel <nogahf@...lanox.com>
> > Reviewed-by: Jiri Pirko <jiri@...lanox.com>
> > ---
> > misc/ifstat.c | 161
> ++++++++++++++++++++++++++++++++++++++++++++++++++++------
> > 1 file changed, 146 insertions(+), 15 deletions(-)
> >
> > diff --git a/misc/ifstat.c b/misc/ifstat.c
> > index 92d67b0..d17ae21 100644
> > --- a/misc/ifstat.c
> > +++ b/misc/ifstat.c
> > @@ -35,6 +35,7 @@
> >
> > #include <SNAPSHOT.h>
> >
> > +#include "utils.h"
> > int dump_zeros;
> > int reset_history;
> > int ignore_history;
>
> Minor nit, please cleanup include order here (original code was wrong).
>
> Standard practice is:
> #include system headers (like stdio.h etc)
> #include "xxx.h" local headers.
>
> Should be:
> #include <getopt.h>
>
> #include <linux/if.h>
> #include <linux/if_link.h>
>
> #include "json_writer.h"
> #include "libnetlink.h"
> #include "utils.h"
> #include "SNAPSHOT.h"
Thanks, I'll fix it.
Powered by blists - more mailing lists