diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-11-19 03:01:42 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-01-12 05:58:20 -0500 |
commit | f9d8a53784a53a528e2c180291874500e87d9c91 (patch) | |
tree | 176ef6cdb2d5751febcbf605b549604fe5cb5869 /net/batman-adv | |
parent | 85766a82003ec5ecc35403e855c47ce69c4658fc (diff) |
batman-adv: print the CRC together with the translation tables
To simplify debugging operations, it is better to print the related
CRC together with the translation table (local CRC for the local
table and global CRC for each entry in the global table)
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/translation-table.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 426a3ae47788..408807eb9df3 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -488,8 +488,9 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset) | |||
488 | goto out; | 488 | goto out; |
489 | 489 | ||
490 | seq_printf(seq, | 490 | seq_printf(seq, |
491 | "Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n", | 491 | "Locally retrieved addresses (from %s) announced via TT (TTVN: %u CRC: %#.4x):\n", |
492 | net_dev->name, (uint8_t)atomic_read(&bat_priv->tt.vn)); | 492 | net_dev->name, (uint8_t)atomic_read(&bat_priv->tt.vn), |
493 | bat_priv->tt.local_crc); | ||
493 | seq_printf(seq, " %-13s %-7s %-10s\n", "Client", "Flags", | 494 | seq_printf(seq, " %-13s %-7s %-10s\n", "Client", "Flags", |
494 | "Last seen"); | 495 | "Last seen"); |
495 | 496 | ||
@@ -986,10 +987,11 @@ batadv_tt_global_print_entry(struct batadv_tt_global_entry *tt_global_entry, | |||
986 | best_entry = batadv_transtable_best_orig(tt_global_entry); | 987 | best_entry = batadv_transtable_best_orig(tt_global_entry); |
987 | if (best_entry) { | 988 | if (best_entry) { |
988 | last_ttvn = atomic_read(&best_entry->orig_node->last_ttvn); | 989 | last_ttvn = atomic_read(&best_entry->orig_node->last_ttvn); |
989 | seq_printf(seq, " %c %pM (%3u) via %pM (%3u) [%c%c%c]\n", | 990 | seq_printf(seq, |
991 | " %c %pM (%3u) via %pM (%3u) (%#.4x) [%c%c%c]\n", | ||
990 | '*', tt_global_entry->common.addr, | 992 | '*', tt_global_entry->common.addr, |
991 | best_entry->ttvn, best_entry->orig_node->orig, | 993 | best_entry->ttvn, best_entry->orig_node->orig, |
992 | last_ttvn, | 994 | last_ttvn, best_entry->orig_node->tt_crc, |
993 | (flags & BATADV_TT_CLIENT_ROAM ? 'R' : '.'), | 995 | (flags & BATADV_TT_CLIENT_ROAM ? 'R' : '.'), |
994 | (flags & BATADV_TT_CLIENT_WIFI ? 'W' : '.'), | 996 | (flags & BATADV_TT_CLIENT_WIFI ? 'W' : '.'), |
995 | (flags & BATADV_TT_CLIENT_TEMP ? 'T' : '.')); | 997 | (flags & BATADV_TT_CLIENT_TEMP ? 'T' : '.')); |
@@ -1031,8 +1033,9 @@ int batadv_tt_global_seq_print_text(struct seq_file *seq, void *offset) | |||
1031 | seq_printf(seq, | 1033 | seq_printf(seq, |
1032 | "Globally announced TT entries received via the mesh %s\n", | 1034 | "Globally announced TT entries received via the mesh %s\n", |
1033 | net_dev->name); | 1035 | net_dev->name); |
1034 | seq_printf(seq, " %-13s %s %-15s %s %s\n", | 1036 | seq_printf(seq, " %-13s %s %-15s %s (%-6s) %s\n", |
1035 | "Client", "(TTVN)", "Originator", "(Curr TTVN)", "Flags"); | 1037 | "Client", "(TTVN)", "Originator", "(Curr TTVN)", "CRC", |
1038 | "Flags"); | ||
1036 | 1039 | ||
1037 | for (i = 0; i < hash->size; i++) { | 1040 | for (i = 0; i < hash->size; i++) { |
1038 | head = &hash->table[i]; | 1041 | head = &hash->table[i]; |