From owner-freebsd-stable@freebsd.org Sun Apr 10 17:44:21 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB727B0BA38 for ; Sun, 10 Apr 2016 17:44:21 +0000 (UTC) (envelope-from cmt@burggraben.net) Received: from smtp.burggraben.net (smtp.burggraben.net [IPv6:2a01:4f8:140:50a2::3:1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "ns.exwg.net", Issuer "Christoph Moench-Tegeder" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 752951A19 for ; Sun, 10 Apr 2016 17:44:21 +0000 (UTC) (envelope-from cmt@burggraben.net) Received: from localhost (localhost [127.0.0.1]) by smtp.burggraben.net (Postfix) with ESMTP id 8DE886002EE for ; Sun, 10 Apr 2016 19:44:16 +0200 (CEST) X-Spam-Scanned: by amavisd-new at exwg.net Received: from smtp.burggraben.net ([127.0.0.1]) by localhost (ns.burggraben.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7Xz0GigrkjxZ for ; Sun, 10 Apr 2016 19:44:16 +0200 (CEST) Received: from elch.exwg.net (elch.exwg.net [IPv6:2001:470:7120:1:922b:34ff:fe56:321]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "elch.exwg.net", Issuer "Christoph Moench-Tegeder" (verified OK)) by smtp.burggraben.net (Postfix) with ESMTPS for ; Sun, 10 Apr 2016 19:44:16 +0200 (CEST) Received: by elch.exwg.net (Postfix, from userid 1000) id C39F3301F2; Sun, 10 Apr 2016 19:44:15 +0200 (CEST) Date: Sun, 10 Apr 2016 19:44:15 +0200 From: Christoph Moench-Tegeder To: freebsd-stable@freebsd.org Subject: VLAN problem on some em(4) cards Message-ID: <20160410174415.GA1746@elch.exwg.net> Mail-Followup-To: freebsd-stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2016 17:44:21 -0000 Hi, while replacing a switch I ran into a problem with using 802.1q VLANs (vlan(4)) on a em(4) card - that is, I could not get the card to work with VLANs. Details: Software is FreeBSD 10.3-RELEASE i386 with a custom kernel (but has em(4) and vlan(4) compiled in (not as a module)). Hardware is a Soekris net6501-70, the interface in question is (pciconf) em2@pci0:10:0:0: class=0x020000 card=0x00008086 chip=0x10d38086 rev=0x00 vendor = 'Intel Corporation' device = '82574L Gigabit Network Connection' class = network subclass = ethernet The setup I wanted to create was a "router on a stick", that is having 3 (for starters) tagged VLANs on that one link between router and switch. I was not able to get any packet through to the switch, while tcpdump shows the packets on the vlan interface (but not on the underlying em interface - I understand that this could be the result of hardware vlan processing). I could not ping any host beyond the switch nor the switch's management interface itself, I did not even receive ARP replies. I tried both manual creation of the vlan devices and the rc.conf/ netif mechanism - with the very same results ("doesn't work"). Experimenting with the vlanhw* flags on the em interface did not result in any change. To make sure it's not the switch (or my own mistake), I took another host with an em interface - this time, it was a em0@pci0:0:25:0: class=0x020000 card=0x21ce17aa chip=0x15028086 rev=0x04 vendor = 'Intel Corporation' device = '82579LM Gigabit Network Connection' class = network subclass = ethernet (again 10.3-RELEASE, but amd64). With this interface (connected to the very same switch port) I had instantaneous success, so I guess the switch is ok and I'm not totally mistaken in my doings. Could anybody give a hint on how to further debug this or a pointer to further reading? Regards, Christoph -- Spare Space