Re: [PATCH] [net/ipv4]: fib_seq_show function adjustment to get a more sensable output of /proc/net/route

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Denis Cheng <crquan@...>
Cc: David S. Miller <davem@...>, Jeff Garzik <jgarzik@...>, <netdev@...>, <linux-kernel@...>
Date: Monday, October 22, 2007 - 3:31 pm

Denis Cheng a écrit :

Hum... did you test your patch with many routes declared ? (more than 32 on 
i386/x86_64)

127 is not a random value, but chosen as a power of two minus 1.
PAGE_SIZE is garanted to be a multiple of 128 (127 chars + line_feed) on all 
arches.

So each read() on /proc/net/route delivers PAGE_SIZE/128 lines.

With your patch, some lines might be truncated (one every 32 on i386)


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] [net/ipv4]: fib_seq_show function adjustment to ..., Eric Dumazet, (Mon Oct 22, 3:31 pm)