Evgeniy Polyakov wrote:
On Sat, Aug 06, 2005 at 09:37:00PM +0200, Patrick McHardy ([EMAIL PROTECTED]) 
wrote:

I'm working on extending netlink to work with an arbitary number
of groups and stumbled over this in the w1 driver:

       dev->groups = 23

       NETLINK_CB(skb).dst_group = dev->groups;
       netlink_broadcast(dev->nls, skb, 0, dev->groups, GFP_ATOMIC);

Apparently it wants to send to multiple groups at once, is that correct?
Why does it need to do so? One limitation introduced by my patches will
be that broadcasting to multiple groups won't be possible anymore and
this is the only code in the kernel that uses this feature of netlink.


23 was selected arbitrary - w1 definitely can live without multicast.

netlink_broadcast takes a mask of groups, 23 equal 10111, so it
tries to broadcasts to multiple groups. I suggest to change it
to 1.

According to complete removal of multicast feature - it is qiute
usefull, maybe it is better to make it per-socket.
And will not it break RTMGRP_* messages?

It won't be removed, just a change in functionality. To support
an arbitary number of groups we can't use bitmasks anymore, otherwise
we would still be limited by the size of skb->cb. So instead of using
masks we use group numbers. This means we can only send to a single
group using netlink_broadcast, which is fine for all current users.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to