On Tuesday 15 July 2014 04:38:17 Linus Lüssing wrote:
/**
- batadv_mcast_get_bridge - get the bridge on top of the softif if it exists
- @soft_iface: netdev struct of the mesh interface
- Returns either a bridge interface on top of our soft interface or
- NULL if no such bridge exists.
- */
The kernel doc should mention that the bridge object's refcount is increased (if found).
+update: if (!bat_priv->mcast.enabled || mcast_data.flags != bat_priv->mcast.flags) {
if (!bat_priv->mcast.enabled)
sprintf(str_flags_old, "<undefined>");
else
sprintf(str_flags_old, "[%c%c%c]",
(bat_priv->mcast.flags &
BATADV_MCAST_WANT_ALL_UNSNOOPABLES ?
'U' : '.'),
(bat_priv->mcast.flags &
BATADV_MCAST_WANT_ALL_IPV4 ? '4' : '.'),
(bat_priv->mcast.flags &
BATADV_MCAST_WANT_ALL_IPV6 ? '6' : '.'));
sprintf(str_flags_new, "[%c%c%c]",
(mcast_data.flags &
BATADV_MCAST_WANT_ALL_UNSNOOPABLES ? 'U' : '.'),
(mcast_data.flags &
BATADV_MCAST_WANT_ALL_IPV4 ? '4' : '.'),
(mcast_data.flags &
BATADV_MCAST_WANT_ALL_IPV6 ? '6' : '.'));
batadv_dbg(BATADV_DBG_MCAST, bat_priv,
"Changing multicast flags from '%s' to '%s'\n",
str_flags_old, str_flags_new);
IMHO the debug log should be more verbose about why a given flag was enabled or disabled. As it is now, one can't learn anything from this log that isn't already part of the mcast table. If you think that is too big of a change you can also move this chunk into a separate patch.
Cheers, Marek