Skip to contentSkip to conversation

Move IPVS from net/ipv4/ipvs to net/netfilter/ipvs in preparation for IPv6 support

PATCH In review Julius Volz 3 participants 7 messages May 7, 2008 – May 9, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Move IPVS from net/ipv4/ipvs to net/netfilter/ipvs in preparation for IPv6 support

Hi,

I'm resending this since I didn't get any feedback on it the first time around. I redid the patch to apply to the current net-2.6 tree. Please let me know if there are any issues with it!

Thanks,
Julius

Quoted 31 lines · Julius Volz

Hi,

This patch moves IPVS from net/ipv4/ipvs to net/netfilter/ipvs, as discussed earlier with Horms and Patrick McHardy. This is done as a preparation for later adding IPv6 functionality to IPVS. The patch is 600kb, so I uploaded it here:

http://www-user.tu-chemnitz.de/~volz/move_ipvs_to_netfilter.patch

--------------------------
Description:
Move IPVS from net/ipv4/ipvs to net/netfilter/ipvs as a preparation for adding IPv6 support to IPVS later on.

--------------------------

It applies to the current net-2.6 tree and IPVS is working after these changes. The patch also moves the IPVS menu options into the Netfilter menu subtree. Please let me know if that is ok or has to be changed (it seems ok to me, as IPVS depends on Netfilter).

Again, I'm pretty new to kernel development, so let me know of anything that can be done better.

Thanks,
Julius Volz

--
Google Switzerland GmbH

Signature · 1 line
Google Switzerland GmbH
#1 lore raw
Quoted 4 lines · Julius Volz

Hi,

I'm resending this since I didn't get any feedback on it the first time around.

With the little time lvs developers have had for ipv6 so far, you're not likely to get much feedback from people here I'm sorry to say.

The people who are interested in ipv6 have posted to the mailing list. Some of them may still be interested in lvs-ipv6 and in testing patches. Looking for ipv6 in

http://marc.info/?l=linux-virtual-server&m=116664927421172&w=2

Dan White <dwhite () olp ! net>

Tim Mooney <Tim.Mooney () ndsu ! edu>

Bhaskar K <k_bhaskar () sifycorp ! com>

"jinjian" <jinjian () cnnic ! cn>

"John P. Looney" <john () antefacto ! com>

Seiji Tsuchiike <tsuchiike () yggr-drasill ! com> #the original ipv6 implementation for LVS, doesn't respond to e-mail and is not findable with google.

"Fernanda G Weiden" <[email protected]> #I think she's with you

A pair of people working for a company installing gear at govt sites was interested enough in getting an ipv6 port of LVS to offer Horms some money for his time, but Horms didn't have time at any price. You'd think I'd be able to find the e-mail from these people, but apparently I can't think of the correct grep string.

You might e-mail all these people above and as well put out notices of new releases of code onto the regular LVS mailing list. Someone may be listening, or they'll pick it up from one of the archivers.

Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#2 lore raw

Hi Joe,

Quoted 2 lines · On Wed, May 7, 2008, Joseph Mack NA3T wrote:

With the little time lvs developers have had for ipv6 so far, you're not
likely to get much feedback from people here I'm sorry to say.

Hm, ok. This patch doesn't touch any functionality though. It only moves files from one directory to another, so it's merely cosmetics, no IPv6 knowledge required. Of course, we could still do the move later, after some IPv6 code is actually in IPVS. If there is no reaction, I'll just continue working under net/ipv4/ipvs for now. No big deal.

Quoted 7 lines

The people who are interested in ipv6 have posted to the mailing list. Some
of them may still be interested in lvs-ipv6 and in testing patches. Looking for ipv6 in

http://marc.info/?l=linux-virtual-server&m=116664927421172&w=2

[addresses]

Thank you! Good to have interested people for testing later on. We also have some, but different people and organizations have different setups and edge cases to help testing.

The other code I have at the moment compiles (sometimes), but doesn't do much more. It needs much more work to actually do something again with either IP version.

Quoted 3 lines

Seiji Tsuchiike <tsuchiike () yggr-drasill ! com> #the original ipv6
implementation for LVS, doesn't respond to e-mail and is not findable with google.

Yes, he and his code seem to have disappeared...

Quoted 1 line

"Fernanda G Weiden" <[email protected]> #I think she's with you

Yes! :)

Quoted 5 lines

A pair of people working for a company installing gear at govt sites was
interested enough in getting an ipv6 port of LVS to offer Horms some money for his time, but Horms didn't have time at any price. You'd think I'd be able to find the e-mail from these people, but apparently I can't think of the correct grep string.

Ok, thanks. Let me know in case you stumble over it!

Quoted 3 lines

You might e-mail all these people above and as well put out notices of new
releases of code onto the regular LVS mailing list. Someone may be listening, or they'll pick it up from one of the archivers.

Yes, once there is code that does something useful! At the moment, it seems like a hamburger too big to get a good first bite at. But I'm working on it...

Thanks for responding once again, Joe!

Julius

Signature · 1 line
Google Switzerland GmbH
#3 lore raw
Quoted 3 lines · Julius Volz

Hm, ok. This patch doesn't touch any functionality though. It only moves files from one directory to another, so it's merely cosmetics, no IPv6 knowledge required.

