From: Arnaldo Carvalho de Melo <acme@mandriva.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/1] [INET]: Change protocol field in struct inet_protosw to u16
Date: Tue, 28 Nov 2006 03:14:11 -0200 [thread overview]
Message-ID: <20061128051410.GE4029@mandriva.com> (raw)
Hi David,
Last one tonight, please consider pulling from:
master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.20.git
- Arnaldo
[acme@newtoy net-2.6.20]$ pahole /tmp/tcp_ipv6.o inet_protosw
/* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/net/protocol.h:69 */
struct inet_protosw {
struct list_head list; /* 0 8 */
short unsigned int type; /* 8 2 */
/* XXX 2 bytes hole, try to pack */
int protocol; /* 12 4 */
struct proto * prot; /* 16 4 */
const struct proto_ops * ops; /* 20 4 */
int capability; /* 24 4 */
char no_check; /* 28 1 */
unsigned char flags; /* 29 1 */
}; /* size: 32, sum members: 28, holes: 1, sum holes: 2, padding: 2 */
So that we can kill that hole, protocol can only go all the way to 255 (RAW).
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
---
include/net/protocol.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 28c4cac..105bf12 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -71,7 +71,7 @@ struct inet_protosw {
/* These two fields form the lookup key. */
unsigned short type; /* This is the 2nd argument to socket(2). */
- int protocol; /* This is the L4 protocol number. */
+ unsigned short protocol; /* This is the L4 protocol number. */
struct proto *prot;
const struct proto_ops *ops;
--
1.4.2.1.g3d5c
next reply other threads:[~2006-11-28 5:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-28 5:14 Arnaldo Carvalho de Melo [this message]
2006-11-28 5:20 ` [PATCH 1/1] [INET]: Change protocol field in struct inet_protosw to u16 David Miller
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=20061128051410.GE4029@mandriva.com \
--to=acme@mandriva.com \
--cc=davem@davemloft.net \
--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