From: Thomas Graf <tgraf@suug.ch>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com
Subject: [PATCH 1/11] [NET] Reorder struct inet_sock
Date: Wed, 9 Mar 2005 20:46:21 +0100 [thread overview]
Message-ID: <20050309194621.GI31837@postel.suug.ch> (raw)
In-Reply-To: <20050309194521.GH31837@postel.suug.ch>
tos: int -> 8bit
uc_ttl: int -> 16 bit
cmsg_flags: int -> 16 bit
hdrincl: 8bit -> 1 bit
mc_loop: 8bit -> 1 bit
Saves 12 bytes together with the reordering.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
diff -Nru linux-2.6.11-rc4.orig/include/linux/ip.h linux-2.6.11-rc4/include/linux/ip.h
--- linux-2.6.11-rc4.orig/include/linux/ip.h 2005-03-08 18:11:22.000000000 +0100
+++ linux-2.6.11-rc4/include/linux/ip.h 2005-03-08 20:26:37.000000000 +0100
@@ -121,18 +121,18 @@
__u16 dport; /* Destination port */
__u16 num; /* Local port */
__u32 saddr; /* Sending source */
- int uc_ttl; /* Unicast TTL */
- int tos; /* TOS */
- unsigned cmsg_flags;
+ __s16 uc_ttl; /* Unicast TTL */
+ __u16 cmsg_flags;
struct ip_options *opt;
__u16 sport; /* Source port */
- unsigned char hdrincl; /* Include headers ? */
+ __u16 id; /* ID counter for DF pkts */
+ __u8 tos; /* TOS */
__u8 mc_ttl; /* Multicasting TTL */
- __u8 mc_loop; /* Loopback */
__u8 pmtudisc;
- __u16 id; /* ID counter for DF pkts */
unsigned recverr : 1,
- freebind : 1;
+ freebind : 1,
+ hdrincl : 1,
+ mc_loop : 1;
int mc_index; /* Multicast device index */
__u32 mc_addr;
struct ip_mc_socklist *mc_list; /* Group array */
next prev parent reply other threads:[~2005-03-09 19:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-09 19:45 [PATCHSET] [NET] Various sock struct reorderings Thomas Graf
2005-03-09 19:46 ` Thomas Graf [this message]
2005-03-09 19:47 ` [PATCH 2/11] [NET] Convert sk_zapped into SOCK_ZAPPED flag Thomas Graf
2005-03-09 19:54 ` Patrick McHardy
2005-03-09 19:56 ` Thomas Graf
2005-03-09 20:05 ` Patrick McHardy
2005-03-09 20:23 ` Thomas Graf
2005-03-09 19:47 ` [PATCH 3/11] [NET] Convert sk_user_write_queue into SOCK_USE_WRITE_QUEUE flag Thomas Graf
2005-03-09 19:48 ` [PATCH 4/11] [NET] Convert sk_debug into SOCK_DBG flag Thomas Graf
2005-03-09 19:48 ` [PATCH 5/11] [NET] Convert sk_rcvtstamp into SOCK_RCVTSTAMP flag Thomas Graf
2005-03-09 19:49 ` [PATCH 6/11] [NET] Convert sk_no_largesend into SOCK_NO_LARGESEND flag Thomas Graf
2005-03-09 19:49 ` [PATCH 7/11] [NET] Convert sk_localroute into SOCK_LOCALROUTE flag Thomas Graf
2005-03-09 19:50 ` [PATCH 8/11] [NET] Convert sk_queue_shrunk into SOCK_QUEUE_SHRUNK flag Thomas Graf
2005-03-09 19:51 ` [PATCH 9/11] [NET] Reorder struct sock Thomas Graf
2005-03-09 19:51 ` [PATCH 10/11] [NET] Reorder struct ipv6_pinfo Thomas Graf
2005-03-09 19:52 ` [PATCH 11/11] [NET] Reorder struct tcp_options_received Thomas Graf
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=20050309194621.GI31837@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
/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).