On Friday, February 10, 2012 07:41:37 Antonio Quartulli wrote:
> +static inline void bat_dbg_arp(struct bat_priv *bat_priv,
> + struct sk_buff *skb, uint16_t type) {
> + char buf[30];
> + const char *type_str[] = { "REQUEST", "REPLY", "RREQUEST",
> "RREPLY", + "InREQUEST", "InREPLY",
> "NAK" }; +
> + if (type >= 1 && type <= ARRAY_SIZE(type_str))
> + scnprintf(buf, sizeof(buf), "%s", type_str[type - 1]);
> + else
> + scnprintf(buf, sizeof(buf), "UNKNOWN (%hu)", type);
> +
> + bat_dbg(DBG_ARP, bat_priv, "ARP message of type %s recognised "
> + "[src: %pM-%pI4 dst: %pM-%pI4]\n", buf, ARP_HW_SRC(skb),
> + &ARP_IP_SRC(skb), ARP_HW_DST(skb), &ARP_IP_DST(skb));
> +}
Every time this fucntion is called an additional bat_dgb() call is made
directly before that (as far as I can tell). Wouldn't it make sense to include
this extra message as parameter to bat_dbg_arp() ?
Regards,
Marek