* [PATCH,resent] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures
@ 2005-03-16 23:38 Eric Dumazet
2005-03-17 4:54 ` David S. Miller
2005-03-18 12:05 ` [PATCH] /proc/net/stat/rt_cache has a wrong header Eric Dumazet
0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2005-03-16 23:38 UTC (permalink / raw)
To: David S. Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
Resent with diff file not tab/space mangled :(
As peer_cachep uses kmem_cache_create("inet_peer_cache", ... SLAB_HWCACHE_ALIGN ...),
better try to use exactly 64 bytes instead of 72 for struct inet_peer.
This also means that this structure fits in one cache line on x86_64.
Thank you
Eric Dumazet
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 597 bytes --]
diff -Nru linux-2.6.11/include/net/inetpeer.h linux-2.6.11-ed/include/net/inetpeer.h
--- linux-2.6.11/include/net/inetpeer.h 2005-03-02 08:37:48.000000000 +0100
+++ linux-2.6.11-ed/include/net/inetpeer.h 2005-03-16 18:52:49.000000000 +0100
@@ -19,9 +19,9 @@
{
struct inet_peer *avl_left, *avl_right;
struct inet_peer *unused_next, **unused_prevp;
- atomic_t refcnt;
unsigned long dtime; /* the time of last use of not
* referenced entries */
+ atomic_t refcnt;
__u32 v4daddr; /* peer's address */
__u16 avl_height;
__u16 ip_id_count; /* IP ID for the next packet */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH,resent] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures
2005-03-16 23:38 [PATCH,resent] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures Eric Dumazet
@ 2005-03-17 4:54 ` David S. Miller
2005-03-18 12:05 ` [PATCH] /proc/net/stat/rt_cache has a wrong header Eric Dumazet
1 sibling, 0 replies; 6+ messages in thread
From: David S. Miller @ 2005-03-17 4:54 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev
On Thu, 17 Mar 2005 00:38:48 +0100
Eric Dumazet <dada1@cosmosbay.com> wrote:
> Resent with diff file not tab/space mangled :(
Patch applied, thanks Eric.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] /proc/net/stat/rt_cache has a wrong header
2005-03-16 23:38 [PATCH,resent] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures Eric Dumazet
2005-03-17 4:54 ` David S. Miller
@ 2005-03-18 12:05 ` Eric Dumazet
2005-03-18 16:50 ` Stephen Hemminger
1 sibling, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2005-03-18 12:05 UTC (permalink / raw)
To: acme, David S. Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 122 bytes --]
Hello
The header of /proc/net/stat/rt_cache misses the 'in_slow_mc' field.
This patch adds it.
Thank you
Eric Dumazet
[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 697 bytes --]
--- linux-2.6.11/net/ipv4/route.c 2005-03-17 11:19:45.000000000 +0100
+++ linux-2.6.11-ed2/net/ipv4/route.c 2005-03-18 13:01:11.000000000 +0100
@@ -393,7 +393,7 @@
struct rt_cache_stat *st = v;
if (v == SEQ_START_TOKEN) {
- seq_printf(seq, "entries in_hit in_slow_tot in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n");
+ seq_printf(seq, "entries in_hit in_slow_tot in_slow_mc in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n");
return 0;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] /proc/net/stat/rt_cache has a wrong header
2005-03-18 12:05 ` [PATCH] /proc/net/stat/rt_cache has a wrong header Eric Dumazet
@ 2005-03-18 16:50 ` Stephen Hemminger
2005-03-18 17:14 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2005-03-18 16:50 UTC (permalink / raw)
To: Eric Dumazet; +Cc: acme, David S. Miller, netdev
On Fri, 18 Mar 2005 13:05:44 +0100
Eric Dumazet <dada1@cosmosbay.com> wrote:
> Hello
>
> The header of /proc/net/stat/rt_cache misses the 'in_slow_mc' field.
> This patch adds it.
Current iproute2 tools adapt to additional fields, but wouldn't this be breaking
the API for other tools? (if any)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] /proc/net/stat/rt_cache has a wrong header
2005-03-18 16:50 ` Stephen Hemminger
@ 2005-03-18 17:14 ` Eric Dumazet
2005-03-18 17:26 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2005-03-18 17:14 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: acme, David S. Miller, netdev
Stephen Hemminger a écrit :
> On Fri, 18 Mar 2005 13:05:44 +0100
> Eric Dumazet <dada1@cosmosbay.com> wrote:
>
>
>>Hello
>>
>>The header of /proc/net/stat/rt_cache misses the 'in_slow_mc' field.
>>This patch adds it.
>
>
> Current iproute2 tools adapt to additional fields, but wouldn't this be breaking
> the API for other tools? (if any)
>
>
AFAIK the old stat file (/proc/net/rt_cache_acct) was OK.
During the conversion to /proc/net/stat/rt_cache done in late 2.6.XX version, a bug was introduced, in kernel and also in iproute2.
The API if fine, and my patch doesnt change it.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] /proc/net/stat/rt_cache has a wrong header
2005-03-18 17:14 ` Eric Dumazet
@ 2005-03-18 17:26 ` Eric Dumazet
0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2005-03-18 17:26 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Stephen Hemminger, acme, David S. Miller, netdev
Eric Dumazet a écrit :
> AFAIK the old stat file (/proc/net/rt_cache_acct) was OK.
>
> During the conversion to /proc/net/stat/rt_cache done in late 2.6.XX
> version, a bug was introduced, in kernel and also in iproute2.
>
> The API if fine, and my patch doesnt change it.
>
> Eric
>
>
I should give more explanations about the bug :
Each line contains 17 fields.
But the header contains only 16 fields, one column (in_slow_mc, the 4th field) was forgotten.
Thus rtstat (from last iproute2) gives wrong information starting at 4th column.
Eric
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-03-18 17:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-16 23:38 [PATCH,resent] reduce sizeof(struct inet_peer) from 128 to 64 bytes on 64bits architectures Eric Dumazet
2005-03-17 4:54 ` David S. Miller
2005-03-18 12:05 ` [PATCH] /proc/net/stat/rt_cache has a wrong header Eric Dumazet
2005-03-18 16:50 ` Stephen Hemminger
2005-03-18 17:14 ` Eric Dumazet
2005-03-18 17:26 ` Eric Dumazet
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).