From: Chetan Loke <chetanloke@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@vyatta.com, Chetan.Loke@netscout.com,
bhutchings@solarflare.com, netdev@vger.kernel.org
Subject: Re: [RFC] Enhance dev_ioctl to return <hwaddr>:<if_name::if_index> mapping
Date: Fri, 16 Jul 2010 16:15:44 -0400 [thread overview]
Message-ID: <AANLkTineSDEEKY-9ve2maSBmPWBxkW5XmqnHlLtIOClx@mail.gmail.com> (raw)
In-Reply-To: <20100716.130445.149851386.davem@davemloft.net>
On Fri, Jul 16, 2010 at 4:04 PM, David Miller <davem@davemloft.net> wrote:
> From: Chetan Loke <chetanloke@gmail.com>
> Date: Fri, 16 Jul 2010 16:02:23 -0400
>
>> So all user space apps should replicate code when all of that can be
>> replaced at the cost of a single for-loop in a non fast-path code
>> within the kernel?
>
> When there is a way to do something already, we don't add "yet another"
> way to do it. The kernel already suffers from API masterbation as-is.
>
Ok, what if, i) ifindex == 0 in the call to SIOCGIFINDEX or ii) if the
ifindex is not found ? May be then in the else clause we could search
using the hw-addr before bailing out ;)? This way we can avoid adding
a new API. Still not a good idea?
next prev parent reply other threads:[~2010-07-16 20:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 13:18 [RFC] Enhance dev_ioctl to return <hwaddr>:<if_name::if_index> mapping Chetan Loke
2010-07-16 17:10 ` Ben Hutchings
2010-07-16 18:04 ` Stephen Hemminger
2010-07-16 18:12 ` Loke, Chetan
2010-07-16 18:31 ` Stephen Hemminger
2010-07-16 19:29 ` Chetan Loke
2010-07-16 19:33 ` David Miller
2010-07-16 19:35 ` Chetan Loke
2010-07-16 19:40 ` David Miller
2010-07-16 20:02 ` Chetan Loke
2010-07-16 20:04 ` David Miller
2010-07-16 20:15 ` Chetan Loke [this message]
2010-07-16 20:18 ` David Miller
2010-07-16 20:49 ` Loke, Chetan
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=AANLkTineSDEEKY-9ve2maSBmPWBxkW5XmqnHlLtIOClx@mail.gmail.com \
--to=chetanloke@gmail.com \
--cc=Chetan.Loke@netscout.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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;
as well as URLs for NNTP newsgroup(s).