Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-08 Thread Octavian Purdila
On Monday 08 February 2010 05:21:50 you wrote: Octavian Purdila wrote: On Friday 05 February 2010 06:45:38 you wrote: Again, using bitmap algorithm is not a problem and it's better, the problem is sysctl interface, how would you plan to interact with users via sysctl/proc if you use

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-05 Thread Octavian Purdila
On Friday 05 February 2010 06:45:38 you wrote: Again, using bitmap algorithm is not a problem and it's better, the problem is sysctl interface, how would you plan to interact with users via sysctl/proc if you use bitmap to handle this? I would like to hear more details about this. We could

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-04 Thread David Miller
From: Octavian Purdila opurd...@ixiacom.com Date: Thu, 4 Feb 2010 20:15:51 +0200 int inet_is_reserved_local_port(int port) { if (test_bit(port, reserved_ports)) return 1; return 0; } In theory it might be slower because of the reserved_ports bitmap will have a

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-04 Thread David Miller
From: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp Date: Fri, 5 Feb 2010 06:45:28 +0900 Octavian Purdila wrote: int inet_is_reserved_local_port(int port) { if (test_bit(port, reserved_ports)) return 1; return 0; } Above check is exactly what I'm doing in the

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-04 Thread Cong Wang
Octavian Purdila wrote: On Friday 05 February 2010 02:41:12 you wrote: David Miller wrote: Octavian Purdila wrote: int inet_is_reserved_local_port(int port) { if (test_bit(port, reserved_ports)) return 1; return 0; } Above check is exactly what I'm doing in

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-04 Thread Bart Van Assche
On Wed, Feb 3, 2010 at 5:30 AM, Amerigo Wang amw...@redhat.com wrote: This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers within

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-04 Thread Cong Wang
Bart Van Assche wrote: On Wed, Feb 3, 2010 at 5:30 AM, Amerigo Wang amw...@redhat.com wrote: This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-03 Thread Octavian Purdila
On Wednesday 03 February 2010 06:30:07 you wrote: This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers within ip_local_port_range. This only

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-03 Thread Cong Wang
Octavian Purdila wrote: On Wednesday 03 February 2010 06:30:07 you wrote: This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers within

[RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-02 Thread Amerigo Wang
This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers within ip_local_port_range. This only affects the applications which call socket functions like

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-02 Thread Eric Dumazet
Le mardi 02 février 2010 à 23:30 -0500, Amerigo Wang a écrit : This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers within ip_local_port_range.

Re: [RFC Patch] net: reserve ports for applications using fixed port numbers

2010-02-02 Thread Cong Wang
Eric Dumazet wrote: Le mardi 02 février 2010 à 23:30 -0500, Amerigo Wang a écrit : This patch introduces /proc/sys/net/ipv4/ip_local_reserved_ports, it can be used like ip_local_port_range, but this is used to reserve ports for third-party applications which use fixed port numbers within