From: jamal <hadi@cyberus.ca>
To: balbir@in.ibm.com
Cc: Shailabh Nagar <nagar@watson.ibm.com>,
netdev <netdev@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
lse-tech@lists.sourceforge.net
Subject: Re: [UPDATED PATCH] Re: Re: [Patch 7/7] Generic netlink interface (delay accounting)
Date: Sat, 11 Mar 2006 08:30:49 -0500 [thread overview]
Message-ID: <1142083849.5184.69.camel@jzny2> (raw)
In-Reply-To: <20060310163927.GA6537@in.ibm.com>
On Fri, 2006-10-03 at 22:09 +0530, Balbir Singh wrote:
> On Fri, Mar 10, 2006 at 09:53:53AM -0500, jamal wrote:
> > On kernel->user (in the case of response to #a or async notifiation as
> > in #b) you really dont need to specify the TG/PID since they appear in
> > the STATS etc.
>
> I see your point now. I am looking at other users of netlink like
> rtnetlink and I see the classical usage.
>
> We can implement TLV's in our code, but for the most part the data we exchange
> between the user <-> kernel has all the TLV's listed in the enum above.
>
> The major differnece is the type (pid/tgid). Hence we created a structure
> (taskstats) instead of using TLV's.
Something to remember:
1) TLVs are essentially giving you the flexibility to send optionally
appearing elements. It is up to the receiver (in the kernel or user
space) to check for the presence of mandatory elements or execute things
depending on the presence of certain TLVs. Example in your case:
if the tgid TLV appears then the user is requesting for that TLV
if the pid appears then they are requesting for that
if both appear then it is the && of the two.
You should always ignore TLVs you dont understand - to allow for forward
compatibility.
2) The "T" part is essentially also encoding (semantically) what size
the value is; the "L" part is useful for validation. So the receiver
will always know what the size of the TLV is by definition and uses the
L to make sure it is the right size. Reject what is of the wrong size.
cheers,
jamal
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
next prev parent reply other threads:[~2006-03-11 13:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1141026996.5785.38.camel@elinux04.optonline.net>
2006-02-27 8:31 ` [Patch 7/7] Generic netlink interface (delay accounting) Shailabh Nagar
[not found] ` <1141045194.5363.12.camel@localhost.localdomain>
[not found] ` <4403608E.1050304@watson.ibm.com>
[not found] ` <1141652556.5185.64.camel@localhost.localdomain>
2006-03-06 17:00 ` Shailabh Nagar
2006-03-07 14:38 ` [Lse-tech] " jamal
2006-03-08 21:56 ` Shailabh Nagar
2006-03-09 14:37 ` [UPDATED PATCH] " Balbir Singh
2006-03-09 16:06 ` Shailabh Nagar
2006-03-10 14:53 ` jamal
2006-03-10 15:35 ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-10 16:39 ` [UPDATED PATCH] " Balbir Singh
2006-03-11 13:30 ` jamal [this message]
2006-03-13 16:21 ` [UPDATED PATCH] Re: [Lse-tech] " Balbir Singh
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=1142083849.5184.69.camel@jzny2 \
--to=hadi@cyberus.ca \
--cc=balbir@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=nagar@watson.ibm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).