All of lore.kernel.org
 help / color / mirror / Atom feed
* [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support
@ 2010-11-19 13:24 Hans Schillstrom
  2010-11-19 20:22 ` Julian Anastasov
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Schillstrom @ 2010-11-19 13:24 UTC (permalink / raw)
  To: Simon Horman, Julian Anastasov, LVS-Devel, wensong, Daniel Lezcano
  Cc: Hans Schillstrom

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

 - IPv6
 - Persistence Engine
 - Firewall marks transferred
 - Time-outs transferred.
 - Flag field increased to 32 bits.

Note:
This patch set is build upon lvs-next-2.6
i.e. last patch in master was "ipvs: allow transmit of GRO aggregated skbs"


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.
It's also possible to send sync msg in version 0 format, by sysctl
#sysclt -w net.ipv4.vs.sync_version=0


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:
  Note, first byte should be Zero, so ver 0 receivers will drop the packet.

       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    |    Reserved, 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)                   |


Note: Msg. Size is the real block size include padding

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

     Sync Connection format (sync_conn)

       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  (in sec.)                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                              ...                              |
      |                        IP-Addresses  (v4 or v6)               |
      |                              ...                              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  Optional Parameters.
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      | Param. Type    | Param. Length |   Param. data                |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
      |                              ...                              |
      |                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                               | Param Type    | Param. Length |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                           Param  data                         |
      |         Last Param data should be padded for 32 bit alignment |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

New fields that might need some explanation,

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

Bit 0 = 1 This sync_conn contains IPv6 addresses.


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

Size;    not including ev. padding

fwmark:  Firewall mark from skb.

timeout: from ip_vs_conn struct, converted to sec.


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

Param. header
 Bit    7        6        . . .    0    7                      0
   +----------+----------------------+---------------------------+
   | Optional |  Parameter Type      |  Parameter length         |
   +----------+----------------------+---------------------------+
   |  Data ...                                                   |
   |  ...                                                        |
   +----------+----------------------+---------------------------+
Bit 7 (msb) Optional Param, conn. entry could be keept, if not type
            is unknown.
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
#define IPVS_OPT_PARAM          7

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

PATCH STATUS:
 - Persistence data for IPv6 is not tested.
 - Practical test for SEQ_DATA not teest due to lack of sending logic.

THANKS
To Julian and Simon for the review and alternative solutions.

*v6
 Patch 4 Handling scheduling errors, was forgotten it has also been rewritten.
 see comments in that patch

*v5
 Minor changes, mostly in ip_vs_sync_conn
 change of padding philosophy, according to Julians comments.
 Added an Error messages in ip_vs_conn_fill_param_sync()
 - IP_VS_ERR_RL("BACKUP, Invalid PE parameters\n");
 4 patches from staging branch added again.

*v4
 Corrections and enhancements acording to Julians review
 See individual patches.
 Change of principle, length for individual sync_conn
 does not contain padding.

*v3
 New: Ability to send ver. 0 sync messages.
 Optional data, renamed to Optional parameter
 Corrections, see comments in each patch,

*v2
 Simplified 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                   |   11 +-
 net/netfilter/ipvs/ip_vs_conn.c       |    5 +-
 net/netfilter/ipvs/ip_vs_core.c       |   97 +++--
 net/netfilter/ipvs/ip_vs_ctl.c        |   32 +-
 net/netfilter/ipvs/ip_vs_ftp.c        |    5 +-
 net/netfilter/ipvs/ip_vs_pe.c         |    5 +-
 net/netfilter/ipvs/ip_vs_pe_sip.c     |    3 +
 net/netfilter/ipvs/ip_vs_proto_sctp.c |   11 +-
 net/netfilter/ipvs/ip_vs_proto_tcp.c  |   10 +-
 net/netfilter/ipvs/ip_vs_proto_udp.c  |   10 +-
 net/netfilter/ipvs/ip_vs_sync.c       |  962 ++++++++++++++++++++++++++++-----
 12 files changed, 963 insertions(+), 196 deletions(-)

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support
  2010-11-19 13:24 [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support Hans Schillstrom
@ 2010-11-19 20:22 ` Julian Anastasov
  2010-11-20 22:07   ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Julian Anastasov @ 2010-11-19 20:22 UTC (permalink / raw)
  To: Hans Schillstrom
  Cc: Simon Horman, LVS-Devel, wensong, Daniel Lezcano, Hans Schillstrom


 	Hello,

On Fri, 19 Nov 2010, Hans Schillstrom wrote:

> This patch series adds/(updates) the following functionality
> in the synchronization between master and backup daemons.
>
> - IPv6
> - Persistence Engine
> - Firewall marks transferred
> - Time-outs transferred.
> - Flag field increased to 32 bits.

> *v6
> Patch 4 Handling scheduling errors, was forgotten it has also been rewritten.
> see comments in that patch

 	v6 looks ok to me, thanks!

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support
  2010-11-19 20:22 ` Julian Anastasov
@ 2010-11-20 22:07   ` Simon Horman
  2010-11-20 22:52     ` Julian Anastasov
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2010-11-20 22:07 UTC (permalink / raw)
  To: Julian Anastasov
  Cc: Hans Schillstrom, LVS-Devel, wensong, Daniel Lezcano, Hans Schillstrom

On Fri, Nov 19, 2010 at 10:22:40PM +0200, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Fri, 19 Nov 2010, Hans Schillstrom wrote:
> 
> >This patch series adds/(updates) the following functionality
> >in the synchronization between master and backup daemons.
> >
> >- IPv6
> >- Persistence Engine
> >- Firewall marks transferred
> >- Time-outs transferred.
> >- Flag field increased to 32 bits.
> 
> >*v6
> >Patch 4 Handling scheduling errors, was forgotten it has also been rewritten.
> >see comments in that patch
> 
> 	v6 looks ok to me, thanks!

These look good to me too.
Julian, can I add acked-by you?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support
  2010-11-20 22:07   ` Simon Horman
@ 2010-11-20 22:52     ` Julian Anastasov
  2010-11-21  5:37       ` Simon Horman
  0 siblings, 1 reply; 5+ messages in thread
From: Julian Anastasov @ 2010-11-20 22:52 UTC (permalink / raw)
  To: Simon Horman
  Cc: Hans Schillstrom, LVS-Devel, wensong, Daniel Lezcano, Hans Schillstrom


 	Hello,

On Sun, 21 Nov 2010, Simon Horman wrote:

> On Fri, Nov 19, 2010 at 10:22:40PM +0200, Julian Anastasov wrote:
>>
>> 	Hello,
>>
>> On Fri, 19 Nov 2010, Hans Schillstrom wrote:
>>
>>> This patch series adds/(updates) the following functionality
>>> in the synchronization between master and backup daemons.
>>>
>>> - IPv6
>>> - Persistence Engine
>>> - Firewall marks transferred
>>> - Time-outs transferred.
>>> - Flag field increased to 32 bits.
>>
>>> *v6
>>> Patch 4 Handling scheduling errors, was forgotten it has also been rewritten.
>>> see comments in that patch
>>
>> 	v6 looks ok to me, thanks!
>
> These look good to me too.
> Julian, can I add acked-by you?

 	Yes

Acked-by: Julian Anastasov <ja@ssi.bg>

Regards

--
Julian Anastasov <ja@ssi.bg>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support
  2010-11-20 22:52     ` Julian Anastasov
@ 2010-11-21  5:37       ` Simon Horman
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2010-11-21  5:37 UTC (permalink / raw)
  To: Julian Anastasov
  Cc: Hans Schillstrom, LVS-Devel, wensong, Daniel Lezcano,
	Hans Schillstrom, Patrick McHardy

On Sun, Nov 21, 2010 at 12:52:47AM +0200, Julian Anastasov wrote:
> 
> 	Hello,
> 
> On Sun, 21 Nov 2010, Simon Horman wrote:
> 
> >On Fri, Nov 19, 2010 at 10:22:40PM +0200, Julian Anastasov wrote:
> >>
> >>	Hello,
> >>
> >>On Fri, 19 Nov 2010, Hans Schillstrom wrote:
> >>
> >>>This patch series adds/(updates) the following functionality
> >>>in the synchronization between master and backup daemons.
> >>>
> >>>- IPv6
> >>>- Persistence Engine
> >>>- Firewall marks transferred
> >>>- Time-outs transferred.
> >>>- Flag field increased to 32 bits.
> >>
> >>>*v6
> >>>Patch 4 Handling scheduling errors, was forgotten it has also been rewritten.
> >>>see comments in that patch
> >>
> >>	v6 looks ok to me, thanks!
> >
> >These look good to me too.
> >Julian, can I add acked-by you?
> 
> 	Yes
> 
> Acked-by: Julian Anastasov <ja@ssi.bg>

Thanks,

I'll wait until the pull of my previous set of changes
appears in nf-next-2.6 and then send these changes to Patrick.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-21  5:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-19 13:24 [*v6 PATCH 0/8] IPVS: Backup Adding Ipv6 and Persistence support Hans Schillstrom
2010-11-19 20:22 ` Julian Anastasov
2010-11-20 22:07   ` Simon Horman
2010-11-20 22:52     ` Julian Anastasov
2010-11-21  5:37       ` Simon Horman

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.