Commit f9d8a53784a53a528e2c180291874500e87d9c91
1 parent
85766a8200
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>
Showing 1 changed file with 9 additions and 6 deletions Side-by-side Diff
net/batman-adv/translation-table.c
... | ... | @@ -488,8 +488,9 @@ |
488 | 488 | goto out; |
489 | 489 | |
490 | 490 | seq_printf(seq, |
491 | - "Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n", | |
492 | - net_dev->name, (uint8_t)atomic_read(&bat_priv->tt.vn)); | |
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), | |
493 | + bat_priv->tt.local_crc); | |
493 | 494 | seq_printf(seq, " %-13s %-7s %-10s\n", "Client", "Flags", |
494 | 495 | "Last seen"); |
495 | 496 | |
496 | 497 | |
... | ... | @@ -986,10 +987,11 @@ |
986 | 987 | best_entry = batadv_transtable_best_orig(tt_global_entry); |
987 | 988 | if (best_entry) { |
988 | 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 | 992 | '*', tt_global_entry->common.addr, |
991 | 993 | best_entry->ttvn, best_entry->orig_node->orig, |
992 | - last_ttvn, | |
994 | + last_ttvn, best_entry->orig_node->tt_crc, | |
993 | 995 | (flags & BATADV_TT_CLIENT_ROAM ? 'R' : '.'), |
994 | 996 | (flags & BATADV_TT_CLIENT_WIFI ? 'W' : '.'), |
995 | 997 | (flags & BATADV_TT_CLIENT_TEMP ? 'T' : '.')); |
... | ... | @@ -1031,8 +1033,9 @@ |
1031 | 1033 | seq_printf(seq, |
1032 | 1034 | "Globally announced TT entries received via the mesh %s\n", |
1033 | 1035 | net_dev->name); |
1034 | - seq_printf(seq, " %-13s %s %-15s %s %s\n", | |
1035 | - "Client", "(TTVN)", "Originator", "(Curr TTVN)", "Flags"); | |
1036 | + seq_printf(seq, " %-13s %s %-15s %s (%-6s) %s\n", | |
1037 | + "Client", "(TTVN)", "Originator", "(Curr TTVN)", "CRC", | |
1038 | + "Flags"); | |
1036 | 1039 | |
1037 | 1040 | for (i = 0; i < hash->size; i++) { |
1038 | 1041 | head = &hash->table[i]; |