Subject: Re: kern/32643: re(4) has problems with HW VLAN tagging
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: netbsd-bugs
Date: 11/19/2006 10:50:02
The following reply was made to PR kern/32643; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: pavel@netbsd.org
Cc: gnats-bugs@netbsd.org, tsutsui@ceres.dti.ne.jp
Subject: Re: kern/32643: re(4) has problems with HW VLAN tagging
Date: Sun, 19 Nov 2006 19:49:02 +0900
pavel@netbsd.org wrote:
> yamt suggested something similar, and it did not work for me.
> see Message-Id: <1147820216.470989.3258.nullmailer@yamt.dyndns.org> on
> source-changes.
His patch cleared only vlanctl in the first DMA desc on TX,
but I guess all descs should be cleared both on TX and RX.
(though I'm not sure what will happen when only trailing descs
have vlanctl values on TX with multiple descs)
---
With -current rtl8169.c with #define RE_VLAN:
(byteswap ops should also be fixed for big endian machines though)
--- commands on re(4) host ---
# ifconfig re0 192.168.20.4 ip4csump udp4csum tcp4csum
# ifconfig vlan0 create
# ifconfig vlan0 vlan 4 vlanif re0
# ifconfig vlan0 192.168.200.2
# ping -c 256 -fn 192.168.20.1
:
# ping -c 256 -fn 192.168.200.1
:
# ping -c 256 -fn 192.168.20.1
:
--- end of commands ---
--- tcpdump output on host 192.168.20.1 aka 192.168.200.1 ---
19:31:10.918941 00:0d:0b:4b:af:1b > 00:50:04:65:51:1a, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 15357, offset 0, flags [none], length: 84) 192.168.20.4 > 192.168.20.1: icmp 64: echo request seq 0
19:31:10.918988 00:50:04:65:51:1a > 00:0d:0b:4b:af:1b, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 22507, offset 0, flags [none], length: 84) 192.168.20.1 > 192.168.20.4: icmp 64: echo reply seq 0
:
19:31:17.576561 00:0d:0b:4b:af:1b > 00:50:04:65:51:1a, ethertype 802.1Q (0x8100), length 102: vlan 4, p 0, ethertype IPv4, IP (tos 0x0, ttl 255, id 15613, offset 0, flags [none], length: 84) 192.168.200.2 > 192.168.200.1: icmp 64: echo request seq 0
19:31:17.576615 00:50:04:65:51:1a > 00:0d:0b:4b:af:1b, ethertype 802.1Q (0x8100), length 102: vlan 4, p 0, ethertype IPv4, IP (tos 0x0, ttl 255, id 22767, offset 0, flags [none], length: 84) 192.168.200.1 > 192.168.200.2: icmp 64: echo reply seq 0
:
19:31:28.920271 00:0d:0b:4b:af:1b > 00:50:04:65:51:1a, ethertype 802.1Q (0x8100), length 102: vlan 4, p 0, ethertype IPv4, IP (tos 0x0, ttl 255, id 15869, offset 0, flags [none], length: 84) 192.168.20.4 > 192.168.20.1: icmp 64: echo request seq 0
19:31:28.920325 00:50:04:65:51:1a > 00:0d:0b:4b:af:1b, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 23034, offset 0, flags [none], length: 84) 192.168.20.1 > 192.168.20.4: icmp 64: echo reply seq 0
:
--- end of tcpdump output ---
With my patch:
--- commands on re(4) host ---
# ifconfig re0 192.168.20.4 ip4csump udp4csum tcp4csum
# ifconfig vlan0 create
# ifconfig vlan0 vlan 4 vlanif re0
# ifconfig vlan0 192.168.200.2
# ping -c 256 -fn 192.168.20.1
:
# ping -c 256 -fn 192.168.200.1
:
# ping -c 256 -fn 192.168.20.1
:
--- end of commands ---
--- tcpdump output on host 192.168.20.1 aka 192.168.200.1 ---
19:37:01.564851 00:0d:0b:4b:af:1b > 00:50:04:65:51:1a, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 1, offset 0, flags [none], length: 84) 192.168.20.4 > 192.168.20.1: icmp 64: echo request seq 0
19:37:01.564875 00:50:04:65:51:1a > 00:0d:0b:4b:af:1b, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 23498, offset 0, flags [none], length: 84) 192.168.20.1 > 192.168.20.4: icmp 64: echo reply seq 0
:
19:37:14.011127 00:0d:0b:4b:af:1b > 00:50:04:65:51:1a, ethertype 802.1Q (0x8100), length 102: vlan 4, p 0, ethertype IPv4, IP (tos 0x0, ttl 255, id 257, offset 0, flags [none], length: 84) 192.168.200.2 > 192.168.200.1: icmp 64: echo request seq 0
19:37:14.011154 00:50:04:65:51:1a > 00:0d:0b:4b:af:1b, ethertype 802.1Q (0x8100), length 102: vlan 4, p 0, ethertype IPv4, IP (tos 0x0, ttl 255, id 23760, offset 0, flags [none], length: 84) 192.168.200.1 > 192.168.200.2: icmp 64: echo reply seq 0
:
19:37:21.142618 00:0d:0b:4b:af:1b > 00:50:04:65:51:1a, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 513, offset 0, flags [none], length: 84) 192.168.20.4 > 192.168.20.1: icmp 64: echo request seq 0
19:37:21.142674 00:50:04:65:51:1a > 00:0d:0b:4b:af:1b, ethertype IPv4 (0x0800), length 98: IP (tos 0x0, ttl 255, id 24026, offset 0, flags [none], length: 84) 192.168.20.1 > 192.168.20.4: icmp 64: echo reply seq 0
:
--- end of tcpdump output ---
---
Izumi Tsutsui