public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: jamal <hadi@cyberus.ca>
To: Vlad Dogaru <ddvlad@rosedu.org>
Cc: netdev@vger.kernel.org, Octavian Purdila <opurdila@ixiacom.com>
Subject: Re: [PATCH 3/3] netlink: support setting devgroup parameters
Date: Mon, 10 Jan 2011 08:14:33 -0500	[thread overview]
Message-ID: <1294665273.6063.292.camel@mojatatu> (raw)
In-Reply-To: <1294659524-22509-4-git-send-email-ddvlad@rosedu.org>


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;
       }


cheers,
jamal

On Mon, 2011-01-10 at 13:38 +0200, Vlad Dogaru wrote:
> Add a new type of message, IFLA_FILTERGROUP, which, if present in a
> userspace request, specifies that parameters should be changed for all
> devices in the group.
> 



  reply	other threads:[~2011-01-10 13:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 11:38 [PATCH 0/3] net: add device groups Vlad Dogaru
2011-01-10 11:38 ` [PATCH 1/3] net_device: add support for network " Vlad Dogaru
2011-01-10 11:38 ` [PATCH 2/3] net/dummy: add device group parameter Vlad Dogaru
2011-01-10 21:37   ` David Miller
2011-01-11 12:17     ` Vlad Dogaru
2011-01-10 11:38 ` [PATCH 3/3] netlink: support setting devgroup parameters Vlad Dogaru
2011-01-10 13:14   ` jamal [this message]
2011-01-11 12:13     ` Vlad Dogaru
2011-01-11 12:40       ` jamal
2011-01-10 13:41 ` [PATCH 0/3] net: add device groups Johannes Berg
2011-01-10 14:00   ` jamal
2011-01-10 14:08     ` Johannes Berg
2011-01-10 14:24       ` jamal
2011-01-10 14:38         ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1294665273.6063.292.camel@mojatatu \
    --to=hadi@cyberus.ca \
    --cc=ddvlad@rosedu.org \
    --cc=netdev@vger.kernel.org \
    --cc=opurdila@ixiacom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox