b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Chichek hunt started! Verbose patch
Date: Sun, 25 Sep 2011 18:06:38 +0200	[thread overview]
Message-ID: <1316966798-9024-1-git-send-email-ordex@autistici.org> (raw)
In-Reply-To: <20110925160519.GA4631@ritirata.org>

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
 translation-table.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/translation-table.c b/translation-table.c
index 7de9960..e7bac85 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -258,9 +258,14 @@ int tt_changes_fill_buffer(struct bat_priv *bat_priv,
 	spin_lock_bh(&bat_priv->tt_changes_list_lock);
 	atomic_set(&bat_priv->tt_local_changes, 0);
 
+	printk("TT_BUG Preparing OGM buffer\n");
+
 	list_for_each_entry_safe(entry, safe, &bat_priv->tt_changes_list,
 			list) {
 		if (count < tot_changes) {
+			printk("TT_BUG Copying flags: 0x%x addr: %pM\n",
+					entry->change.flags,
+					entry->change.addr);
 			memcpy(buff + tt_len(count),
 			       &entry->change, sizeof(struct tt_change));
 			count++;
@@ -270,6 +275,8 @@ int tt_changes_fill_buffer(struct bat_priv *bat_priv,
 	}
 	spin_unlock_bh(&bat_priv->tt_changes_list_lock);
 
+	printk("TT_BUG Copied %d addresses\n", count);
+
 	/* Keep the buffer for possible tt_request */
 	spin_lock_bh(&bat_priv->tt_buff_lock);
 	kfree(bat_priv->tt_buff);
@@ -1407,7 +1414,11 @@ static void _tt_update_changes(struct bat_priv *bat_priv,
 {
 	int i;
 
+	printk("TT_BUG Received %d changes\n", tt_num_changes);
+
 	for (i = 0; i < tt_num_changes; i++) {
+		printk("TT_BUG flags: 0x%x %pM\n", (tt_change + i)->flags,
+				(tt_change + i)->addr);
 		if ((tt_change + i)->flags & TT_CLIENT_DEL)
 			tt_global_del(bat_priv, orig_node,
 				      (tt_change + i)->addr,
@@ -1505,12 +1516,16 @@ void handle_tt_response(struct bat_priv *bat_priv,
 	if (!orig_node)
 		goto out;
 
-	if (tt_response->flags & TT_FULL_TABLE)
+	if (tt_response->flags & TT_FULL_TABLE) {
+		printk("TT_BUG Got full table on response\n");
 		tt_fill_gtable(bat_priv, tt_response);
-	else
+	}
+	else{
+		printk("TT_BUG Got diff\n");
 		tt_update_changes(bat_priv, orig_node, tt_response->tt_data,
 				  tt_response->ttvn,
 				  (struct tt_change *)(tt_response + 1));
+	}
 
 	/* Delete the tt_req_node from pending tt_requests list */
 	spin_lock_bh(&bat_priv->tt_req_list_lock);
-- 
1.7.3.4


  reply	other threads:[~2011-09-25 16:06 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-30 22:53 [B.A.T.M.A.N.] batman-adv 2011.2.0 hop somtimes does not work Tobias
2011-08-30 23:07 ` clownix
2011-08-31  9:55 ` Marek Lindner
2011-08-31 15:57   ` wayne abroue
2011-08-31 16:07     ` Antonio Quartulli
2011-08-31 16:16       ` Marek Lindner
2011-08-31 16:18         ` Antonio Quartulli
2011-08-31 17:05           ` Tobias
2011-08-31 21:55             ` Antonio Quartulli
2011-08-31 22:14               ` Javier Cardona
2011-09-01  8:15               ` Tobias
2011-09-01 15:55                 ` Antonio Quartulli
2011-09-01 21:11                   ` Tobias
2011-09-01 21:35                     ` Antonio Quartulli
2011-09-01 22:45                       ` Tobias
2011-09-05  8:06                         ` Marek Lindner
2011-09-06  9:06                           ` Tobias
2011-09-06 18:33                             ` Marek Lindner
2011-09-07  8:00                               ` Tobias
2011-09-13 11:18                                 ` Marek Lindner
2011-09-13 12:09                                   ` Andrew Lunn
2011-09-14 20:54                                   ` Tobias
2011-09-19 22:45                                     ` Antonio Quartulli
     [not found]                                       ` <4E7ED5D3.2000600@wifibot.com>
     [not found]                                         ` <20110925073942.GA2993@ritirata.org>
     [not found]                                           ` <4E7EE7A9.7010309@wifibot.com>
2011-09-25 16:05                                             ` Antonio Quartulli
2011-09-25 16:06                                               ` Antonio Quartulli [this message]
2011-08-31 16:44     ` Tobias
2011-08-31 16:54       ` wayne abroue
2011-08-31 16:36 ` Tobias
2011-10-19 13:36 ` Antonio Quartulli
2011-09-26 21:14 laurent
2011-09-26 22:49 ` [B.A.T.M.A.N.] [PATCH] batman-adv: Chichek hunt started! Verbose patch Antonio Quartulli
     [not found] <1317110464-7089-1-git-send-email-ordex@autistici.org>
2011-09-27 21:15 ` laurent
2011-09-27 21:42   ` laurent
2011-09-29 13:56     ` Antonio Quartulli

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=1316966798-9024-1-git-send-email-ordex@autistici.org \
    --to=ordex@autistici.org \
    --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).