Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630Ab2JHSmi (ORCPT ); Mon, 8 Oct 2012 14:42:38 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:56854 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751172Ab2JHSmf (ORCPT ); Mon, 8 Oct 2012 14:42:35 -0400 Date: Mon, 08 Oct 2012 14:42:30 -0400 (EDT) Message-Id: <20121008.144230.1404596032615788891.davem@davemloft.net> To: florz@florz.de Cc: kaber@trash.net, eric.dumazet@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jpirko@redhat.com Subject: Re: [PATCH v2] vlan: don't deliver frames for unknown vlans to protocols From: David Miller In-Reply-To: <20121008015158.GE25895@florz.florz.dyndns.org> References: <20121008015158.GE25895@florz.florz.dyndns.org> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1092 Lines: 27 From: Florian Zumbiehl Date: Mon, 8 Oct 2012 03:51:58 +0200 > This version completely avoids any new state that could need to be spilled > to RAM, and instead re-checks existence and non-zeroness of the tag. What > do you think? At a high level it looks fine and doesn't have the problems mentioned earlier. But I wonder if it breaks things, since you do the assignment so late we no longer handle the case where the VLAN device's MAC address matches the packet MAC address and the top-level device's does not. That's handled by logic in vlan_do_receive() which checks for PACKET_OTHERHOST. But you're going to unconditionally set PACKET_OTHERHOST, overriding any decision that code makes. This turns out to be a really non-trivial area and it's going to take some time to get this right and audit the change appropriately. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/