From: Octavian Purdila <opurdila-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
linux-sctp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC Patch] net: reserve ports for applications using fixed port numbers
Date: Thu, 4 Feb 2010 20:15:51 +0200 [thread overview]
Message-ID: <201002042015.51092.opurdila@ixiacom.com> (raw)
In-Reply-To: <20100204.094110.64247447.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Thursday 04 February 2010 19:41:10 you wrote:
> From: Octavian Purdila <opurdila-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
> Date: Thu, 4 Feb 2010 14:44:01 +0200
>
> > My concern is that we can have multiple applications that require a
> > fixed port and if those ports are significantly apart we will
> > decrease the port range available for connect. And that will hurt
> > the rate of which new connections can be opened.
>
> I'm already uneasy about adding the simple check every time
> we loop around in the bind port allocator.
>
> Adding an LSM hook to this spot? I absolutely refuse to allow
> that, it will completely kill bind performance.
>
I think Tetsuo was proposing the LSM hook, so I'll leave him the daunting task
of convincing you of the benefit of that :) - I have no opinion on this due to
massive lack of knowledge.
I was just proposing to use a discrete set of ports instead of a range. The
check in the current patch:
int inet_is_reserved_local_port(int port)
{
int min, max;
inet_get_local_reserved_ports(&min, &max);
if (min && max)
return (port >= min && port <= max);
return 0;
}
would become:
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
larger memory footprint than just a min/max, especially with random port
allocation. But is this an issue in practice?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Octavian Purdila <opurdila@ixiacom.com>
To: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org,
linux-sctp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC Patch] net: reserve ports for applications using fixed port numbers
Date: Thu, 04 Feb 2010 18:15:51 +0000 [thread overview]
Message-ID: <201002042015.51092.opurdila@ixiacom.com> (raw)
In-Reply-To: <20100204.094110.64247447.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Thursday 04 February 2010 19:41:10 you wrote:
> From: Octavian Purdila <opurdila@ixiacom.com>
> Date: Thu, 4 Feb 2010 14:44:01 +0200
>
> > My concern is that we can have multiple applications that require a
> > fixed port and if those ports are significantly apart we will
> > decrease the port range available for connect. And that will hurt
> > the rate of which new connections can be opened.
>
> I'm already uneasy about adding the simple check every time
> we loop around in the bind port allocator.
>
> Adding an LSM hook to this spot? I absolutely refuse to allow
> that, it will completely kill bind performance.
>
I think Tetsuo was proposing the LSM hook, so I'll leave him the daunting task
of convincing you of the benefit of that :) - I have no opinion on this due to
massive lack of knowledge.
I was just proposing to use a discrete set of ports instead of a range. The
check in the current patch:
int inet_is_reserved_local_port(int port)
{
int min, max;
inet_get_local_reserved_ports(&min, &max);
if (min && max)
return (port >= min && port <= max);
return 0;
}
would become:
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
larger memory footprint than just a min/max, especially with random port
allocation. But is this an issue in practice?
WARNING: multiple messages have this Message-ID (diff)
From: Octavian Purdila <opurdila@ixiacom.com>
To: David Miller <davem@davemloft.net>
Cc: amwang@redhat.com, linux-kernel@vger.kernel.org,
eric.dumazet@gmail.com, linux-rdma@vger.kernel.org,
netdev@vger.kernel.org, nhorman@tuxdriver.com,
linux-sctp@vger.kernel.org
Subject: Re: [RFC Patch] net: reserve ports for applications using fixed port numbers
Date: Thu, 4 Feb 2010 20:15:51 +0200 [thread overview]
Message-ID: <201002042015.51092.opurdila@ixiacom.com> (raw)
In-Reply-To: <20100204.094110.64247447.davem@davemloft.net>
On Thursday 04 February 2010 19:41:10 you wrote:
> From: Octavian Purdila <opurdila@ixiacom.com>
> Date: Thu, 4 Feb 2010 14:44:01 +0200
>
> > My concern is that we can have multiple applications that require a
> > fixed port and if those ports are significantly apart we will
> > decrease the port range available for connect. And that will hurt
> > the rate of which new connections can be opened.
>
> I'm already uneasy about adding the simple check every time
> we loop around in the bind port allocator.
>
> Adding an LSM hook to this spot? I absolutely refuse to allow
> that, it will completely kill bind performance.
>
I think Tetsuo was proposing the LSM hook, so I'll leave him the daunting task
of convincing you of the benefit of that :) - I have no opinion on this due to
massive lack of knowledge.
I was just proposing to use a discrete set of ports instead of a range. The
check in the current patch:
int inet_is_reserved_local_port(int port)
{
int min, max;
inet_get_local_reserved_ports(&min, &max);
if (min && max)
return (port >= min && port <= max);
return 0;
}
would become:
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
larger memory footprint than just a min/max, especially with random port
allocation. But is this an issue in practice?
next prev parent reply other threads:[~2010-02-04 18:15 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 4:30 [RFC Patch] net: reserve ports for applications using fixed port numbers Amerigo Wang
2010-02-03 4:30 ` Amerigo Wang
2010-02-03 4:30 ` Amerigo Wang
[not found] ` <20100203043332.3817.27932.sendpatchset-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-03 4:39 ` Eric Dumazet
2010-02-03 4:39 ` Eric Dumazet
2010-02-03 4:39 ` [RFC Patch] net: reserve ports for applications using fixed Eric Dumazet
2010-02-03 5:15 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Cong Wang
2010-02-03 5:15 ` Cong Wang
2010-02-03 5:15 ` [RFC Patch] net: reserve ports for applications using fixed port Cong Wang
2010-02-03 11:12 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Octavian Purdila
2010-02-03 11:12 ` Octavian Purdila
2010-02-03 11:12 ` Octavian Purdila
[not found] ` <201002031312.48531.opurdila-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
2010-02-04 3:23 ` Cong Wang
2010-02-04 3:23 ` Cong Wang
2010-02-04 3:23 ` [RFC Patch] net: reserve ports for applications using fixed port Cong Wang
[not found] ` <4B6A3DBA.1000706-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-02-04 12:44 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Octavian Purdila
2010-02-04 12:44 ` Octavian Purdila
2010-02-04 12:44 ` Octavian Purdila
[not found] ` <201002041444.01897.opurdila-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
2010-02-04 17:41 ` David Miller
2010-02-04 17:41 ` David Miller
2010-02-04 17:41 ` [RFC Patch] net: reserve ports for applications using fixed David Miller
[not found] ` <20100204.094110.64247447.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-02-04 18:15 ` Octavian Purdila [this message]
2010-02-04 18:15 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Octavian Purdila
2010-02-04 18:15 ` Octavian Purdila
[not found] ` <201002042015.51092.opurdila-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
2010-02-04 18:21 ` David Miller
2010-02-04 18:21 ` David Miller
2010-02-04 18:21 ` [RFC Patch] net: reserve ports for applications using fixed David Miller
2010-02-04 21:45 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Tetsuo Handa
2010-02-04 21:45 ` Tetsuo Handa
2010-02-04 21:45 ` Tetsuo Handa
[not found] ` <201002050645.CEC95380.MLOtOVFFHSFOQJ-JPay3/Yim36HaxMnTkn67Xf5DAMn2ifp@public.gmane.org>
2010-02-04 21:56 ` David Miller
2010-02-04 21:56 ` David Miller
2010-02-04 21:56 ` [RFC Patch] net: reserve ports for applications using fixed David Miller
2010-02-05 0:41 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Tetsuo Handa
2010-02-05 0:41 ` Tetsuo Handa
2010-02-05 1:05 ` Octavian Purdila
2010-02-05 1:05 ` Octavian Purdila
2010-02-05 5:58 ` [RFC Patch] net: reserve ports for applications using fixed port Cong Wang
2010-02-05 6:01 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Cong Wang
2010-02-05 12:28 ` Octavian Purdila
2010-02-05 12:28 ` Octavian Purdila
2010-02-05 4:45 ` Cong Wang
2010-02-05 4:45 ` [RFC Patch] net: reserve ports for applications using fixed port Cong Wang
[not found] ` <4B6BA272.4090405-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-02-05 12:05 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Octavian Purdila
2010-02-05 12:05 ` Octavian Purdila
2010-02-05 12:05 ` Octavian Purdila
[not found] ` <201002051405.54029.opurdila-+zzKsuq53OdBDgjK7y7TUQ@public.gmane.org>
2010-02-08 3:21 ` Cong Wang
2010-02-08 3:21 ` Cong Wang
2010-02-08 3:21 ` [RFC Patch] net: reserve ports for applications using fixed port Cong Wang
[not found] ` <4B6F834E.4010801-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-02-08 16:51 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Octavian Purdila
2010-02-08 16:51 ` Octavian Purdila
2010-02-08 16:51 ` Octavian Purdila
2010-02-05 7:11 ` Bart Van Assche
2010-02-05 7:11 ` Bart Van Assche
2010-02-05 7:11 ` [RFC Patch] net: reserve ports for applications using fixed port Bart Van Assche
2010-02-05 7:25 ` [RFC Patch] net: reserve ports for applications using fixed port numbers Cong Wang
2010-02-05 7:25 ` [RFC Patch] net: reserve ports for applications using fixed port Cong Wang
2010-02-05 9:08 ` [RFC Patch] net: reserve ports for applications using fixed portnumbers Tetsuo Handa
2010-02-05 9:08 ` Tetsuo Handa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201002042015.51092.opurdila@ixiacom.com \
--to=opurdila-+zzksuq53odbdgjk7y7tuq@public.gmane.org \
--cc=amwang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sctp-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.