All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Schillstrom <hans.schillstrom@ericsson.com>
To: LVS-Devel <lvs-devel@vger.kernel.org>
Cc: Simon Horman <horms@verge.net.au>, Julian Anastasov <ja@ssi.bg>,
	"wensong@linux-vs.org" <wensong@linux-vs.org>,
	"daniel.lezcano@free.fr" <daniel.lezcano@free.fr>
Subject: [v2 PATCH 0/4] IPVS: Backup Adding Ipv6 and Persistence support
Date: Fri, 29 Oct 2010 14:15:34 +0200	[thread overview]
Message-ID: <201010291415.35299.hans.schillstrom@ericsson.com> (raw)

This patch series adds/(updates) the following functionality
in the synchronization between master and backup daemons.

 - Ipv6
 - Persistence Engine
 - Firewall marks transfered
 - Timeouts transfered.
 - Flag field increased to 32 bits.

A new message format is also introduced, not understood by old backup daemons.
For compatibility reasons receiving the old version (version 0) is still possible.
Old (version 0) backups will just drop new (Version 1) messages.

Update scenario:
 Update the Machine with Bakup daemon first.

Message structure:
A new 32 bit word is added to the header,
where the old count_Conns is set to 0 so old Backup daemons just will drop the packet.
Added is version (1) and there is also a spare 16 bit field at the end.
This is a reworked version based upon Simon Hormans work.

 Version 1:
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      0        |    Syncid     |            Size               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Count Conns  |   Version     | Spare set to Zero             |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      |                    IPVS Sync Connection (1)                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                            .                                  |
      ~                            .                                  ~
      |                            .                                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                                                               |
      |                    IPVS Sync Connection (n)                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 Version 0 Header
       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  Count Conns  |    SyncID     |            Size               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    IPVS Sync Connection (1)                   |


The Sync. Conn. message format is also changed to allow future enhancements
and versioning.

     Connection Message format

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |    Type       |    Protocol   | Ver.  |        Size           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Flags                                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            State              |         cport                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |            vport              |         dport                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             fwmark                            |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                             timeout                           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      |                        IP-Addresses  (IPv4 or IPv6)           |
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Options
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Option Type   | Option Length |   Option data                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
      |                              ...                              |
      |               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               | Option Type   | Option Length | Option data   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+               +
      |                           Option data                         |
      |                             ...                             - |
      |          Last Opt. data should be padded for 32 bit alignment |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

New fields that might need some explanation,

Type:
  Bit    7        6        . . .      2         1           0
    +-------------------------------------+-------------+-------+
    |                     Spare           | Packed IPv6 |  IPv6 |
    +-------------------------------------+-------------+-------+

#define STYPE_INET6	 1
#define STYPE_INET6_PACK 2

Ver.  Version of specified type right now it's 0

fwmark:  Firewall mark from skb.

timeout: from ip_vs_conn struct, converted to sec.


Optional Data will be added at the end without any kind of alignment
each Param data will have a header of two bytes

Option header
 Bit    7        6        . . .    0    7                      0
   +----------+----------------------+---------------------------+
   | Optional |      Option type     |    Option length          |
   +----------+----------------------+---------------------------+
   |  Option data ...                                            |
   |  ...                                                        |
   +----------+----------------------+---------------------------+
Bit 7 (msb) Optional Param, conn. entry could be keept
Bit 6-0 Option Type defined below

#define IPVS_OPT_SEQ_DATA 	1
#define IPVS_OPT_PE_DATA	2
#define IPVS_OPT_PE_NAME	3

Option Length, 1-255 bytes 0 is an illegal value.

PATCH STATUS:
 - Persistence data is not tested.


THANKS
The Persistence part is based on Simon Hormans Backup RFC
Julian for the comments and the Review of the RFC

*v2
 Simlified fwmark handling patch 1/4
 New handling of optional data patch 2/4
 Seconds in timeout
 Basically all changes is based on Julians and Simons comments on the RFC
 For details see individual patches.


SUMMARY
 include/linux/ip_vs.h           |    8 +
 include/net/ip_vs.h             |    6 +-
 net/netfilter/ipvs/ip_vs_conn.c |    5 +-
 net/netfilter/ipvs/ip_vs_core.c |    8 +-
 net/netfilter/ipvs/ip_vs_ctl.c  |    4 +-
 net/netfilter/ipvs/ip_vs_ftp.c  |    5 +-
 net/netfilter/ipvs/ip_vs_sync.c |  612 +++++++++++++++++++++++++++++++--------
 7 files changed, 508 insertions(+), 140 deletions(-)

--
Regards
Hans Schillstrom <hans.schillstrom@ericsson.com>

             reply	other threads:[~2010-10-29 12:15 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 12:15 Hans Schillstrom [this message]
2010-10-30 14:55 ` [v2 PATCH 0/4] IPVS: Backup Adding Ipv6 and Persistence support Julian Anastasov
2010-10-30 23:16   ` Simon Horman
2010-11-01 10:04     ` Hans Schillstrom
2010-11-01 15:30     ` Hans Schillstrom
2010-11-01 21:56       ` Julian Anastasov
2010-11-03 20:08     ` Hans Schillstrom
2010-11-06  0:56       ` Simon Horman
2010-11-06 10:02         ` Hans Schillstrom
2010-11-06 11:49           ` Simon Horman
2010-11-06 14:07         ` Julian Anastasov
2010-11-06 14:34           ` Simon Horman
2010-11-06 18:57             ` Julian Anastasov
2010-11-08  6:21               ` Simon Horman
2010-11-08  8:51                 ` Julian Anastasov
2010-11-08 11:16                   ` Simon Horman
2010-11-08 15:07                     ` Hans Schillstrom
2010-11-08 21:45                       ` Simon Horman
2010-11-08 20:59                     ` Julian Anastasov
2010-11-08 21:49                       ` Simon Horman
2010-11-08 23:01                         ` Julian Anastasov
2010-11-09  0:43                           ` Simon Horman
2010-11-08 15:15                 ` Hans Schillstrom
2010-11-08 22:00                   ` Simon Horman
2010-11-08 22:23                     ` Hans Schillstrom
2010-11-09  0:39                       ` Simon Horman
2010-11-08 23:19                     ` Julian Anastasov
2010-11-09  0:48                       ` Simon Horman
2010-11-01 10:03   ` Hans Schillstrom
2010-11-01 21:53     ` Julian Anastasov
2010-11-01 22:47       ` Hans Schillstrom
2010-11-02  0:17         ` Julian Anastasov
2010-11-02  6:13           ` Hans Schillstrom
2010-11-01 12:16   ` [v2 PATCH 0/4] IPVS: Backup Adding Ipv6 and Persistence support -> option_param skip ? 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=201010291415.35299.hans.schillstrom@ericsson.com \
    --to=hans.schillstrom@ericsson.com \
    --cc=daniel.lezcano@free.fr \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-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 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.