Arnaldo Carvalho de Melo
2ff52f282c
[TCP]: Change tcp_header_len member in tcp_sock to u16
...
With this we eliminate the last hole in struct tcp_sock.
End result:
[acme@newtoy net-2.6.20]$ codiff -sV /tmp/tcp.o.before net/ipv4/tcp.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c:
struct tcp_sock | -4
tcp_header_len;
from: int /* 1000(0) 4(0) */
to: u16 /* 1000(0) 2(0) */
1 struct changed
[acme@newtoy net-2.6.20]$
Now sizeof(tcp_sock) is just...
[acme@newtoy net-2.6.20]$ pahole --sizes ../OUTPUT/qemu/net-2.6.20/net/ipv4/tcp.o | grep -w tcp_sock
struct tcp_sock: 1500 0
1500 bytes ;-)
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com >
2006-12-02 21:30:53 -08:00
Arnaldo Carvalho de Melo
d5c42c0ec4
[NET]: Pack struct hh_cache
...
[acme@newtoy net-2.6.20]$ pahole net/ipv4/tcp.o hh_cache
/* /pub/scm/linux/kernel/git/acme/net-2.6.20/include/linux/netdevice.h:190 */
struct hh_cache {
struct hh_cache * hh_next; /* 0 4 */
atomic_t hh_refcnt; /* 4 4 */
__be16 hh_type; /* 8 2 */
/* XXX 2 bytes hole, try to pack */
int hh_len; /* 12 4 */
int (*hh_output)(); /* 16 4 */
rwlock_t hh_lock; /* 20 36 */
long unsigned int hh_data[24]; /* 56 96 */
}; /* size: 152, sum members: 150, holes: 1, sum holes: 2 */
[acme@newtoy net-2.6.20]$ find net -name "*.[ch]" | xargs grep 'hh_len.\+=' | sort -u
net/atm/br2684.c: hh->hh_len = PADLEN + ETH_HLEN;
net/ethernet/eth.c: hh->hh_len = ETH_HLEN;
net/ipv4/ipconfig.c: int hh_len = LL_RESERVED_SPACE(dev);
net/ipv4/ip_output.c: hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
net/ipv4/ip_output.c: int hh_len = LL_RESERVED_SPACE(dev);
net/ipv4/netfilter.c: hh_len = (*pskb)->dst->dev->hard_header_len;
net/ipv4/raw.c: hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
net/ipv6/ip6_output.c: hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
net/ipv6/netfilter/ip6t_REJECT.c: hh_len = (dst->dev->hard_header_len + 15)&~15;
net/ipv6/raw.c: hh_len = LL_RESERVED_SPACE(rt->u.dst.dev);
[acme@newtoy net-2.6.20]$
[acme@newtoy net-2.6.20]$ find include -name "*.h" | xargs grep 'define ETH_HLEN'
include/linux/if_ether.h:#define ETH_HLEN 14 /* Total octets in header. */
(((dev)->hard_header_len&~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
[acme@newtoy net-2.6.20]$ pahole net/ipv4/tcp.o net_device | grep hard_header_len
short unsigned int hard_header_len; /* 106 2 */
[acme@newtoy net-2.6.20]$
So I think we're safe in turning hh_len an u16, end result:
[acme@newtoy net-2.6.20]$ codiff -sV /tmp/tcp.o.before net/ipv4/tcp.o
/pub/scm/linux/kernel/git/acme/net-2.6.20/net/ipv4/tcp.c:
struct hh_cache | -4
hh_len;
from: int /* 12(0) 4(0) */
to: u16 /* 10(0) 2(0) */
1 struct changed
[acme@newtoy net-2.6.20]$
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com >
2006-12-02 21:30:47 -08:00
Thomas Graf
e3703b3de1
[RTNETLINK]: Add rtnl_put_cacheinfo() to unify some code
...
IPv4, IPv6, and DECNet all use struct rta_cacheinfo in a similiar
way, therefore rtnl_put_cacheinfo() is added to reuse code.
Signed-off-by: Thomas Graf <tgraf@suug.ch >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:30:44 -08:00
Thomas Graf
4e9b826935
[NETLINK]: Remove unused dst_pid field in netlink_skb_parms
...
The destination PID is passed directly to netlink_unicast()
respectively netlink_multicast().
Signed-off-by: Thomas Graf <tgraf@suug.ch >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:30:43 -08:00
Gerrit Renker
d61c167dd0
[NET]: Add documentation for TFRC structures
...
This adds documentation for the TFRC structure fields.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk >
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz >
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com >
2006-12-02 21:30:42 -08:00
Al Viro
ff1dcadb1b
[NET]: Split skb->csum
...
... into anonymous union of __wsum and __u32 (csum and csum_offset resp.)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:27:18 -08:00
Al Viro
962c837275
[SCTP]: Netfilter sctp annotations.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:27:12 -08:00
Al Viro
f3ffaf1468
[SCTP]: Annotate SCTP headers.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:26:16 -08:00
Ian McDonald
82e3ab9dbe
[DCCP]: Adds the tx buffer sysctls
...
This one got lost on the way from Ian to Gerrit to me, fix it.
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz >
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com >
2006-12-02 21:24:42 -08:00
Michael Chan
bac0dff6cd
[BNX2]: Add 5709 PCI ID.
...
Add PCI ID and detection for 5709 copper and SerDes chips.
Signed-off-by: Michael Chan <mchan@broadcom.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:24:33 -08:00
Al Viro
1f61ab5ca5
[NET]: Preliminaty annotation of skb->csum.
...
It's still not completely right; we need to split it into anon unions
of __wsum and unsigned - for cases when we use it for partial checksum
and for offset of checksum in skb
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:44 -08:00
Al Viro
43bc0ca7ea
[NET]: netfilter checksum annotations
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:42 -08:00
Al Viro
b51655b958
[NET]: Annotate __skb_checksum_complete() and friends.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:38 -08:00
Al Viro
81d7766276
[NET]: Annotate skb_copy_and_csum_bits() and callers.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:36 -08:00
Al Viro
2bbbc86890
[NET]: Annotate skb_checksum() and callers.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:35 -08:00
Al Viro
5084205faf
[NET]: Annotate callers of csum_partial_copy_...() and csum_and_copy...() in net/*
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:33 -08:00
Al Viro
44bb93633f
[NET]: Annotate csum_partial() callers in net/*
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:32 -08:00
Al Viro
9981a0e36a
[NET]: Annotate checksums in on-the-wire packets.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:26 -08:00
Al Viro
2bc357987a
[NET]: Introduce types for checksums.
...
New types - for 16bit checksums and "unfolded" 32bit variant.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:23:00 -08:00
Al Viro
a64b78a077
[NET]: Annotate net_srandom().
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:22:57 -08:00
Al Viro
47c183fa5e
[BRIDGE]: Annotations.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:22:56 -08:00
Al Viro
30d492da73
[ATM]: Annotations.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:22:55 -08:00
Al Viro
42d224aa17
[NETFILTER]: More trivial annotations.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:22:54 -08:00
Al Viro
b09b845ca6
[RANDOM]: Annotate random.h IP helpers.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:22:51 -08:00
Al Viro
714e85be35
[IPV6]: Assorted trivial endianness annotations.
...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Signed-off-by: David S. Miller <davem@davemloft.net >
2006-12-02 21:22:50 -08:00