All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: roopa <roopa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com, davem@davemloft.net,
	Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats
Date: Tue, 15 Mar 2016 09:20:41 +0100	[thread overview]
Message-ID: <56E7C5D9.8080107@6wind.com> (raw)
In-Reply-To: <56E7AC06.8040905@cumulusnetworks.com>

Le 15/03/2016 07:30, roopa a écrit :
> On 3/14/16, 8:00 AM, Nicolas Dichtel wrote:
>> Le 13/03/2016 02:56, Roopa Prabhu a écrit :
[snip]
>>> diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
>>> index ca764b5..2bbb300 100644
>>> --- a/include/uapi/linux/rtnetlink.h
>>> +++ b/include/uapi/linux/rtnetlink.h
>>> @@ -139,6 +139,13 @@ enum {
>>>        RTM_GETNSID = 90,
>>>    #define RTM_GETNSID RTM_GETNSID
>>>
>>> +    RTM_NEWSTATS = 92,
>>> +#define RTM_NEWSTATS RTM_NEWSTATS
>>> +    RTM_DELSTATS = 93,
>>> +#define RTM_DELSTATS RTM_DELSTATS
>> RTM_DELSTATS is never used.
>
> yeah, i had to define it just because rtnetlink_rcv_msg seems to expect all three to be
> there when it tries to check if it is a get msg. But, i could sure not declare this
> but make rtnetlink_rcv_msg happy by keeping the GET msg at the right offset.
Not sure to understand what is the problem.
Look at RTM_NEWNETCONF/RTM_GETNETCONF, there is no DEL command.

>>
>>> +    RTM_GETSTATS = 94,
>>> +#define RTM_GETSTATS RTM_GETSTATS
>>> +
>>>        __RTM_MAX,
>>>    #define RTM_MAX        (((__RTM_MAX + 3) & ~3) - 1)
>>>    };
>>> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
>>> index d2d9e5e..d1e3d17 100644
>>> --- a/net/core/rtnetlink.c
>>> +++ b/net/core/rtnetlink.c
>> [snip]
>>> +static noinline size_t if_nlmsg_stats_size(const struct net_device *dev,
>>> +                       u32 filter_mask)
>> Why are you using the 'noinline' attribute?
>
> I actually picked it up from if_nlmsg_size ...
If there is no better reason, I suggest to remove it ;-)
It was introduced by Eric (commit 9e34a5b51684 ("net/core: EXPORT_SYMBOL
cleanups").
Eric, do you remember why you add this 'noinline' attribute?

  reply	other threads:[~2016-03-15  8:20 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
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 [this message]
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=56E7C5D9.8080107@6wind.com \
    --to=nicolas.dichtel@6wind.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=roopa@cumulusnetworks.com \
    /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.