From patchwork Sat Apr 7 18:49:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 151318 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 17E13B70A1 for ; Sun, 8 Apr 2012 04:50:01 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754916Ab2DGSt4 (ORCPT ); Sat, 7 Apr 2012 14:49:56 -0400 Received: from investici.nine.ch ([217.150.252.179]:61043 "EHLO confino.investici.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754638Ab2DGSt3 (ORCPT ); Sat, 7 Apr 2012 14:49:29 -0400 Received: from [217.150.252.179] (confino [217.150.252.179]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id C94D4C865D; Sat, 7 Apr 2012 18:49:26 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 confino.investici.org C94D4C865D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1333824568; bh=Dqn4dCvPzXuYj928wdh6QnSrcewiWeAGr+E50uK4QtM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=INdST3wzhqSgR0FHt7vIbe6OzXlDJO/GLh9xzeHfaaB6T+M9AtANPB61xs86S5MOu b9OnBR1YRePWlLUJSpEct9d3UwSkynCaY9+DzoksJqu3gDoxgR+pCHiQ2/YTFdE9mm eRDV6CYzYAZoovTq2dDQhKOjZu78Kv6DX1yWGChw= From: Antonio Quartulli To: davem@davemloft.net Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org, Simon Wunderlich , Simon Wunderlich , Antonio Quartulli Subject: [PATCH 09/16] batman-adv: make bridge loop avoidance switchable Date: Sat, 7 Apr 2012 20:49:51 +0200 Message-Id: <1333824598-27771-10-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.9.4 In-Reply-To: <1333824598-27771-1-git-send-email-ordex@autistici.org> References: <1333824598-27771-1-git-send-email-ordex@autistici.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Simon Wunderlich Signed-off-by: Simon Wunderlich Signed-off-by: Antonio Quartulli --- Documentation/ABI/testing/sysfs-class-net-mesh | 9 +++++++++ net/batman-adv/bat_sysfs.c | 2 ++ 2 files changed, 11 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-net-mesh b/Documentation/ABI/testing/sysfs-class-net-mesh index b218e0f..c81fe89 100644 --- a/Documentation/ABI/testing/sysfs-class-net-mesh +++ b/Documentation/ABI/testing/sysfs-class-net-mesh @@ -14,6 +14,15 @@ Description: mesh will be sent using multiple interfaces at the same time (if available). +What: /sys/class/net//mesh/bridge_loop_avoidance +Date: November 2011 +Contact: Simon Wunderlich +Description: + Indicates whether the bridge loop avoidance feature + is enabled. This feature detects and avoids loops + between the mesh and devices bridged with the soft + interface . + What: /sys/class/net//mesh/fragmentation Date: October 2010 Contact: Andreas Langer diff --git a/net/batman-adv/bat_sysfs.c b/net/batman-adv/bat_sysfs.c index d12757f..824bfe7 100644 --- a/net/batman-adv/bat_sysfs.c +++ b/net/batman-adv/bat_sysfs.c @@ -386,6 +386,7 @@ static ssize_t store_gw_bwidth(struct kobject *kobj, struct attribute *attr, BAT_ATTR_BOOL(aggregated_ogms, S_IRUGO | S_IWUSR, NULL); BAT_ATTR_BOOL(bonding, S_IRUGO | S_IWUSR, NULL); +BAT_ATTR_BOOL(bridge_loop_avoidance, S_IRUGO | S_IWUSR, NULL); BAT_ATTR_BOOL(fragmentation, S_IRUGO | S_IWUSR, update_min_mtu); BAT_ATTR_BOOL(ap_isolation, S_IRUGO | S_IWUSR, NULL); static BAT_ATTR(vis_mode, S_IRUGO | S_IWUSR, show_vis_mode, store_vis_mode); @@ -404,6 +405,7 @@ BAT_ATTR_UINT(log_level, S_IRUGO | S_IWUSR, 0, 15, NULL); static struct bat_attribute *mesh_attrs[] = { &bat_attr_aggregated_ogms, &bat_attr_bonding, + &bat_attr_bridge_loop_avoidance, &bat_attr_fragmentation, &bat_attr_ap_isolation, &bat_attr_vis_mode,