All of lore.kernel.org
 help / color / mirror / Atom feed
From: roopa <roopa@cumulusnetworks.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com, davem@davemloft.net
Subject: Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats
Date: Tue, 15 Mar 2016 01:08:44 -0700	[thread overview]
Message-ID: <56E7C30C.7020009@cumulusnetworks.com> (raw)
In-Reply-To: <20160315075223.GB2263@nanopsycho.orion>

On 3/15/16, 12:52 AM, Jiri Pirko wrote:
> Tue, Mar 15, 2016 at 08:38:51AM CET, roopa@cumulusnetworks.com wrote:
>>
[snip]
>> how does it matter if we have reached an agreement that the struct is required ?.
>> unlike other messages, a filter_mask is an important and must attribute for
>> stats. If you are worried about us running out of bits in u32, the netlink attribute you will
>> define for the filter_mask will also be u32 to begin with.
> No, you are missing the point:

I understood what you meant the first time...(to which i did comment if you really wanted a u8 for every filter attribute).

>
> enum {
> 	IFLA_STATS_UNSPEC,
> 	IFLA_STATS_FILTER, /* nest */
> 	IFLA_STATS_LINK64,
> 	IFLA_STATS_INET6,
> 	__IFLA_STATS_MAX,
> };
>
> #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
>
> enum {
> 	IFLA_STATS_FILTER_UNSPEC,
> 	IFLA_STATS_FILTER_LINK64, /* flag */
> 	IFLA_STATS_FILTER_INET6, /* flag */
> 	...
> 	IFLA_STATS_FILTER_WHATEVER, /* flag */
> 	__IFLA_STATS_FILTER_MAX,
> };
>
> #define IFLA_STATS_FILTERMAX (__IFLA_STATS_FILTER_MAX - 1)

Apart from the usability concern i have described earlier, this just seems an overkill ...having to redefine every attribute.

  reply	other threads:[~2016-03-15  8:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-13  1:56 [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats Roopa Prabhu
2016-03-14 14:51 ` Jiri Pirko
2016-03-14 18:45   ` roopa
2016-03-14 19:04     ` Jiri Pirko
2016-03-14 19:56       ` David Miller
2016-03-14 20:22         ` Jiri Pirko
2016-03-15  7:02         ` roopa
2016-03-15  6:24       ` roopa
2016-03-15  7:28         ` Jiri Pirko
2016-03-15  7:38           ` roopa
2016-03-15  7:52             ` Jiri Pirko
2016-03-15  8:08               ` roopa [this message]
2016-03-15  8:24                 ` Jiri Pirko
2016-03-21 19:04                   ` David Miller
2016-03-14 15:00 ` Nicolas Dichtel
2016-03-15  6:30   ` roopa
2016-03-15  8:20     ` Nicolas Dichtel
2016-03-16  6:44       ` roopa
2016-03-14 15:11 ` Elad Raz
2016-03-15  6:37   ` roopa

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=56E7C30C.7020009@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.