From owner-freebsd-net@FreeBSD.ORG Wed Feb 8 10:42:15 2012 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6AB71065675; Wed, 8 Feb 2012 10:42:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 28A978FC0C; Wed, 8 Feb 2012 10:42:14 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q18AgDMx021393; Wed, 8 Feb 2012 14:42:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q18AgDwc021392; Wed, 8 Feb 2012 14:42:13 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 8 Feb 2012 14:42:13 +0400 From: Gleb Smirnoff To: Adrian Chadd , "rozhuk.im" Message-ID: <20120208104213.GD13554@FreeBSD.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Net Subject: Re: call for review: 802.11q QinQ netgraph support 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: Wed, 08 Feb 2012 10:42:15 -0000 On Tue, Feb 07, 2012 at 03:27:10PM -0800, Adrian Chadd wrote: A> I've been working with the patch author on this and although I haven't A> yet had time to test it out myself, he's taken my suggestions on board A> and continued improving things. A> A> The patch can be found in the PR: A> A> http://www.freebsd.org/cgi/query-pr.cgi?pr=161908 A> A> In summary, he's added the ability to support q-in-q tags, as well as A> maintaining backwards compatibility for existing users. A> A> I'd like to commit this at the end of the week. A> A> He's indicated that he will take care of any issues it may break. I'll A> back it out if it breaks things and isn't fixed. A> A> Ivan - thank you for being so patient! A> A> I would appreciate further review from network/netgraph related A> people. I'm going to borrow a term from gnn and say "Silence implies A> consent." :-) I have only minor comments: 1.1) According to style(9) new code should use uintXX_t instead of u_intXX_t. 1.2) Some lines are really loooong, they need to be broken into shorter ones accoording to style(9). 1.3) Operators at beginning of a line - also style(9) violation. 2) NETGRAPH_DEBUG wasn't designed for the things the patch is doing. But the KASSERT was. So it'll be better to change the code under NETGRAPH_DEBUG to KASSERTs. For example in the chunk '@@ -262,35 +322,143 @@': KASSERT(priv->vlan_hook[EVL_VLANOFTAG(hook_data)] == hook, ("%s: NGM_VLAN_DEL_FILTER: Invalid VID for Hook = %s\n", __func__, (char *)msg->data)); and KASSERT(EVL_VLANOFTAG(hook_data) == vid, ("%s: NGM_VLAN_DEL_VID_FLT: Invalid VID Hook = %us, must be: %us\n", __func__, (uint16_t )EVL_VLANOFTAG(hook_data), vid)); -- Totus tuus, Glebius.