From: roopa <roopa@cumulusnetworks.com>
To: David Miller <davem@davemloft.net>
Cc: jiri@resnulli.us, netdev@vger.kernel.org, jhs@mojatatu.com
Subject: Re: [PATCH net-next 1/2] rtnetlink: add new RTM_GETSTATS message to dump link stats
Date: Tue, 15 Mar 2016 00:02:43 -0700 [thread overview]
Message-ID: <56E7B393.5000400@cumulusnetworks.com> (raw)
In-Reply-To: <20160314.155640.1574437783302725000.davem@davemloft.net>
On 3/14/16, 12:56 PM, David Miller wrote:
> From: Jiri Pirko <jiri@resnulli.us>
> Date: Mon, 14 Mar 2016 20:04:35 +0100
>
>> I believe that using *any* structs to send over netlink is a mistake.
>> Netlink is capable to transfer everything using attrs. Easy to compose,
>> easy to parse. easy to extend. Couple of more bytes in the message? So what?
>> For newly introduced things, I suggest to do this properly.
> It is not so straight-forward.
>
> What to put into the header is a tradeoff.
>
> The most basic use cases should be as efficient as possible, and if we
> can put reasonable knobs into the base commend header we should do that
> as avoiding attribute processing makes things faster.
yes, i have recently realized this after looking at all other message
types and the userspace part of it. It does make the default message much simpler.
>
> And I think in this case it is reasonable to put the mask in there.
>
> The only problem I see with this series is the naming of the netlink
> command (it isn't a "new" operation, and the "del" is unused).
I just replied to the other responses on this: I did declare all three because
rtnetlink_rcv_msg seems to expect the get message at a particular offset
(when it derives kind from nlmsg_type). But, i can fix it accordingly.
>
> Maybe the suggestion to use just "GET" as the name is ok.
I am thinking RTM_NEWSTATS is ok here. Because from userspace you are looking at message per interface
as a separate stats object. It also adheres to existing convention.
Besides, jamals original request/suggestion also had periodic stats notification to user-space...,
in which case it would be more appropriate to use RTM_NEWSTATS (if we implement it in the future ofcourse).
And from userspace perspective, dumps and notifications should come in with the same msg type.
userspace sees it as a stats message and does not care if it came as part of a dump or a notification.
also, user space netlink caches expect this (i work with libnl a lot and it is based on this assumption).
so, RTM_NEWSTATS seems more appropriate here.
But, if you have stronger reasons for RTM_GETSTATS, sure, pls let me know.
Thanks,
Roopa
next prev parent reply other threads:[~2016-03-15 7:02 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 [this message]
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
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=56E7B393.5000400@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.