LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ipvs 0.8.1 tcp checksum failed

To: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ipvs 0.8.1 tcp checksum failed
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Wed, 17 Oct 2001 22:18:05 +0800 (CST)
On 16 Oct 2001, Hervé Guehl wrote:

> Repost.. I used the wrong mail account to send
>
> Hi,
> I have a problem with ipvs 0.8.1...
> In fact packets are not "forwarded"
> here's what I can find with dmesg :
> "IPVS: Incoming failed TCP checksum from 192.168.32.248 (size=40)!"


The size=40 is exactly the size of struct iphdr and tcphdr, so the size of
payload is zero, so this is zero data packet, it seldom helps in real
applications.

One of odd thing is that csum_partial implementation on the i386
architecture will provide the wrong result if the length is zero and the
address is double word aligned.

csum_partial(a, 0, 0) = 0
csum_partial(a+1, 0, 0) = 0
csum_partial(a+2, 0, 0) = 3
csum_partial(a+3, 0, 0) = 4

csum_partial implementations on other architectures is right. I used to
provide a patch.

--- linux/arch/i386/lib/checksum.S.orig Wed Sep  6 05:01:35 2000
+++ linux/arch/i386/lib/checksum.S      Fri Jul 13 09:54:37 2001
@@ -149,6 +149,8 @@
 30:    subl $2, %ecx
        ja 20b
        je 32f
+       addl $2, %ecx
+       jz 80f
        movzbl (%esi),%ebx      # csumming 1 byte, 2-aligned
        addl %ebx, %eax
        adcl $0, %eax


But the kernel guru insist that the caller should check the length first
before csum_partial, their assumption on  csum_partial calling is the
length must be >0. Maybe I need to make a shell of ip_vs_csum_partial to
correct this problem.

Regards,

Wensong



> I am running 2.4.12, network card drivers eepro100 and starfire..
> Following my ipvs and network conf (routing is enabled.. no firewall
> rule):
>
> ipvsadm -Ln
> IP Virtual Server version 0.8.1 (size=65536)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port             Forward Weight ActiveConn InActConn
> TCP  192.168.35.199:80 wlc persistent 30
>   -> 192.168.39.199:80              Masq    1      0          0
>   -> 192.168.39.200:80              Masq    1      0          0
>
> ip a:
>
> 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
>     inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
> 2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
>     link/ether 00:d0:b7:b6:7c:35 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.39.252/24 brd 192.168.39.255 scope global eth0
>     inet 192.168.39.254/24 scope global secondary eth0
> 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
>     link/ether 00:00:d1:ee:41:31 brd ff:ff:ff:ff:ff:ff
> 4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
>     link/ether 00:00:d1:ee:41:32 brd ff:ff:ff:ff:ff:ff
> 5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 100
>     link/ether 00:00:d1:ee:41:33 brd ff:ff:ff:ff:ff:ff
> 6: eth4: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
>     link/ether 00:00:d1:ee:41:34 brd ff:ff:ff:ff:ff:ff
>     inet 192.168.35.248/24 brd 192.168.35.255 scope global eth4
>     inet 192.168.35.199/32 scope global eth4
>
> Made test on eth4 with 192.168.35.199/32 and 192.168.35.199/24
>
> Did I forgot something ??
> PS: This works with the devel version 0.9.4..
>
> Regards
> Hervé
>
>
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://www.in-addr.de/mailman/listinfo/lvs-users
>



<Prev in Thread] Current Thread [Next in Thread>