From patchwork Mon May 11 11:46:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyrill Gorcunov X-Patchwork-Id: 27047 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 28906B6F56 for ; Mon, 11 May 2009 22:54:10 +1000 (EST) Received: by ozlabs.org (Postfix) id 1CE0DDDE18; Mon, 11 May 2009 22:54:10 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id AB9C2DDE0A for ; Mon, 11 May 2009 22:54:09 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758084AbZEKMyG (ORCPT ); Mon, 11 May 2009 08:54:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757117AbZEKMyE (ORCPT ); Mon, 11 May 2009 08:54:04 -0400 Received: from rv-out-0506.google.com ([209.85.198.236]:27590 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755482AbZEKMx5 (ORCPT ); Mon, 11 May 2009 08:53:57 -0400 Received: by rv-out-0506.google.com with SMTP id f9so2140705rvb.1 for ; Mon, 11 May 2009 05:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:message-id :user-agent:date:from:to:cc:subject:references:content-disposition; bh=O5r7culrc7ESF5hLG2J+ESBVZqOF9D2rtSr946X14RE=; b=iyZLw7lyFrwgw4Art/92nQkTP6WM0bELTD12d+eaCgPHrMDq+ktwK9zTVCL+eltAUr Vjb/S6JEZfoa2Ng2czhCJQV5Lf14m5/UG+8726zQPOtwQNolqWYzgVz+nRyDFTC9dRt8 eNAuEvvZZgyEXp6OElHK6c3n6ulGkMflx/XLM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:user-agent:date:from:to:cc:subject:references :content-disposition; b=STalqdJ25yufCo1Lu3s6pZfCQFzwRQreWyNbQ9J51UW2x2ybi6N1fQDdT0lWlIIXXj F/MRvm8ddjwg3mR84XbAXjFNZOsmZK53nYZpjnFOXWJioxaSSC8+oMXfor2j5EiUL6YH F7aBRgYN5Pirm0Ruhzn1+l93BXMLSfbOEVT1U= Received: by 10.141.62.9 with SMTP id p9mr2947251rvk.76.1242046437300; Mon, 11 May 2009 05:53:57 -0700 (PDT) Received: from gorcunov (95-28-135-248.broadband.corbina.ru [95.28.135.248]) by mx.google.com with ESMTPS id f42sm10943452rvb.11.2009.05.11.05.53.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 11 May 2009 05:53:56 -0700 (PDT) Received: by gorcunov (Postfix, from userid 1000) id 2FBE31C7E; Mon, 11 May 2009 16:53:51 +0400 (MSD) Message-Id: <20090511125350.996551330@openvz.org> User-Agent: quilt/0.47-1 Date: Mon, 11 May 2009 15:46:42 +0400 From: Cyrill Gorcunov To: Stephen Hemminger Cc: davem@davemloft.net, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, xemul@openvz.org, Cyrill Gorcunov Subject: [RFC 3/5] net: sk_buff - introduce br_seen field to mark skb issued by a bridge References: <20090511114639.440944109@openvz.org> Content-Disposition: inline; filename=net-br-introduce-skb-brmark Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org To distinguish skb's that was issued by a bridge (to not loop forever) special skb mark is needed - br_seen. Signed-off-by: Cyrill Gorcunov --- include/linux/skbuff.h | 3 +++ net/core/skbuff.c | 3 +++ 2 files changed, 6 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6.git/include/linux/skbuff.h ===================================================================== --- linux-2.6.git.orig/include/linux/skbuff.h +++ linux-2.6.git/include/linux/skbuff.h @@ -382,6 +382,9 @@ struct sk_buff { __u8 do_not_encrypt:1; __u8 requeue:1; #endif +#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) + __u8 br_seen:1; +#endif /* 0/13/14 bit hole */ #ifdef CONFIG_NET_DMA Index: linux-2.6.git/net/core/skbuff.c ===================================================================== --- linux-2.6.git.orig/net/core/skbuff.c +++ linux-2.6.git/net/core/skbuff.c @@ -549,6 +549,9 @@ static void __copy_skb_header(struct sk_ new->tc_verd = old->tc_verd; #endif #endif +#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) + new->br_seen = old->br_seen; +#endif new->vlan_tci = old->vlan_tci; skb_copy_secmark(new, old);