Re: [PATCH 4/5] udp: memory limitation by using udp_mem

2007-11-21 Thread Hideo AOKI
David Miller wrote: > From: Hideo AOKI <[EMAIL PROTECTED]> > Date: Thu, 15 Nov 2007 16:50:14 -0500 > >> +static inline int __ip_check_max_skb_pages(struct sock *sk, int size) >> +{ >> +switch(sk->sk_protocol) { >> +case IPPROTO_UDP: >> +if (atomic_read(sk->sk_prot->memory_alloc

Re: [PATCH 4/5] udp: memory limitation by using udp_mem

2007-11-16 Thread David Miller
From: Hideo AOKI <[EMAIL PROTECTED]> Date: Fri, 16 Nov 2007 21:52:16 -0500 > I understood that memory accounting code should avoid special > protocols checks. Then, I'll improve this part in next patch set. Thank you for continuing this work, it is very much appreciated. - To unsubscribe from th

Re: [PATCH 4/5] udp: memory limitation by using udp_mem

2007-11-16 Thread Hideo AOKI
Herbert Xu wrote: > On Thu, Nov 15, 2007 at 03:23:53PM -0800, David Miller wrote: >> We don't have tests all over the place to see if a socket is TCP or >> DCCP or SCTP in order to implement memory accounting there, because we >> did it for connection oriented protocols cleanly, seperating things >

Re: [PATCH 4/5] udp: memory limitation by using udp_mem

2007-11-15 Thread Herbert Xu
On Thu, Nov 15, 2007 at 03:23:53PM -0800, David Miller wrote: > > We don't have tests all over the place to see if a socket is TCP or > DCCP or SCTP in order to implement memory accounting there, because we > did it for connection oriented protocols cleanly, seperating things > via callbacks etc. >

Re: [PATCH 4/5] udp: memory limitation by using udp_mem

2007-11-15 Thread David Miller
From: Hideo AOKI <[EMAIL PROTECTED]> Date: Thu, 15 Nov 2007 16:50:14 -0500 > +static inline int __ip_check_max_skb_pages(struct sock *sk, int size) > +{ > + switch(sk->sk_protocol) { > + case IPPROTO_UDP: > + if (atomic_read(sk->sk_prot->memory_allocated) + size > +

[PATCH 4/5] udp: memory limitation by using udp_mem

2007-11-15 Thread Hideo AOKI
This patch introduces memory limitation for UDP. signed-off-by: Satoshi Oshima <[EMAIL PROTECTED]> signed-off-by: Hideo Aoki <[EMAIL PROTECTED]> --- Documentation/networking/ip-sysctl.txt |6 include/net/udp.h |3 ++ net/ipv4/af_inet.c |3