From owner-freebsd-net@FreeBSD.ORG Fri Dec 17 06:15:09 2010 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C50110656B9; Fri, 17 Dec 2010 06:15:09 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from out-0.mx.aerioconnect.net (outd.internet-mail-service.net [216.240.47.227]) by mx1.freebsd.org (Postfix) with ESMTP id 4AAD38FC19; Fri, 17 Dec 2010 06:15:03 +0000 (UTC) Received: from idiom.com (postfix@mx0.idiom.com [216.240.32.160]) by out-0.mx.aerioconnect.net (8.13.8/8.13.8) with ESMTP id oBH5oEBG009375; Thu, 16 Dec 2010 21:50:14 -0800 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (h-67-100-89-137.snfccasy.static.covad.net [67.100.89.137]) by idiom.com (Postfix) with ESMTP id 569492D6011; Thu, 16 Dec 2010 21:50:13 -0800 (PST) Message-ID: <4D0AFA13.4040604@freebsd.org> Date: Thu, 16 Dec 2010 21:50:11 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Ruslan Ermilov , Marko Zec , Alexander Motin , FreeBSD Net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 216.240.47.51 Cc: Subject: A question about netgraph and vlans in general. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Dec 2010 06:15:09 -0000 There is a sort of confusion in the kernel and in netgraph I see as to whether a vlan packet has a vlan header on it or has a M_VLANTAG tag on it. For example the ng_vlan netgraph node prepends a real vlan header, and if it were to be handed an mbuf with a M_VLANTAG associated with it, it would ignore it, leaving a packet with both. (maybe useful for QinQ except the order is probably opposite what one would want or expect). Is there possibility that it (the vlan node) should simply add a M_VLANTAG and let it be handled downstream? and what happens if there is already a vlan tag? should teh vlan tag be converted into a header and a new vlan tag added with the new value? I ask this after prodding with PR 152141 which is to do with vlan encapsulation for ng_ether. During my investigation of the bug, looking to see what was done elsewhere it seemed that it was a little confusing.. Julian