Skip to content

Commit

Permalink
batman-adv: remove bonding and interface alternating
Browse files Browse the repository at this point in the history
Remove bonding and interface alternating code - it will be replaced
by a new, network-wide multi interface optimization which enables
both bonding and interface alternating in a better way.

Keep the sysfs and find router function though, this will be needed
later.

Signed-off-by: Simon Wunderlich <[email protected]>
Signed-off-by: Marek Lindner <[email protected]>
Signed-off-by: Antonio Quartulli <[email protected]>
  • Loading branch information
Simon Wunderlich authored and ordex committed Jan 12, 2014
1 parent f9577a3 commit f6c8b71
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 327 deletions.
5 changes: 0 additions & 5 deletions net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,6 @@ batadv_iv_ogm_orig_update(struct batadv_priv *bat_priv,
neigh_node->last_ttl = batadv_ogm_packet->ttl;
}

batadv_bonding_candidate_add(bat_priv, orig_node, neigh_node);

/* if this neighbor already is our next hop there is nothing
* to change
*/
Expand Down Expand Up @@ -1424,9 +1422,6 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr,
is_bidirect = batadv_iv_ogm_calc_tq(orig_node, orig_neigh_node,
batadv_ogm_packet, if_incoming);

batadv_bonding_save_primary(orig_node, orig_neigh_node,
batadv_ogm_packet);

/* update ranking if it is not a duplicate or has the same
* seqno and similar ttl as the non-duplicate
*/
Expand Down
15 changes: 1 addition & 14 deletions net/batman-adv/originator.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
neigh_node->if_incoming = hard_iface;
neigh_node->orig_node = orig_node;

INIT_LIST_HEAD(&neigh_node->bonding_list);

/* extra reference for return */
atomic_set(&neigh_node->refcount, 2);

Expand All @@ -208,20 +206,13 @@ batadv_neigh_node_new(struct batadv_hard_iface *hard_iface,
static void batadv_orig_node_free_rcu(struct rcu_head *rcu)
{
struct hlist_node *node_tmp;
struct batadv_neigh_node *neigh_node, *tmp_neigh_node;
struct batadv_neigh_node *neigh_node;
struct batadv_orig_node *orig_node;

orig_node = container_of(rcu, struct batadv_orig_node, rcu);

spin_lock_bh(&orig_node->neigh_list_lock);

/* for all bonding members ... */
list_for_each_entry_safe(neigh_node, tmp_neigh_node,
&orig_node->bond_list, bonding_list) {
list_del_rcu(&neigh_node->bonding_list);
batadv_neigh_node_free_ref(neigh_node);
}

/* for all neighbors towards this originator ... */
hlist_for_each_entry_safe(neigh_node, node_tmp,
&orig_node->neigh_list, list) {
Expand Down Expand Up @@ -325,7 +316,6 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
return NULL;

INIT_HLIST_HEAD(&orig_node->neigh_list);
INIT_LIST_HEAD(&orig_node->bond_list);
INIT_LIST_HEAD(&orig_node->vlan_list);
spin_lock_init(&orig_node->bcast_seqno_lock);
spin_lock_init(&orig_node->neigh_list_lock);
Expand All @@ -350,8 +340,6 @@ struct batadv_orig_node *batadv_orig_node_new(struct batadv_priv *bat_priv,
orig_node->bcast_seqno_reset = reset_time;
orig_node->batman_seqno_reset = reset_time;

atomic_set(&orig_node->bond_candidates, 0);

/* create a vlan object for the "untagged" LAN */
vlan = batadv_orig_node_vlan_new(orig_node, BATADV_NO_FLAGS);
if (!vlan)
Expand Down Expand Up @@ -416,7 +404,6 @@ batadv_purge_orig_neighbors(struct batadv_priv *bat_priv,
neigh_purged = true;

hlist_del_rcu(&neigh_node->list);
batadv_bonding_candidate_del(orig_node, neigh_node);
batadv_neigh_node_free_ref(neigh_node);
} else {
/* store the best_neighbour if this is the first
Expand Down
Loading

0 comments on commit f6c8b71

Please sign in to comment.