From: hans@schillstrom.com
To: horms@verge.net.au, ja@ssi.bg, daniel.lezcano@free.fr,
wensong@linux-vs.org, lvs-devel@vger.kernel.org,
netdev@vger.kernel.org, netfilter-devel@vger.kernel.org
Cc: Hans Schillstrom <hans.schillstrom@ericsson.com>
Subject: [*v3 PATCH 00/22] IPVS Network Name Space aware
Date: Thu, 30 Dec 2010 11:50:44 +0100 [thread overview]
Message-ID: <1293706266-27152-1-git-send-email-hans@schillstrom.com> (raw)
From: Hans Schillstrom <hans.schillstrom@ericsson.com>
This patch series adds network name space support to the LVS.
REVISION
This is version 3
OVERVIEW
The patch doesn't remove or add any functionality except for netns.
For users that don't use network name space (netns) this patch is
completely transparent.
Now it's possible to run LVS in a Linux container (see lxc-tools)
i.e. a light weight visualization. For example it's possible to run
one or several lvs on a real server in their own network name spaces.
>From the LVS point of view it looks like it runs on it's own machine.
IMPLEMENTATION
Basic requirements for netns awareness
- Global variables has to be moved to dyn. allocated memory.
- No or very little performance loss
Large hash tables connection hash and service hashes still resides in
global memory with net ptr added in hash key.
Most global variables now resides in a struct ipvs { } in netns/ip_vs.h.
The size of per name space is 2096 bytes (for x86_64) and a little bit less
for 32 bit arch's.
Statistics counters is now lock-free i.e. incremented per CPU,
The estimator does a sum when using it.
Procfs: ip_vs_stats_percpu is added to reflect the "per cpu"
ex.
# cat /proc/net/ip_vs_stats
Total Incoming Outgoing Incoming Outgoing
CPU Conns Packets Packets Bytes Bytes
0 0 3 1 9D 34
1 0 1 2 49 70
2 0 1 2 34 76
3 1 2 2 70 74
~ 1 7 7 18A 18E
Conns/s Pkts/s Pkts/s Bytes/s Bytes/s
0 0 0 0 0
Algorithm files are untouched except for lblc and lblcr.
STEP BY STEP
First patch creates network name space init for all files that need it.
How ever if a new name space is created an error is returned.
This will be removed in the last patch.
When net ptr ain't available init_net will be used temporarily.
CHANGES
*v2
The patches is totally reworked so each patch compile ...
Depends on the IPv6 and Persistence Backup patch.
Common hash-table per name-space for connections and services
Stats per CPU
smaller changes in lblc and lblcr
Triggered by Julians comment:
"tcp_timeout_change should work with the new struct ip_vs_proto_data
so that tcp_state_table will go to pd->state_table
and set_tcp_state will get pd instead of pp"
*v3
Changes triggered by comment mostly, see individual patches for details.
procfs ip_vs_stats remains the same, ip_vs_stats_percpu added instead.
Unused functions removed.
The pp -> pd conversion should start from functions like ip_vs_out()....
Timer per ns instead of a common timer in estimator.
Moved net compare to the end in "fast path"
__ip_vs_mutex remains global
PATCH SET
This patch set is based upon lvs-test-2.6 / v2.6.37-rc1
and depends upon IPVS sync patches
STATUS
untested protos
- sctp
- esp_ah
and SIP for IPv6
SUMMARY
include/net/ip_vs.h | 248 +++++++---
include/net/net_namespace.h | 2 +
include/net/netns/ip_vs.h | 146 ++++++
net/netfilter/ipvs/ip_vs_app.c | 101 +++--
net/netfilter/ipvs/ip_vs_conn.c | 159 ++++---
net/netfilter/ipvs/ip_vs_core.c | 228 ++++++---
net/netfilter/ipvs/ip_vs_ctl.c | 826 ++++++++++++++++++-------------
net/netfilter/ipvs/ip_vs_est.c | 131 ++++--
net/netfilter/ipvs/ip_vs_ftp.c | 56 ++-
net/netfilter/ipvs/ip_vs_lblc.c | 66 +++-
net/netfilter/ipvs/ip_vs_lblcr.c | 70 +++-
net/netfilter/ipvs/ip_vs_nfct.c | 6 +-
net/netfilter/ipvs/ip_vs_proto.c | 121 +++++-
net/netfilter/ipvs/ip_vs_proto_ah_esp.c | 45 +-
net/netfilter/ipvs/ip_vs_proto_sctp.c | 144 +++---
net/netfilter/ipvs/ip_vs_proto_tcp.c | 133 +++---
net/netfilter/ipvs/ip_vs_proto_udp.c | 102 ++--
net/netfilter/ipvs/ip_vs_sync.c | 422 +++++++++-------
net/netfilter/xt_ipvs.c | 2 +-
19 files changed, 1960 insertions(+), 1048 deletions(-)
next reply other threads:[~2010-12-30 10:50 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-30 10:50 hans [this message]
2010-12-30 10:50 ` [*v3 PATCH 01/22] IPVS: netns, add basic init per netns hans
2010-12-30 23:58 ` Jan Engelhardt
2010-12-31 15:36 ` Hans Schillstrom
2010-12-30 10:50 ` [*v3 PATCH 02/22] IPVS: netns to services part 1 hans
2011-01-01 14:57 ` Jan Engelhardt
2011-01-03 9:14 ` Hans Schillstrom
2010-12-30 10:50 ` [*v3 PATCH 03/22] IPVS: netns awarness to lblcr sheduler hans
2010-12-30 10:50 ` [*v3 PATCH 04/22] IPVS: netns awarness to lblc sheduler hans
2010-12-30 10:50 ` [*v3 PATCH 05/22] IPVS: netns, prepare protocol hans
2010-12-30 10:50 ` [*v3 PATCH 06/22] IPVS: netns preparation for proto_tcp hans
2010-12-30 10:50 ` [*v3 PATCH 07/22] IPVS: netns preparation for proto_udp hans
2010-12-30 10:50 ` [*v3 PATCH 08/22] IPVS: netns preparation for proto_sctp hans
2010-12-30 10:50 ` [*v3 PATCH 09/22] IPVS: netns preparation for proto_ah_esp hans
2010-12-30 10:50 ` [*v3 PATCH 10/22] IPVS: netns, use ip_vs_proto_data as param hans
2010-12-30 10:50 ` [*v3 PATCH 11/22] IPVS: netns, common protocol changes and use of appcnt hans
2010-12-30 10:50 ` [*v3 PATCH 12/22] IPVS: netns awareness to ip_vs_app hans
2010-12-30 10:50 ` [*v3 PATCH 13/22] IPVS: netns awareness to ip_vs_est hans
2010-12-30 10:50 ` [*v3 PATCH 14/22] IPVS: netns awareness to ip_vs_sync hans
2010-12-31 0:44 ` Simon Horman
2011-01-02 9:47 ` Hans Schillstrom
2010-12-30 10:50 ` [*v3 PATCH 15/22] IPVS: netns, ip_vs_stats and its procfs hans
2010-12-30 10:51 ` [*v3 PATCH 16/22] IPVS: netns, connection hash got net as param hans
2010-12-30 10:51 ` [*v3 PATCH 17/22] IPVS: netns, ip_vs_ctl local vars moved to ipvs struct hans
2010-12-30 10:51 ` [*v3 PATCH 18/22] IPVS: netns, defense work timer hans
2010-12-30 10:51 ` [*v3 PATCH 19/22] IPVS: netns, trash handling hans
2010-12-30 10:51 ` [*v3 PATCH 20/22] IPVS: netns, svc counters moved in ip_vs_ctl,c hans
2010-12-30 10:51 ` [*v3 PATCH 21/22] IPVS: netns, misc init_net removal in core hans
2010-12-30 10:51 ` [*v3 PATCH 22/22] IPVS: netns, final patch enabling network name space hans
2011-01-01 12:27 ` [*v3 PATCH 00/22] IPVS Network Name Space aware Julian Anastasov
2011-01-02 16:27 ` Hans Schillstrom
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=1293706266-27152-1-git-send-email-hans@schillstrom.com \
--to=hans@schillstrom.com \
--cc=daniel.lezcano@free.fr \
--cc=hans.schillstrom@ericsson.com \
--cc=horms@verge.net.au \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=wensong@linux-vs.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 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).