From: Ben Greear <greearb@candelatech.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Daniel Lezcano <dlezcano@fr.ibm.com>,
Dmitry Mishin <dim@openvz.org>,
Linux Containers <containers@lists.osdl.org>
Subject: Re: [PATCH] net: Add etun driver
Date: Sat, 07 Apr 2007 00:31:01 -0700 [thread overview]
Message-ID: <461748B5.30904@candelatech.com> (raw)
In-Reply-To: <m1irc84uf4.fsf@ebiederm.dsl.xmission.com>
Eric W. Biederman wrote:
> Ben Greear <greearb@candelatech.com> writes:
>
>
>> I guess that will do, but then if you ever change the strings, any user-space
>> that is
>> depending on this will break or have to be modified with additional cruft. It
>> seems
>> cleaner to me to have an ioctl or a specific place in /proc or some other
>> virtual
>> fs, but I can deal with it either way...
>>
>
> True if the name of the driver changes from etun there is an issue.
>
So, how about a sysfs field for this too, something like 'is-etun' or
whatever...
Or, IOCTL works fine too, of course.
>
>>>> Also, how do you find the peer device from user-space? This would be very
>>>> useful
>>>> for anyone trying to manage these devices with a user-space program.
>>>>
>>>>
>>> Currently "ethtool -S <interface>"
>>> And read the partner_ifindex.
>>>
>>>
>> Ok, that will work. Again, my personal preference is for a single specific
>> ioctl or proc'ish file
>> to read the specific value instead of having to parse strings, but this will do.
>>
>
> Hmm. I guess there is string parsing to identify the index.
>
> I guess a sysfs device attribute would work as well.
>
Yes, that would be much appreciated.
>
>>> Further whoever generates the pair specifies the initial set of names.
>>>
>>>
>> Yeah, but you can't depend on knowing that in an interesting environment.
>>
>
> Frankly. In an interesting environment I haven't been able to think of a
> way to successfully say anything about the partner device.
>
> The problem is that all identifiers are namespace local so the remote side
> is not in the current namespace the ifindex or the device name mean nothing.
>
> In that case the only remotely usable value I can return is the mac address
> of the other side.
>
Couldn't you also show the peer's name-space id in that case?
MAC could be duplicated, so that's not a very good key.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
prev parent reply other threads:[~2007-04-07 7:31 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-06 20:43 [PATCH] net: Add etun driver Eric W. Biederman
2007-04-06 20:34 ` Stephen Hemminger
2007-04-06 21:38 ` Ben Greear
2007-04-06 20:54 ` Stephen Hemminger
2007-04-06 22:01 ` Ben Greear
2007-04-07 2:51 ` Eric W. Biederman
2007-04-09 16:37 ` Johannes Berg
2007-04-09 16:58 ` Patrick McHardy
2007-04-09 18:14 ` Ben Greear
2007-04-09 18:37 ` David Miller
2007-04-09 18:48 ` Ben Greear
2007-04-09 18:45 ` Patrick McHardy
2007-04-09 18:44 ` David Miller
2007-04-09 19:35 ` Eric W. Biederman
2007-04-09 19:48 ` Jeff Garzik
2007-04-09 20:03 ` Johannes Berg
2007-04-09 20:11 ` Patrick McHardy
2007-04-09 20:29 ` Johannes Berg
2007-04-10 0:06 ` Patrick McHardy
2007-04-10 5:47 ` Johannes Berg
2007-04-10 6:08 ` Eric W. Biederman
2007-04-10 6:18 ` Johannes Berg
2007-04-10 7:52 ` Patrick McHardy
2007-04-10 9:18 ` Johannes Berg
2007-04-10 9:52 ` Patrick McHardy
2007-04-10 10:27 ` Johannes Berg
2007-04-10 10:46 ` Patrick McHardy
2007-04-10 11:02 ` Johannes Berg
2007-04-10 11:09 ` Patrick McHardy
2007-04-10 11:16 ` Jeff Garzik
2007-04-10 11:24 ` Johannes Berg
2007-04-10 12:05 ` Patrick McHardy
2007-04-10 13:44 ` John W. Linville
2007-04-10 13:48 ` Johannes Berg
2007-04-10 21:16 ` Johannes Berg
2007-04-11 16:15 ` Patrick McHardy
2007-04-11 16:43 ` Johannes Berg
2007-04-11 16:52 ` Patrick McHardy
2007-04-11 16:59 ` Johannes Berg
2007-04-11 16:16 ` Stephen Hemminger
2007-04-06 20:57 ` Roland Dreier
2007-04-07 2:08 ` Eric W. Biederman
2007-04-06 21:20 ` Ben Greear
2007-04-07 2:06 ` Eric W. Biederman
2007-04-07 3:31 ` Ben Greear
2007-04-07 5:37 ` Eric W. Biederman
2007-04-07 7:31 ` Ben Greear [this message]
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=461748B5.30904@candelatech.com \
--to=greearb@candelatech.com \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=davem@davemloft.net \
--cc=dim@openvz.org \
--cc=dlezcano@fr.ibm.com \
--cc=ebiederm@xmission.com \
--cc=jgarzik@pobox.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
/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).