are you at a stage where it's all split up, after which you'll only be working on the ipv6 part and leaving the ipv4 untouched? Have you tested the ipv4 part to make sure it's still OK. ie the code is reorthogonalised but with no change in functionality?

If so then this might be a good point to submit to the kernel. Also Jason might be interested in the new version of the code (hopefully working in different parts of the code, you two won't be having many collisions).

One of the things I worry about (from personal experience) is people working on projects and getting stuck for time and later having to drop the work. If you can submit the reorthogonalised code, and have to stop sometime later, at least we've got that far down the road.

Horms,
Do you want ipvs() reorthogonalised into ipv4/ipv6
blocks, presumably with the ipv4 functionality untouched, and with ipv6 stubs, for submission to the kernel, or do you want to wait for the finished product?

Joe

Signature · 4 lines
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
#4 lore raw
Quoted 11 lines · On Friday 09 May 2008 21:49:52 Joseph Mack NA3T wrote:
Quoted 3 lines · Julius Volz

Hm, ok. This patch doesn't touch any functionality though. It only moves files from one directory to another, so it's merely cosmetics, no IPv6 knowledge required.

are you at a stage where it's all split up, after which you'll only be working on the ipv6 part and leaving the ipv4 untouched? Have you tested the ipv4 part to make sure it's still OK. ie the code is reorthogonalised but with no change in functionality?

I haven't applied the patch and done a diff to individual files to be certain, but I'm pretty sure that the patch is mainly just a directory change. IPVS itself is already fairly well abstracted protocol-wise. Just another guess, but it sounds like Julius is submitting the patch as it would make more meaty patches smaller.

Quoted 4 lines

If so then this might be a good point to submit to the kernel. Also Jason might be interested in the new version of the code (hopefully working in different parts of the code, you two won't be having many collisions).

Call me crazy, but I plan to put my patch into production in two weeks time without the connect-to-vip-from-director parts. If everything goes well, I'll post patches again with adequate comments (and adjustments to comments). And to make this relevant: My patches don't do anything protocol specific other than to change when things are done and so would be fairly easy to update for IPV6 if/when it is integrated.

Signature · 4 lines
Jason Stubbs <[email protected]>
LINKTHINK INC.
東京都渋谷区桜ヶ丘町22-14 N.E.S S棟 3F
TEL 03-5728-4772  FAX 03-5728-4773
#5 lore raw
Quoted 1 line · Jason Stubbs

I haven't applied the patch and done a diff to individual files to be certain, but I'm pretty sure that the patch is mainly just a directory change.

Yes, this is only a directory move of the current code in the kernel (with the needed small Kconfig and Makefile adjustments for that, of course).

Basically, you can arrive at this patch by doing:

$ git mv net/ipv4/ipvs net/netfilter
change net/ipv4/Kconfig:
        - source "net/ipv4/ipvs/Kconfig" => move (with adjusted dir)
to net/netfilter/Kconfig
change net/ipv4/Makefile:
        - obj-$(CONFIG_IP_VS) += ipvs/   => move to net/netfilter/Makefile

Julius

Signature · 1 line
Google Switzerland GmbH
#6 lore raw
In reply to Joseph Mack NA3T
Quoted 4 lines · On Fri, May 9, 2008, Joseph Mack NA3T wrote:

are you at a stage where it's all split up, after which you'll only be working on the ipv6 part and leaving the ipv4 untouched? Have you tested the ipv4 part to make sure it's still OK. ie the code is reorthogonalised but with no change in functionality?

No, I'm not at this stage yet, I'm approaching the problem from the other direction, following your earlier advice: try to come up with something that actually does something (hopefully in a couple of weeks, due to other obligations), then worry about separation / cleanup and more features. So everything is pretty hacky with lots of open TODOs and stupid questions. It compiles, but running it wouldn't make much sense (partially because of lacking userspace ipsvadm support for the changes). I'm not even #ifdef-ing away my IPv6 code at the moment...

What I did:

I basically copied lots of IPVS functions (yep, too much duplication, unfortunately) that depend on the IP version and made corresponding IPv6 versions of the function. A lot of this duplication could probably be avoided by doing some heavy refactoring, but I tried to stay away from that to minimize the chances of breaking the existing code. Some few, not often called functions now handle both IP versions in one function. The multiplexing of IPv4/IPv6 code is done either by implicitly knowing which code path we're in (different paths resulting from different NF hooks for IPv4/IPv6) or by looking at the new "af" address family (AF_INET or AF_INET6) field introduced into all the relevant IPVS data structures.

I didn't duplicate any data structures, even the actual hash tables contain both IPv4 and IPv6 entries (differentiation done via the "af" field). So far, this seems to work quite well... what I don't like about this is that you have an additional space-taking IPv6 address field in all data structures, even when it is not used. E.g., when IPv6 support is compiled as a module, but it is not loaded. A later move to use different structs for the cases that actually matter (probably only the table of active connections) should be pretty easy, though.

Quoted 4 lines

One of the things I worry about (from personal experience) is people working on projects and getting stuck for time and later having to drop the work. If you can submit the reorthogonalised code, and have to stop sometime later, at least we've got that far down the road.

Yes, let's hope that will not happen. But sadly, I'm not at the stage of having cleanly separated code, so submitting code isn't possible yet :(

Julius

Signature · 1 line
Google Switzerland GmbH