public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber•org>
To: Nogah Frankel <nogahf@mellanox•com>
Cc: netdev@vger•kernel.org, roopa@cumulusnetworks•com,
	jiri@mellanox•com, eladr@mellanox•com, yotamg@mellanox•com,
	idosch@mellanox•com, ogerlitz@mellanox•com
Subject: Re: [PATCH iproute2 v2 1/3] ifstat: Add extended statistics to ifstat
Date: Thu, 15 Dec 2016 09:33:27 -0800	[thread overview]
Message-ID: <20161215093327.2daf60c6@xeon-e3> (raw)
In-Reply-To: <1481806845-63384-2-git-send-email-nogahf@mellanox.com>

On Thu, 15 Dec 2016 15:00:43 +0200
Nogah Frankel <nogahf@mellanox•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@mellanox•com>
> Reviewed-by: Jiri Pirko <jiri@mellanox•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"

  reply	other threads:[~2016-12-15 17:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-15 13:00 [PATCH iproute2 v2 0/3] update ifstat for new stats Nogah Frankel
2016-12-15 13:00 ` [PATCH iproute2 v2 1/3] ifstat: Add extended statistics to ifstat Nogah Frankel
2016-12-15 17:33   ` Stephen Hemminger [this message]
2016-12-16 12:11     ` Nogah Frankel
2016-12-16 15:21       ` Rami Rosen
2016-12-18 14:22         ` Nogah Frankel
2016-12-19  4:10   ` Or Gerlitz
2016-12-15 13:00 ` [PATCH iproute2 v2 2/3] ifstat: Add 64 bits based stats to extended statistics Nogah Frankel
2016-12-15 13:00 ` [PATCH iproute2 v2 3/3] ifstat: Add "sw only" extended statistics to ifstat Nogah Frankel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161215093327.2daf60c6@xeon-e3 \
    --to=stephen@networkplumber$(echo .)org \
    --cc=eladr@mellanox$(echo .)com \
    --cc=idosch@mellanox$(echo .)com \
    --cc=jiri@mellanox$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=nogahf@mellanox$(echo .)com \
    --cc=ogerlitz@mellanox$(echo .)com \
    --cc=roopa@cumulusnetworks$(echo .)com \
    --cc=yotamg@mellanox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox