Subject: Re: IP Header CRC problems

From: "Pieter Truter" <[email-masked]>
Date: Tue, 9 May 2000 14:26:32 -0700

I just solved my problem.

The packet addr was not 4 byte aligned.
By adding a skb_reserve(..,2) after allocating it, solved the problem.

Thanks

  ----- Original Message ----- 
  From: Pieter Truter 
  To: [email-masked] 
  Sent: Tuesday, May 09, 2000 11:45 AM
  Subject: IP Header CRC problems

  I have ported ARM-Linux to a SA-1110 based board with 16M ram & 16M falsh with a Crystal network chip.

  I used Linux-2.3.99-pre6 and wrote a device driver for the ether chip based on the existing cs89x0 driver.

  The problem is that I can ping remote system from my board and the remote system reply to the ping. However, the network stack rejects the IP packet based on a bad IP header CRC claculated with ip_fast_csum() in net/ipv4/ip_input.c.

  If I compare the packet on the wire against what I pass up the IP stack, it looks the same.

  So it appears that my network device driver works OK. I am tracing through the network code to find the problem, but I cannot imagine that I am the first/only person using the network on an ARM system.

  The weird part is that I receive & send all ARP packets perfectly.

  I would appreciete any help.

  Thanks.

  Here is a few screens:
  =================

  Starting kernel at address c0008000...
  Uncompre ............................... done, bLinux version 2.3.99-pre3-rmk3-np2 
  (ptruter@testlinux) (gcc version 2.95.2 19991024 (release)) #186 Tue May 9 09:51:13 PDT 2000
  Architecture: Intrinsyc Surfboard
  On node 0 totalpages: 2048
  zone(0): 2048 pages.
  zone(1): 0 pages.
  zone(2): 0 pages.
  On node 1 totalpages: 2048
  zone(0): 2048 pages.
  zone(1): 0 pages.
  zone(2): 0 pages.
  Calibrating delay loop... 180.22 BogoMIPS
  Memory: 8MB 8MB = 16MB total
  Memory: 12852KB available (888K code, 442K data, 8K init)
  Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
  Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
  POSIX conformance testing by UNIFIX
  Linux NET4.0 for Linux 2.3
  Based upon Swansea University Computer Society NET3.039
  NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
  NET4: Linux TCP/IP 1.0 for NET4.0
  IP Protocols: ICMP, UDP, TCP
  IP: routing cache hash table of 512 buckets, 4Kbytes
  TCP: Hash tables configured (established 1024 bind 1024)
  Starting kswapd v1.6
  SA1100 serial driver version 1.2
  ttyS0 on SA1100 UART3 (irq 17)
  ttyS1 on SA1100 UART1 (irq 15)
  pty: 256 Unix98 ptys configured
  RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
  cerf89x0:cerf89x0_probe()
  cerf89x0.c: (kernel 2.3.99) Russell Nelson, Andrew Morton
  eth0: cs8900 rev I found at 0xd8000300 , IRQ 11, programmed I/O, MAC 00:d0:ca:f1:ff:2f
  RAMDISK: Compressed image found at block 0
  NetWinder Floating Point Emulator V0.95 (c) 1998-1999 Rebel.com
  VFS: Mounted root (ext2 filesystem).
  Freeing unused kernel memory: 8k init

  Linux login:

  Some Network Screens:
  =================
  [root@Linux /root]$ ifconfig
  eth0    Link encap:Ethernet  HWaddr 00:D0:CA:F1:FF:2F
            inet addr:192.168.0.232  Bcast:192.168.0.255  Mask:255.255.255.0
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:11 errors:0 dropped:0 overruns:0 frame:0
            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:100
            Interrupt:11 Base address:0x300

  [root@Linux /root]$ arp -av
  ? (192.168.0.25) at 00:10:4B:33:83:36 [ether] on eth0
  Entries: 1      Skipped: 0      Found: 1