On Sat, Aug 13, 2005 at 02:35:53AM +0200, Patrick McHardy ([EMAIL PROTECTED]) 
wrote:
> Hi,
> 
> besides a small bugfix, this patchset adds support for dynamic number
> of groups to netlink. To support an arbitary number of groups a couple
> of changes had to me made, I'll explain them below. The patches are
> only sent to netdev to avoid spamming your inboxes.
> 
> The destination groups of a packet are currently stored in the cb as a
> bitmask. To avoid beeing limited by the size of the cb, support for
> broadcasting to multiple groups using a single call to netlink_broadcast
> is removed and only a single destination group is supported. which is
> stored as an integer in the cb. No users in the kernel used more than a
> single destination group.
> 
> The subscribed groups bitmask in struct netlink_sock is only 32 bit
> wide, it is changed to be dynamically allocated. Currently binding to
> a group is possible before a kernel socket for a protocol exists.
> To avoid guessing the group number and dealing with reallocations this
> is changed and sockets for a protocol can only be created when a
> kernel socket exists. Herbert and Thomas agreed that pure userspace
> communication is not a good idea with current netlink and the change
> should be ok.
> 
> For compatibility, userspace can still subscribe to the lower 32 groups
> using bind and see which groups a socket is subscribed to using
> getsockname, to subscribe/unsubscribe groups in the extended range two
> setsockopt options are provided. struct nl_addr can only contain up to
> 32 groups, to get the destination group of a packet for the extended
> range a nl_pktinfo control message can be enabled using another
> setsockopt option.
> 
> 
> [NETLINK]: Fix module refcounting problems
> [NETLINK]: Remove unused groups member from struct netlink_skb_parms
> [NETLINK]: Use group numbers instead of bitmasks internally
> [NETLINK]: Convert netlink users to use group numbers instead of bitmasks
> [NETLINK]: Return -EPROTONOSUPPORT in netlink_create() if no kernel 
> socket is registered
> [NETLINK]: Support dynamic number of multicast groups per netlink family
> [NETLINK]: Add set/getsockopt options to support more than 32 groups
> [NETLINK]: Add "groups" argument to netlink_kernel_create

You've done a good job, thanks Patrick.

One small comment after diagonal patchset review - 
last patch will fail to apply on top of w1 changes :)
since it already has a group changes to 1.

-- 
        Evgeniy Polyakov
-
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