From: Antonio Quartulli Date: Sat, 25 Aug 2012 23:05:56 +0000 (+0200) Subject: batman-adv: print packets re-routing on DBG_TT and ratelimit it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60c39c7584e1bb69cdce4e0a9ee1e78ba09c82b9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git batman-adv: print packets re-routing on DBG_TT and ratelimit it To simplify TranslationTable debugging it is better to print the packet rerouting message on the DBG_TT log level. In this way a developer interested in packets rerouting doesn't need to filter it out of the whole ROUTES log. Moreover, since this message will appear for each rerouted message, it is now "ratelimited". Signed-off-by: Antonio Quartulli --- diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index 1ac072d7409e..456a0a9f8831 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c @@ -965,10 +965,10 @@ static int batadv_check_unicast_ttvn(struct batadv_priv *bat_priv, batadv_orig_node_free_ref(orig_node); } - batadv_dbg(BATADV_DBG_ROUTES, bat_priv, - "TTVN mismatch (old_ttvn %u new_ttvn %u)! Rerouting unicast packet (for %pM) to %pM\n", - unicast_packet->ttvn, curr_ttvn, ethhdr->h_dest, - unicast_packet->dest); + net_ratelimited_function(batadv_dbg, BATADV_DBG_TT, bat_priv, + "TTVN mismatch (old_ttvn %u new_ttvn %u)! Rerouting unicast packet (for %pM) to %pM\n", + unicast_packet->ttvn, curr_ttvn, + ethhdr->h_dest, unicast_packet->dest); unicast_packet->ttvn = curr_ttvn; }