b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@ascom.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: "Linus Lüssing" <linus.luessing@ascom.ch>
Subject: [B.A.T.M.A.N.] [PATCH 08/12] batman-adv: Add sysfs option for enabling redundant bonding mode
Date: Wed,  2 Mar 2011 18:18:37 +0100	[thread overview]
Message-ID: <1299086321-25116-9-git-send-email-linus.luessing@ascom.ch> (raw)
In-Reply-To: <1299086321-25116-1-git-send-email-linus.luessing@ascom.ch>

When bonding is enabled, then enabling red_bonding too changes the
behavior from throughput bonding (round robin sending on interfaces) to
redundant bonding (sending every packet on all interfaces available for
bonding).

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
---
 bat_sysfs.c      |   10 ++++++++++
 soft-interface.c |    1 +
 types.h          |    1 +
 3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/bat_sysfs.c b/bat_sysfs.c
index e449bf6..3b8cf26 100644
--- a/bat_sysfs.c
+++ b/bat_sysfs.c
@@ -356,8 +356,17 @@ static ssize_t store_gw_bwidth(struct kobject *kobj, struct attribute *attr,
 	return gw_bandwidth_set(net_dev, buff, count);
 }
 
+static void print_bonding_notice(struct net_device *net_dev)
+{
+	bat_info(net_dev, "Redundant Bonding mode is currently not compatible "
+			"with batman-adv's link layer fragmentation and will "
+			"be ignored. Also make sure to activate general "
+			"bonding for redundant bonding to take effect.\n");
+}
+
 BAT_ATTR_BOOL(aggregated_ogms, S_IRUGO | S_IWUSR, NULL);
 BAT_ATTR_BOOL(bonding, S_IRUGO | S_IWUSR, NULL);
+BAT_ATTR_BOOL(red_bonding, S_IRUGO | S_IWUSR, print_bonding_notice);
 BAT_ATTR_BOOL(fragmentation, S_IRUGO | S_IWUSR, update_min_mtu);
 static BAT_ATTR(vis_mode, S_IRUGO | S_IWUSR, show_vis_mode, store_vis_mode);
 static BAT_ATTR(gw_mode, S_IRUGO | S_IWUSR, show_gw_mode, store_gw_mode);
@@ -374,6 +383,7 @@ BAT_ATTR_UINT(log_level, S_IRUGO | S_IWUSR, 0, 3, NULL);
 static struct bat_attribute *mesh_attrs[] = {
 	&bat_attr_aggregated_ogms,
 	&bat_attr_bonding,
+	&bat_attr_red_bonding,
 	&bat_attr_fragmentation,
 	&bat_attr_vis_mode,
 	&bat_attr_gw_mode,
diff --git a/soft-interface.c b/soft-interface.c
index 8224fdc..7f0e768 100644
--- a/soft-interface.c
+++ b/soft-interface.c
@@ -571,6 +571,7 @@ struct net_device *softif_create(char *name)
 
 	atomic_set(&bat_priv->aggregated_ogms, 1);
 	atomic_set(&bat_priv->bonding, 0);
+	atomic_set(&bat_priv->red_bonding, 0);
 	atomic_set(&bat_priv->vis_mode, VIS_TYPE_CLIENT_UPDATE);
 	atomic_set(&bat_priv->gw_mode, GW_MODE_OFF);
 	atomic_set(&bat_priv->gw_sel_class, 20);
diff --git a/types.h b/types.h
index 83445cf..0ce4b99 100644
--- a/types.h
+++ b/types.h
@@ -133,6 +133,7 @@ struct bat_priv {
 	struct net_device_stats stats;
 	atomic_t aggregated_ogms;	/* boolean */
 	atomic_t bonding;		/* boolean */
+	atomic_t red_bonding;		/* boolean */
 	atomic_t fragmentation;		/* boolean */
 	atomic_t vis_mode;		/* VIS_TYPE_* */
 	atomic_t gw_mode;		/* GW_MODE_* */
-- 
1.7.2.3


  parent reply	other threads:[~2011-03-02 17:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 17:18 [B.A.T.M.A.N.] Redundancy bonding mode patches, v2 Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 01/12] batman-adv: Remove unused hdr_size variable in route_unicast_packet() Linus Lüssing
2011-03-02 17:36   ` Marek Lindner
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 02/12] batman-adv: Add explicit batman header structure Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 03/12] batman-adv: Unify TTL handling Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 04/12] batman-adv: Make route_unicast_packet() packet_type independent Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 05/12] batman-adv: Use route_unicast_packet() for sending own unicast packets Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 06/12] batman-adv: Avoid redundant hash_find() call for " Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 07/12] batman-adv: Use packet lists for unicast packet sending Linus Lüssing
2011-03-03 13:17   ` Marek Lindner
2011-03-02 17:18 ` Linus Lüssing [this message]
2011-03-03  2:01   ` [B.A.T.M.A.N.] [PATCH 08/12] batman-adv: Add sysfs option for enabling redundant bonding mode Marek Lindner
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 09/12] batman-adv: Adding redundant bonding mode transmission Linus Lüssing
2011-03-03 13:48   ` Marek Lindner
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 10/12] batman-adv: Adding unicast_safe packet reception Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 11/12] batman-adv: Generic sequence number checking for data packets Linus Lüssing
2011-03-02 17:18 ` [B.A.T.M.A.N.] [PATCH 12/12] batman-adv: Add sequence number and duplicate checks for unicasts_safe Linus Lüssing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1299086321-25116-9-git-send-email-linus.luessing@ascom.ch \
    --to=linus.luessing@ascom.ch \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).