From owner-freebsd-net@FreeBSD.ORG Wed Feb 8 16:53:48 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 E41A0106564A; Wed, 8 Feb 2012 16:53:48 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 495EC8FC14; Wed, 8 Feb 2012 16:53:47 +0000 (UTC) Received: by wgbgn7 with SMTP id gn7so5445121wgb.1 for ; Wed, 08 Feb 2012 08:53:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=3Bt1p2WgEfVCw+a9p2HRYww/5ShIpfbtlPkn3tFIoFI=; b=HUJyNFAP7h64bx0V2gdlNo2kgILoS6bklRZ2wFWlxJ066t/U0Wb0hXJ6izTW9RNw9F goBHTfw28wwpfYCHNXZ7gwHs9zKbU7dg0G0xT4n6jRfA3xkjdjLRJXVf0YR11MkuRSLr ESrTISnHiFHN74s1uAx+t1oO9HQ6AXHyHNe0w= MIME-Version: 1.0 Received: by 10.216.135.76 with SMTP id t54mr11003490wei.14.1328720027188; Wed, 08 Feb 2012 08:53:47 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.175.136 with HTTP; Wed, 8 Feb 2012 08:53:47 -0800 (PST) In-Reply-To: <20120208104213.GD13554@FreeBSD.org> References: <20120208104213.GD13554@FreeBSD.org> Date: Wed, 8 Feb 2012 08:53:47 -0800 X-Google-Sender-Auth: bnglK4tXeo4hK85xl1tgke5FUwM Message-ID: From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 16:53:49 -0000 2012/2/8 Gleb Smirnoff : > 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: Thanks for your feedback! Ivan, can you please review these? Adrian > > 1.1) According to style(9) new code should use uintXX_t instead of u_intX= X_t. > 1.2) Some lines are really loooong, they need to be broken into shorter o= nes > =A0 =A0 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 > =A0 the KASSERT was. So it'll be better to change the code under NETGRAPH= _DEBUG > =A0 to KASSERTs. For example in the chunk '@@ -262,35 +322,143 @@': > > =A0 =A0 =A0 =A0KASSERT(priv->vlan_hook[EVL_VLANOFTAG(hook_data)] =3D=3D h= ook, > =A0 =A0 =A0 =A0 =A0 =A0("%s: NGM_VLAN_DEL_FILTER: Invalid VID for Hook = =3D %s\n", > =A0 =A0 =A0 =A0 =A0 =A0__func__, (char *)msg->data)); > > =A0 =A0 =A0 =A0and > > =A0 =A0 =A0 =A0KASSERT(EVL_VLANOFTAG(hook_data) =3D=3D vid, > =A0 =A0 =A0 =A0 =A0 =A0("%s: NGM_VLAN_DEL_VID_FLT: Invalid VID Hook =3D %= us, must be: %us\n", > =A0 =A0 =A0 =A0 =A0 =A0__func__, (uint16_t )EVL_VLANOFTAG(hook_data), vid= )); > > -- > Totus tuus, Glebius.