mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Net: reorder udp_iter_state to remove padding on 64bit builds
@ 2008-06-05 10:33 Richard Kennedy
  2008-06-13 10:03 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kennedy @ 2008-06-05 10:33 UTC (permalink / raw)
  To: davem; +Cc: netdev, lkml

reorder udp_iter_state to remove padding on 64bit builds

shrinks from 24 to 16 bytes, moving to a smaller slab when CONFIG_NET_NS
is undefined & seq_net_private = {}

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

---
static analysis found this padding in udp_iter_state.

I've boot tested 2.6.26-rc4 + patch on desktop AMD64, and successfully
run a simple UDP test case.

Richard



diff --git a/include/net/udp.h b/include/net/udp.h
index ccce837..7a86848 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -196,8 +196,8 @@ struct udp_seq_afinfo {
 struct udp_iter_state {
 	struct seq_net_private  p;
 	sa_family_t		family;
-	struct hlist_head	*hashtable;
 	int			bucket;
+	struct hlist_head	*hashtable;
 };
 
 #ifdef CONFIG_PROC_FS



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Net: reorder udp_iter_state to remove padding on 64bit builds
  2008-06-05 10:33 [PATCH] Net: reorder udp_iter_state to remove padding on 64bit builds Richard Kennedy
@ 2008-06-13 10:03 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-06-13 10:03 UTC (permalink / raw)
  To: richard; +Cc: netdev, linux-kernel

From: Richard Kennedy <richard@rsk.demon.co.uk>
Date: Thu, 05 Jun 2008 11:33:39 +0100

> reorder udp_iter_state to remove padding on 64bit builds
> 
> shrinks from 24 to 16 bytes, moving to a smaller slab when CONFIG_NET_NS
> is undefined & seq_net_private = {}
> 
> Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

Applied, th anks Richard.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-13 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-05 10:33 [PATCH] Net: reorder udp_iter_state to remove padding on 64bit builds Richard Kennedy
2008-06-13 10:03 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®