From: Randy Dunlap <randy.dunlap@oracle.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: Paul Moore <paul.moore@hp.com>,
hadi@cyberus.ca, netdev@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: Generic Netlink HOW-TO based on Jamal's original doc
Date: Fri, 10 Nov 2006 14:49:54 -0800 [thread overview]
Message-ID: <45550212.5060207@oracle.com> (raw)
In-Reply-To: <20061110221219.GM8693@postel.suug.ch>
Thomas Graf wrote:
> * Randy Dunlap <randy.dunlap@oracle.com> 2006-11-10 10:23
>> On Fri, 10 Nov 2006 01:08:23 -0500 Paul Moore wrote:
>>
>>> An Introduction To Using Generic Netlink
>>> ===============================================================================
>>> 3.1.2. The genl_family Structure
>>>
>>> Generic Netlink services are defined by the genl_family structure, which is
>>> shown below:
>>>
>>> struct genl_family
>>> {
>>> unsigned int id;
>>> unsigned int hdrsize;
>>> char name[GENL_NAMSIZ];
>>> unsigned int version;
>>> unsigned int maxattr;
>>> struct nlattr ** attrbuf;
>>> struct list_head ops_list;
>>> struct list_head family_list;
>>> };
>> Any alignment/packing concerns here? or that is already
>> handled, just not presented here?
>
> I thought I chose GENL_NAMESIZ wisely but to be sure I checked
> with Mr. Alignment himself, Arnaldo:
Hm, looks OK to me. Am I missing something?
> struct genl_family {
> unsigned int id; /* 0(0) 4 */
> unsigned int hdrsize; /* 4(0) 4 */
> char name[16]; /* 8(0) 16 */
> unsigned int version; /* 24(0) 4 */
> unsigned int maxattr; /* 28(0) 4 */
> /* ---------- cacheline 1 boundary ---------- */
> struct nlattr * * attrbuf; /* 32(0) 4 */
> struct list_head ops_list; /* 36(0) 8 */
> struct list_head family_list; /* 44(0) 8 */
> }; /* size: 52 */
How about field size issues? Usually for int's etc. that are in
userspace interfaces, we use __u32 etc.
--
~Randy
next prev parent reply other threads:[~2006-11-10 22:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-10 6:08 Generic Netlink HOW-TO based on Jamal's original doc Paul Moore
2006-11-10 6:37 ` James Morris
2006-11-10 6:45 ` Paul Moore
2006-11-10 14:34 ` jamal
2006-11-10 16:17 ` Paul Moore
2006-11-10 16:59 ` Randy Dunlap
2006-11-10 9:48 ` Thomas Graf
2006-11-10 16:08 ` Paul Moore
2006-11-10 13:24 ` Jarek Poplawski
2006-11-10 16:10 ` Paul Moore
2006-11-10 17:36 ` Thomas Graf
2006-11-13 7:05 ` Jarek Poplawski
2006-11-13 7:23 ` Jarek Poplawski
2006-11-13 14:08 ` Paul Moore
2006-11-13 14:17 ` jamal
2006-11-13 20:06 ` Paul Moore
2006-11-17 13:05 ` jamal
2006-11-17 19:47 ` jamal
2006-11-17 23:53 ` Paul Moore
2006-11-18 17:06 ` jamal
2006-11-20 7:39 ` Jarek Poplawski
2006-11-21 22:24 ` Paul Moore
2006-11-22 12:27 ` Jarek Poplawski
2006-11-22 21:38 ` Paul Moore
2006-11-20 7:26 ` Jarek Poplawski
2006-11-13 19:58 ` Paul Moore
2006-11-14 6:53 ` Jarek Poplawski
2006-11-10 15:49 ` Stephen Hemminger
2006-11-10 16:20 ` Paul Moore
2006-11-10 18:23 ` Randy Dunlap
2006-11-10 19:50 ` Paul Moore
2006-11-10 22:12 ` Thomas Graf
2006-11-10 22:49 ` Randy Dunlap [this message]
2006-11-10 22:56 ` Thomas Graf
2006-11-10 23:17 ` Randy Dunlap
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=45550212.5060207@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=acme@ghostprotocols.net \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
--cc=paul.moore@hp.com \
--cc=tgraf@suug.ch \
/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).