netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jengelh@inai.de
Cc: pablo@netfilter.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] netlink: kill netlink_set_nonroot
Date: Sun, 23 Sep 2012 02:09:52 -0400 (EDT)	[thread overview]
Message-ID: <20120923.020952.2024265275496412823.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LNX.2.01.1209230700120.2498@nerf07.vanv.qr>

From: Jan Engelhardt <jengelh@inai.de>
Date: Sun, 23 Sep 2012 07:00:42 +0200 (CEST)

> 
> On Thursday 2012-09-06 14:31, pablo@netfilter.org wrote:
> 
>> /* optional Netlink kernel configuration parameters */
>> struct netlink_kernel_cfg {
>> 	unsigned int	groups;
>> 	void		(*input)(struct sk_buff *skb);
>> 	struct mutex	*cb_mutex;
>> 	void		(*bind)(int group);
>>+	unsigned int	flags;
>> };
> 
> Putting flags next to groups would reduce the hole there.

Works for me:

--------------------
[PATCH] netlink: Rearrange netlink_kernel_cfg to save space on 64-bit.

Suggested by Jan Engelhardt.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 include/linux/netlink.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index b3dc992..f80c56a 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -183,10 +183,10 @@ extern void netlink_table_ungrab(void);
 /* optional Netlink kernel configuration parameters */
 struct netlink_kernel_cfg {
 	unsigned int	groups;
+	unsigned int	flags;
 	void		(*input)(struct sk_buff *skb);
 	struct mutex	*cb_mutex;
 	void		(*bind)(int group);
-	unsigned int	flags;
 };
 
 extern struct sock *__netlink_kernel_create(struct net *net, int unit,
-- 
1.7.11.4


 

  reply	other threads:[~2012-09-23  6:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 12:31 [PATCH 1/2] netlink: kill netlink_set_nonroot pablo
2012-09-06 12:31 ` [PATCH 2/2] netlink: remove module parameter from netlink_kernel_create pablo
2012-09-07 18:16 ` [PATCH 1/2] netlink: kill netlink_set_nonroot David Miller
2012-09-23  5:00 ` Jan Engelhardt
2012-09-23  6:09   ` David Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-09-08 12:53 [PATCH 0/2] [v3] netlink_kernel_create updates pablo
2012-09-08 12:53 ` [PATCH 1/2] netlink: kill netlink_set_nonroot pablo
2012-08-17 17:22 [PATCH 0/2] netlink patches pablo
2012-08-17 17:22 ` [PATCH 1/2] netlink: kill netlink_set_nonroot pablo

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=20120923.020952.2024265275496412823.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jengelh@inai.de \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.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).