Commit d7b2a97e authored by Marek Lindner's avatar Marek Lindner Committed by Antonio Quartulli

batman-adv: rename last_valid to last_seen

Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
Acked-by: default avatarSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
parent c3e29312
...@@ -651,7 +651,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv, ...@@ -651,7 +651,7 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
rcu_read_unlock(); rcu_read_unlock();
orig_node->flags = batman_ogm_packet->flags; orig_node->flags = batman_ogm_packet->flags;
neigh_node->last_valid = jiffies; neigh_node->last_seen = jiffies;
spin_lock_bh(&neigh_node->tq_lock); spin_lock_bh(&neigh_node->tq_lock);
ring_buffer_set(neigh_node->tq_recv, ring_buffer_set(neigh_node->tq_recv,
...@@ -772,11 +772,11 @@ static int bat_iv_ogm_calc_tq(struct orig_node *orig_node, ...@@ -772,11 +772,11 @@ static int bat_iv_ogm_calc_tq(struct orig_node *orig_node,
if (!neigh_node) if (!neigh_node)
goto out; goto out;
/* if orig_node is direct neighbor update neigh_node last_valid */ /* if orig_node is direct neighbor update neigh_node last_seen */
if (orig_node == orig_neigh_node) if (orig_node == orig_neigh_node)
neigh_node->last_valid = jiffies; neigh_node->last_seen = jiffies;
orig_node->last_valid = jiffies; orig_node->last_seen = jiffies;
/* find packet count of corresponding one hop neighbor */ /* find packet count of corresponding one hop neighbor */
spin_lock_bh(&orig_node->ogm_cnt_lock); spin_lock_bh(&orig_node->ogm_cnt_lock);
......
...@@ -283,7 +283,7 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv, ...@@ -283,7 +283,7 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
hlist_for_each_entry_safe(neigh_node, node, node_tmp, hlist_for_each_entry_safe(neigh_node, node, node_tmp,
&orig_node->neigh_list, list) { &orig_node->neigh_list, list) {
if ((has_timed_out(neigh_node->last_valid, PURGE_TIMEOUT)) || if ((has_timed_out(neigh_node->last_seen, PURGE_TIMEOUT)) ||
(neigh_node->if_incoming->if_status == IF_INACTIVE) || (neigh_node->if_incoming->if_status == IF_INACTIVE) ||
(neigh_node->if_incoming->if_status == IF_NOT_IN_USE) || (neigh_node->if_incoming->if_status == IF_NOT_IN_USE) ||
(neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) { (neigh_node->if_incoming->if_status == IF_TO_BE_REMOVED)) {
...@@ -300,9 +300,9 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv, ...@@ -300,9 +300,9 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
neigh_node->if_incoming->net_dev->name); neigh_node->if_incoming->net_dev->name);
else else
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"neighbor timeout: originator %pM, neighbor: %pM, last_valid: %lu\n", "neighbor timeout: originator %pM, neighbor: %pM, last_seen: %lu\n",
orig_node->orig, neigh_node->addr, orig_node->orig, neigh_node->addr,
(neigh_node->last_valid / HZ)); (neigh_node->last_seen / HZ));
neigh_purged = true; neigh_purged = true;
...@@ -325,10 +325,10 @@ static bool purge_orig_node(struct bat_priv *bat_priv, ...@@ -325,10 +325,10 @@ static bool purge_orig_node(struct bat_priv *bat_priv,
{ {
struct neigh_node *best_neigh_node; struct neigh_node *best_neigh_node;
if (has_timed_out(orig_node->last_valid, 2 * PURGE_TIMEOUT)) { if (has_timed_out(orig_node->last_seen, 2 * PURGE_TIMEOUT)) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Originator timeout: originator %pM, last_valid %lu\n", "Originator timeout: originator %pM, last_seen %lu\n",
orig_node->orig, (orig_node->last_valid / HZ)); orig_node->orig, (orig_node->last_seen / HZ));
return true; return true;
} else { } else {
if (purge_orig_neighbors(bat_priv, orig_node, if (purge_orig_neighbors(bat_priv, orig_node,
...@@ -446,9 +446,9 @@ int orig_seq_print_text(struct seq_file *seq, void *offset) ...@@ -446,9 +446,9 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
goto next; goto next;
last_seen_secs = jiffies_to_msecs(jiffies - last_seen_secs = jiffies_to_msecs(jiffies -
orig_node->last_valid) / 1000; orig_node->last_seen) / 1000;
last_seen_msecs = jiffies_to_msecs(jiffies - last_seen_msecs = jiffies_to_msecs(jiffies -
orig_node->last_valid) % 1000; orig_node->last_seen) % 1000;
seq_printf(seq, "%pM %4i.%03is (%3i) %pM [%10s]:", seq_printf(seq, "%pM %4i.%03is (%3i) %pM [%10s]:",
orig_node->orig, last_seen_secs, orig_node->orig, last_seen_secs,
......
...@@ -52,7 +52,7 @@ struct hard_iface { ...@@ -52,7 +52,7 @@ struct hard_iface {
/** /**
* orig_node - structure for orig_list maintaining nodes of mesh * orig_node - structure for orig_list maintaining nodes of mesh
* @primary_addr: hosts primary interface address * @primary_addr: hosts primary interface address
* @last_valid: when last packet from this node was received * @last_seen: when last packet from this node was received
* @bcast_seqno_reset: time when the broadcast seqno window was reset * @bcast_seqno_reset: time when the broadcast seqno window was reset
* @batman_seqno_reset: time when the batman seqno window was reset * @batman_seqno_reset: time when the batman seqno window was reset
* @gw_flags: flags related to gateway class * @gw_flags: flags related to gateway class
...@@ -70,7 +70,7 @@ struct orig_node { ...@@ -70,7 +70,7 @@ struct orig_node {
struct neigh_node __rcu *router; /* rcu protected pointer */ struct neigh_node __rcu *router; /* rcu protected pointer */
unsigned long *bcast_own; unsigned long *bcast_own;
uint8_t *bcast_own_sum; uint8_t *bcast_own_sum;
unsigned long last_valid; unsigned long last_seen;
unsigned long bcast_seqno_reset; unsigned long bcast_seqno_reset;
unsigned long batman_seqno_reset; unsigned long batman_seqno_reset;
uint8_t gw_flags; uint8_t gw_flags;
...@@ -120,7 +120,7 @@ struct gw_node { ...@@ -120,7 +120,7 @@ struct gw_node {
/** /**
* neigh_node * neigh_node
* @last_valid: when last packet via this neighbor was received * @last_seen: when last packet via this neighbor was received
*/ */
struct neigh_node { struct neigh_node {
struct hlist_node list; struct hlist_node list;
...@@ -131,7 +131,7 @@ struct neigh_node { ...@@ -131,7 +131,7 @@ struct neigh_node {
uint8_t tq_avg; uint8_t tq_avg;
uint8_t last_ttl; uint8_t last_ttl;
struct list_head bonding_list; struct list_head bonding_list;
unsigned long last_valid; unsigned long last_seen;
DECLARE_BITMAP(real_bits, TQ_LOCAL_WINDOW_SIZE); DECLARE_BITMAP(real_bits, TQ_LOCAL_WINDOW_SIZE);
atomic_t refcount; atomic_t refcount;
struct rcu_head rcu; struct rcu_head rcu;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment