From owner-freebsd-current@FreeBSD.ORG Tue Nov 9 19:14:21 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C87816A4CE; Tue, 9 Nov 2004 19:14:21 +0000 (GMT) Received: from avscan1.sentex.ca (avscan1.sentex.ca [199.212.134.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id 066FC43D41; Tue, 9 Nov 2004 19:14:21 +0000 (GMT) (envelope-from mike@sentex.net) Received: from localhost (localhost.sentex.ca [127.0.0.1]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id iA9JEJIP015397; Tue, 9 Nov 2004 14:14:19 -0500 (EST) (envelope-from mike@sentex.net) Received: from avscan1.sentex.ca ([127.0.0.1]) by localhost (avscan1.sentex.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 14781-06; Tue, 9 Nov 2004 14:14:19 -0500 (EST) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by avscan1.sentex.ca (8.12.11/8.12.11) with ESMTP id iA9JEFve015349; Tue, 9 Nov 2004 14:14:15 -0500 (EST) (envelope-from mike@sentex.net) Received: from simian.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.12.11/8.12.11) with ESMTP id iA9JE5kO029917; Tue, 9 Nov 2004 14:14:06 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <6.1.2.0.0.20041109135557.0767b2c0@64.7.153.2> X-Sender: mdtpop@64.7.153.2 (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 6.1.2.0 Date: Tue, 09 Nov 2004 14:20:09 -0500 To: "Lenar D. Tukhvatullin" , astesin@ukrtelecom.net From: Mike Tancsa In-Reply-To: <20041108191316.GA9446@proxy.netroad.ru> References: <1152675CA9EDD71187130002B3CE5ADA10660EB1@hoexc010.ukrtelecom.net> <20041108191316.GA9446@proxy.netroad.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by amavisd-new X-Virus-Scanned: by amavisd-new at avscan1b cc: freebsd-current@freebsd.org cc: rwatson@freebsd.org Subject: Re: em0, VLAN and bpf(?) trouble w/RELENG_5 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2004 19:14:21 -0000 At 02:13 PM 08/11/2004, Lenar D. Tukhvatullin wrote: >I have similar problem (but with "bge" interface). >See PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=72933 >Can you recompile and test kernel with my patch? Hi, I tried --- if_ethersubr.c.orig Tue Nov 9 13:47:11 2004 +++ if_ethersubr.c Tue Nov 9 13:47:31 2004 @@ -647,7 +647,7 @@ #endif if (!(BDG_ACTIVE(ifp)) && - !(ether_type == ETHERTYPE_VLAN && ifp->if_nvlans > 0)) { + !((ether_type == ETHERTYPE_VLAN || m_tag_locate(m, MTAG_VLAN, MTAG_VLAN_TAG, NULL) != NULL) && ifp->if_nvlans > 0)) { /* * Discard packet if upper layers shouldn't see it because it * was unicast to a different Ethernet address. If the driver But no luck. On the RELENG_5 machine, as soon as I do # tcpdump -en -i vlan0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on vlan0, link-type EN10MB (Ethernet), capture size 96 bytes 13:57:00.234459 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, 802.3, length 64: LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39 13:57:00.834971 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype IPv4 (0x0800), length 98: IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 19968 13:57:00.834994 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4 (0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 19968 13:57:01.844991 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype IPv4 (0x0800), length 98: IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 20224 The ping never makes it back to the source. As soon as I stop the tcpdump, traffic passes once again. Afterwards, if I do it just on em0 and ping the vlan IP on vlan0, it again freezes up, despite tcpdump implying that its working. # tcpdump -i em0 -ne tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 96 bytes 13:58:56.986762 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype 802.1Q (0x8100), length 102: vlan 2, p 0, ethertype IPv4, IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 49408 13:58:56.986790 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4 (0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 49408 13:58:57.996780 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype 802.1Q (0x8100), length 102: vlan 2, p 0, ethertype IPv4, IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 49664 13:58:57.996803 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4 (0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 49664 13:58:58.110834 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q (0x8100), length 68: vlan 3, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39 0x0000: 0100 0ccc cccd 000b be69 149a 8100 e003 .........i...... 0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2.............. 0x0020: 0300 0bbe 6914 8000 0000 0080 0300 0bbe ....i........... 0x0030: 6914 8080 1a00 i..... 13:58:58.112208 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q (0x8100), length 68: vlan 4, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39 0x0000: 0100 0ccc cccd 000b be69 149a 8100 e004 .........i...... 0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2.............. 0x0020: 0400 0bbe 6914 8000 0000 0080 0400 0bbe ....i........... 0x0030: 6914 8080 1a00 i..... 13:58:58.124076 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q (0x8100), length 68: vlan 109, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39 0x0000: 0100 0ccc cccd 000b be69 149a 8100 e06d .........i.....m 0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2.............. 0x0020: 6d00 0bbe 6914 8000 0000 0080 6d00 0bbe m...i.......m... 0x0030: 6914 8080 1a00 i..... 13:58:58.234760 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, ethertype 802.1Q (0x8100), length 68: vlan 2, p 7, LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39 0x0000: 0100 0ccc cccd 000b be69 149a 8100 e002 .........i...... 0x0010: 0032 aaaa 0300 000c 010b 0000 0000 0080 .2.............. 0x0020: 0200 0bbe 6914 8000 0000 0080 0200 0bbe ....i........... 0x0030: 6914 8080 1a00 i..... 13:58:58.250875 00:0b:be:69:14:9a > 01:80:c2:00:00:00, 802.3, length 60: LLC, dsap STP (0x42), ssap STP (0x42), cmd 0x03, 802.1d config 8001.00:0b:be:69:14:80.801a root 8001.00:0b:be:69:14:80 pathcost 0 age 0 max 20 hello 2 fdelay 15 13:58:58.251875 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cd, 802.3, length 64: LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, sap aa ui/C len=39 13:58:58.759447 00:0b:be:69:14:9a > 01:00:0c:cc:cc:cc, 802.3, length 388: LLC, dsap SNAP (0xaa), ssap SNAP (0xaa), cmd 0x03, CDPv2, ttl: 180s, Device-ID 'Switch'[|cdp] 13:58:58.762568 00:0b:be:69:14:9a > 00:0b:be:69:14:9a, ethertype Loopback (0x9000), length 60: 0x0000: 0000 0100 0000 0000 0000 0000 0000 0000 ................ 0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0020: 0000 0000 0000 0000 0000 0000 0000 .............. 13:58:59.006797 00:01:80:54:23:5a > 00:01:80:54:b8:df, ethertype 802.1Q (0x8100), length 102: vlan 2, p 0, ethertype IPv4, IP 10.2.2.1 > 10.2.2.2: icmp 64: echo request seq 49920 13:58:59.006817 00:01:80:54:b8:df > 00:01:80:54:23:5a, ethertype IPv4 (0x0800), length 98: IP 10.2.2.2 > 10.2.2.1: icmp 64: echo reply seq 49920 ^C 14 packets captured 14 packets received by filter 0 packets dropped by kernel # If I reboot the system, and just tcpdump em0, everything works as expected. I can start and stop the dump with no problem. I can then ifconfig vlan0 create, and still start and stop tcpdump -i em0 with no problem. But if I then send some data across vlan0 from the other machine, doing a tcpdump -i em0 stops all traffic from coming back. ie.. em0 and vlan0 get the data, but em0 and vlan0 no longer can send data. ---Mike