[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTineSDEEKY-9ve2maSBmPWBxkW5XmqnHlLtIOClx@mail.gmail.com>
Date: Fri, 16 Jul 2010 16:15:44 -0400
From: Chetan Loke <chetanloke@...il.com>
To: David Miller <davem@...emloft.net>
Cc: shemminger@...tta.com, Chetan.Loke@...scout.com,
bhutchings@...arflare.com, netdev@...r.kernel.org
Subject: Re: [RFC] Enhance dev_ioctl to return <hwaddr>:<if_name::if_index>
mapping
On Fri, Jul 16, 2010 at 4:04 PM, David Miller <davem@...emloft.net> wrote:
> From: Chetan Loke <chetanloke@...il.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?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists