Thread (14 messages) 14 messages, 4 authors, 2011-01-11

Re: [PATCH 3/3] netlink: support setting devgroup parameters

flat view

From: Vlad Dogaru <hidden>
Date: 2011-01-11 12:15:03

On Mon, Jan 10, 2011 at 08:14:33AM -0500, jamal wrote:
Nice - short and sweet.

IMO: I dont think you need this new attribute, IFLA_GROUP
should suffice...
You can use the trick that if a <=0 ifindex is specified,
and no name is passed but a GROUP is passed, then we
operate on the group i.e something like:

        if (ifm->ifi_index > 0)
                dev = __dev_get_by_index(net, ifm->ifi_index);
        else {
                if (tb[IFLA_IFNAME])
                     dev = __dev_get_by_name(net, ifname);
                else if (tb[IFLA_GROUP])
                     new/get/set/del specific stuff..
                else
                   return -EINVAL;
       }
That sounds like a good idea, but, by using the same attribute,
userspace won't be able to change the group of all the interfaces in a
group, i.e. no more
	ip l set group 1 devgroup 0

However, I'm not sure that the use case above would be very common.

Vlad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help